I want to include records between header and trailer



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

I want to include records between header and trailer

Postby rakeshsneha1212 » Wed Jan 29, 2020 5:20 pm

Hi All,

Can someone help me with the below requirement?

I have an input file with the below format, I want to keep D1, D2, D3 records if the first 6 bytes of my data has TL03106 and to write it's corresponding H1 & T1 irrespective of what is there in first 6 bytes in H1 & T1 of the file.

TL00973  C   ABCDE00018858                 2020012305150000H1   0000000000000000000000
TL00973  C   ABCDE00018858                 2020012305150000D1ABCD4161290              
TL00973  C   ABCDE00018858                 2020012305150000D212638609500000000100973  
TL00973  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL03106  C   ABCDE00018858                 2020012305150000D1QQQQ8043656              
TL03106  C   ABCDE00018858                 2020012305150000D212638606800000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL00973  C   ABCDE00018858                 2020012305150000D1EEEE3223175              
TL00973  C   ABCDE00018858                 2020012305150000D212638618700000000100973  
TL00973  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL03106  C   ABCDE00018858                 2020012305150000D1MSKU1593605              
TL03106  C   ABCDE00018858                 2020012305150000D212638607800000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL03106  C   ABCDE00018858                 2020012305150000D1PONU8210082              
TL03106  C   ABCDE00018858                 2020012305150000D212638608600000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL03106  C   ABCDE00018858                 2020012305150000D1SUDU8575079              
TL03106  C   ABCDE00018858                 2020012305150000D212638606500000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA
TL03106  C   ABCDE00018858                 2020012305150000D1TCKU6508788              
TL03106  C   ABCDE00018858                 2020012305150000D212638608700000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA0
TL03106  C   ABCDE00018858                 2020012305150000D1TCNU2982303              
TL03106  C   ABCDE00018858                 2020012305150000D212638609200000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA0
TL03106  C   ABCDE00018858                 2020012305150000D1TCNU4581758              
TL03106  C   ABCDE00018858                 2020012305150000D212638614400000000103106  
TL03106  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA0
TL00973  C   ABCDE00018858                 2020012305150000D1TCNU5143083              
TL00973  C   ABCDE00018858                 2020012305150000D212638606300000000103106  
TL00973  C   ABCDE00018858                 2020012305150000D300069808600000000021000EA0
TL00973  C   ABCDE00018858                 2020012305150000T1000000001
 


Regards,
Rakesh MS


topic edited to add the code tags
rakeshsneha1212
 
Posts: 30
Joined: Thu Mar 30, 2017 2:09 pm
Has thanked: 5 times
Been thanked: 0 time

Re: I want to include records between header and trailer

Postby enrico-sorichetti » Wed Jan 29, 2020 6:06 pm

we reply on our own time and free of charge

WE EXPECT SOME COURTESY from the people asking for help

when posting data to be used in a sort step USE the CODE tags
makes the data understandable and makes easier to find out the starting end ending columns of the fields

Your post has been edited to use the CODE tags
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: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: I want to include records between header and trailer

Postby sergeyken » Wed Jan 29, 2020 8:30 pm

rakeshsneha1212 wrote:I have an input file with the below format, I want to keep D1, D2, D3 records if the first 6 bytes of my data has TL03106 and to write it's corresponding H1 & T1 irrespective of what is there in first 6 bytes in H1 & T1 of the file.


1) What exactly prevents you from doing this?

2) What did you try so far? Where are the results of your own efforts?

Looks like nothing else is needed but:

1) to get access to mainframe, including TSO/ISPF, and batch processing
2) to read something about SORT utility
3) to try using SORT control statements; only INCLUDE, and SORT must be enough.

Any Example #1 of any SORT guide gives you the template: how to do this.
Last edited by sergeyken on Wed Jan 29, 2020 8:33 pm, edited 1 time in total.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: I want to include records between header and trailer

Postby NicC » Wed Jan 29, 2020 8:32 pm

TL03106 is 7 bytes not 6. What have you tried? Where are you stuck? What is your expected output from the input that you have shown? What sre the dataset (not 'file') characteristics i.e. LRECL and RECFM?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post