×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Many many ways of doing this but probably the easiest is to define the packed field as the only field within a DS and then pass the DS.

dcl-ds packedParm;
packedField packed(7:2);
end-ds;

packedField = whateverValue;

// then use packedParm in the command string.

Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Oct 10, 2017, at 10:41 AM, a4g atl <a4ginatl2@xxxxxxxxx> wrote:

I need to sbmjob a job from a RPG program and I have 3 packed fields to put
into the command variable.

I have not done this before and so I thought I would get some help.

Can you put the packed value in the command?

zCommand = 'SBMJOB CMD(CALL D1C716 PARM('
+ Q + %trim(emotid) + Q + ' '
+ Q + %trim(wForProcess) + Q + ' '
+ mhseq + ' '
+ Q + %trim(mhtral) + Q + ' '
+ wManifest2 + ' '
+ wManifest3 + ' '
+ Q + %trim(wUseScreen) + Q + ' '
+ Q + %trim(wPrtManifest) + Q + ' '
+ Q + %trim(wStripPrintWap) + Q + ' '
+ Q + %trim(wErrmsg1) + Q + ' '
+ Q + %trim(wErrmsg2) + Q + ' '
+ Q + %trim(wErrmsg3) + Q + ' '
+ Q + %trim(wOutManifest1) + Q + ' '
+ Q + %trim(wOutManifest2) + Q + ' '
+ Q + %trim(wOutManifest3) + Q + ' '

+ ')) JOB(N' + %char(mhseq) + ') '
+ ' JOBQ(INR500)' ;

I had initially put it as %char(mhseq) but I got a decimal data error in
the called program.

I would not like to create a intermediary CL to convert the character
variable to packed.

TIA

Darryl Freinkel
--
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: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.