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



Alan,
CLLE SBMJOB is where the problem lies.
ILE CLLE will be the same either way. Be it a Bound CLLE Program or a CLLE Module within an ILE program.
You have the issue either way.

Most people use the "CALL" command inside the SBMJOB.
Like this:
SBMJOB CMD(CALL PGM(XXX) PARM(&FIELD))

The CLLE program "knows" the length of the field, but that doesn't matter.
Because it passes that to SBMJOB.
Which then parses it and puts the job on the job queue.
And at that time it becomes a Character Literal.

If you look at your job on the job queue you will see a request message with something like:

CALL PGM(XXX) PARM('CONTENTOF&FIELD')

You will not see:
CALL PGM(XXX) PARM(&FIELD)


So when the system generates that string 'CONTENTOF&FIELD', and the original &FIELD was really 100 characters longer with trailing blanks, the system does not preserver all those blanks.

That's why you need to either use a Command, or pad the field with a trailing Non-Blank character like "X".

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Alan Campin
Sent: Friday, October 15, 2021 2:37 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Passing a parameter to a CLLE program in SBMJOB

Another solution to the problem is to use ILE. Say you have a program you want to submit from an RPG program. You can create an RPG module that calls a CL module *ExtProc" and then within the CL Modul

Another solution to the problem is to use ILE.



Say you have a program you want to submit from an RPG program. You can

create an RPG module that calls a CL module *ExtProc" and then within the

CL Module you do your SBMJOB.



The submit job command knows what size the variables and and passes them

correctly.



You then bind the modules into a program and you have one object to

distribute.



I sometimes wonder if I am the only person on the IBM I doing ILE.



On Fri, Oct 15, 2021 at 1:22 PM Kevin Bucknum <Kevin@xxxxxxxxxxxxxxxxxxx<mailto:Kevin@xxxxxxxxxxxxxxxxxxx>>

wrote:



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.