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 |
what is the use of comp2 ? where can we use it with example ?
What do you understand by psb and acb?
Suppose i want to declare a binary comp fild of 7 byte .how to write?
What is report-item in COBOL?
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
What do you do to resolve SOC-7 error?
COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.
What is the difference between Global and External Variables?
db2 variable decimal(15,2) what is the equalent size of cobol variable
can we print comp 3 stmts how ?