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
 

 

COBOL digits allocation problem

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

New User


Joined: 12 Mar 2005
Posts: 13
Location: hyderabad

PostPosted: Fri Aug 19, 2005 10:58 am    Post subject: COBOL digits allocation problem
Reply with quote

my query is

we have 6 digits and 6 bytes date field, but I want to accomodate it into 3 bytes with 6 digits.

don't say use comp-3, because that contains sign....

by
prasad yadav
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Aug 19, 2005 1:25 pm    Post subject: Re: COBOL digits allocation problem
Reply with quote

Hi Prasad,

To allocate 6 digit into 3 byte comp-3 is best oprtion in numeric field

Regards
Rupesh
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Aug 21, 2005 12:56 am    Post subject:
Reply with quote

You need 4 bytes to accomodate a 6 digit date in COMP-3 format. All that aside, the Y2K frenzey should point us toward 8 digit dates.
Back to top
View user's profile Send private message
Carl-B

New User


Joined: 17 Sep 2005
Posts: 1

PostPosted: Sat Sep 17, 2005 2:56 am    Post subject:
Reply with quote

icon_biggrin.gif
Setup an 88 section similar to:
*01 WS-1BYTE PIC X.
* 88 x00 VALUES X"00".
* etc
* etc
* 88 x22 VALUES X"22".
* etc
* etc

Then use a perform loop. Drop 1 character into WS-1BYTE
Use an EVALUATE WS-1BYTE
and list the WHEN's.
You will have to setup an 88 for each possible value (00 thru 99). But eventually you will have the logic to map the hex-decimal to decimal.
Use your imagination. You will see the answer.

Carl.
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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am


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