IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Confused with "value is" clause ! when's the value


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jul 05, 2010 2:47 pm
Reply with quote

Hi All..

I have a program A in which at the beginning I am assigning a ws-count variable to a value of '0' using value is clause.
During program execution this value changes and my program ends with 'go back' statement,
now the transaction has not been committed and the jcl which invoked this program is also still running. Program A is called again , and the value of ws-count i see is preserved..
I thought that each time program would start , "value is" clause should initialize this variable ws-count to '0'.. Is that wrong.

TIA
Sunny
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Mon Jul 05, 2010 4:02 pm
Reply with quote

see INITIAL in COBOL ref manuals at top of this page.



Best to set values desired upon entrance to program with a MOVE stmt. Then you know what you have in the first reference to that field.
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jul 05, 2010 4:33 pm
Reply with quote

Hi Dave.
Thanks I got what i needed to know.

Sunny
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts To search DB2 table based on Conditio... DB2 1
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Using PARM=('JPn"&SYMBOL&quo... DFSORT/ICETOOL 2
Search our Forums:

Back to Top