|
|
| Author |
Message |
vjai6977
New User
Joined: 08 Aug 2008 Posts: 16 Location: Chennai
|
|
|
|
Hi All,
I am using the following JCL to remove the duplicates.
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=TST01.TUSER.INFILE
//SORTOUT DD DSN= TST01.TUSER.OUTFILE,
// UNIT=DISK,DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=133,BLKSIZE=0),
// SPACE=(CYL,(1,5),RLSE)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,100)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,100)
//SYSIN DD *
SORT FIELDS=(10,25,A),FORMAT=CH
INCLUDE COND=(3,5,CH,EQ,C'TSTIN')
SUM FIELDS=NONE
/*
SortIn / SortOut file definition’s for the above JCL:
Organization . . . : PS
Record format . . . : FB
Record length . . . : 133
Block size . . . . : 27930
ON THE BELOW EXAMPLES THE EACH ASTRIC ‘*’ IS A BLANK SPACE. JUST FOR READABILITY I HAD PUT IT DOWN.
Input file:
123456789012345678901234567890123456789012345678901234567890
__3___7__0_________0_________0____5______________________133
**TSTIN**TEST01.FEED.FILE(-1)
**TSTIN**TEST01.FEED.FILE(-8)
**TSTIN**TEST01.FEED.FILE(0)
**TSTIN**TEST01.FEED.FILE(-4)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT2.FILE(-1)
Required Output:
123456789012345678901234567890123456789012345678901234567890
__3___7__0_________0_________0____5______________________133
**TSTIN**TEST01.FEED.FILE(-4)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT2.FILE(-1)
As according to the sysin parameters supplied on the above JCL the syncsort considers the version limit like (-1), (-8) etc., after every dataset and the present output file looks like below.
123456789012345678901234567890123456789012345678901234567890
__3___7__0_________0_________0____5______________________133
**TSTIN**TEST01.FEED.FILE(-1)
**TSTIN**TEST01.FEED.FILE(-8)
**TSTIN**TEST01.FEED.FILE(0)
**TSTIN**TEST01.FEED.FILE(-4)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT2.FILE(-1)
But the first 4 records has a redundant datasets, irrespective of the different values in ‘()’. My requirement is sort the input file for all rows between columns 10+25, for each column position, the sort should consider the text before '(' only.
This way i can exclude redundant datasets. I welcome any suggestions.
Regards,
Jai |
|
| Back to top |
|
 |
References
|
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 800 Location: Chennai, India
|
|
| Back to top |
|
 |
Sambhaji Warnings : 1 Active User
Joined: 16 Feb 2007 Posts: 267 Location: Pune, India
|
|
|
|
| Quote: |
If you have Syncsort for z/OS Release 1.3 ,
|
Hi Arun, am not aware of but is PARSE is available for Syncsort you mentioned as PARSE doesnt work on Syncsort i have  |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 800 Location: Chennai, India
|
|
|
|
Hello,
PARSE will definitely work if you have Syncsort for z/OS Release 1.3 which is the latest release of Syncsort.
Thanks,
Arun |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 172 Location: Chennai
|
|
|
|
HI,
The following sort card will give u solution. And i assumed that maximum length of file name including '**TSTIN**' is 50. U can change as ur requirement.
| Code: |
//JSTP0010 EXEC PGM=SORT
//SORTIN DD DSN=DEV2.RK.TEST(@@CASE),
// DISP=SHR
//SORTOUT DD DSN=DEV2.RK.TEST(@@CASE1),
// DISP=SHR
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,20)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
INCLUDE COND=(3,5,CH,EQ,C'TSTIN')
INREC PARSE=(%01=(ENDBEFR=C'(',FIXLEN=50)),
BUILD=(%01)
SORT FIELDS=(1,20,CH,A)
SUM FIELDS=NONE
//*
|
Input file:
| Code: |
**TSTIN**TEST01.FEED.FILE(-1)
**TSTIN**TEST01.FEED.FILE(-8)
**TSTIN**TEST01.FEED.FILE(0)
**TSTIN**TEST01.FEED.FILE(-4)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT2.FILE(-1)
|
Output file:
| Code: |
**TSTIN**TEST01.FEED.FILE
**TSTIN**TEST01.OUT1.FILE001
**TSTIN**TEST01.OUT2.FILE
|
Regards
R KARTHIK |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 172 Location: Chennai
|
|
|
|
Hi,
Change
SORT FIELDS=(1,20,CH,A)
to
SORT FIELDS=(1,50,CH,A)
Regards
R KARTHIK |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 800 Location: Chennai, India
|
|
|
|
karthikr44,
Did you have a look at the output records posted in the original requirement. I believe you need to modify he card to something like this.
I cant test this now as I dont have the recent version of SYNCSORT
| Code: |
//SYSIN DD *
INCLUDE COND=(3,5,CH,EQ,C'TSTIN')
INREC PARSE=(%01=(ENDBEFR=C'(',FIXLEN=50)),
BUILD=(1,133,%01)
SORT FIELDS=(134,50,CH,A)
SUM FIELDS=NONE
OUTREC BUILD=(1,133) |
Thanks,
Arun |
|
| Back to top |
|
 |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 172 Location: Chennai
|
|
|
|
HI Arun,
Thanks for spotting the mistake. Ur code provides the following output....
| Code: |
**TSTIN**TEST01.FEED.FILE(-1)
**TSTIN**TEST01.OUT1.FILE001(-1)
**TSTIN**TEST01.OUT2.FILE(-1)
|
Regards
R KARTHIK |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 800 Location: Chennai, India
|
|
|
|
| Quote: |
| If you have DFSORT installed at your shop |
If I read it correctly, the OP is using SYNCSORT and NOT DFSORT.
Thanks,
Arun |
|
| Back to top |
|
 |
Sambhaji Warnings : 1 Active User
Joined: 16 Feb 2007 Posts: 267 Location: Pune, India
|
|
|
|
Yes read correctly..
thats why i wrote "IF..." otherwise i wouldnt have  |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8768 Location: 221 B Baker St
|
|
|
|
Hello,
There is no reason (even with qualification) to post a DFSORT code suggestion/reply to a Syncsort topic.
It has been removed. . . |
|
| Back to top |
|
 |
vjai6977
New User
Joined: 08 Aug 2008 Posts: 16 Location: Chennai
|
|
|
|
Hi,
Thanks for the reply posts.
I tried to execute the solutions proposed by Karthik and sambhaji, either of resulted me on the following error message.
When Used for SORT:
SYSIN :
INCLUDE COND=(3,5,CH,EQ,C'TESTIN')
INREC PARSE=(%01=(ENDBEFR=C'(',FIXLEN=80)),
*
BUILD=(%01)
SORT FIELDS=(1,80,CH,A)
SUM FIELDS=NONE
WER901I **WARNING** SYNCSORT 1.2.3.1 WILL EXPIRE IN 77 DAYS
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
When Used for ICETOOL:
CTL1CNTL :
SORT FIELDS=COPY
INREC PARSE=(%00=(ABSPOS=10,FIXLEN=25,ENDBEFR=C'('),
*
%01=(FIXLEN=2,ENDBEFR=C')')),
BUILD=(1,9,%00,35:C'(',%01,JFY=(SHIFT=RIGHT),C')')
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER901I **WARNING** SYNCSORT 1.2.3.1 WILL EXPIRE IN 77 DAYS
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Not too sure about this stuffs, I am using ICETOOL SPLICE for another operation and it works fine for me even now.
Any other suggestions for making the duplicate removal successful.
Regards,
Jai |
|
| Back to top |
|
 |
vjai6977
New User
Joined: 08 Aug 2008 Posts: 16 Location: Chennai
|
|
|
|
my shop uses SYNCSORT for z/os version 1.2.3 , instead of using a parse stement is there any way to achieve the result.
Regars,
Jai |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8768 Location: 221 B Baker St
|
|
|
|
Hello,
When your system renews the license that will expire soon, it might be a good time to upgrade to the current release of Syncsort. . .  |
|
| Back to top |
|
 |
vjai6977
New User
Joined: 08 Aug 2008 Posts: 16 Location: Chennai
|
|
|
|
Hi,
I appreciate and recommend for that, but now I would like to get a solution on the current version issues. Any ideas that i can solve it for now. And latter can use the above mentioned solution if we our shop is installed with release 1.3 of syncsort
Regards,
Jai |
|
| Back to top |
|
 |
|
|
|