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

which one is assigned by 'SET' for a multiple valued 88 name


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

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Jan 17, 2007 4:37 pm
Reply with quote

I have assigned multiple values for a condition name. then which value will be assigned by SET function if I SET to true
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Jan 17, 2007 5:09 pm
Reply with quote

Hi
Here's an example.

Definition in workingStorage

01 PGM-RETURN PIC X(04).
88 MDL30060-ZUENDE VALUE '0000'.
88 MDL30060-WEITER VALUE '0002'.
88 MDL30060-PGHINW VALUE '0005'.
88 MDL30060-PGWARN VALUE '0006'.
88 MDL30060-FEHLER VALUE '9999'.

...In coding

Set MDL30060-Weiter to true

... If MDL30060-Weiter
perform ...
End-If


...Evaluate true
when MDL30060-FEHLER Perform
End-Evaluate


Hope it helps, Regards, UmeySan
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Jan 17, 2007 5:14 pm
Reply with quote

In your case

suppose 88 MDL30060-WEITER VALUE '0002' '0009' '0008'

If I SET 'MDL30060-WEITER to TRUE then 'PGM-RETURN' contains which value, I mean '0002' or '0009' or '0008'
Back to top
View user's profile Send private message
adarsha

New User


Joined: 28 Dec 2006
Posts: 8
Location: Noida,Delhi

PostPosted: Wed Jan 17, 2007 5:34 pm
Reply with quote

hi,
the set function is an enhanced parameter prvided in the cobol-85.
it sets the parti cular variable u were wished.

it can be any one of the below (as per the preious reply)

88 MDL30060-ZUENDE VALUE '0000'.
88 MDL30060-WEITER VALUE '0002'.
88 MDL30060-PGHINW VALUE '0005'.
88 MDL30060-PGWARN VALUE '0006'.
88 MDL30060-FEHLER VALUE '9999'.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Jan 17, 2007 5:49 pm
Reply with quote

@ rkprasanth_m !


In my example, i used the 88-names for clarifying a distinct status.

Multiple values i use when perhaps testing some flags.
Example:

01 RecordFlag

88 Record-Department-01 VALUE '0002' '0009' '0008'
88 Record-Department-02 VALUE '0005' '0007' '0001'

If Record-Department-01
Perform Processinf for Department-01
End-If

So here, the incoming record is processed depending on his flag.


I think using SET TO TRUE makes no sense by multiple values.

Regards, UmeySan
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Jan 17, 2007 6:03 pm
Reply with quote

OK, I found answer.

Here is what IBM manul says

"If more than one literal is specified in the VALUE clause of condition-name-1, its associated conditional variable is set equal to the first literal."

It means First litiral in value clause ocupied in condition-variable.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Wed Jan 17, 2007 6:18 pm
Reply with quote

Why not test this - it should take just a few minutes. Then you'll know for sure.

SET the value, then DISPLAY the variable.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top