can we use go to statement inline-perform?

Answers were Sorted based on User's Feedback



can we use go to statement inline-perform?..

Answer / sandy

The below code is possible, if that is what asked.
1000-PARA
PERFORM VARYING
IF <CONDITION>
GO TO 1000-EXIT
END-IF
OTHER STATEMENTS.....
END-PERFORM

1000-EXIT
EXIT.

Is This Answer Correct ?    6 Yes 0 No

can we use go to statement inline-perform?..

Answer / suputhru

Yessssssssssssss!!!

Raveeeeee,shruti! we can use go to statement inline-perform.

If we use goto in inline then control will goto particular para and wont return.
thus control will comes from inline.

thus, no probs, u can use go to.
So please, don't give blindly answers.

-Sk

Is This Answer Correct ?    3 Yes 0 No

can we use go to statement inline-perform?..

Answer / ravi

No we cant.

Inline perform is - -> PERFROM END-PERFORM.

Is This Answer Correct ?    3 Yes 1 No

can we use go to statement inline-perform?..

Answer / mr.perfect

hello Suputhru ,

if you use GOTO statement inside the inline perform, the
control will go permanently to the GOTO statement.then what
about the other statements after END-IF, this will not
executed man. i think this is not good design of programmr.

Is This Answer Correct ?    1 Yes 0 No

can we use go to statement inline-perform?..

Answer / sruthi

Hi,
we can't use GO TO statement in in-line perform.goto
should be used with in the range of paragrafhs being
executed.
in-line syn is, perform--- end-perform.

Is This Answer Correct ?    3 Yes 3 No

can we use go to statement inline-perform?..

Answer / jswan

Yes you can, although that is not good programming practice.

Is This Answer Correct ?    0 Yes 0 No

can we use go to statement inline-perform?..

Answer / jswan

Yes you can but that is not good COBOL programming practice at all.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

How to solve SOC7. I have the cobol coded as below 01 A PIC 9(4). 01 AIN REDEFINES A. 05 AIN1 PIC S9(4) 01 B PIC 9(4)V99. 01 BIN REDEFINES B. 05 BIN1 PIC S9(4)V99. PROCEDURE DIVISION. START-PARA. INITIALIZE A AIN B BIN. ACCEPT A B. DISPLAY 'VALUE OF A=' A. DISPLAY 'VALUE OF B=' B. DISPLAY 'VALUE OF BIN1=' BIN1. DISPLAY 'VALUE OF AIN1=' AIN1. COMPUTE AIN1 = BIN1 - AIN1. DISPLAY 'VALUE OF AIN1=' AIN1. When i'm executing this code i'm getting SOC7 for A = 12 & B=34. Can someone explain SDSF OUTPUT DISPLAY TCOM058R JOB05458 DSID 102 LINE 0 COLUMNS 02- 81 COMMAND INPUT ===> SCROLL ===> CSR ********************************* TOP OF DATA ********************************** VALUE OF A=12 VALUE OF B=34 VALUE OF BIN1=34 VALUE OF AIN1=12 CEE3207S The system detected a data exception (System Completion Code=0C7). From compile unit PROG1 at entry point PROG1 at statement 29 at compile +000004CE at address 00007ECE. Please address how to solve this issue Thanks in advance.

1 Answers  


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?

2 Answers   HCL,


What is the difference between subscript and index?

1 Answers  


Can the OCCURS clause be at the 01 level?

2 Answers  






What are the different data types in cobol?

0 Answers  


How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


What is amode(24)?

0 Answers  


how to display comp3 variables reply soon ?

4 Answers   Patni,


subscript and index r not coded in u r application program what will happen?

2 Answers  


what is the difference between external and global variables?

1 Answers  


Why we are using comp and comp-3 in real time projects?

4 Answers   IBM,


Categories