Re: CL Corrupt Parm
- From: Tom Liotta <thomas@xxxxxxxxxxx>
- Date: Sun, 18 Mar 2007 15:45:05 -0700
Ken Sims wrote:
Hi Tom -<snip>
Hi Ken,
The CMD() parm was apparently intended to support prompting of structured commands. But CALL does not structure its PARMS(). The result of prompting the CMD() parameter value is a command string that SBMJOB passes into RQSDTA() internally.
Stripping off trailing blanks in the process. That's busted behavior.
But... _exactly_ what blanks are stripped?
Consider this trivial program:
pgm ( +
&p1 +
&p2 +
)
dcl &p1 *char 50
dcl &p2 *char 50
sndmsg ( &p1 *cat &p2 ) kensims
dmpclpgm
return
endpgm
And this:
sbmjob cmd(CALL PGM(TSTSBM) PARM('here is a 50-char string <pad to 50-char>' 'and here is another...<pad to 50-char>'))
When the two parms have blanks added out to the *CHAR (50) lengths defined in the CL program, everything runs fine on my system here. No garbage if I CALL interactively and none when I SBMJOB.
OTOH, if I simply prompt a CALL command and type the strings _without_ quoting out to the proper lengths, the parms only contain the significant characters. Blanks aren't "stripped" or truncated; they simply never existed. Garbage results.
Is that IBM's responsibility? I.e., if I don't supply correct values, aren't I at fault?
--
Tom Liotta
http://zap.to/tl400
.
- References:
- CL Corrupt Parm
- From: Mike LaFountain
- Re: CL Corrupt Parm
- From: Dr.UgoGagliardelli
- Re: CL Corrupt Parm
- From: xyzzy
- Re: CL Corrupt Parm
- From: Ken Sims
- Re: CL Corrupt Parm
- From: Tom Liotta
- Re: CL Corrupt Parm
- From: Ken Sims
- CL Corrupt Parm
- Prev by Date: Re: Trigger - which program caused the update
- Next by Date: V5R3 to V5R4 Operations Console
- Previous by thread: Re: CL Corrupt Parm
- Next by thread: Re: CL Corrupt Parm
- Index(es):
Relevant Pages
|