On 4/10/2014 3:17 PM, Steinmetz, Paul wrote:
Thanks everyone for all the help and tips.
Parm length corrected along with CMD created.
For a CMD default value, the maximum positions is 32.
I need 34.
Is this 32 cmd parm length issue the same we've been discussing, or is this a different maximum.
From CMD help text. o If the default is a character constant, it can have no more than
Post your command source so we can work out exactly which '32' you are
looking at. For comparison purposes, here's the start of a RUNSQL
command I wrote many years ago:
CMD PROMPT('Run a SQL statement')
PARM KWD(SQLSTM) TYPE(*CHAR) LEN(1280) MIN(1) +
EXPR(*YES) PROMPT('SQL statement')
PARM KWD(OUTPUT) TYPE(*CHAR) LEN(8) RSTD(*YES) +
DFT(*) VALUES(* *PRINT *OUTFILE) +
The thing I don't understand is why is it intermittent.
Today it ran fine 3 times, no garbage.
Yesterday, all kinds of garbage.
Parms are basically pointers to memory locations.
CL don't stay in memory, every time you call, reloads a fresh copy.
Where is the garbage coming from?
You nailed it in one. Parms are pointers to memory locations. Your
buffer contains room for 34 bytes. The command processor clears 32
bytes of that buffer. The last 2 bytes will contain whatever the
previous step in your job left there. Depending on what you did
earlier, there may or may not be blanks in those 2 bytes.