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
 

 

Question regarding perform.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Nov 16, 2007 12:43 pm    Post subject: Question regarding perform.
Reply with quote

I have my code like this :-
Add 1
To A
Giving B

Then Perform
Varying B
By 1
Until B > 10

My question is syntax of Perform is ok??because there is no start position using From and i dont want to use From 1 as we are varying B so can i give this like :-

Perform
Varying B
From B
By 1
Until B > 10
Back to top
View user's profile Send private message

Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Nov 16, 2007 1:07 pm    Post subject:
Reply with quote

Yes we can use the above logic..
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Nov 16, 2007 1:10 pm    Post subject:
Reply with quote

Quote:
I have my code like this :-
Add 1
To A
Giving B

Then Perform
Varying B
By 1
Until B > 10

My question is syntax of Perform is ok??because there is no start position using From and i dont want to use From 1 as we are varying B

The syntax of PERFORM statement is wrong.
Quote:
so can i give this like :-

Perform
Varying B
From B
By 1
Until B > 10

Yes, you can code like this.

You can use any one of the following PERFORM statements for your requirement.
Code:
PERFORM VARYING B FROM B BY 1 UNTIL B > 10
...
...
...
END-PERFORM

Code:
PERFORM UNTIL B > 10
COMPUTE B = B + 1                         
...
...
...
END-PERFORM
Back to top
View user's profile Send private message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Nov 16, 2007 1:17 pm    Post subject: Reply to: Question regarding perform.
Reply with quote

Thanks alott dudes
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 Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts How to perform Digest Access Authenti... vasanthz All Other Mainframe Topics 0 Tue Mar 15, 2016 4:47 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm


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