|
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.
As an Amazon Associate we earn from qualifying purchases.
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.