View previous topic :: View next topic
|
Author |
Message |
Arun bv
New User
Joined: 29 Dec 2010 Posts: 41 Location: Mumbai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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:
www.ibmmainframeforum.com/index.php |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
Arun bv
New User
Joined: 29 Dec 2010 Posts: 41 Location: Mumbai
|
|
|
|
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 |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
or SET condition-name TO TRUE |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Jeffrey Ranney
New User
Joined: 23 Dec 2010 Posts: 20 Location: USA
|
|
|
|
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 |
|
|
Arun bv
New User
Joined: 29 Dec 2010 Posts: 41 Location: Mumbai
|
|
|
|
Thanks everyone......... |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
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 |
|
|
|