How to read the last 100 records from a COBOL file. The file
contains N number of records.
Answer Posted / heeraj r
Pls post the correct question. I am not sure what you mean
by COBOL file, is it PS or VSAM or Tape etc etc? If you
want last 100 records of a file use below SORT JCL, and if
required that output file can be read in your COBOL.
//S1 EXEC
PGM=ICETOOL
//TOOLMSG DD
SYSOUT=*
//DFSMSG DD
SYSOUT=*
//IN DD DSN=... input
file
//OUT DD DSN=... output file
//TOOLIN DD
*
SUBSET FROM(IN) TO(OUT) KEEP INPUT LAST(100)
/*
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
In COBOL programming, what is PERFORM? What is VARYING?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
Give some examples of command terminators?
Name some of the examples of COBOl 11?
What is perform what is varying?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is the difference between structured cobol programming and object alternativelyiented cobol?
What guidelines should be followed to write a structured cobol prgm?
What are the different types of condition in cobol and write their forms.
How do get the result of your program directly on your pc?
explain sorting techniques in cobol program?
What is the local-storage section?