i5_program_prepare_PCML with variable path name?

General discussion on Zend Studio for IBM System i
Post Reply
ralphmorris
Posts: 2
Joined: Tue Nov 30, 2010 12:21 pm

i5_program_prepare_PCML with variable path name?

Post by ralphmorris » Tue Nov 30, 2010 12:32 pm

Is there a way of using i5_program_prepare_PCML that doesn't require you to 'hardcode' the program path name in the underlying PCML?

So instead of <program name="MYPGM" path="/QSYS.LIB/PROD02.LIB/MYPGM.PGM"> the program could be called by a search through the jobs library list, as happens if I use, say, the CALL command in a cl program.

erich_hieden
Posts: 393
Joined: Tue Jul 07, 2009 9:01 am

Re: i5_program_prepare_PCML with variable path name?

Post by erich_hieden » Tue Nov 30, 2010 4:34 pm

ralphmorris wrote:Is there a way of using i5_program_prepare_PCML that doesn't require you to 'hardcode' the program path name in the underlying PCML?

So instead of <program name="MYPGM" path="/QSYS.LIB/PROD02.LIB/MYPGM.PGM"> the program could be called by a search through the jobs library list, as happens if I use, say, the CALL command in a cl program.
You can easily do this by changing the PCML-line you mentioned to <program name="MYPGM" path="/QSYS.LIB/*LIBL.LIB/MYPGM.PGM">

Regards

ralphmorris
Posts: 2
Joined: Tue Nov 30, 2010 12:21 pm

Re: i5_program_prepare_PCML with variable path name?

Post by ralphmorris » Tue Nov 30, 2010 4:47 pm

Works perfectly.

Many thanks for your help.

Post Reply