IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help with SPLICING (SYNCSORT)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 1:54 pm
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: 2481
Location: @my desk

PostPosted: Tue Aug 19, 2008 2:18 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 2:28 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 2:32 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top