sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Another command issue: parameter specified more than once.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Another command issue: parameter specified more than once.

    Hello again,
    Although I've written dozens and dozens of commands, it's been a while and I have something that probably is simple but I'm missing it. I've looked though my old posts regarding commands and didn't find an answer so....

    I have a command that is used to email an Excel file as a CSV using the SNDSMTPEMM IBM command from within my command CPP. I have parameters for a header record which will have the column headings defined in a nice readable fashion for the recipient rather than obscure file field names.

    How I did this was to request a record from a file (IFSHEADER) in my command with a from and to record number should there be more than one header.
    Then in my CPP I retrieve this header record using CPYF with the from and to record values to a file in Qtemp.
    Then, copy that file to the IFS using CPYTOIMPF.
    Then, add the data file in the same manner to that same file.
    Then, send that stream file using the IBM SNDSMTPEMM command - all this works great then, the idea was presented to save specific definitions for repeatably. I knew what this meant; I needed a keyparm and a POP. Been here before and always have problems...

    I have created the POP, CPP and VC programs and added both the keyparm and a parameter to Save Definition and here lies my issue.
    I can save a defined instance in a data area for retrieval but get the 'error detected in prompt override program command string' error message when I attempt to retrieve it using the name it was saved as and load the command parameters.

    I have isolated the source members into a specific library so as to not interfere with the existing command.
    I have debugged the POP and it builds the string perfectly without error. I have also added code to copy the completed string to another data area so I can view it – perfect, string length at the front and then the string just like I saw it in debug.
    I have debugged the CPP and there are no issues or errors.

    When I attempt it normally, I get the error. A look at the job log shows several messages;
    - Parameter FORM specified more than once. [this is the field that would be the keyparm. I have searched all programs for a duplication but cannot locate.]
    - List of values not valid for parameter FILE. [this is the field that would be the name of the file being sent, and lib. Looks ok in the data area I created to check the string.]
    - Error detected in prompt override program command string.

    What could be causing this?
    I know you’re going to want to see the code but before I do that, I was hoping for a few suggestions.
    Red.



    Everyday's a school day, what grade are you in?
Working...
X