Hi Lim -

- PGMA is a CL program.
- In this program &MYVAR is declare as *char with length of 510
- PGMA does SBMJOB CMD(CALL PGMB PARM(&MYVAR))

When I look that the submitted job PGMB, the param is being truncate.
No tailing blank.  Is that normal?

In additional to the normal rules for command line CALLs, if you are using SBMJOB you need to make sure that any character values longer than 32 bytes have a non-blank character at the end so that trailing blanks don't get trimmed off.

This non-blank end character doesn't have to be visible to the receiving program. If you are using all 510 bytes, put them in the first 510 bytes of a 511 byte field. Put a non-blank character into the 511th byte. Use the 511 byte field on the SBMJOB. You don't need to change the batch program at all.

There is absolutely no problem with using CALL in the CMD parameter of SBMJOB as long as you follow a few simple rules.

Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.


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.