View previous topic :: View next topic
Author
Message
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hello Experts,
I need help to compare the trailer record count with detail record count in the file using dfsort.
Logical record length of file is 80.
trailer count length is PIC 9(06).
here is the file structure:
H20120307 1148 00001
3xxxxxxxxxxxxxxN11290125 9056821822 RVNDIVR CR
3xxxxxxxxxxxxxxV11290123 6032823827 M1VDIVR CR
3xxxxxxxxxxxxxxI11290134 6168888638 O1IDIVR CR
3xxxxxxxxxxxxxxM11290138 6168888638 O1MDIVR CR
3xxxxxxxxxxxxxxL11290134 6917268638 WVLDIVR CR
3xxxxxxxxxxxxxxN11290125 9056821822 RVNDIVR CR
T000006
RC = 0 FOR COUNT MATCH
RC=16 FOR UNMATCH COUNT.
Thanks
Sudip
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
try this
Code:
//STEP0001 EXEC PGM=SORT
//SORTIN DD *
H20120307 1148 00001
3XXXXXXXXXXXXXXV11290123 6032823827 M1VDIVR CR
3XXXXXXXXXXXXXXI11290134 6168888638 O1IDIVR CR
3XXXXXXXXXXXXXXM11290138 6168888638 O1MDIVR CR
3XXXXXXXXXXXXXXL11290134 6917268638 WVLDIVR CR
3XXXXXXXXXXXXXXN11290125 9056821822 RVNDIVR CR
3XXXXXXXXXXXXXXN11290125 9056821822 RVNDIVR CR
T000006
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DEBUG NOABEND
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,6,ZD)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),
OVERLAY=(81:81,6,ZD,SUB,+2,EDIT=(TTTTTT)))
OUTFIL INCLUDE=(1,1,CH,EQ,C'T',AND,2,6,ZD,EQ,81,6,ZD),
NULLOFL=RC16
/*
Gerry
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hi Gerry
Thanks for your response.I have tried sortcard given above however i am getting below error in the sysout:
WER061A I/O ERR NXXXXX,JS010 ,JES ,O,SORTOUT ,WRITE ,WRITE ERROR ,****,**************,BSAM
Thanks
Sudip
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hi Gerry
Please ignore my previous post.There was some syntax error in sysout.
I have tested my sortcard and here is the result:
correct count:
getting Maxcc 0
incorrect count
Getting Maxcc 0
Looks like there is some problem with unmatch count compare.
Thanks
Sudip
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
can you provide your JCL and data used including the control cards.
Gerry
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Here is the JCL:
input data is the same i have posted above.
//JS010 EXEC PGM=SORT,
// REGION=0M
//*
//SORTIN DD DSN=file name,
// DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DEBUG NOABEND
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,6,ZD)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),
OVERLAY=(81:81,6,ZD,SUB,+2,EDIT=(TTTTTT)))
OUTFIL INCLUDE=(1,1,CH,EQ,C'T',AND,2,6,ZD,EQ,81,6,ZD),
NULLOFL=RC16
/*
Regards
Sudip
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
You have no reason to complain...
You posted in the DFSORT/ICETOOL section of the forum, and misled everybody by telling
but You are using SYNCSORT ( as proved by the WER messages )
if You had told so from the beginning somebody would have posted a SYNCSORT solution
and would have not wasted any time
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hi Enrico
my apologize for posting in wrong section and misleading all experts:
yes i am using synsort:
Regards,
sudip
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
we keep telling everyone who ask <SORT> questions that is is important to tell
what sort product he/she is using and the level of it
so that people who answer know what features/facilities are available
the simple way is ( both for DFSORT and SYNCSORT ) to run a job like ...
Code:
//SHOW EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/*
and post the output
for dfsort further details can be found here
www.ibmmainframes.com/viewtopic.php?t=33389
- does not apply to You, but it will be useful for lurkers using DFSORT
Back to top
bodatrinadh Active User Joined: 05 Jan 2007Posts: 101 Location: chennai (India)
Sudip,
try this code..You won't be getting RC16. It will abend with RC4.
Code:
//*
//STEP0001 EXEC PGM=SORT,PARM='NULLOUT=RC4'
//$ORTPARM DD DSN=IMS.PARMLIB(IMSMS005),DISP=SHR
//SORTIN DD *
H20120307 1148 00001
3XXXXXXXXXXXXXXV11290123 6032823827 M1VDIVR CR
3XXXXXXXXXXXXXXI11290134 6168888638 O1IDIVR CR
3XXXXXXXXXXXXXXM11290138 6168888638 O1MDIVR CR
3XXXXXXXXXXXXXXL11290134 6917268638 WVLDIVR CR
3XXXXXXXXXXXXXXN11290125 9056821822 RVNDIVR CR
3XXXXXXXXXXXXXXN11290125 9056821822 RVNDIVR CR
3XXXXXXXXXXXXXXN11290125 9056821822 RVNDIVR CR
T000006
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(2,1,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,6,ZD)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),
OVERLAY=(81:81,6,ZD,SUB,+2,EDIT=(TTTTTT)))
OUTFIL INCLUDE=(1,1,CH,EQ,C'T',AND,2,6,ZD,EQ,81,6,ZD)
Note:- Tested on SYNCSORT FOR Z/OS 1.4.0.1R
Thanks
-3nadh
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
Quote:
.You won't be getting RC16. It will abend with RC4.
in IT using the proper terminology is essential for effective communication
I find quite unlikely that something will abend with a return code
and abend is an ABEND and no RC will be generated
if the program is able to generate a RC then it did not ABEND
meditate, plese, meditate
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hi Bodatrinadh,
Thanks for your quick help.Your help is much appreciated.sort is working fine getting expected results:
Enrico
special thanks for your great suggestion.
Regards
Sudip
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi Bodatrinadh,
if TS wants a rc of 16, why not code
Code:
PARM='NULLOUT=RC16'
Why are you sorting the records and why are you sorting on this key
Code:
SORT FIELDS=(2,1,CH,A)
Gerry
Back to top
bodatrinadh Active User Joined: 05 Jan 2007Posts: 101 Location: chennai (India)
Quote:
if TS wants a rc of 16, why not code Code:
PARM='NULLOUT=RC16'
Why are you sorting the records and why are you sorting on this key Code:
SORT FIELDS=(2,1,CH,A)
Gcicchet,
Apologies for the mistake.
Sudip,
Can you try giving PARM='NULLOUT=RC16'
Thanks
-3nadh
Back to top
sudipghanvat New User Joined: 30 Mar 2010Posts: 7 Location: pune
Hi Gerry & Bodatrinadh,
Code is working fine now.I have used appropriate error code to set
after count mismatch. there is confusion now on RC codes
Also i have changed
SORT FIELDS=(2,1,CH,A)
To
SORT FIELDS=COPY
Regards,
Sudip
Back to top
Please enable JavaScript!