× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jeff

What version of the OS are you on? I believe that later versions of the
operating system have a field type of *INT that you can use, however if
you're using an older version of the operating system, e.g. V5R1, or before
then you can code the values as *CHAR with a length of 4 and use the %BIN
function to convert it to numeric. For example:

DCL VAR(&MYCHAR) TYPE(*CHAR) LEN(4) VALUE(X'00000020')
DCL VAR(&MYNUM) TYPE(*DEC) LEN(4 0) VALUE(0)

CHGVAR VAR(&MYNUM) VALUE(%BIN(&MYCHAR))

Hope it helps

Jonathan

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Crosby
Sent: 31 July 2007 15:16
To: 'Midrange Systems Technical Discussion'
Subject: Integer equivalent in CL

What is the CL equivalent for an RPG integer variable 10I 0?

I think this has been asked before, but I can't seem to find it.

Thanks in advance.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.