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



From what he said the the four byte int was being translated by the pre-comp to int(20) - if that was the case then yes I would consider it a bug as it should translate as int(10) as you note in your own post.

Nobody suggested using hex that I can recall - the OP just talked about the debug value as seen in hex.


On Jun 2, 2020, at 10:18 AM, Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx> wrote:

Well an INT with a length of 8 should be an Int(10) not 20. So that looks
like a pre-processor bug to me.
sure ?
4 Byte Integer is the equivalent of Integer in SQL and INT(10) in RPG!
8 Byte Integer is the equivalent of a BigInt in SQL and INT(20) in RPG!

IMHO when submitting the Integer Value (BigInt or not!) should be passed as
Hex-Value.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser


"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
„Train people well enough so they can leave, treat them well enough so they
don't want to.“ (Richard Branson)


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon Paris
Sent: Dienstag, 2. Juni 2020 14:40
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: BIGINT parameter in SQLRPGLE

Well an INT with a length of 8 should be an Int(10) not 20. So that looks
like a pre-processor bug to me.

However, since the parm is defined as Const it shouldn't matter.

Similarly with VALUE. But when you say "when I pass the value to a procedure
with this parameter" is that a procedure of your design? Because the value
on the stack for a parm passed by value is very different from that passed
as const.

The real problem though is that debug is showing what appears a packed value
with 5 decimal places. That makes it look as if it came from the command
line/submit job and not created and passed internally. Does that ring any
bells?


On Jun 2, 2020, at 7:09 AM, Paul Bailey <PabloMotte+Midrange@xxxxxxxxx>
wrote:

I have an external stored procedure with a BIGINT parameter that calls
a CLLE program, which passes the parameter through SBMJOB to a
SQLRPGLE.

In the procedure, the parameter is defined like this: IN
P#IMPORTBATCHID BIGINT

In the CLLE the parameter is defined like this: DCL
VAR(&ROWID_INT) TYPE(*INT) LEN(8)

In the SQLRPGLE the parameter is defined like this:
p#ImportBatchID INT(20) CONST;

The SQLRPGLE works, using the correct row ID throughout the program,
except when I pass the value to a procedure with this parameter
definition: p#BatchID INT(20) VALUE;


The value passed into the stored procedure in parameter
P#IMPORTBATCHID is 223, but the value in P#BATCHID (from PGMDMP and
debug monitor field) is:

INT(20) 9177137167
VALUE IN HEX '000000022300000F'X


Have I made a mistake in the differing definitions of the field? I
would expect the value displayed in debug to be 223 and the hex value
to be '0000000000000DFF'X.

Any advice would be appreciated.

-Paul.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.