× 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.



>The data structure and the documentation for 
>the exit point I'm trying to work with actually 
>define the field as being binary AND 4 
>bytes long.  It is not an integer, so I didn't 
>want to use 10I 0.  

OK.  I'm not sure if this helps or hinders, but here goes.
RPG III "B" data type is integer, but crippled so it can't store large
numbers.
RPG III "B" data type works like "P" data type: You specify how many digits
and the compiler figures out how many bytes it takes to store them in.  So,
7P can hold 7 digits and takes 4 bytes of storage.  4B can hold 4 digits and
takes up 2 bytes of storage.

RPG IV "B" data type is exactly like RPG III "B" data type.
RPG IV "I" data type is integer, just like C documentation expects.
RPG IV "I" data type works like "P" data type: You specify how many digits
and the compiler figures out how much storage to use.  The twist is that the
maximum value the field can hold isn't all 9's, rather it's a power of two
(minus one for the sign bit.)  10I can hold a maximum value of (2 to the 32)
- 1.  It occupies 4 bytes of storage.

In this case, I think you really want the other function: cvthc.  You have
'binary' stuff that you want translated into EBCDIC do you can see it in a
query or something.  Use the same prototype but declare the size to be twice
the size of the input (you're taking each nybble and turning it into a
character.)
  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.