How to Write the RESTART Logic Using COBOL?
Answers were Sorted based on User's Feedback
i thing restart is using in jcl this is exec parameter,
if we have the 3 steps in jcl
//step1
//step2
//step3 in this case we run the jcl and got the abend at stop3,we don't want to run again step1 and step2,
directly we write like this
Restart = step3 bypass step1 to step2.
| Is This Answer Correct ? | 7 Yes | 12 No |
Answer / mahendra babu
it is a keyword parameter at job level which is used restart the job from a specific step as per the user requriment.
syntax: 1) restart = step name.
2)restart = jclstep.proc step.
ex:-//jobcard , restart= (s3).
//s1
//s2
//s3
//s4
at the above ex is used to restart the job from s3 using the restart parameter.
| Is This Answer Correct ? | 2 Yes | 8 No |
I have PS flat file with 14 records. I want to read from 4th to 9th record and want to write those 6 records (4th record to 9th record) to another PS file (output file). there is no key defined in the input file. I just want read a certain Consecutive records. can any one please give me the procedure division Coding for this. I have coded the below coding but the READ-PARA is performing only 1 time even though I have 14 records in my input file (i.e FILE-1): PROCEDURE DIVISION. A000-SECTION. MOVE 0 TO I. OPEN INPUT FILE-1. IF CHECK-KEY1 > 0 DISPLAY "OPEN ERROR FOR FILE-1, CODE IS:" CHECK-KEY1 END-IF. OPEN EXTEND NEWFILE-1 IF CHECK-KEY3 > 0 DISPLAY "OPEN ERROR FOR NEWFILE-1 COD IS" CHECK-KEY3 END-IF. PERFORM READ-PARA THRU EXIT-PARA UNTIL EOF-REC = 'YES'. DISPLAY " FINALLY OUT OF LOOP" CLOSE FILE-1 CLOSE NEWFILE-1 STOP RUN. READ-PARA. ADD 1 TO I READ FILE-1 AT END MOVE 'YES' TO EOF-REC IF I > 3 AND < 10 PERFORM WRITE-PARA ELSE DISPLAY "NOT IN RANGE" END-IF. EXIT-PARA. EXIT. WRITE-PARA. WRITE NEW-REC FROM FILE1-REC.
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
how will u pass dadta to cobol+db2 program...?
Hi Guys, I have faced one interview question if I have requirement to add 5 new columns to existing table what are prerequisite do i need to take.
)what is retrieve?
RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE
what are the limitations of Inline Perform?
s9(18) comp-3:: What is the size of memory it takes internally?
can we use variable picture clause as xx.99 in cobol.
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).
If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??