Re: What is wrong?



Understood. However the quoted snippet of my most recent response, snipped too much of that response; look again ;-) The quoted snippet to which I responded, should have made it clear that I was responding first to the comment that the "crtrpgmod does not understand sql." And second about how to setup to call the procedure to test and debug -- using SQL.

Anyhow, although obviously CRTRPGMOD is not going to like /EXEC SQL, if the OP did not have a problem with CRTRPGMOD, then one has to wonder why the quoted comment was even written? Perhaps my post was for naught, with regard to progressing toward resolution of the issue, but it did address the quoted comment with respect to the given source.

Besides, my not-so-ulterior motive was to get the OP to consider that there was possibly little reason to make an effectively pure SQL procedure from RPG when it could be done simply instead, as a purely SQL routine; as coded, an SQL function. :-)

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind whatsoever and may not represent positions, strategies, nor views of my employer

Jonathan Ball wrote:
On Jan 24, 12:43 pm, CRPence <crpe...@xxxxxxxxxxxx> wrote:
The /EXEC SQL and /END-EXEC are not RPG, they are tags to denote what
a pre-compiler is supposed to convert into RPG. They are directives to
the SQL precompiler, that the upcoming and prior source is to be
interpreted as embedded SQL source, rather than as RPG source. Use
CRTSQLRPGI OBJTYPE(*MODULE) to create an SQLRPG module.

The original poster isn't having trouble with the embedded SQL. His
problem is ILE and RPGLE concepts: he has a subprocedure in his code,
and no way of calling it. Look again.

[...]
.



Relevant Pages

  • Re: What is wrong?
    ... snipped too much of that response; look again;-) The quoted snippet to ... about how to setup to call the procedure to test and debug -- using SQL. ... procedure from RPG when it could be done simply instead, ... Another would be to create an SQL function, either using the SQLP language or SQLRPGLE. ...
    (comp.sys.ibm.as400.misc)
  • RE: SSIS package fail from Job
    ... We have not received your response. ... I recommend that you use SQL Profiler to monitor ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.dts)
  • Re: Query about the LIKE statement
    ... Thanks for your quick response. ... I understand that this would be more on the realms of Dynamic SQL but was ... Vince ... >> to teacher Angel and James, ...
    (microsoft.public.sqlserver.programming)
  • RE: Transaction Log filling up
    ... Thank you for your response. ... I already know how to shrink the log when it ... It used to be that under SQL 7 there was an option called "Truncate Log on ... Checkpoint" which I don't see as an option under SQL 2000. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Tools with/for Express
    ... I had to start with SQL Server ... I then attempted to use Query Analyzer. ... No such luck with Enterprise Manager. ... I tried harder to get it started because your response told me I ...
    (microsoft.public.sqlserver.tools)