|
rpg400-l-request@midrange.com wrote: >This is a FAQ. >Go to http://faq.midrange.com > >In the lower left, click "Search". >In the search box enter "Parameters Garbage" > >Please search the FAQ and the archives before asking a question. :) Excellent advice. Unfortunately, the FAQ articles don't necessarily clearly describe what's going on in this case. Note that submitting a CALL via SBMJOB does not require parms over 32 bytes to have any added non-blank characters at the end to prevent garbage nor is a new command shell needed. SBMJOB handles character parms just fine as long as SBMJOB is (correctly? properly? appropriately?) coded to begin with. Where the problem with SBMJOB comes in is with the inappropriate use of the CMD() parm when RQSDTA() should be used. Two simple example CLPs demonstrate: TSTSBMJOB: pgm dcl &cmdstr *char 64 value( 'sndmsg hi MyMsgQ' ) dcl &xgarbage *char 64 value( 'who knows?????? ' ) sbmjob ??rqsdta( 'call tstsndmsg parm(''' *cat &CmdStr + *cat ''' ''' *cat &XGarbage *cat ''')' ) sbmjob ??cmd( call pgm(TstSndMsg) parm(&CmdStr &XGarbage) ) return endpgm TSTSNDMSG: pgm ( + &pCmdStr + &pXGarbage + ) dcl &pCmdStr *char 64 dcl &pXGarbage *char 64 dcl &CmdLen *dec ( 15 5 ) value( 64 ) call QCmdExc ( + &pCmdStr + &CmdLen + ) return endpgm The first submits the second in two different ways, via CMD() and via RQSDTA(). The resulting success and failure illustrate the "real" problem here... of course, assuming correct library list, an existing MyMsgQ *msgq, etc. Also of course, this is not the same issue as with numeric parms; but understanding one helps with the other. It's possible that what's going on in this case is simply using the command prompter to enter parm values for CALL without appropriate quote marks. Tom Liotta >On Fri, 11 Oct 2002, Richard Carpenter wrote: > >> I'm trying to setup a procedure using passed 50 character parameter, but I >can't get it to work. >> I keep getting garbage, as seen here: 'This is a test NE >1234567890' >> >From 'NE' on, it is garbage. Any one have any suggestions, other than >making the parameter smaller? >> Thanks in advance -- -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertechgroup.com __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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.