From: David Flicek To: All
I need to submit a CL program to a job queue from a S/36E procedure. With it, I also need to pass the parameters, which are variable (not fixed). How do I do this?
From: Ernie Malaga To: David Flicek
You can build the CALL command string within a procedure parameter and then execute the parameter as follows:
// EVALUATE + P64='CALL XYZ (?1? ?2?)' // SBMJOB CMD(?64?) JOBQ(QBATCH)
Suppose now that parameter 1 contains 'ABC' and parameter two contains 'IJK'. The EVALUATE statement changes parameter 64 to 'CALL XYZ (ABC IJK)', and the next statement runs the program.
You'll run into a bit of trouble if the parameters need to be surrounded by single quotes. For example, if parameter 1 contains 'ABC DEF', the above technique will fail when the second statement tries to CALL program XYZ, passing it three parameters instead of two (ABC, DEF and IJK). A more generic solution, then, would be as follows:
// EVALUATE + P64='CALL XYZ (''?1?'' ''?2?'')' // SBMJOB CMD(?64?) JOBQ(QBATCH)
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online