Search found 10 matches

by allthom
Thu Oct 03, 2024 7:52 am
Forum: RPG IV
Topic: RPG and Java Lists
Replies: 8
Views: 45757

Re: RPG and Java Lists

I received a similar request, given a pdf file with a hundred pages, which contains invoices issued to different customers, split it, reading the VAT number of each customer placed on the page, and then save the new pdf file in a specific directory of the IFS.
Be careful the number of pages of each ...
by allthom
Thu Oct 03, 2024 5:24 am
Forum: General
Topic: Securing out rest api
Replies: 0
Views: 17555

Securing out rest api

a few years ago, following the examples published in a nice series of articles on the IBM developer network, I created a rest API, with IWS, for a company I work with. around thirty methods that were used to expose basic functions such as creation/querying/modification of customer data and orders ...
by allthom
Mon Aug 26, 2024 8:07 am
Forum: General
Topic: My new UDTFs does not work
Replies: 9
Views: 41339

Re: My new UDTFs does not work

Is there a way to debug the srvpgm procedure while working in a "sql environment"? I.e. while running strsql command?
by allthom
Wed Aug 21, 2024 5:39 am
Forum: General
Topic: My new UDTFs does not work
Replies: 9
Views: 41339

Re: My new UDTFs does not work

Scott Klement wrote: Wed Aug 21, 2024 5:23 am Assuming that you want to return one row from the UDTF for each record that is in the copdc00f, then you would only read ONE row in the doFetch routine. Your subprocedure will be called repeatedly, once for each row.
No, i want to return only one row with all the meaningful valute in it
by allthom
Wed Aug 21, 2024 5:02 am
Forum: General
Topic: My new UDTFs does not work
Replies: 9
Views: 41339

Re: My new UDTFs does not work



I am not familiar with your application, your business or your database, so I cannot tell you how your business logic is meant to work. But from looking at the code, it appears to be setting only one field at a time in a SELECT/WHEN construct.


it seems like I need to study better how the loop ...
by allthom
Tue Aug 20, 2024 11:08 pm
Forum: General
Topic: My new UDTFs does not work
Replies: 9
Views: 41339

Re: My new UDTFs does not work


It looks like your file (copdc00f) is declared inside the subprocedure. Therefore it will be automatically closed when the subprocedure returns.

Move your 'dcl-f' so that it is before the first 'dcl-proc.'


It works almost, but i don't understand: what difference does it make the position of ...
by allthom
Tue Aug 20, 2024 9:21 pm
Forum: General
Topic: My new UDTFs does not work
Replies: 9
Views: 41339

My new UDTFs does not work

I'm having various difficulties creating what appears to me to be fairly simple UDTFs and I can't figure out exactly what's going on, it just doesn't work.
The scenario in which I move is relatively simple. I have a table/PF built via DDL that contains the payroll entries of a company. Given an ...
by allthom
Fri May 03, 2024 9:26 pm
Forum: CL
Topic: Prototype CL subprocedure in a service program
Replies: 2
Views: 170490

Prototype CL subprocedure in a service program

Hello everyone, perhaps a stupid question, more about style than strictly technical, but which sparked a discussion in my working group. In short: how do you build the prototype for a cl subprocedure within a service program to make it callable with a meaningful name?
In our environment we have the ...
by allthom
Thu Apr 13, 2023 7:47 pm
Forum: YAJL-ILE
Topic: Problem putting packed fields in a ds from a json in standard in
Replies: 4
Views: 18169

Re: Problem putting packed fields in a ds from a json in standard in

Thanks jonboy49,
DATELB's definition is wrong on the code here but in my pgm is right, defined as you said.
In my json test case there are a couple of error, a missing comma after codfisc value, and missing double quotes for DATELB value.
So the correct json to run the test should be:
{
"IDRECO": 0 ...
by allthom
Thu Apr 13, 2023 4:29 pm
Forum: YAJL-ILE
Topic: Problem putting packed fields in a ds from a json in standard in
Replies: 4
Views: 18169

Problem putting packed fields in a ds from a json in standard in

Hello' everybody, I'm creating a POC for one of our application, working with the DIY web service provider. In our scenario we receive a JSON representing a row (or record of a table) had to write/insert into the table and call another program to work on it. A very simple scenario but i must be ...