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



As long as nothing weird happens with the character string (i.e. untranslatable - which shouldn't happen) it should be OK.

Hex is needed from the command line mostly because converting to character by hand (and more importantly keying them in) is tough - hex is easier. But I agree that a routine to convert to hex might be better if for no other reason than to make debugging from the log easier.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Oct 10, 2017, at 11:08 AM, Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx> wrote:

Not to question your wisdom, Jon, but doesn't passing a packed value from a command line require using the hexadecimal syntax (x'123F') for anything other than 15P5 fields? Maybe I just haven't had enough coffee today.


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.

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

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.