Re: CPYF using INCREL parm in CL

I don't think there is a way around CPYF processing automatic string
termination 'feature'. Funny thing is that if you try it on the
command line with 'AA ' for &val keyword it'll work. One workaround
is to build your own string and submit it via QCMDEXC. Another is
I tested option 1 using the via CALL T1 (F1 AA) and it seems to work.
Here is the source for T1 pgm:

pgm (&fld &val)
dcl &fld *char 10
dcl &val *char 5
dcl &cmd *char 200
dcl &cmdlen *dec (15 5) 200

chgvar &cmd ('CPYF FROMFILE(QTEMP/T1) TOFILE(QTEMP/T2) ' *cat +
&FLD *cat ' *EQ ''' *cat &VAL *cat ''')) ERRLVL(*NOMAX)')
call qcmdexc (&cmd &cmdlen)



Relevant Pages

  • Re: API parameter values
    ... of a remote printer (an IP based printer configured on the 400 to an ... output queue) using QGYRPRTA. ... Dcl &rcvinf *char 402 ...
  • Re: API parameter values
    ... specified in the second parameter or the maximum lenght of the RPTA0100 ... Dcl &rcvinf *char 402 ...
  • Re: Determine a Display Size?
    ... Are you wanting to know the display modes available in the currently open display file? ... dcl &DspModInd *char 1 ... Because variable &DspMod is set to '4', the device capability for 27x132 is queried. ...
  • Re: Writer Job Status - API QSPROUTQ
    ... DCL &APIERR *CHAR 16 ... &WRTJSTS - Showed empty even thought I found the OUTQ in Status MSGW. ... I also tried to get the Writer status in API QGYRPRTA, ...
  • Writer Job Status - API QSPROUTQ
    ... I used following CL code to retrieve the Writer Job Status, ... DCL &APIERR *CHAR 16 ... &WRTJSTS - Showed empty even thought I found the OUTQ in Status MSGW. ...