• Subject: short int in RPG
  • From: Dave Mahadevan <mahadevan@xxxxxxxx>
  • Date: Tue, 03 Feb 1998 12:06:40 -0500
  • Organization: Stoner and Associates


I ran into a slightly annoyance in passing short int as 5I0   in RPG.  I
was trying to pass short int to QXXRTVDA.  I declared a variable 5I0 and
QXXRTVDA complained loudly with CPF1192 ( Message . . . . :   Substring
specified for data area &1 not valid.
Cause . . . . . :   The end of the substring, defined by the combination
  starting position and length, is not between the substring starting
  and the data area end. The data area was not changed or retrieved.
Recovery  . . . :   Use the (DSPDTAARA command) to find the length of
the data
  area. Either the starting position or length or both should be

When I passed it as 10I0 it took it and DID ITS job.  What does ILE RPG
do when it passes short int?  as 2 bytes binary or 4 bytes binary with

void QXXRTVDA(_DTAA_NAME_T dtaname, short int offset,
                short int len, char *dtaptr);
the above is from ILE C/400 Programmers guide.  As you see it needs
short int not long int!

and oh yes, I did try the ALIGN keyword which did diddly nothing.

Thank You.


Dave Mahadevan.. mailto:mahadevan@fuse.net

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page