Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perform with two until conditions 1

Status
Not open for further replies.

RoseAnnM

Programmer
Jul 27, 2001
4
US
We are beginning a conversion to Cobol OS/390. I read in the migration manual that a perform until condition 1 or condition 2 is not allowed. Does anyone know if this is the case?
 
I checked the IBM COBOL/390 Conversion manual, and could not find the rule you state. Could you give me a section reference?

In "6.2.27.4 PERFORM with UNTIL phrase",
The COBOL/390 Language Reference diagram shows "UNTIL condition-1" only, but explains further that "condition-1" can be any type of condition in "6.1.6 Conditional expressions", which includes combined conditions (condition-1 and/or condition-2), as well as complex conditions.

If you can show me where to look up your rule, I will investigate further.

Stephen J Spiro
Member, J4 COBOL Standards Committee
check it out at
and

stephenjspiro at hotmail.com
 
I found the reference in the Cobol for OS/390 IBM Compiler and Run-Time Migration Guide (GC26-4764-05) page 126.
Thanks for your help.
 
You must have a brand-new book; the IBM versions on the web are GC26-4764-04. It must be a brand-new rule. Can you quote the section, please?

I just checked the Draft Standard, and the rule has NOT changed there; it can be as I desribed in the last post: combined and complex conditions are allowed.

Stephen J Spiro
Member, J4 COBOL Standards Committee
check it out at
and

stephenjspiro at hotmail.com
 
This is news to me. Because I just wrote a program in VS COBOL II which contains a ton of PERFORM UNTIL paragraphs where the PERFORM UNTIL reach either one of 2, or sometimes 3 or sometimes even more, conditions. I don't think that COBOL OS/390 is any different.

The program is in our final testing and will soon go into production.

You have to be very careful about how you word the conditions, but you can have as many conditions as you wish, I believe.

Nina Too
 
Hi All,

The Section Rose Ann cites is 4.1.6 and it calls multiple UNTIL conditions "an undocumented extension" and states that it "must be removed". Are we misinterpreting? Did IBM err? Is it just a bad dream?

I use multiple UNTIL conditions all the time, and I'm sure others do too.

Regards, Jack.
 
Without seeing the Text I cannot be assured of being totally correct... but...

IBM used to allow:

Perform Until xxxxx
Until xxxxx
Until xxxxx

Etc...

Multiple UNTIL (not Multiple CONDITIONS). The original poster said multiple CONDITIONS were not allowed - and I find that hard to swallow. It's in the '85 standard!

However, Multiple UNTIL's are not - and should be removed. Is this what the "new" IBM documentation is saying?

Most importantly - did the original poster TRY one using the new compiler (multiple conditions after the Until) and did it work?

 
Since I originally posted this, I have gotten access to an OS/390 compiler and this condition was not flagged as an error. Up until then, I only had access to the documentation from IBM which cites the following example as not allowed:

Perform check-for-match thru check-for-match-exit until parm-count = 7 or ssrejadv-eof.

Since this type of perform is very commom in all our COBOL II programs, I was concerned when I read the documentation.

I have not tested the program yet, so I still don't know if this will present a problem.

Thanks for the discussion.
 
Still waiting to hear from Ann Bennett, but Bill Klein says it is the Migration Manual which is wrong, not the compiler. The example shows how the code SHOULD look, even tho it says it is the non-conforming bad code.

Stay tuned.

Stephen J Spiro
Member, J4 COBOL Standards Committee
check it out at
and

stephenjspiro at hotmail.com
 
I have an OFFICIAL reply from IBM on this question. The MANUAL (Migration Guide) was in error, the compiler has it right.
*-----------------------From IBM:

We meant the text to read like this:

PERFORM statement-second UNTIL

OS/VS COBOL allowed a second UNTIL in a PERFORM statement, as in the following example:

PERFORM CHECK-FOR-MATCH THRU CHECK-FOR-MATCH-EXIT
UNTIL PARM-COUNT = 7
OR UNTIL SSREJADV-EOF.

IBM COBOL does not allow a second UNTIL statement. The above statement must be changed to:

PERFORM CHECK-FOR-MATCH THRU CHECK-FOR-MATCH-EXIT
UNTIL PARM-COUNT = 7
OR SSREJADV-EOF.
*-------------
The new compiler will not accept multiple UNTIL statements, but it WILL accept multiple conditions. The Migration Guide will be fixed in the next edition.


Stephen J Spiro
Member, J4 COBOL Standards Committee
check it out at

stephenjspiro at hotmail.com
 
Hi Stephen,

I'm sure I speak for all of us when I say "thanx" for using your good offices and taking the time to verify IBM's position on this.

Phew, Jack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top