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
 
Problem with Fixed Bin(15) variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
sivarajkumarD

New User


Joined: 05 Jan 2006
Posts: 1

PostPosted: Thu Jan 05, 2006 12:30 pm    Post subject: Problem with Fixed Bin(15) variable
Reply with quote

Hi All,
I am using PL/1 MVS & VM V1R1 compiler.I want to store values upto
65535 in a variable declared as FIXED BINARY(15).UNSIGNED attribute is unavaible in this compiler.Is there a workaround to overcome this problem?
Back to top
View user's profile Send private message

hsourabh

New User


Joined: 24 May 2005
Posts: 12
Location: Z?rich

PostPosted: Sat Jan 28, 2006 5:24 pm    Post subject:
Reply with quote

FIXED BIN(15) cannot acccomodate a figure as large as 65535!
Why dnt u use FIXED BIN(31) instead??

Sourabh
Back to top
View user's profile Send private message
jawadshaik
Warnings : 1

New User


Joined: 27 Sep 2005
Posts: 16

PostPosted: Tue Jan 31, 2006 1:02 pm    Post subject: Re: Problem with Fixed Bin(15) variable
Reply with quote

Hi

we can store more than 32500 value in bin fixed(15):

Dcl i bin fixed(31);
Dcl j bin fixed(15);
Dcl 1 k based(addr(i)),
2 k1 char(2),
2 k2 char(2);
Dcl k3 char(2) based(addr(j));
i = 40000;
k3 = k2;
put skip list(j);
put skip list(j);
put skip list(k)

now the i,k can be used in the place of j for the values greater the 32500.

This work around will work. try it out.
Back to top
View user's profile Send private message
ravi1

New User


Joined: 27 Apr 2006
Posts: 11

PostPosted: Wed May 03, 2006 7:13 pm    Post subject: Re: Problem with Fixed Bin(15) variable
Reply with quote

jawadshaik wrote:
Hi

we can store more than 32500 value in bin fixed(15):

Dcl i bin fixed(31);
Dcl j bin fixed(15);
Dcl 1 k based(addr(i)),
2 k1 char(2),
2 k2 char(2);
Dcl k3 char(2) based(addr(j));
i = 40000;
k3 = k2;
put skip list(j);
put skip list(j);
put skip list(k)

now the i,k can be used in the place of j for the values greater the 32500.

This work around will work. try it out.


No, the output of the above code is

-25536
-25536
Back to top
View user's profile Send private message
k_vikram07

New User


Joined: 23 Nov 2005
Posts: 35

PostPosted: Fri Jun 09, 2006 5:13 pm    Post subject: Re: Problem with Fixed Bin(15) variable
Reply with quote

/*************************************/
DCL bin31 FIXED BIN(31);
DCL bin15 FIXED BIN(15);

DCL 1 temp1 BASED(ADDR(bin31)),
2 tmpdummy FIXED BIN(15),
2 tmpbin15 FIXED BIN(15);

tmpdummy = 0;

/***********************************/

Use bin31 for internal purposes for calculations. Programatically make sure that the value in bin31 is always positive and is in limits.
U will get the equivalent FIXED BIN(15) UNSIGNED value in tmpbin15.

-Vik.
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm

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