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
 

 

datatype for sign without occupying bytes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: datatype for sign without occupying bytes
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: 1746
Location: Bloomington, IL

PostPosted: Fri Feb 18, 2011 4:43 pm    Post subject: Re: datatype for sign without occupying bytes
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    Post subject:
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: 1746
Location: Bloomington, IL

PostPosted: Fri Feb 18, 2011 5:26 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FIXED BIN (31) and FIXED BIN (63) - H... sundarkudos PL/I & Assembler 4 Thu Nov 05, 2015 1:11 pm
No new posts IGZ0040S An invalid separate sign was... kishpra COBOL Programming 13 Sun Aug 02, 2015 2:41 am
No new posts Syncsort 1.4.2 - Variable file - Igno... TS70363 SYNCSORT 9 Fri May 22, 2015 9:45 pm
No new posts OUTREC fill bytes restants josessegura DFSORT/ICETOOL 5 Thu Apr 16, 2015 12:40 am
No new posts How to modify the value using the sig... Vinay Pushpala PL/I & Assembler 3 Fri Feb 13, 2015 2:10 pm


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