View previous topic :: View next topic
|
Author |
Message |
sunny_io
New User
Joined: 11 Jul 2007 Posts: 68 Location: noida
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
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 |
|
|
sunny_io
New User
Joined: 11 Jul 2007 Posts: 68 Location: noida
|
|
|
|
Hi Dave.
Thanks I got what i needed to know.
Sunny |
|
Back to top |
|
|
|