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



That's what I get for copying and pasting code :-)

I will definitely be cleaning it up. Thanks for the comments on what will
happen given the usage of wrong data types - always nice to learn what goes
on in the head of a compiler programmer ;-)

Aaron Bartell
http://mowyourlawn.com

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Barbara Morris
Sent: Friday, February 15, 2008 9:42 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Easy way to get LPAR from RPG?

Aaron Bartell wrote:
Funny, I was just working on that this week. I am still in the process of
converting some old code I found on the net (still using B data type and
need to convert it to I). See my code below:

h dftactgrp(*no) actgrp(*caller)

d returndata s 2560
d datalength s 4b 0 inz(2560)
...
c call 'QWCRSSTS'
c parm returndata
c parm datalength
...

Eek!

Quick, change the 4b to 10i (or even 9b). This isn't just a matter of
the slight badness of B vs I. This is just plain wrong; 4B is a 2-byte
binary and the API needs a 4-byte binary. The API will think the
datalength parameter is 167772160 or more (depending on what the 2 bytes
after datalength happen to contain).


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.