|
I have seen many questions about passing long parameters with many different answers. I have never seen anyone give this answer. The following is a technique which we use that we originally used on the S38, because the SBMJOB command did not have a CMD parameter (at least not through release 6 the last one I was on). It may not look pretty, but it works, and does not have the 32 character parm problem when using the CMD parameter. This situation is an online RPGIV program, which calls a CLP, which submits itself to batch. GQPARM is an externally defined data structure, which we use to pass data to a lot of programs, online and batch. It is 201 bytes long with 52 fields. This particular code was written on V1R2 and it still works. 0548.00 C* 0549.00 C Call 'GQ6010CL' 0550.00 C Parm GQBOOK 0558.00 C************************************************************************* Columns . . . : 1 100 Browse SEU==> 0092.00 0093.00 CHGVAR VAR(&RQSDTA) VALUE('CALL PGM(GQ6010CL) PARM (' + 0094.00 *CAT '''' *CAT &GQBOOK *CAT '''' *CAT ')') 0095.00 0096.00 SBMJOB JOB(QDBOOKPRNT) JOBQ(QDJOBQ) RQSDTA (&RQSDTA) 0097.00 0098.00 RETURN 0099.00 +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.