MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2014

RE: optional parm in CLLE



fixed

+1 for good comments

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, January 22, 2014 5:48 AM
To: Midrange Systems Technical Discussion
Subject: RE: optional parm in CLLE

"...wrong" dealt with that none of us commented the code.
A test for a missing parm may be be glaringly obvious as to what the code is trying to do. At best, lack of a comment may slow down the person who nexts work on this program.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Gary Thompson <gthompson@xxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 01/21/2014 04:46 PM
Subject: RE: optional parm in CLLE
Sent by: midrange-l-bounces@xxxxxxxxxxxx



Ken, I appreciate the extra detail.

I had seen Rob's follow-up "We were all wrong." but
I was not sure what he meant, so I thought I would
try.

Somewhere (maybe in John Yeung's second e-mail or
Midrange archives) I got the following link which
mentions ILE CL procedutes with variable length
parameter lists:

http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/evfclmst79.htm


at any rate, I can't work on this for a while,
but do intend to attempt CLLE with "optional parameter(s)"


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [
mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Ken Sims
Sent: Tuesday, January 21, 2014 2:26 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: optional parm in CLLE

Hi Gary -

On Tue, 21 Jan 2014 20:09:15 +0000, Gary Thompson <gthompson@xxxxxxxxxxx>
wrote:

I am looking at changing a local program used for FTP.

Are optional parameters possible in CLLE ?

The idea is existing programs calling this changed program will not
pass the new parameter and will not need changing.

Note that all of the responses about trying to use the parameter and
monitoring for an invalid/null pointer are NOT correct for not passing a
pointer at all (unless CLLE does something under the covers for checking
the number of parameters passed versus the field being accessed).

If a pointer is not passed (valid or null), then there could be a valid
pointer in the memory location where that pointer would be if it had been
passed.

You need the equivalent of the RPGLE %PARMS BIF. I suspect that you will
need to use one of the CEE APIs to do that, but I don't know. I have many
RPGLE programs that can handle varying numbers of parameters, but I've
never done that in CLLE.

Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.
--
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