MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

RE: ILE C command line: What is the maximum



fixed

The Midrange FAQ for CL (http://faq.midrange.com/data/cache/15.html) covers a lot of this, including the problem with variables > 32 bytes.

There's, also, the Wiki (http://wiki.midrange.com/index.php/Main_Page) though it doesn't seem to have as much info - yet.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of vhamberg@xxxxxxxxxxx
Sent: Wednesday, July 09, 2008 6:53 AM
To: Midrange Systems Technical Discussion
Subject: Re: ILE C command line: What is the maximum

zvi - it depends.

First, the maximum length for a CL parameter is the maximum length of a CL variable - this depends on the release of the operating system, so type DCL on a command line and press F4 to prompt it - the put the cursor on the length parameter and press F1 - you will find the maximum length for variables there - different kinds of data have different constraints. On V5R1, for example, this maximum is 9999. It is right there in the help text - but other information is spread around in different places.

Then you need to be sure to match the size with the calling program - the CL parameter MUST not be longer than the caller is sending. An interesting example is when you use a CL as a command processor - the maximum length at V5R1 of a *CHAR PARM is 5000, so that means you MUST not use a parameter longer than that, in that one instance.

Information about matching size of character parameters is usually somewhere around chapter 9 of the manual called CL Programming. I think it got a new name that makes no sense in the latest release.

HTH
Vern
-------------- Original message --------------
From: Zvi Kave <zvi_kave@xxxxxxxxx>

Simon,

I mean the size of the &PARMn variables.
In my example it is *CHAR 4000 .
Is it OK or too much?

Regards,

Zvi


--- On Wed, 7/9/08, Simon Coulter wrote:

From: Simon Coulter
Subject: Re: ILE C command line: What is the maximum
To: "Midrange Systems Technical Discussion"
Date: Wednesday, July 9, 2008, 2:29 AM
On 09/07/2008, at 6:33 PM, Zvi Kave wrote:


Is there a maximum size of the command line
parameters?

Do you mean maximum number of parameters?

Parameters (PARM) - Help

Specifies one or more parameter values that are passed to
the called program. A maximum of 40 parameter values can
be passed.


Or maximum size for each parameter?

Depending on which OS release you are using CL can accept a
character
parameter with a maximum size of 32767 bytes.

Other than that you are limited by the size of the command
line. Most
command lines give you somewhere between 70 (ish) and 200
(ish) bytes
for the entire command. CALL QCMD then F11 will give you
between 1900
(ish) and 3500 (ish bytes.

What is your real question?
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical
Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400
/"\
Fax: +61 2 6657 8251
\ /

X
ASCII Ribbon campaign against HTML E-Mail
/ \
--------------------------------------------------------------------



--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact