Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need clarification on OUTFIL and OUTREC in SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Fri Nov 23, 2007 12:21 pm    Post subject: Need clarification on OUTFIL and OUTREC in SYNCSORT
Reply with quote

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
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 12:32 pm    Post subject: Reply to: Need clarification on OUTFIL and OUTREC
Reply with quote

Learncoholic,

Could you please post the desired output?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Nov 23, 2007 12:34 pm    Post subject:
Reply with quote

Aaru,

Quote:
Could you please post the desired output?

TS had already did that.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 2:11 pm    Post subject: Reply to: Need clarification on OUTFIL and OUTREC in SYNCSOR
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Mon Nov 26, 2007 11:34 am    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Nov 26, 2007 11:45 am    Post subject: Reply to: Need clarification on OUTFIL and OUTREC in SYNCSOR
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Mon Nov 26, 2007 11:49 am    Post subject:
Reply with quote

Thanks Aaru for the clarifications.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Nov 26, 2007 2:38 pm    Post subject: Reply to: Need clarification on OUTFIL and OUTREC in SYNCSOR
Reply with quote

You are Welcome icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us