View previous topic :: View next topic
|
Author |
Message |
lewafa
New User
Joined: 13 Feb 2008 Posts: 3 Location: India
|
|
|
|
Hi,
I have a quick question on the below code with how the PERFORM statement works..
Code: |
.
.
.
PERFORM PARA-NAME-1 THRU PARA-NAME-1.
.
.
.
PARA-NAME-1.
.
.
.
EX-PARA-NAME-1.
EXIT. |
Ideally the above PERFORM statement should have been written as
PERFORM PARA-NAME-1 THRU EX-PARA-NAME-1. But there was a typo mistake and the actual code was PERFORM PARA-NAME-1 THRU PARA-NAME-1. When the above code is executed will the statements inside the PARA-NAME-1 would be executed or not? |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Quote: |
When the above code is executed will the statements inside the PARA-NAME-1 would be executed or not? |
They will be executed (once). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But there was a typo mistake and the actual code was PERFORM PARA-NAME-1 THRU PARA-NAME-1. |
If there is an instruction in PARA-NAME-1 that issues a GO TO EX-PARA-NAME-1, the result will be unpredictable as the execution can "fall thru" and cause a wide variety of surprises. . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Why not run a quick test for what you've asked? |
|
Back to top |
|
|
|