View previous topic :: View next topic
|
Author |
Message |
Isabellemary
New User
Joined: 11 Aug 2023 Posts: 4 Location: India
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
You have tried what so far by yourself? |
|
Back to top |
|
|
Isabellemary
New User
Joined: 11 Aug 2023 Posts: 4 Location: India
|
|
|
|
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 |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
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 |
|
|
|