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



So - we're back to our earlier suggestion. Look at the generated code from a version that works in RPG but not in COBOL and try to spot the difference.

Personally I'd be reporting it to IBM as a bug if you are convinced that what you are doing in COBOL is identical to the RPG.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Feb 15, 2018, at 4:21 AM, Roman Miklos <rmiklos.work@xxxxxxxxx> wrote:

Hi Michael,

when I try
EXEC SQL
DECLARE CLOOPWS CURSOR FOR
SELECT
SYSTOOLS.HTTPGETCLOB(
:URL-STRING-CONTENT(1:URL-STRING-LEN)
, '')
FROM SYSIBM.SYSDUMMY1
END-EXEC

then I get this error from precompiler:

5770ST1 V7R1M0 100416 Create SQL ILE COBOL Object
WSSQLB
Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7
232
:URL-STRING-CONTENT(1:URL-STRING-LEN)
5770ST1 V7R1M0 100416 Create SQL ILE COBOL Object
WSSQLB
DIAGNOSTIC
MESSAGES
MSG ID SEV RECORD
TEXT
SQL0104 30 232 Position 37 Token ( was not valid. Valid tokens: )
,.


On Wed, Feb 14, 2018 at 4:38 PM, <MichaelQuigley@xxxxxxxxxx> wrote:

Let me first qualify my post with the fact I've never worked with
HttpGetClob. That said I have worked with varying length character strings
(VARCHAR) data.

If the actual data coming into your program is VARCHAR, I would think you
were going in the correct direction when you broke the field definition
apart to separate the length from the actual data. i.e.:

01 URL-STRING.
49 URL-STRING-LEN PIC S9(4) COMP-4.
49 URL-STRING-CONTENT PIC X(255).

When you tried that, did you then reference URL-STRING-CONTENT or
URL-STRING? When I've used VARCHAR data, I've always referenced
URL-STRING-CONTENT(1:URL-STRING-LEN)

Also, isn't pic s9(4) two bytes which would only leave x(254) for the
content?

Failing the above test, I would do as Jon suggests and contact IBM. If you
can, I would also compare the pre-compiler generated code for the RPG and
COBOL and check the similarity of what they do.

And please post back to the list when you get it figured out.

Michael Quigley
Computer Services
The Way International

"COBOL400-L" <cobol400-l-bounces@xxxxxxxxxxxx> wrote on 02/13/2018
01:00:02 PM:
----- Message from Jon Paris <jon.paris@xxxxxxxxxxxxxx> on Tue, 13
Feb 2018 09:04:28 -0500 -----

To:

"Cobol400-L@Midrange. Com" <cobol400-l@xxxxxxxxxxxx>

Subject:

Re: [COBOL400-L] How to use a host variable with the SQL-function
HttpGetClob() ?

Time for a call to IBM Roman - it should work.

But check your PTF levels first.

Did you look at the generated code and compare with the RPG version?


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

--
This is the COBOL Programming on the IBM i (AS/400 and iSeries)
(COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/cobol400-l.


--
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/cobol400-l.



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.