Re: Inconsistency with SQL in ACS vs RPG

Daniel Gross <[email protected]>
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
I do that occasionally - but sadly the pseudo-host-variables in iACs are ...

a) not persistent - so I have to re-enter them at every execution again and again - VScode DB2 for I has a new "bind:" prefix - I have to look into this

b) if you have the same host-variable multiple times, you have to enter it multiple times - which is also less than ideal

But all in all I use that feature here and there. 

Regards,
Daniel 


> Am 08.10.2025 um 08:43 schrieb Vern Hamberg via RPG400-L <[email protected]>:
> 
> Hi Daniel
> 
> Yes, I understood that you start with RSS in ACS. What I'm suggesting is that you enter host variables in there - not constants - this way, you start there but with the syntax you will use in RPG - it might save you a step.
> 
> And I believe we can type in parameter markers, and RSS will prompt you for a value for each. As I recall, you can specify data types for each, too.
> 
> *Regards*
> 
> *Vern Hamberg*
> 
> IBM Champion 2025 <cid:[email protected]> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023
> 
> 
>> On 10/8/2025 6:20 AM, Daniel Gross wrote:
>> Hi Vern,
>> 
>> thanks - but I meant it the other way around.
>> 
>> If I'm developing today, I mostly start with SQL in iACS. And when the SQL statement is ready, I copy it from iACS to the RPG source, and replace my typical "constants" with my RPG :hostVariables.
>> 
>> Of course, if I have to extract a statement, I try to fill them with iACS. Now with the "bind:" prefix in VScode SQL extension, it might be even easier to run SQL statements that were extracted from an RPG source.
>> 
>> But I my comment, the other way around was meant, as the OP had a problem with SQL statements, that seem to run in iACS but not embedded.
>> 
>> Kind regards,
>> Daniel
>> 
>> 
>>>> Am 07.10.2025 um 09:44 schrieb Vern Hamberg via RPG400-L<[email protected]>:
>>> 
>>> Hi Daniel
>>> 
>>> You mention "...replacing constants with host variables..." - I believe you can enter host variables and parameter markers in RSS now, and it will prompt you for values. I say, I believe, because it seems I've actually done it. Nonetheless, if statements with such elements are pulled from RPG, say, using the tool in RDi, then that works.
>>> 
>>> So it could be a shorter cut, perhaps.
>>> 
>>> *Regards*
>>> 
>>> *Vern Hamberg*
>>> 
>>> IBM Champion 2025<cid:[email protected]> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023
>>> 
>>> 
>>>> On 10/6/2025 8:07 PM, Daniel Gross wrote:
>>>> As I have already written, it would be nice, to have one or two examples.
>>>> 
>>>> My typical development process today is - trying to implement as much as possible and reasonable in SQL using iACS-RSS - then copy/paste the SQL into the RPG source and replacing constants with host variables and what else.
>>>> 
>>>> I never had a query/statement that didn't work as expected. What I had lately where some complex SQL queries, that I couldn't pack into a view. But I had never a problem with putting the statement into SQLRPGLE-
>>>> 
>>>> Regards,
>>>> Daniel
>>>> 
>>>> 
>>>>> Am 06.10.2025 um 17:[email protected]:
>>>>> 
>>>>> I do nearly all my development using SQL and use the same process as Richard (Testing SQL statements in ACS). I agree with Richard and have struggled with stupid differences, sometimes putting in calls to IBM for assistance.
>>>>> 
>>>>> Darryl Freinkel
>>>>> A4G
>>>>> 
>>>>> --
>>>>> This is the RPG programming on IBM i (RPG400-L) mailing list
>>>>> To post a messageemail:[email protected]
>>>>> To subscribe, unsubscribe, or change list options,
>>>>> visit:https://lists.midrange.com/mailman/listinfo/rpg400-l
>>>>> oremail:[email protected]
>>>>> Before posting, please take a moment to review the archives
>>>>> athttps://archive.midrange.com/rpg400-l.
>>>>> 
>>>>> [email protected] for any subscription related questions.
>>>>> 
>>> --
>>> This is the RPG programming on IBM i (RPG400-L) mailing list
>>> To post a message email:[email protected]
>>> To subscribe, unsubscribe, or change list options,
>>> visit:https://lists.midrange.com/mailman/listinfo/rpg400-l
>>> or email:[email protected]
>>> Before posting, please take a moment to review the archives
>>> athttps://archive.midrange.com/rpg400-l.
>>> 
>>> Please [email protected] for any subscription related questions.
>>> 
> --
> This is the RPG programming on IBM i (RPG400-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/rpg400-l.
> 
> Please contact [email protected] for any subscription related questions.
> 
-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.