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

Merge two files of different LRECL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rswathi_1208

New User


Joined: 14 May 2010
Posts: 11
Location: chennai

PostPosted: Tue May 25, 2010 6:47 pm
Reply with quote

Hi,
I have 2 files one is lengh 80 and another is length 14. I want to merge these two files. The one shown below is the test JCL I used but for the below jcl I am getting maxcc = 20.pls help
Code:
   //TJOB123 JOB (T),'SWATHI',MSGLEVEL=(1,1),CLASS=A,MSGCLASS=Y,
   //  NOTIFY=&SYSUID,REGION=2000M,TIME=1440                       
   //PSTEP25  EXEC PGM=ICETOOL                                     
   //TOOOLMSG DD SYSOUT=*                                         
   //DFSMSG   DD SYSOUT=*                                         
   //SYSOUT  DD SYSOUT=*                                           
   //IN1      DD *                                                 
   12345678932343435454544                                         
   //IN2      DD *                                                 
   2457899005533323323                                             
   //OUT      DD SYSOUT=*                                         
   //TOOLIN    DD *                                                 
     COPY FROM(IN1) TO(OUT)                                       
     COPY FROM(IN2) TO(OUT) USING(CTL1)     
                /*                     
   //CTL1CNTL DD *                                                 
     INREC OVERLAY=(23:X)                                         
   /*
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 25, 2010 6:50 pm
Reply with quote

Please post the output from the run showing the error codes and messages.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 25, 2010 8:08 pm
Reply with quote

rswathi_1208,

Your description (have 2 files one is lengh 80 and another is length 14.) and what you show in your job (IN1 and IN2) does not go with each other - actually if you have used instream data, the way you show it, both the files are same from DCB attribute per se, FB/80. So, you need to post something which will help us to help you and ofcourse error codes and messages too, as expat has asked for.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue May 25, 2010 10:28 pm
Reply with quote

rswathi_1208,

Assuming that you want to merge the 14 byte file into 80 byte file, use the following DFSORT ICETOOL JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*                 
//IN80     DD DSN=Your input FB 80 byte file,DISP=SHR
//IN14     DD DSN=Your input FB 14 byte file,DISP=SHR
//OUT      DD DSN=your output merge file,       
//            DISP=(MOD,CATLG,DELETE), 
//            UNIT=SYSDA,               
//            SPACE=(CYL,(X,Y),RLSE)   
//TOOLIN   DD *                         
  COPY FROM(IN80) TO(OUT)               
  COPY FROM(IN14) TO(OUT) USING(CTL1)   
//CTL1CNTL DD *                         
  INREC OVERLAY=(80:X)                 
//*
Back to top
View user's profile Send private message
rswathi_1208

New User


Joined: 14 May 2010
Posts: 11
Location: chennai

PostPosted: Tue May 25, 2010 11:20 pm
Reply with quote

Thank you all...I used the one Skolusu posted..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 26, 2010 5:30 am
Reply with quote

rswathi_1208,

BTW, the reason you got RC=20 is that you didn't have a //TOOLMSG DD statement ... you had //TOOOLMSG DD instead (too many Os).

Spelling does count in JCL. icon_smile.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed May 26, 2010 8:04 am
Reply with quote

Hi,

has MERGE taken on a new meaning ?

Adding one file onto to the back of another file is not what I call MERGE.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 26, 2010 9:35 am
Reply with quote

Hi Jerry,

Quote:
has MERGE taken on a new meaning ?
No, usage has just been getting more and more sloppy in out industry. . . Which is one of the main reasons there is so much missed communication (both on the forum and in the office).

Very few are willing to take the flak (and there is flak) for correcting mis-use (it is often (usually?) a bigger infracton to point out the mis-use than to use terminology incorrectly).

Fortunately, there are still some who believe the lesson is important.

d
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed May 26, 2010 10:00 am
Reply with quote

gcicchet wrote:
Hi,

has MERGE taken on a new meaning ?

Adding one file onto to the back of another file is not what I call MERGE.


Gerry

You are rite Gerry....
It seems OP actualy wanted to append data
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed May 26, 2010 10:16 am
Reply with quote

rswathi_1208 wrote:
Thank you all...I used the one Skolusu posted..

You are just fortunate that it worked for you as you have SYNCSORT\SYNCTOOL and not DFSORT\ICETOOL (based on your previous post)
I echo.. Enrico...
Enrico wrote:
since You posted to DFSORT section of the forums
You got a DFSORT tested solution!

by posting to the right forum section You will make everybody happy
people will not waste time on useless replies
You will get better an more timely answers
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top