If my file contains 100,000 records and job abended at
55,000th records processing then how can i restart job from
that record onward by ignoring that record. I can not edit
the file as file size is big and it is getting browse
substituted?
Answers were Sorted based on User's Feedback
Answer / neeraj
I think this logic is sufficient to fullfill this req:
// pgm=dfsort
/*
sort fields=copy,skiprec=55000
*/
//srtin dd dsn=orig-file
//sortout dd dsn=newfile
| Is This Answer Correct ? | 18 Yes | 0 No |
Answer / lenin
if the file used in cics region, we can browse and read the
file from the record after the fault record by using
startbr,readnext and endbr commands.
if not, we can copy all the records after the fault record
to the new file and we read the new file,
The following code is used to create a new file which will
have the records after the fault record
// pgm=dfsort
/*
sort fields=copy,stopaft=45000,skiprec=55000
*/
//srtin dd dsn=orig-file
//sortout dd dsn=newfile
...
--Then you can read the new file in the cobol program.
Please correct me if i am wrong.
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / sj@iy
Code sort fields as
SORTIN DD *
OPTION COPY
SKIPREC(55000)
/*
This will skip all records upto and including 55000th record
OR
SORTIN DD *
OPTION COPY
OUTFIL STARTREC=550001,ENDREC=100000
/*
This will copy records from 550001 to 100000
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / tdagar
We can skip 55000 records using File-Aid as well. Copy the
file into another file and mention 55000 against Skip
records.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / hemant borase
// pgm=dfsort
/*
sort fields=copy,stopaft=55000,skiprec=55000
*/
//srtin dd dsn=orig-file
//sortout dd dsn=newfile
...
correct me if i am wrong because we need to skip only
55,000th record.
am i rt?
| Is This Answer Correct ? | 1 Yes | 3 No |
WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?
How to resolve the soc4 and soc7 errors?
IF I mention stop run in CICS what happens?
How do you define a variable of comp-1 and comp-2?
I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?
I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?
how do u link sub pgm to main pgm ?
Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries given below: 01 END-OF-FILE-SWITCH PIC XXX. 88 NO-MORE-RECS VALUE "YES". 88 MORE-RECS VALUE "NO". (i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS. (ii) IF NO-MORE-RECS = "YES" GO TO LAST-PARA. (iii) IF NO-MORE-RECS GO TO LAST-PARA. Which are wrong? (a) (i) and (ii) (b) (ii) and (iii) (c) (i) and (iii) (d) all
What is sqlca and why is it needed in any cobol-db2 program?
Explain complete concept of table handling in COBOL with an example?
can we use 77 level no for Redefines?if we use give an example?
I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.