× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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
32 bytes.

Paul

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) +
EXPR(*YES) PROMPT('Output')

-snip-

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.
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.