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 QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm


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