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
 

 

Help with SPLICING (SYNCSORT)

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

New User


Joined: 19 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Tue Aug 19, 2008 1:20 pm    Post subject: Help with SPLICING (SYNCSORT)
Reply with quote

Hi,

I need to collate 2 files - one containing a date field of 8 bytes length and another containing a counter field, again of 8 bytes length. I am trying to create an output file with the date field, a '-' and the corresponding counter value. I just have 5 records in both the files.

File1 Input:
20080811-
20080812-
20080813-
20080814-
20080815-

File2 Input:
00000932
00000813
00000648
00000639
00000923

I am using SYNCTOOL to collate these two fields. Here is my code
Code:

//STEPNUM   EXEC PGM=SYNCTOOL                                     
//TOOLMSG   DD SYSOUT=*                                       
//DFSMSG    DD SYSOUT=*                                       
//FILEA     DD DSN=file1.........,DISP=SHR         
//FILEB     DD DSN=file2.........,DISP=SHR         
//TEMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)), 
//             UNIT=SYSDA,AVGREC=U,LRECL=25                   
//OUT       DD DSN=outputfile,                 
//             DISP=(NEW,CATLG,KEEP),                         
//             UNIT=SYSDA,                                     
//             SPACE=(CYL,(200,50),RLSE),                     
//             AVGREC=U,BLKSIZE=27975,                         
//             LRECL=17                                       
//*                                                           
//TOOLIN    DD *                                               
  COPY FROM(FILEA) TO(TEMP1) USING(CTL1)                       
  COPY FROM(FILEB) TO(TEMP1) USING(CTL2)                       
  SPLICE FROM(TEMP1) TO(OUT) ON(10,8,PD) WITH(10,8) USING(CTL3)
/*                           
//CTL1CNTL DD *                             
  OUTREC FIELDS=(1:1,9,10:SEQNUM,8,PD)     
/*                                         
//CTL2CNTL DD *                             
  OUTREC FIELDS=(10:1,8,18:SEQNUM,8,PD)     
/*                                         
//CTL3CNTL DD *                             
  OUTFIL FNAMES=OUT,OUTREC=(1,10)           
/*                                         

I just keep getting an RC of 16 with the reason that the outfile LRECL is incompatible. I have created all the files with an LRECL of 25.
Can anyone please tell me where I am missing out?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 1:54 pm    Post subject:
Reply with quote

On which of the three operations are you getting the error occur ?

Please post the output.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Tue Aug 19, 2008 2:18 pm    Post subject:
Reply with quote

Post your error messages.......

Thanks,
Arun
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 2:28 pm    Post subject:
Reply with quote

Just a couple of points, as during a quieter moment I had a little play. The amended code below gives the required result for your question.

1) You do not specify any RECFM in your JCL, and also use AVGREC when you have fully defined the space requirement already using TRKS or CYLS, so the AVGREC parameter is ignored.

2) For your OUT DD the BLKSIZE is not an integer multiple of the LRECL, and RECFM=VB was not specified.

3) Your control statements place the SEQNUM in different positions.

4) I assume that you want to collate on SEQNUM.

Code:

//STEPNUM EXEC PGM=ICETOOL                       
//TOOLMSG DD SYSOUT=*                           
//DFSMSG DD SYSOUT=*                             
//FILEA DD DSN=...........                                     
//FILEB DD DSN=...........                                     
//TEMP1    DD DSN=&&TEMP1,DISP=(MOD,PASS),       
//            SPACE=(TRK,(5,5)),                 
//            RECFM=FB,LRECL=80                 
//OUT      DD DSN=&&TEMP2,                                   
//            DISP=(,PASS,DELETE),                           
//            SPACE=(CYL,(200,50),RLSE),                     
//            RECFM=FB,LRECL=17                               
//*                                                           
//TOOLIN DD *                                                 
 COPY FROM(FILEA) TO(TEMP1) USING(CTL1)                       
 COPY FROM(FILEB) TO(TEMP1) USING(CTL2)                       
 SPLICE FROM(TEMP1) TO(OUT) ON(18,8,PD) WITH(10,8) USING(CTL3)
/*                                                           
//CTL1CNTL DD *                                               
 OUTREC FIELDS=(1:1,9,18:SEQNUM,8,PD)                         
/*                                                           
//CTL2CNTL DD *                                               
 OUTREC FIELDS=(10:1,8,18:SEQNUM,8,PD)                       
/*                                                           
//CTL3CNTL DD *                                               
 OUTFIL FNAMES=OUT,OUTREC=(1,17)                             
/*                                                           
Back to top
View user's profile Send private message
Narmadha Krishnamurthy

New User


Joined: 19 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Tue Aug 19, 2008 2:29 pm    Post subject:
Reply with quote

Hi,

I get these messages under TOOLMSG in the sysout:

SPLICE FROM(TEMP1) TO(OUT) ON(10,8,PD) WITH(10,8) USING(CTL3)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0003"
SYT012E SYNCSORT COMPLETED UNSUCCESSFULLY
SYT030I OPERATION COMPLETED WITH RETURN CODE 16

SYT015I PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE

SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 16

And I see these messages in the DFSMSG:

WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I FILEA : RECFM=FB ; LRECL= 25; BLKSIZE= 27975
WER237I OUTREC RECORD LENGTH = 17
WER110I TEMP1 : RECFM=FB ; LRECL= 25; BLKSIZE= 27975
WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL

WER108I TEMP1 : RECFM=FB ; LRECL= 25; BLKSIZE= 27975
WER197A OUT RECFM=F/FB, LRECL/BLKSIZE INVALID
WER110I OUT : RECFM=FB ; LRECL= 17; BLKSIZE= 27975
WER247A OUT HAS INCOMPATIBLE LRECL
WER425A CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN

Please let me know if you need any more details.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 2:32 pm    Post subject:
Reply with quote

Topic moved from DFSORT forum

The solution I have given works for DFSORT, but may or may not work for SYNCSORT.

PLEASE clarify which sort product you are using in your question.
Back to top
View user's profile Send private message
Narmadha Krishnamurthy

New User


Joined: 19 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Tue Aug 19, 2008 2:36 pm    Post subject:
Reply with quote

Expat,

Thank you so much for your corrections on the code!!
I got my ouput! icon_smile.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 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
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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