sample code for read a 2nd record from last in flatfile how
can do?
Answer Posted / nsingh
ADD SEQUENCE NUMBER
SORT FIELDS=COPY
OUTREC FIELDS = (1,80,SEQNUM,ZD,A)
NOW SORT SEQ NUM IN DESCENDING ORDER
SORT FIELDS=(81,4,ZD,D)
INCLUDE ONLY 2ND LAST REC
SORT FILEDS = COPY
INCLUDE COND = (81,4,ZD,EQ,0002')
REMOVE SEQ NUM FROM FILE & THIS REC IS SELECTED
SORT FIELDS =COPY
OUTREC FIELDS = (1,80)
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Define cobol?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Describe the cobol database components?
Write the code implementing the perform … varying.
What is rmode(24)
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 u handle errors in BMS macro
Which Search verb is equivalent to PERFORM…VARYING?
How do you get the data to code the BMS macro?
Can we change the password using ALTER? anyone tried and changed?
Difference between array and sub-script ?
example for sub strings ? and refernce modifications whit output pls