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



If my file contains 100,000 records and job abended at 55,000th records processing then how can i r..

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

If my file contains 100,000 records and job abended at 55,000th records processing then how can i r..

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

If my file contains 100,000 records and job abended at 55,000th records processing then how can i r..

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

If my file contains 100,000 records and job abended at 55,000th records processing then how can i r..

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

If my file contains 100,000 records and job abended at 55,000th records processing then how can i r..

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

Post New Answer

More COBOL Interview Questions

How do define dynamic array in cobol.

0 Answers  


What is a subscript ?

3 Answers  


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?

2 Answers   TCS,


What is the difference between perform … with test after and perform … with test before?

0 Answers  






88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above

5 Answers   TCS,


Without using move verb how to move one variable to another.

5 Answers  


How do u initialize an array?

2 Answers   CTS,


How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.

7 Answers   Financial Services,


how to code in cobol while using variable block file?

1 Answers  


What are the ways you can generate a copybook?

2 Answers  


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

0 Answers   HCL,


Categories