InfoCrap. Need I say more? ;-) I often use Google instead:
CL programming reference v5r4 site:ibm.com filetype:pdf
The InfoCenter links are not in a manual form; the navigation frame
is there, but you have to click the open book icon below the frame, to
see the context of the navigation, instead of the search result list
[which has a flashlight icon to the right of the book]. Find the
"Printable PDF" links in the navigation frame, to find documentation in
book form.
The above search string will find the v5r4 CL programming reference
[obviously replace with v5r3 as needed], which is the same rbam6.pdf
that is listed in the /Printable PDFs/ under the /Control Language/
topic in InfoCenter under the /Programming/ heading. However the text
for the link in InfoCenter does not give any hint that it is the Control
Language Programming reference, having only "Control Language". This is
just one of the reasons for its not so pleasant moniker noted first.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/rbam6.pdf
The *DEC type indeed allows the precision to be specified on values
entered on the parameter, irrespective of the precision defined for what
the CPP receives. Instead of validation that would identify the value
as an error, the specified value is simply cast to the expected
precision [with truncation] to be passed to the CPP.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/prtyp.htm
The allowed decimal values would either need to be specified
explicitly as a list of valid values [but limits for /restricted/ values
will surely not allow for one thousand values in a VALUES list, which is
valid only for signed integer types] or validated by a separate means.
The CPP or a Validity Checking program could validate the data; but that
is noted as undesirable. On a side note, a Choice Program could present
the list of allowed values, but they are pretty lame since they do not
build an actual selection list, nor does it help in any way to get only
one of those values except as visual cue; I do not think the
CHOICE(*VALUES) would do that for a simple decimal range.?
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/valid.htm
For the Integer types, the length can not be specified, irrespective
of an established limited RANGE; even though that would seem to enable a
limited presentation length. This is because the prompt for Integer is
built to handle values according to the data TYPE only. However, the
range is still enforced. There would just be no visual cue to the user
[by the room provided for input] that the specified value must be only
up to three digits in length nor that precision is zero. The visual cue
must be instead, specified on the text describing the prompt and perhaps
even implied by the parameter [name] itself; "Number of widgets", where
it is intuitively obvious to the user that widgets are known always to
be whole.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/dtpr.htm
The Initial Prompt Length can sometimes limit what is established for
the data type and length, by including the INLPMTLEN on the PARM [or
QUAL or ELEM] specification. But that feature is disallowed for the
numeric and date/time types. The default length is unstated in that
topic, for the integer types.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/lprvl.htm
Does the following suffice, with the text to hint at the values,
since the prompt length can not be shortened?
PARM KWD(SAVESET#) TYPE(*UINTx) RANGE(001 999) MIN(1) +
CHOICE('001-999') PROMPT('SaveSet Number (1-999)')
Regards, Chuck
Dan wrote:
Question 1:
I am trying to find the IBM reference manual for command programming
on InfoCenter (V5R3). I didn't find the PDF for it, so I searched
for "choice program" see if that would point me to it. The search
takes me to the "Qualifier Definition (QUAL)" page, but this isn't
what I'm looking for, and I was hoping that I'd get a link that would
take me to the table of contents for the manual but I am unable to
navigate to it. Frustrating!
Since I can't figure out Question 1:
Question 2:
I want to define a parameter on a command as a 3-digit integer, with
a range of 001 - 999. If I define it as TYPE(*DEC), the definition
allows non-integer decimals (i.e., 9.123, 147.9, etc.). I tried the
integer types *INT2/4 & *UINT2/4, but those don't play nice with the
LENgth value of 3. I would like to avoid having to write a command
validation program. Ideas?
As an Amazon Associate we earn from qualifying purchases.