Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


after udatingg first 110 rows, my job abends. now how do i
change my cobol program so that when i restart the Job it
will start updating from 111th row ( i.e in next run I
di=ont want to update those 110 rows which are already been
updated in the first run before job abend)

Answers were Sorted based on User's Feedback



after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / raj

You can use check point logic in JCL or you can do this in
program using a recovery-restart table.
1)First time when program runs it reads this table. No
records .. proceed..
2)Process 50 records .. store 50th record key in table..
then proceed to process file from 50th record..
3) Say program failed at 65th record..
4)Restart the job..
5)Program first look the restart table.. It has key value
of 50th record..
6)So set pointer to 51st record and start processing.
7)If your system is unrealiable and set commit frequency 5
or 10 records..

Is This Answer Correct ?    5 Yes 1 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / sasha

- allocate control file with counter init to zero
- when you successfully processed your input records
accumulate your counter on control file
- if you abend then in your program first find out in
control counter is > 0. Then you reread your input file
until number of records read is equal to your counter on
control file. Next record is your current record to be
processed

Is This Answer Correct ?    3 Yes 0 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / satish

Hi Raj,

Can u tell me how to do this with files.

Is This Answer Correct ?    3 Yes 1 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / mallappa

You can use Restart Logic in DB2.

Is This Answer Correct ?    1 Yes 0 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / kavitha

Use PARM parameter in JCL to pass the key value of the 111
record and process the program

Is This Answer Correct ?    1 Yes 0 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / kapil arya

For this situation, we must use the Check Point and Restart
Logic in COBOL program wherever you are reading or modifing
the Record from a file or a Db2 Tables.

For this you have to define one counter variable in working
storage section which contains your Recod Key.
01 WS-EMP-REC-KEY PIC X(8).
01 WS-SVE-CNT-KEY PIC X(8).
And after that first time when you will start reading the
file you have to check it
If WS-SVE-CNT-KEY = SPACES then start reading the record
from first record and as per you requirement you can save
you record key in this counter variable after 500 (for E.g)
and increase you counter variable by 1 after reading each
record when the counter variable will reach on 500 then
move this value to save variable.
Move WS-EMP-REC-KEY TO WS-SVE-CNT-KEY.
And then Write your 500 record in a file. And using the
COMMIT save this status. and after that set the counter
value to 0 again and start it from top...
And suppose You job abends after reading 1055 records that
means 1000 records has been written in your o/p file. and
when you restart your job again it will match again
If WS-SVE-CNT-KEY = SPACES then this variable will have the
record key of 1000th record then it will start readind the
record from 1001..

Is This Answer Correct ?    0 Yes 5 No

after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i ..

Answer / navjeet kumar

we have to use restart command to update from 111th row

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More COBOL Interview Questions

I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??

2 Answers   HCL,


I have a occurs for 100 times but it has executed 101 time what could be the reason?

4 Answers  


how to code in cobol while using variable block file?

1 Answers  


What is the difference between COMP & COMP-3 ?

2 Answers  


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

0 Answers  


How many maximum number of procedures can we write in one COBOL program?

6 Answers  


Can the OCCURS clause be at the 01 level?

8 Answers   Oracle,


How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


Can anyone tell me how to handle the array beyond the limit. If we have an array or a table which can handle 5000 records but now we have to compensate 20000 records with the same array? how to handle the situation.

2 Answers  


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

0 Answers  


Categories