I am having the requirement to extract the data from the report .so i am using sort to extract the records that the field EVENT HAVING '1'
I can able to extract the first line of the record only i need the USER NAME(USER ID) field also it is in the second line ,please let me know how to extract the USER NAME Field using sort
DATE TIME SYSID NAME GROUP EVENT
08.022 09:54:23 SP07 USERIDV XXUSERSX 1
USER ID AAAA
08.033 09:22:20 SP06 USERIDJ XXXUSERV 1
USER ID BBBB[img][/img]
It's not clear what you want to do. You show two records that end with '1' each followed by a USER ID record. If that's what the report really looks like, then you could just use INCLUDE to include each record with '1' and each record with 'USER ID'. If it's more complicated than that, for example some records don't have a '1' so you don't want those records or the USER ID records that follow them, then you need to show a better example of your input records with all variations and your expected output. Explain the "rules" for getting from input to output. Also, give the RECFM and LRECL of the input file and the starting position, length and format of each relevant field.