|
Erik wrote:
I want to submit a call to a program in batch, and the program needs totake
a number of parameters.and
If this was an interactive application I'd create the called program as a
service program, have a prototyped interface for controlling parameters
all would be fine.
Any better solutions than having the program called via SBMJOB to have a
main function and then manually typecast the parms from argv's char * to
their proper ones (say integers)?
Thanks in advance.
The classic answer is to write a CMD object wrapper and then instead of
SBMJOB CMD(CALL MYPGM (parm1 parm2) do a SBMJOB CMD(MYCMD parm1 parm2)
The classic answer for those who prefer not to write a command (it's
easy) is to remind them that numeric data is passed as packed (15, 5)
and if you structure the called program so its numeric parameters are
packed (15 5) then your SBMJOB CMD(CALL MYPGM (123 456) will work as
expected.
--buck
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-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.