IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can i use two variables in a varying class of Perform


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Thu Nov 23, 2006 7:27 pm
Reply with quote

Hi All,

I have small doubt, as can i use two variables in a varying class of Perform as refer the syntax

PERFORM VARYING WW-TEMP-WK WW-TEMP-HT
FROM 7 BY -1 UNTIL WW-TEMP-HT = 0
OR UNUSE-CHANGE-FOUND

I want to increment both of them at once.I do know that i can perform one variable and make other to refer that value as

PERFORM VARYING WW-TEMP-HT
FROM 7 BY -1 UNTIL WW-TEMP-HT = 0
OR UNUSE-CHANGE-FOUND
SET WW-TEMP-WK TO WW-TEMP-HT.

I just want to know whether first one is possible.

Cheers
Ashwin
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 23, 2006 8:23 pm
Reply with quote

Hi Aswin

The syntax you have given is invalid.It will give compile time error.

Thanks
Arun
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 23, 2006 8:25 pm
Reply with quote

You cant give 2 variables after " PERFORM VARYING ...It is not possible.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Nov 23, 2006 10:38 pm
Reply with quote

Hi Ashwin,

You can use more than one variable if you are using a multi level tbl, but you must use the AFTER phrase. See the diagram in the link below:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IGY3LR10/6.2.27.5?SHELF=&DT=20020920180651&CASE=
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Nov 24, 2006 10:37 am
Reply with quote

But i dont think the AFTER phrase option will solve his problem.

Quote:
I have small doubt, as can i use two variables in a varying class of Perform as refer the syntax

PERFORM VARYING WW-TEMP-WK WW-TEMP-HT
FROM 7 BY -1 UNTIL WW-TEMP-HT = 0
OR UNUSE-CHANGE-FOUND

I want to increment both of them at once.


Plz let me know hw come it be possible to increment both the values at once using AFTER phrase.

Thanks
Arun
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Fri Nov 24, 2006 8:35 pm
Reply with quote

Hi all,

Yes i know that it will give compliation error if i use that, i just thinking if i can set two variables using a set command then why cann't i vary two Variables.

And i never tried this earlier, when i was trying i got a compliation error. So i just want to confirm that can it be possible in any other way.

And using after doesn't satisfy my purpose.

Thanks all for the spending time on this.

Cheers
Ashwin
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Nov 25, 2006 4:52 am
Reply with quote

Arun,

I didn't mean that AFTER would solve his prob. I said the only way to VARY 2 variables is in a multi-level tbl w/AFTER.

He may be able to solve his problem by subtracting 1 from WW-TEMP-WK in the performed pgraph.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Use of Perform Thru Exit COBOL Programming 6
No new posts building java class with zip4j.jar on... Java & MQSeries 0
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts JCL with variables JCL & VSAM 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top