How you can read the file from bottom?

Showing Answers 1 - 5 of 5 Answers

Lazar Kaplansky

  • Aug 8th, 2006
 

The questions is very general.  Let's look into these possibilities:

1.  QSAM (sequential) file.  You can run it thru SORT utility adding SEQNUM and then sort then sort by SEQNUM in DESC order

2.  VSAM: In CICS, you can read backward using READREV; i

3. VSAM: I Batch, unload the VSAM file using SORT in DESC order by

key value

Hope that helps

  Was this answer useful?  Yes

deepa

  • Oct 2nd, 2006
 

in sequential file

  Was this answer useful?  Yes

P.Karthikkumar

  • Jan 17th, 2007
 

Hi,

 It is possible through jcl. For example if the input file contains 80 record length then

In sort, INREC=(1:1,80,81:SEQNUM,6,ZD),SORT FIELDS=(81,6,ZD,D),OUTREC=(1:1,80)

 1) Using inrec we need to generate the sequential number starts from position 81.

     For example

           1) First 1-80 bytes contains the actual record and from position 81 we need to generate sequential number using inrec i.e 000100, 000200 upto 50 records.  

           2) After generating all those numbers, sort we takes place in descending order.

           3) Using outrec we have to move the first 80 bytes to the output file.

After doing this sort in first step in jcl, you can read the output file in second step

Thanks

Karthikkumar.P

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions