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

How to append a PS file into multiple files in a single step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Isabellemary

New User


Joined: 11 Aug 2023
Posts: 4
Location: India

PostPosted: Wed Aug 16, 2023 5:37 pm
Reply with quote

I have a pipe delimited PS file (table unload) which is huge - which I will have to split into say 50 files (using sort utility), now I have to append a column header to each of the 50 files. w/o cobol or 50 individual sort steps - is there any other way to do this in a single/fewer steps?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Wed Aug 16, 2023 5:41 pm
Reply with quote

You have tried what so far by yourself?
Back to top
View user's profile Send private message
Isabellemary

New User


Joined: 11 Aug 2023
Posts: 4
Location: India

PostPosted: Wed Aug 16, 2023 5:52 pm
Reply with quote

Tried out OUTREC, OUTFIL etc , but none of them could satidfy the problem statement i have given - based on my limited knowledge. But I tried out using sort utility only. Appreciate help. I wouldnt dare to come here and post a question without trying out by self or without enough googling icon_smile.gif
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 724
Location: Denmark

PostPosted: Wed Aug 16, 2023 8:31 pm
Reply with quote

Well, you can do it in one step, depending on the dataset specificatons. The following sample is submitted from a dataset with recfm VB and lrecl 256. The headers are concatenated in front of each concatenated dataset. Yes I know that both input datasets are the same, but hey, this is just a sample.

Code:
//*                                         
//S1      EXEC PGM=IEBGENER                 
//SYSPRINT DD SYSOUT=*                       
//SYSIN    DD DUMMY                         
//SYSUT1   DD *,DCB=(XX.TEST.SEQ.V256)       
Header 1                                     
//         DD DISP=SHR,DSN=XX.TEST.SEQ.V256 
//         DD *,DCB=(XX.TEST.SEQ.V256)       
Header 2                                     
//         DD DISP=SHR,DSN=XX.TEST.SEQ.V256 
//SYSUT2   DD SYSOUT=*     
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 how to eliminate null indicator value... DB2 7
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top