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
 

 

JCL to concatenate dataset with LRECL different

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

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Thu Sep 24, 2009 4:57 pm    Post subject: JCL to concatenate dataset with LRECL different
Reply with quote

Hi All,

I have a dataset on TAPE with LRECL length as 71 and its trailer file with LRECL as 78 on DISK, to concatenate, facing problem as LRECL are different. I can't expand the PS of LRECL of 71 to 78 as the file has huge data and when I try to expand it in my test setup facing SB37 due to memory problems. Can you pls help with JCL to concatenate the two files, if possible not changing LRECL?
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Sep 24, 2009 5:07 pm    Post subject:
Reply with quote

Hi,

I'm assuming both files are FB, so I believe both file need to have the same LRECL.

By the way, a SB37 is not a memory problem but a space problem.


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

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Sep 24, 2009 5:09 pm    Post subject:
Reply with quote

Quote:
TAPE with LRECL length as 71 and its trailer file with LRECL as 78

Good design.

Quote:
facing SB37 due to memory problems

sb37 is not a memory problem, it is a disk space problem.

Quote:
concatenate the two files, if possible not changing LRECL?

how do you expect to concatenate (means put together) 2 different lrecl
without changing one to be the same as the other?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Sep 24, 2009 6:09 pm    Post subject:
Reply with quote

Just out of curiosity -- Trailer, as it sounds, should be just a single record of LRECL=78 and other file with which you want to append it, as you said is "huge" - by adding just one record to that huge file (by whatever means) is causing SB37, I'm confused... icon_neutral.gif.
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Thu Sep 24, 2009 6:42 pm    Post subject: Reply to: JCL to concatenate dataset with LRECL different
Reply with quote

Hi,

To concatenate the datasets, I am trying to copy the TAPE one to DISK dataset and then copy into an another with LRECL as 78 so that I can concatenate the 2 datasets.

but, while trying to copy the TAPE one to disk I am facing SB37, can you pls let know an approach to be done apart from what I am trying right now?

Thanks
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: Thu Sep 24, 2009 6:56 pm    Post subject:
Reply with quote

Why not transfer the tape file to another tape to avoid the SB37 abend, and at the same time reformat it to 78 bytes and then append the trailer on the end.

However, call me old fashioned, but in my mind it would be far more intelligent to append the damned trailer in the first place icon_rolleyes.gif
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Thu Sep 24, 2009 7:57 pm    Post subject: Reply to: JCL to concatenate dataset with LRECL different
Reply with quote

Hi all,

I have apparently solved my problem. Here is the JCL which I have used
Code:
             
//S1    EXEC  PGM=ICETOOL                                               
//TOOLMSG DD SYSOUT=*                                                   
//DFSMSG DD SYSOUT=*                                                   
//IN1 DD DSN=PIPSTR2T.PAYCOMP.SUPER.FILE.PARA,DISP=SHR
//***(LRECL71)                 
//IN2 DD DSN=PIPSTR2D.TRAILER.COUNT.D0907,DISP=SHR
//****(LRECL78)                     
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(300,150),RLSE),DISP=(MOD,PASS) 
//OUT DD DSN=PIPSTR2D.TRAILER.COUNT.OU3,DISP=(,CATLG,),                 
//    SPACE=(CYL,(500,500),RLSE)
//TOOLIN DD *                                                           
 COPY FROM(IN1) TO(T1) USING(CTL1)                                     
 COPY FROM(IN2) TO(T1)                                                 
 SORT FROM(T1) TO(OUT) USING(CTL2)                                     
/*                                                                     
//CTL1CNTL DD *                                                         
  INREC OVERLAY=(78:X)                                                 
/*                                                                     
//CTL2CNTL DD *                                                         
  SORT FIELDS=COPY                                                     
/*
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Sep 25, 2009 5:05 am    Post subject:
Reply with quote

Hi,

why do you need to write the output to T1 first ? You should be able to write directly to the OUT DD and avoid 1 pass of the file.

Don't forget to change the DISP to (MOD,CATLG,DELETE) for the OUT DD.


Gerry
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Fri Sep 25, 2009 12:13 pm    Post subject: Reply to: JCL to concatenate dataset with LRECL different
Reply with quote

Hi,

Yes, I know I can directly write it to the output, but in case if I needed to sort the records in an order or merge them on a field I could use the CTL2, I have just written it as a sample.
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: Wed Oct 07, 2009 5:09 pm    Post subject:
Reply with quote

It might help if you posted the output from DFSMSG rather than TOOLMSG
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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts WER247A incompatible lrecl Danielle.Filteau SYNCSORT 8 Tue May 02, 2017 4:04 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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