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 |
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?
I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?
what are the steps to sort in a cobol program?
What are the steps you go through while creating a COBOL program executable?
What is the difference between NEXT SENTENCE and CONTINUE?
What type of SDLC u followed? Why?
What is Redefines clause?
What does the INITIALIZE verb do?
What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?
How is sign stored in a comp-3 field?
SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.