Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
SYNCSORT: Copy 2 files with different LRECL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 8
Location: Gurgaon

PostPosted: Mon Jul 28, 2008 9:59 am    Post subject: SYNCSORT: Copy 2 files with different LRECL
Reply with quote

Hi All.

I have 2 input files.
File 1 LRECL 17
File2 LRECL 129

Output FIle should be LRECL 129

The output file will simply contain all records from FIle1 and File2.
How to do this thru SYNCSORT?

Thanks in advance.
Back to top
View user's profile Send private message
References
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 156
Location: PUNE(INDIA)

PostPosted: Mon Jul 28, 2008 10:52 am    Post subject:
Reply with quote

Here is syncsort's synctool job for your requirement.

Code:

//S1      EXEC PGM=SYNCTOOL                   
//TOOLMSG DD SYSOUT=*                         
//DFSMSG  DD SYSOUT=*                         
//IN1     DD DSN=INPUT-FILE-ONE-WITH-LRECL 129
//        DISP=SHR                           
//IN2     DD DSN=INPUT-FILE-ONE-WITH-LRECL 17
//        DISP=SHR                           
//OUT1    DD DSN=OUT-PUT-FILE                 
//      DSORG=PS,RECFM=FB,LRECL=129,         
//      DISP=(MOD,CATLG,DELETE)               
//TOOLIN  DD *                               
    COPY FROM(IN1) TO(OUT1)                   
    COPY FROM(IN2) TO(OUT1)                   
/*                                           
Back to top
View user's profile Send private message
sedireswarapu

New User


Joined: 18 Jun 2008
Posts: 25
Location: India

PostPosted: Mon Jul 28, 2008 11:05 am    Post subject:
Reply with quote

Hi,

Also, you can do it as shown below..

Code:

//STEP1    EXEC PGM=SORT                 
//SORTIN   DD  DSN=INPUT.FILE1,DISP=SHR 
//         DD  DSN=INPUT.FILE2,DISP=SHR 
//SORTOUT  DD  DSN=OUTPUT.FILE,         
//             DISP=(,CATLG,DELETE),     
//             DCB=(RECFM=FB,LRECL=129) 
//SYSIN    DD  *                         
  SORT FIELDS=COPY                       
/*                                       
//SYSOUT   DD  SYSOUT=*                 


Also, please see the below links for some more details.

http://ibmmainframes.com/viewtopic.php?t=2470

http://ibmmainframes.com/viewtopic.php?t=2170
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 8
Location: Gurgaon

PostPosted: Mon Jul 28, 2008 11:47 am    Post subject:
Reply with quote

Hi..since the 2 files are of different LRECL..these are not working
Back to top
View user's profile Send private message
sedireswarapu

New User


Joined: 18 Jun 2008
Posts: 25
Location: India

PostPosted: Mon Jul 28, 2008 12:21 pm    Post subject:
Reply with quote

Hi,

Sorry, ignore my code in case of different LRECL used in the 2 input files..

But, the code given by ParagChouguley should be working fine. If not, what is the output you are getting?

Just make sure you used the same DISP (MOD,CATLG,DELETE) mentioned in the given code.

Also, if you look at the first link given by me, Frank had responded how you can pad the 80-byte record from input file 2 with blanks, and MOD it on to the end of input file 1.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1148
Location: Mumbai - India

PostPosted: Mon Jul 28, 2008 4:47 pm    Post subject: Reply to: SYNCSORT: Copy 2 files with different LRECL
Reply with quote

Cics fan,

Quote:
these are not working


Post your error messages from the SYSOUT.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1