Search found 13 matches

by vhamberg
Sun Apr 21, 2024 11:34 am
Forum: RPG IV
Topic: MCH3601 unmonitored by HTTPAPIR4
Replies: 7
Views: 310

Re: MCH3601 unmonitored by HTTPAPIR4

What is the message text? And if you have the job log, it would help to see the messages that come before the MCH3601.
by vhamberg
Tue Jan 23, 2024 4:38 pm
Forum: General
Topic: copy file txt
Replies: 3
Views: 1685

Re: copy file txt

We need to know more about what you want to do. Where is the txt file you want to copy? On the IBM i or on a Windows computer? (I assume you are using Windows.) What is the character encoding (a number on IBM i called CCSID) of the txt file? Is it Unicode (UTF-8)? Or is it ASCII? If it is ASCII, whi...
by vhamberg
Tue Oct 10, 2023 11:09 am
Forum: General
Topic: QUSRJOBI Returns Invalid Internal Job ID
Replies: 2
Views: 6500

Re: QUSRJOBI Returns Invalid Internal Job ID

Hi Mike

Please send in more details - what are you getting, and what do you expect it to be? Internal job ID is a 16-character value, not the same as the job/user/number we see externally.

Cheers
Vern
by vhamberg
Tue Jul 18, 2023 11:14 am
Forum: FTPAPI
Topic: 550 The semaphore timeout period has expired
Replies: 7
Views: 10003

Re: 550 The semaphore timeout period has expired

Correction to my post - the ftp variable is the connection - but you can get the error message if the result of calling ftp_get is less than 0.
by vhamberg
Tue Jul 18, 2023 11:11 am
Forum: FTPAPI
Topic: 550 The semaphore timeout period has expired
Replies: 7
Views: 10003

Re: 550 The semaphore timeout period has expired

As I recall, functions in FTP_API return error information - ftp_get certainly does. This is an example from EX3GET - if ftp_get(ftp: 'fips.exe': '/fips.exe') < 0 The parameter ftp has the code, and you can get the message. So I would use that parameter to catch the error. Hope this helps with your ...
by vhamberg
Thu Apr 13, 2023 6:22 pm
Forum: General
Topic: Printing from IBM i with Images
Replies: 3
Views: 8068

Re: Printing from IBM i with Images

One way of printing images is to use the AFPRSC keyword in the PRTF - your PRTF has to be *AFPDS type. You should be able to find documentation and examples for it pretty easily.
by vhamberg
Wed Mar 29, 2023 4:29 pm
Forum: HTTPAPI
Topic: Cant get HTTPAPI to work
Replies: 5
Views: 3327

Re: Cant get HTTPAPI to work

This sounds like a library list problem - you need to find how to set the library list in MIWorkplace for compilations. We don't use it here, so I don't know where to look.

Anyhow, welcome to the wonderful world of RPGLE!

Vern
by vhamberg
Thu Mar 09, 2023 2:09 am
Forum: RPG IV
Topic: SQL Select Assigning a Variable Name to Concatenated Fields
Replies: 2
Views: 7415

Re: SQL Select Assigning a Variable Name to Concatenated Fields

You might try a CTE (Common Table Expression) - something like this in general - with xx(field1, field2) as (select infield1, infield2 from infile) select field1 from xx where field2 = 'value' The columns of xx are listed, their attributes are either as they are from infile or some expression in the...
by vhamberg
Tue Feb 21, 2023 1:19 pm
Forum: RPG IV
Topic: Embedded SQL Isolating Hour from Time Field
Replies: 4
Views: 8389

Re: Embedded SQL Isolating Hour from Time Field

You might also consider the following - hour(timestamp_format(digits(TranTime), 'HH24MISS')) This gives you a numeric result, you can get that with the first solution, too. timestamp_format() is most useful if you need to do date calculations such as number of days between dates, perhaps. In the cas...
by vhamberg
Fri Sep 30, 2022 12:09 pm
Forum: HTTPAPI
Topic: How to find current version
Replies: 4
Views: 5680

Re: How to find current version

Hi

A copy book is a member of a source PF - it would have to be one of the source PFs in the library where you put HTTPAPI.

Hope that gets you in a helpful direction.

Vern