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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Confused with "value is" clause ! when's the value
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: 241
Location: Cincinnati OH USA

PostPosted: Mon Jul 05, 2010 4:02 pm    Post subject:
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    Post subject: Thanks.. i got it..
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    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 Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm


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