Compiling a program with parameters on a command that don’t exist as yet will always prevent you from compiling that program. Is there a reason you can’t wait until you get V5R4 loaded before you change this program?
If not I see two possible options.
- Leave the STRTCP command in the CL alone, but when V5R4 is loaded do a CHGCMDDFT to reset the command defaults for parameters STRPTPPRF and STRIP6 to *NO. It is shipped with a default of *YES in V5R4. So when you execute th old CL it will always use *NO in these two parameters.
- Take the old and new STRTCP command strings and load it to text variables in your program. Retrieve data area QSS1MRI from QUSRSYS library. (This data area is updated each time you load a new release.) The first 4 characters of this data area contain the version and release number, ex V5R3, etc. Based on what version you are on pass the correct command string to a QCMDEXC call in your CL. This way as soon as you load V5R4 it will immediately run the new command string.
Hope this helps.
The only way that I’m aware of to execute a command with parameters from a future version is to construct the command as a string and pass it to QCAPCMD (or QCMDEXC) for interpreted execution.
The QSS1MRI data area has been useful. I’ve used it as a DDM data area target to get info about remote systems. However, I would call the Retrieve Product Information (QSZRTVPR) API for product ID *OPSYS to be sure.