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
 

 

88 level multiple value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Ruchir Singh

New User


Joined: 15 Oct 2008
Posts: 2
Location: Delhi, India

PostPosted: Tue Apr 14, 2009 12:24 pm    Post subject: 88 level multiple value
Reply with quote

There has been a change in the layout of OLD-FIELD from 10 level to NEW-FIELD which is now 88 level. Permissible values of OLD-FIELD are now in 88 level NEW-FIELD.

OLD: 10 OLD-FIELD 9(9).

NEW: 88 NEW-FIELD VALUE 00000300
00000301
00000302
00000303.

What changes will I have to make to this IF statement:

OLD: IF OLD-FIELD='00000302'
DO SOMETHING
ELSE-IF OLD-FIELD='00000303'
DO SOMETHING
...

NEW: ??
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 14, 2009 2:41 pm    Post subject:
Reply with quote

If I understood corectly what is being asked, just change "OLD-FIELD" to "NEW-FIELD" in that IF construct.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Apr 14, 2009 2:54 pm    Post subject:
Reply with quote

if you want to do A for 302
and B for 303,
you need to leave the old construct.

otherwise IF NEW-FIELD will be true for 300 & 301 & 302 and 303.

by the way, even though COBOL allows you to compare a numeric display field to an x-type literal ('00000302')
you should get in the practice of using numeric literals.

plus, why go to all the problem of providing leading zeroes on a literal
and the value clause of the 88 level,
if you don't put enough of them on?

granted, 00000302 is the same as 000000302 and 302,
but if the pic clause calls for 9 digits,
don't confuse people by using 8 digits in your literal and value clauses.
Back to top
View user's profile Send private message
Ruchir Singh

New User


Joined: 15 Oct 2008
Posts: 2
Location: Delhi, India

PostPosted: Tue Apr 14, 2009 3:16 pm    Post subject:
Reply with quote

Thanks for the inputs.
Leading zeros is a requirement for preserving my file structure. I missed a leading zero in values, apologies.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Apr 14, 2009 3:29 pm    Post subject:
Reply with quote

Quote:
Leading zeros is a requirement for preserving my file structure


WTFAYTA? (what are you talking about?)
the file structure is defined by your pic and usage clauses.
has nothing to do with value clauses.

so, what IF construct are you going to use?
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 Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Multiple parameters Csongor All Other Mainframe Topics 16 Thu Jun 09, 2016 7:54 pm
No new posts Define Alias for multiple Data sets u... sandy98669 JCL & VSAM 4 Fri May 27, 2016 1:07 pm


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