|
It doesn't actually trim at the last non-blank. If you gave it all 510 characters with blanks out to the end, it should work, if I remember this correctly. What the KB says is, if the parameter is longer than 32, the system does not pad out to the length of the parameter when coming from a command line or equivalent. So you get whatever is in memory beyond the last character you passed (even a blank). To verify this, you will need to view parameters in hexadecimal in STRDBG. To do this, on the debug command line type eval &parm : x Here is a simple sample to point this out: pgm (&char20 &char32 &char99) dcl &char20 *char 20 dcl &char32 *char 32 dcl &char99 *char 99 endpgm Save this as a CLLE source type and use option 14 to create - use DBGVIEW(*ALL) or your otherwise favorite setting. Then STRDBG and set a breakpoint on the ENDPGM. HTH Vern -------------- Original message -------------- > Press send too quick. > > If the field is declared as 510 in length, the ending ' should always > end at 510 not the last non blank byte. The program did not ask the > system to trimr :). > > -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx > [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai > Sent: Tuesday, November 15, 2005 8:43 AM > To: Midrange Systems Technical Discussion > Subject: RE: RE: SBMJOB is trimming the tailing blanks > > Hhmmm. I don't think that is the problem. > > 1) Remember that in my CL program I declared the parm field as 510 in > length. > 2) Depending on condition, the last non blank byte in the above parm > field could be at say byte 410. > 3) When #2 happened and CL does the SBMJOB CMD(CALL PGMB(MYPARM)), the > actual command being subbmitted looks like this CALL PGMB('PARM > DATA..................... .... ....') ==> this ending ' > end at 410. > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. >
As an Amazon Associate we earn from qualifying purchases.
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.