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 |
SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.
If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it
Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS
What is the difference between CALL BY VALUE and CALL BY CONTENT?
how we rectify soc7 and soc4 errors in project?
Explain how you can characterize tables in cobol?
How do get the result of your program directly on your pc?
what happens if parmparameter passes zero bytes to the program
how to transfer the file from pc to mainframe??
Which Search verb is equivalent to PERFORM…VARYING?
Without using move verb how to move one variable to another.
if a file has 1000 recods how copy the records from 1 to 100 records using sort