Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Condition Naming in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Wed Dec 29, 2010 9:58 am    Post subject: Condition Naming in COBOL
Reply with quote

10 Group PIC X(02).

88 MA-GROUP VALUE 'GF'.



Is MA-PZ-ID defaults to ‘GF’.

Can anyone Explain me Condition naming.
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Wed Dec 29, 2010 10:08 am    Post subject:
Reply with quote

Hello and welcome to the forum,

At the top of the page is a link to "IBM Manuals". The first set is COBOL.

Read about level 88 entries in a Language Reference (actually any of them will suffice). If you find something in the manual that is not clear, post what you found and your doubt. Someone will be able to clarify.

If this is new to you, you will most likely be better served in our Student and Fresher forum:
http://www.ibmmainframeforum.com/index.php
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 967
Location: Richmond, Virginia

PostPosted: Wed Dec 29, 2010 10:09 am    Post subject:
Reply with quote

You have not defined MA-PZ-ID.

What does "Is MA-PZ-ID defaults to ‘GF’" mean?

Is "condition naming" in the COBOL manual? If so, what does the manual say? If not, what is the question?

Have you seen this in a program?
Back to top
View user's profile Send private message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Wed Dec 29, 2010 10:28 am    Post subject:
Reply with quote

sorry for the typo error. this is the right question


10 Group PIC X(02).

88 MA-GROUP VALUE 'GF'.



Is MA-GROUP defaults to ‘GF’.
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Wed Dec 29, 2010 11:53 am    Post subject: Reply to: Condition Naming in COBOL
Reply with quote

Very basic question which you could have discussed with your seniors I guess.

No it defaults to junk.....you have to give default through VALUE clause.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Dec 29, 2010 3:10 pm    Post subject:
Reply with quote

or SET condition-name TO TRUE
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8199
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 29, 2010 3:52 pm    Post subject:
Reply with quote

Does your question make sense if you have this instead (and this is valid COBOL, by the way)?
Code:
10 Group PIC X(02).

88 MA-GROUP VALUE 'GF', 'XY', 'AD', 'CO', 'B3', '9Y'.
Back to top
View user's profile Send private message
Jeffrey Ranney

New User


Joined: 23 Dec 2010
Posts: 20
Location: USA

PostPosted: Thu Dec 30, 2010 2:16 am    Post subject:
Reply with quote

You were looking for an answer to this question :

=======================
10 Group PIC X(02).

88 MA-GROUP VALUE 'GF'.

Is MA-PZ-ID defaults to ‘GF’.
=======================

The answer is 'no'. The "GROUP" has a defalut value of... nothing... as in your example there is no "VALUE" clause.

An '88' level is used for testing the value of "GROUP".

For example :

Code:
MOVE SOMETHING-FROM-INPUT    TO   GROUP
IF MA-PZ-ID
   DO THIS
ELSE
   DO THAT
END-IF
Back to top
View user's profile Send private message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Thu Dec 30, 2010 7:21 pm    Post subject:
Reply with quote

Thanks everyone......... icon_rolleyes.gif
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 181
Location: Globe, India

PostPosted: Tue Jan 04, 2011 11:41 am    Post subject:
Reply with quote

take this example for more understanding:

01 gender pic x.
88 male value 'M'.
88 female value 'F'.

now... in cobol if below statement occurs...
move 'M' to gender
then we can check whether the person is male or female..
this is the way to check...
IF male then --- this results in TRUE
do this
else
do that.

IF female then --- this results in FALSE
do this
else
do that.

CONDITION NAMES is a means to check which conditions are true based on the data value.
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
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us