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: 965
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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