Compiling under V5R3 for V5R4 usage

45 pts.
Tags:
Application development
AS/400
CLP
Dear, I'm trying to modify a small CL to comply with new functionalities of V5R4. This CL is used mainly to send datas when the iSeries is on Restricted State, so I've to restart the TCP. Before I was using the command:
STRTCP STRSVR(*NO) STRIFC(*NO)
But with the V5R4, I have to use this command:
STRTCP STRSVR(*NO) STRIFC(*NO) STRPTPPRF(*NO) STRIP6(*NO)
The only problem that I have is that I'm trying to compile under V5R3 as we still have customers running on V5R1... but I have a compilation error: CPD0043 30 Keyword STRIP6 not valid for this command. Do you have any solution? Thanks in advance, Pierre.

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

  1. 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.
  2. 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.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following