|
Michael,expect
I think you're flirting with disaster... Perhaps this works as you
today, but this technique is really unsafe and unreliable.will
When the command line parser takes apart your string, it will trim
trailing blanks from the parameter values being parsed. If you can
guarantee that your data structure will never have trailing blanks, then
you're safe enough to do it this way. Otherwise, the command parser
reserve enough storage to contain the trimmed data. If this length isnot
the same as the parm length defined in your program, then you could getmailto:rpg400-l-bounces@xxxxxxxxxxxx]
garbage at the end of your DS...
Chuck's HEX trick is really clever...
-Eric DeLong
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
On Behalf Of Koester, Michael"hexify"
Sent: Thursday, May 24, 2012 4:41 PM
To: RPG programming on the IBM i / System i
Subject: RE: Passing data structure to batch job RESOLVED
Okay, Tommy Holden gets all the extra points!
My test program that submits the longer-running job just successfully
passed the data-structure as a parm, intact, and without having to
anything. Debugging the submitted job showed all the subfields have thethe
intended values, and all is cool.
// Where NMS_OrderDetails is the name of the data structure from
copybookjob
// and PROVSN_NMS is the program that will run from a different
queue becausenecessary)
// it takes awhile...
Command = 'SBMJOB CMD(CALL PGM(PROVSN_NMS) PARM('''
+ NMS_OrderDetails
+ ''')) JOB(TESTING) jobq(QBATCH4)';
CallP QCMDEXC(%trim(COMMAND) : %len(%trim(COMMAND)));
Who would have thought it would be that easy. (Not me, obviously)
Thanks to all for the elegant (if perhaps more complicated than
ideas.mailto:rpg400-l-bounces@xxxxxxxxxxxx]
-- Michael
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
On Behalf Of Tommy.Holden@xxxxxxxxxxxxxxxxxxxxxjust
Sent: Thursday, May 24, 2012 5:01 PM
To: RPG programming on the IBM i / System i
Subject: RE: Passing data structure to batch job
Will the DS ever be larger than 5000 characters? If not then why not
create a command that accepts a single parm and use the command on thelist
SBMJOB?
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxxlist
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.