View previous topic :: View next topic
|
Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Is it compulsory to initialize the tally counter used along with the INSPECT TALLYING option?If the counter is left uninitialized I am getting SOC7error.
What could be the reason?
Thanks
Arun |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
From the fine manual:
identifier-2 Is the count field, and must be an elementary integer item defined without the symbol P in its PICTURE character-string. identifier-2 cannot be an external floating-point item. You must initialize identifier-2 before execution of the INSPECT statement begins. |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
The counter must be initialized because when each inspect takes place
the internal operation is
COUNT = COUNT + 1
ie when each character that we specified founds in the inspecting identifier the internal operation of count increment takes place
so if we left COUNTER uninitialized the calculation will result in abend because there may be some junk values in COUNTER that are not numeric |
|
Back to top |
|
|
|