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
 
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: 6970
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: 6970
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 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
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm

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