IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

datatype for sign without occupying bytes


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Fri Feb 18, 2011 4:20 pm
Reply with quote

Hi,

I am calling an cobol program from apl/1 program. Cobol program is defined output variable as pic S999V99 where 5 bytes are allocated

example:
05 in-amount S999V99.
05 in-text x(10).
Now I defined my pl/1 veriable as pic '999V99-' to receive above value. 6 bytes will be allocated for this.
05 in_amount '999V99-',
05 in_text char (10).

Hence my program is getting an extra byte into in_amount field ( 5 bytes from in-amount and 1 byte from in-text)

I asked to change the cobol copybook to include an extra field as below, but not successful in this (denied)
05 in-amount S999V99.
05 filler x(01).
05 in-text x(10).

Please advise if it possible to define variable in pl/1 to hold 5 bytes.
(I searched other pl/1 posts, but not find relavent, hence I placed this new post. Thanks)
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Feb 18, 2011 4:43 pm
Reply with quote

sudhaaa wrote:
Hi,

I am calling an cobol program from apl/1 program. Cobol program is defined output variable as pic S999V99 where 5 bytes are allocated

example:
05 in-amount S999V99.
05 in-text x(10).
Now I defined my pl/1 veriable as pic '999V99-' to receive above value. 6 bytes will be allocated for this.
05 in_amount '999V99-',
05 in_text char (10).

Hence my program is getting an extra byte into in_amount field ( 5 bytes from in-amount and 1 byte from in-text)

I asked to change the cobol copybook to include an extra field as below, but not successful in this (denied)
05 in-amount S999V99.
05 filler x(01).
05 in-text x(10).

Please advise if it possible to define variable in pl/1 to hold 5 bytes.
(I searched other pl/1 posts, but not find relavent, hence I placed this new post. Thanks)

FIXED DEC (9,2), but you probably mean PICTURE '999V9T'; five bytes with zoned decimal numbers, the last byte having an "overpunched" sign (i.e., the high nybble is C (positive) or D (negative) instead of F (unsigned)).
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Fri Feb 18, 2011 4:52 pm
Reply with quote

I declared my PL/1 variable as '999V99T' and observed that this also allocated 6 digits
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Feb 18, 2011 5:26 pm
Reply with quote

sudhaaa wrote:
I declared my PL/1 variable as '999V99T' and observed that this also allocated 6 digits

As expected, since that is the equivalent, IIRC, of S999V999; a PL/I T, unlike a COBOL S without a SIGN IS SEPARATE clause, occupies one byte.

You will note that I recommended PICTURE 999V9T, not 999V99T. Change your declaration accordingly.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts total number of bytes PL/I & Assembler 10
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
Search our Forums:

Back to Top