Divide a row into multiple rows



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Divide a row into multiple rows

Postby agam3007 » Wed Mar 02, 2016 3:38 pm

Hi All,
I have a row of LRECL 12500,i need to divide this row into different rows such that keys of the input rows comes in each row.

For example:-
Input records-
input record 1 : abcdefghi
input record 2 : xyziyufdk

Keys for record 1 :abc
Keys for record 1 :xyz

Expected Output
abcde
abcfg
abchi

xyziy
xyzuf
xyzdk

Please guide me the approach to do the above through JCL.

Thanks,
Agam
agam3007
 
Posts: 2
Joined: Tue Mar 01, 2016 4:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Divide a row into multiple rows

 

Re: Divide a row into multiple rows

Postby enrico-sorichetti » Wed Mar 02, 2016 4:05 pm

You were already asked to specify the SORT product used
since You did not care to reply the topic was moved to the IBM DFSORT section.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Divide a row into multiple rows

Postby BillyBoyo » Wed Mar 02, 2016 5:13 pm

You need the slash-operator (/) in BUILD. This is only available in OUTFIL.

 OPTION COPY
  OUTFIL BUILD=(1,3,4,4169,
               /,
               1,3,4173,4169,
               /,
               1,3,8342,4169)


The slash-operator allows for multiple records to be written for one input record in an OUTFIL group.

I haven't check the values, just an example.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post