View previous topic :: View next topic
|
Author |
Message |
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
hi all,
I have lil confusion over this condition names use..please help me out to get rid of this confusion
i have a declaration
05 SUBV-FOUND-SW PIC X(01) VALUE 'N'.
88 SUBV-FOUND VALUE 'Y'.
88 SUBV-NOT-FOUND VALUE 'N'.
now somewhere i'm moving
MOVE 'Y' TO SUBV-FOUND-SW
now my question is, what value would be in
SUBV-FOUND and in SUBV-NOT-FOUND
Thanks,
Ajay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
now my question is, what value would be in
SUBV-FOUND and in SUBV-NOT-FOUND |
There would be no values in them - they occupy no space (no pic(-)). They are conditions for values in the subv-found-sw.
If you look at the output of a compile, notice that they have no length and displacement.
When you move 'y' to the subv-found-sw, the statement
will test true. If the code was
Code: |
IF SUBV-FOUND-SW = 'y' |
this would process the same way. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
Hi Dick,
05 SUBV-FOUND-SW PIC X(01) VALUE 'N'.
88 SUBV-FOUND VALUE 'Y'.
88 SUBV-NOT-FOUND VALUE 'N'.
MOVE 'Y' TO SUBV-FOUND-SW
if i check
IF SUBV-NOT-FOUND
will it false or true after moving 'Y' to SUBV-FOUND-SW
Thanks,
Ajay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you move "Y" to subv-found-sw, IF SUBV-NOT-FOUND will be false. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
The Language Reference Manual explains conditional variables in detail and has lots of examples. Search for "conditional variable". |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If the field itself (SUBV-FOUND-SW) was equal to a value of other than 'Y', then the following IF would be TRUE at the 88 level -
If this were to be coded without using the 88 level, it would be -
Code: |
IF SUBV-FOUND-SW NOT = 'Y'
|
Regards, |
|
Back to top |
|
|
|