View previous topic :: View next topic
Author
Message
Learncoholic New User Joined: 20 Sep 2007Posts: 97 Location: India
Hi I have a small query. Take the jcl below:
Code:
//STEP1 EXEC PGM=SYNCTOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//INDD DD *
AAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDD
/*
//TEMP1 DD DSN=&&TEMP1,DISP=(NEW,PASS),SPACE=(CYL,(1,1)),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80)
//TEMP2 DD DSN=&&TEMP2,DISP=(NEW,PASS),SPACE=(CYL,(1,1)),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80)
//DCNFL DD DSN=&&DCNFL,DISP=(MOD,PASS),SPACE=(CYL,(1,1)),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80)
//OUTDD DD SYSOUT=*
//TOOLIN DD *
SORT FROM(INDD) USING(CT21)
SORT FROM(TEMP2) TO(DCNFL) USING(CT22)
SORT FROM(TEMP1) TO(DCNFL) USING(CT23)
COPY FROM(DCNFL) TO(OUTDD)
/*
//CT21CNTL DD *
INREC OVERLAY(81:SEQNUM,5,PD)
SORT FIELDS=(81,5,PD,D)
OUTFIL FNAMES=TEMP1,ENDREC=1,
OUTREC=(1,80)
OUTFIL FNAMES=TEMP2,SAVE,
OUTREC=(1,80)
/*
//CT22CNTL DD *
OPTION COPY
OUTFIL BUILD=(C' ''',1,16,C''',')
/*
//CT23CNTL DD *
OPTION COPY
OUTFIL BUILD=(C' ''',1,16,C'''')
/*
The above JCL gives error as :
Code:
CT22CNTL :
OPTION COPY 0035000
OUTFIL BUILD=(C' ''',1,16,C''',') 0036000
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=TEMP2,SORTOUT=DCNFL,SORTDD=CT22,
YNALLOC
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER276B SYSDIAG= 234923, 771498, 771498, 1039071
WER164B 5,000K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 500K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I TEMP2 : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I DCNFL : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER247A DCNFL HAS INCOMPATIBLE LRECL
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Whereas if we use the CT22 & CT23 card as
Code:
OUTREC BUILD=(C' ''',1,16,C''',')
&
Code:
OUTREC BUILD=(C' ''',1,16,C'''')
Then I get the desired o/p as:
Code:
'CCCCCCCCCCCCCCCC',
'BBBBBBBBBBBBBBBB',
'AAAAAAAAAAAAAAAA',
'DDDDDDDDDDDDDDDD'
Why so?
Back to top
Aaru Senior Member Joined: 03 Jul 2007Posts: 1287 Location: Chennai, India
Learncoholic,
Could you please post the desired output?
Back to top
murmohk1 Senior Member Joined: 29 Jun 2006Posts: 1436 Location: Bangalore,India
Aaru,
Quote:
Could you please post the desired output?
TS had already did that.
Back to top
Aaru Senior Member Joined: 03 Jul 2007Posts: 1287 Location: Chennai, India
Learncoholic,
Try this sort card
Code:
//CT22CNTL DD *
OPTION COPY
OUTFIL BUILD=(C' ''',1,16,C''',',80:X)
/*
//CT23CNTL DD *
OPTION COPY
OUTFIL BUILD=(C' ''',1,16,C'''',80:X)
/*
Back to top
Learncoholic New User Joined: 20 Sep 2007Posts: 97 Location: India
Hi Aaru,
The sort card you have provided is absolutely fine. Thanks for that. I also want to know as to why we have to give 80:X in the sort card with outfil? Is it mandatory? Moreover in the error report(that I posted along with my previous query) it is showing to have both the LRECL as the same yet the error is:
Code:
WER247A DCNFL HAS INCOMPATIBLE LRECL
Why does this happen?
Back to top
Aaru Senior Member Joined: 03 Jul 2007Posts: 1287 Location: Chennai, India
Learncoholic,
Quote:
also want to know as to why we have to give 80:X in the sort card with outfil?
The record length is specified as 80 across the DD DCNFL. Hence you should BUILD in such a way that the record is with data in these 80 bytes. Hence it is good to pad the remaining with spaces. 80:X will update the record with spaces from the current position to the column specified (80)
Quote:
WER247A DCNFL HAS INCOMPATIBLE LRECL
This might be also because of the same reason.
Quote:
The sort card you have provided is absolutely fine. Thanks for that.
Good that it woked.
Back to top
Learncoholic New User Joined: 20 Sep 2007Posts: 97 Location: India
Thanks Aaru for the clarifications.
Back to top
Aaru Senior Member Joined: 03 Jul 2007Posts: 1287 Location: Chennai, India
You are Welcome
Back to top
Please enable JavaScript!