This could be a 100% wrong thought but thought I'd offer it up anyhow.

Is the %CHAR() confusing it? Based on the value in the command, I would
assume that xmKEYFLDSPart is already character so is there a need to %CHAR
it?

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Eric Wolf
Sent: Wednesday, November 26, 2025 12:06 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: SBMJOB converts command parameter to HEX

All,
When using a custom command interactively, the command looks like this:
ISIPMXPCMD TRID(PRCCHG)
DTFR(1251125)
TMFR(111404)
DTTO(1251125)
TMTO(111424)
USER(E05451)
KFLD('100,6514981001,,1140708100311F6000457F0892221F')
RPRC('0')

I am building the above command using this:
qcmd = 'SBMJOB CMD(ISIPMXPCMD OBCL(ITMPRC) '+
'TRID(' +%TRIM(mTRID)+ ') ' +
'DTFR(' +%EDITC(xmTRDT:'X') +') ' +
'TMFR(' +%EDITC(xmTRTMFr:'X') +') ' +
'DTTO(' +%EDITC(xmTRDT:'X') +') ' +
'TMTO(' +%EDITC(xmTRTMTo:'X') +') ' +
'USER(' +%TRIM(xmUSER) +') ' +
'KFLD('+cApost+%CHAR(%TRIM(xmKEYFLDSPart))+cApost+') ' +
'RPRC(' +cApost+'0'+cApost+')) ' +
'JOB(ITMPRCCHG) ' +
'JOBQ(QBATCHB)';



When using the SBMJOB, the command converts the KFLD parameter to this:
ISIPMXPCMD OBCL(ITMPRC) TRID(PRCCHG) DTFR(1251125) TMFR(163403) DTTO(12511
25) TMTO(163423) USER(E05451) KFLD(X'F1F0F06BF6F5F1F4F9F8F1F0F0F76B6B11407
08103251F7000602F0892221F') RPRC('0')

What feature of the SBMJOB command or the command itself do I need to change
to get the SBMJOB command to look like the interactive version?

TIA,
Eric
This communication is intended only for the use of the individual or entity
to which it is addressed and may contain information that is privileged,
confidential, or otherwise exempt from disclosure under applicable law. If
you are not the intended recipient, or the employee or agent responsible for
delivering this communication to the intended recipient, you are hereby
notified that any dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, please immediately notify the sender by telephone or
email. The technical data herein provided is subject to export control under
the International Traffic in Arms Regulations (ITAR) or the Export
Administration Regulations (EAR). Such data should not be disclosed,
exported or transferred in any manner to any foreign person or any foreign
country without prior written approval of the Office of Defense Trade
Controls, U.S. Department of State or the Bureau of Industry
and Security, U.S. Department of Commerce. This email and any attachments
may contain confidential and proprietary information and must be treated as
such. In addition, the export or re-export of this information may be
prohibited under applicable export control laws.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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