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



On 1/13/2017 3:26 PM, Jeff Young wrote:
I have a command that defines a list consisting of a maximum of 10 entries
of 4 elements each as follows:
PARM KWD(BOXING) TYPE(BOX_DATA) MAX(10) +
PROMPT('Boxing Data')
BOX_DATA: ELEM TYPE(*CHAR) LEN(20) PROMPT('LUCAS Box Id')
ELEM TYPE(*CHAR) LEN(1) PROMPT('Box Type')
ELEM TYPE(*CHAR) LEN(9) PROMPT('Box Qty') +
CHOICE('ie. "000000100" is 1')
ELEM TYPE(*HEX) LEN(1) CONSTANT(X'25')

In my program, I define it as a 310 byte character field:
c Parm inBoxData 310
When I execute the command with a single entry, I get the following data
returned:
EVAL INBOXDATA :X
00000 00010004 0004F1F2 F4F5F4F5 F4C1C1C1 - ......1245454AAA
00010 40404040 40404040 4040C7F0 F0F0F0F0 - G00000
00020 F0F2F0F0 25404040 40404040 40404040 - 0200.
00030 40404040 40F04040 40404040 40404040 - 0
00040 40404040 40404040 40404040 40404040 -
00050 40404040 40404040 40404040 40404040 -
00060 40404040 40404040 40404040 40404040 -
00070 40404040 40404000 00000000 00000000 - .........

I know that the first 2 bytes are the number of entries, but what are the
next 4 bytes before the start of my data?

It's actually a 'list within a list' because there are up to 10
'BOX_DATA' elements, and each 'BOX_DATA' is a mixed list of 4 elements.
Knowing that, I hit the Knowledge Center and tried to locate the
documentation that would match my memory :-)

http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rbam6/dlist.htm
Programming > Control language > CL programming > Defining and
documenting CL commands > Defining CL commands > Defining a CL command
list parameter > Defining lists within lists for a CL command parameter

The layout of the returned data is on the next page, Using CL or other
HLLs for lists within lists

So for this example:
0001 - Number of lists
0004 - Displacement to List 1
0004 - Number of elements in inner list


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.