Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 JES2 EXIT 6 QUESTION Randy Horowitz All Other Mainframe Topics 30 Tue Feb 06, 2018 5:47 pm
No new posts question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us