Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 962
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: 6967
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: 8055
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. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us