Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can i use two variables in a varying class of Perform

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Can i use two variables in a varying class of Perform
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: 2181
Location: @my desk

PostPosted: Thu Nov 23, 2006 8:23 pm    Post subject: Re: Can i use two variables in a varying class of Perform
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: 2181
Location: @my desk

PostPosted: Thu Nov 23, 2006 8:25 pm    Post subject:
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    Post subject:
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: 2181
Location: @my desk

PostPosted: Fri Nov 24, 2006 10:37 am    Post subject:
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    Post subject: Re: Can i use two variables in a varying class of Perform
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we have the varying lenth of ... Gunapala CN DFSORT/ICETOOL 6 Fri Oct 14, 2016 7:31 pm
No new posts XFACILIT class setting for Fault Anal... egrove IBM Tools 2 Thu Aug 11, 2016 8:02 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us