|
Will do.
The first one appears to be close to what I am figuring out. I'll dig
deeper. Thanks again.
On Tue, Nov 11, 2025 at 3:07 PM Peter Dow <petercdow@xxxxxxxxx> wrote:
Hi Brad,
Try the "CL Programming" manual, SC41-5721-05, the section on "Defining
Lists for Parameters". It has examples on exactly what is passed to the
CPP.
--
*Peter Dow* /
909 793-9050
petercdow@xxxxxxxxx
/
On 11/11/2025 12:37 PM, Brad Stone wrote:
I have a few RPG programs that are processing programs for CMDinterfaces.
the
Some have the option to send multiple values. I've always just defined
parameter as a data structure with a binary value to hold the "count" ofthen
options.. For example:
PARM KWD(NAME) TYPE(*CHAR) LEN(60) MIN(1) +
MAX(10) CASE(*MIXED) PROMPT('Name')
dcl-ds NameDSDef Qualified;
NumName Bindec(4) Pos(1);
Name char(60) dim(10); //*NONE
end-ds;
The the parameter is defined as:
NameList likeds(NameDSDef);
This filles the Name.Name array as it should.
But now I have parameters that have multiple parts to them and it's not
working quite the same way.
PARM KWD(ADDRESS) TYPE(ADDDEF) MIN(1) +
MAX(10) PROMPT('Address')
ADDDEF: ELEM TYPE(*CHAR) LEN(100) CASE(*MIXED) +
PROMPT('Address')
ELEM TYPE(*CHAR) LEN(2) +
PROMPT('State')
dcl-ds AddressDSDef Qualified;
NumAddress Bindec(4) Pos(1);
Address char(100) dim(10);
State char(2) dim(10);
end-ds;
Then the parameter is defined as:
AddressList likeds(AddressDSDef);
This seems to add more data in the front, not just the count.
Let's say there are 3 items in the list.... The string appears to be
count, offset to item 3, offset to item 2, offset to item 1, x'0003',
the data.... etc...offset
So before each data item is x'0003' and the offsets appear to be the
AFTER the count value.examples.
I've been searching for some sort of documentation or examples for this,
but I've come up short. AI is pretty useless when it comes to this.
I'm sure I'm doing something wrong, but I can't find any docs or
It's been years since I've done commands and yes, this has to be aCloud
command. :)
Thanks!
Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any
Provider!--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.