How to read records from flat file in reverse order through
COBOL program?
Answer Posted / dimpy19
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT DATASET,DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE IN REVERSE ORDER,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTREC FIELDS=(1,80)
/*
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What is the difference between goback, stop run and exit program in cobol?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
Which is not true about evaluate statement
What are all the divisions of a COBOL program?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
what are decleratives in cobol?
how do you reference the variable unblock file formats from cobol programs
how do you define single dimensional array and multidimensional array in your cobol?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How do define dynamic array in cobol.
How you can read the file from bottom?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is difference between static and dynamic call in cobol?