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



midrange-l-request@xxxxxxxxxxxx wrote:

>   4. RE: RE: SBMJOB is trimming the tailing blanks (Vernon Hamberg)
>
>OK, Tom. help me here - I created a CL with a
>50-character variable. Then I used the following to submit it:
>
>SBMJOB CMD(CALL PGM(VHAMBERGO/TEST) PARM('36
>characters45678901234567890123456    '))

Vern:

Now try all of these again EXCEPT use variables rather than quoted strings.

<guesswork>
By using variables, you force a kind of expression evaluation. When you simply 
use explicitly quoted strings, I imagine the quote marks are used directly as 
markers. However, variables have no explicit quotes.

Quotes still must be added by internal SBMJOB processing in its CPP under many 
circumstances, though, for example when the variable value has embedded spaces. 
I've never looked to see if quotes are _always_ added, and embedded quotes in 
variable values would complicate it all.

The trouble seems only when the command analyzer must make assumptions about 
the formatting of the request message. If you remove ambiguity, things work 
_fairly_ well. Unfortunately, that's when the biggest value of the CMD() parm 
starts disappearing.

In the cases where you DCL'd a *CHAR(50) and passed a quoted *CHAR(40) with 
trailing blanks, the example with garbage is pretty well understood I think.

The single _extra_ blank that kept appearing...??? Well, somebody with far more 
knowledge than I have would need to explain. I'm going almost totally from 
guesswork out of experience.
</guesswork>

Maybe eventually we'll work out a nice, neat tutorial (FAQ) that clearly 
describes all relevant behavior.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.