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

Condition 88 level


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

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Feb 19, 2009 9:50 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 19, 2009 10:32 am
Reply with quote

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
Code:
IF SUBV-FOUND
will test true. If the code was
Code:
IF SUBV-FOUND-SW = 'y'
this would process the same way.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Feb 19, 2009 11:13 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 19, 2009 11:15 am
Reply with quote

Hello,

If you move "Y" to subv-found-sw, IF SUBV-NOT-FOUND will be false.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Feb 19, 2009 9:58 pm
Reply with quote

The Language Reference Manual explains conditional variables in detail and has lots of examples. Search for "conditional variable".
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 19, 2009 10:24 pm
Reply with quote

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 -

Code:

IF  NOT SUBV-FOUND

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
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 How to load to DB2 with column level ... DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
No new posts JPM Reports for each DB2 V12 Function... DB2 0
Search our Forums:

Back to Top