Command Processing Program Examples

Tags:
#AS400 #RPGLE #CL
Examples with Parameters of Mixed Elements and MAX(XX)
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

You’re apparently looking for examples of *CMD PARMs that specify MAX() for mixed lists. Since these wouldn’t be “lists” without specifying MAX(), you’re simply looking for examples of handling mixed-list PARMs.

Mixed-list parms are simply lists of structures rather than lists of repeating (single) elements. Each structure is an ‘element’ of an array of values.
With simple lists, you might have something like this. Two separate lists:
Name
Name
Name
Name
…and:
Address
Address
Address
Address
With a mixed-list, those could come in like this:
Name           Address
Name           Address
Name           Address
Name           Address
That is, instead of two separate simple lists that you must keep in sync, a mixed-list can keep different kinds of related elements together. The Name and Address data elements can have different data types and lengths, and many different data elements can be grouped together.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Max() will return the max value of a data column value based on a group by command. Is there some thing specific you were looking to do? Post the code you have written and what you are hoping to get out of it.

    131,615 pointsBadges:
    report
  • TheRealRaven

    You're apparently looking for examples of *CMD PARMs that specify MAX() for mixed lists. Since these wouldn't be "lists" without specifying MAX(), you're simply looking for examples of handling mixed-list PARMs.


    Mixed-list parms are simply lists of structures rather than lists of repeating (single) elements. Each structure is an 'element' of an array of values.

    With simple lists, you might have something like this. Two separate lists:
    Name
    Name
    Name
    Name
    ...and:
    Address
    Address
    Address
    Address
    With a mixed-list, those could come in like this:
    Name           Address
    Name           Address
    Name           Address
    Name           Address
    That is, instead of two separate simple lists that you must keep in sync, a mixed-list can keep different kinds of related elements together. The Name and Address data elements can have different data types and lengths, and many different data elements can be grouped together.
    34,465 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: