Below is the sample input record and the output expected
Is this is possible using a sort jcl?
I just want the records at 1,5,10 etc. Since the file is in production I dont have access to view it directly.
INPUT: ABCXYZ.UTIL.TEST
AB
AB
DC
DC
DC
PQ
PQ
SR
RQ
CD
AB
CD
CD
AB
Yes the sequence number is fixed but it not multiple. For example it can also be 1,6,8,11 etc until end of file. I also want the last record of the file.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
SanaR,
It should strike you, forcefully, that you know what you want, and no-one else does.
If you cannot describe exactly what it is is that you want, with sample input and expected output which matches your exact description, the topic will be locked, as it can go nowhere. It is up to you.
I have clearly mentioned the sample and expected output. And I have also mentioned that the file is in prod so I cannot view it and the only thing that can be assumed is record at line number say 1,6,10 and last record
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
You will have to get a copy of the dataset (not 'file') cut and paste some of the data (after concealing sensitive data) and describe what you want more fully. You will need a copy anyway so that you can test the solution.
Do you want the 1st, 6th, 10th and last records no matter what their content? If not, what is the criteria? What are the dataset characteristics - RECFM and LRECL? What if there are 10 records? Do you want the 10th record twice? What if there are less than 10 records?
The situation is I will be unloading the data from image copy of a table which has nearly 30 million records. Data set in which I will be unloading will be PS, FB, 20 bytes(20 bytes can change) . Then I would like to fetch records at line 1, 15000000, 29923210 and last records. The only thing I will know is these line numbers and that the records are 30M. The records key is from 1-19. Please let me know if I am still unclear.
Sorry not able to paste the sample file image. so pasting this:
I have clearly mentioned the sample and expected output.
You did not mention anything useful ...
Quote:
I just want the records at 1,5,10 etc.
and then
Quote:
For example it can also be 1,6,8,11
and then
Quote:
1, 15000000, 29923210 and last records
so You have no reason to complain ...
people replying on forums do it on their OWN time and FREE OF CHARGE
so if You do not want spend time helping the people who try to help You
by CLEARLY defining and explaining the requirements You will find that people will not be keen on helping YOU
so the real question is ...
are the record numbers FIXED in value and number or they can change ?
the solution will be different for each case
Apologies as this my first query and I appreciate everyone's time.
Yes the record no. is fixed in value and number. In the above response I have provided the input file to the sort and the expected output should be something like below:
Code:
LINE NUMBER RECORD COUNT OF RECORD
1 9999920002155556 18
15000000 9999930002155555 25
29923210 9999960008888899 10
LAST RECORD 9999978888888899 16