|
RE: Re:Problems with QCMDEXC parameter >>I'm passing a parameter to a CLP that is later used as a command for >>QCMDEXC. The parameter is defined as having a length of 256. However, >>there appears to be a lot of garbage trailing after the value that is >>passed. >The calling program's parm must be defined as 256, too. >If you're doing a CALL XYZ 'parameter data' from the command line >then you'll be left with garbage. An alternative to CALL XYZ is to >write a command for it, and use XYZ as the CPP. >Buck Calabro >Commsoft Hi Quick, what's the default length for Alpha and Numeric Parms ??? and why?? (answer at the end of post, now back to the story) I believe Buck is correct also. If you are calling it from the command line you must do the ; CALL XYZ PARM('xxxx ') And actually count out the WHOLE length. ORrrrrrrrrrrrrrrrrrrr. This is why I really really like the LDA for inter-program communication. Put the parm in the LDA CHGDTAARA *LDA 'BLAH BLAH SHORT BLAH' and have the Program (I presume a CLP) take it from the LDA like; PGM DCL &VAR *CHAR 256 CHGVAR &VAR %SST(*LDA 1 256) CALL XXX &VAR ENDPGM or something like it. We have nearly all application type variables which would normally be passed as parms defined in our LDA template PF. Things like Invoice, Order, Customer, Vendor numbers, From & To dates, etc. In our RPG programs we use an Externally defined D/S to define the LDA so that every program looks at the LDA the Exact Same way. We also have a 300 byte "open work area" for impromptu type stuff like your 256 parm. The upside to us is that we NEVER have to worry about counting out stupid spaces on a command line or create a WHOLE NEW command just to call a program. And we Never have to worry about mis-matched or mis-defined parm types, or lengths. The LDA - AKA "The AS/400 Clipboard" Did I mention that we don't have problems with stupid parms on submitted jobs either? Just a thought <Soapbox mode *OFF> John (With the H) Carr EdgeTech (Now now Jon(without the H), remember your blood pressure) If you guessed 32 for Alpha parms and 15,5 for Numerics move to the head of the class. Ah, that finicky 32 byte boundary what a nuisance heh? +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.