Trim strings and suppress empty array elements from RPG?

Use this board to ask questions or have discussions with other Profound API users.
New User
Posts: 4
Joined: Fri Jul 09, 2021 5:22 pm
First Name: Brian
Last Name: Brock
Company Name: KLLM
Phone: 6012080813
Address 1: 37 Lamplighter Rd
City: Pearl
State / Province: Mississippi
Zip / Postal Code: 39208
Country: United States

Trim strings and suppress empty array elements from RPG?

Post by bkbbrock59 »

So I have an RPG program that I have set up to be called using PROFOUND API. It works just fine. But I find that it outputs trailing spaces in the 75 char fields I have mapped. In addition, my array is the same size each time regardless of the number of entries it actually contains. I have searched for information about this but haven't found any. Is there an easy way to handle this or would this require writing a js solution within the API tool?

dcl-ds jsonOut qualified template;
prgmstr_id int(10);
purge_datetime timestamp;
path char(75);
pattern char(75);

dcl-pi *n;
server char(75);
data likeds(jsonOut) dim(50);

Who is online

Users browsing this forum: No registered users and 0 guests