MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Doubt in COBOL OS/VS code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
rajeshkoratti
Beginner


Joined: 14 Feb 2006
Posts: 42
Topics: 22

PostPosted: Wed Mar 01, 2006 8:25 am    Post subject: Doubt in COBOL OS/VS code Reply with quote

Hi
I was analysing a piece of cobol code which was running in VM environment. I had to migrate the same code to MVS. when compiled the same code in MVS i got an error at a particular statement which looks liek this

ON 50 AND EVERY 50
Imperative Statements....

and..

ON 1
MOVE A TO B
ELSE
MOVE 2 TO B


and..

ON DB-ERROR
PERFROM Z100-PARA.

The third one i was able to understand as the DB-ERROR was a 88 level variable and upon it being true the PERFORM happens but the first two i am a confused..

when searched in net i found out that ON statement is used in COBOL OS/VS and IBM has removed the manual pertaining to it.

Can any of you experts help me out on some documentation of the ON clause or specifically explain me what the first two statement do? And what can i do to implement the same logic when migrating to mVs (Enterprise COBOL)
_________________
Thanks and Regards..
Rajesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
rajeshkoratti
Beginner


Joined: 14 Feb 2006
Posts: 42
Topics: 22

PostPosted: Mon Mar 06, 2006 5:50 am    Post subject: Reply with quote

Kolusu!!! Davey!!!
please help me boo hoo hooo Crying or Very sad
_________________
Thanks and Regards..
Rajesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Mon Mar 06, 2006 9:01 am    Post subject: Reply with quote

rajeshkoratti,
ON 1 specifies first time, ON 2 second time..I mean iterations. I have not used it, but its equivalent of a Evaluate statement, however the counter is maintained internally by the program. Refer to the OS/VS migration guide - not much information here but would help.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYM1101/4.2.6?DT=19930312152044
Back to top
View user's profile Send private message
rajeshkoratti
Beginner


Joined: 14 Feb 2006
Posts: 42
Topics: 22

PostPosted: Mon Mar 06, 2006 10:05 pm    Post subject: Reply with quote

iterations as in?
does it mean that the program works like a pseudo conversation in CICS?
or does it mean that each time the paragraph or the ON Statement is executed the 'counter' is incremented?
_________________
Thanks and Regards..
Rajesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Tue Mar 07, 2006 9:54 am    Post subject: Reply with quote

rajeshkoratti,

When you don't find it anywhere else, you will find it in "google".
Never encountered "ON" statement, but this is what google gives me -

http://supportline.microfocus.com/documentation/books/mx30/lrpdfa.htm#s007

From what I understand about your question, this reference should be sufficient for your needs.

HTH...Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group