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
 
which one is assigned by 'SET' for a multiple valued 88 name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: which one is assigned by 'SET' for a multiple valued 88 name
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: 757
Location: Germany

PostPosted: Wed Jan 17, 2007 5:09 pm    Post subject:
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    Post subject:
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    Post subject:
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: 757
Location: Germany

PostPosted: Wed Jan 17, 2007 5:49 pm    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Wed Jan 17, 2007 6:18 pm    Post subject:
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    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
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am
No new posts Using multiple routines at exit 6 in ... Randy Horowitz All Other Mainframe Topics 2 Sat Feb 10, 2018 11:57 pm
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

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