AS400, CL Program getting CPF0886 Error

2475 pts.
Tags:
AS400 CLP
cpf 0886 error
Hi all ! in the attached program im getting CPF0886 received by REC331C4 at 2100. How to rectify this ?

Answer Wiki

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

Discuss This Question: 4  Replies

 
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
  • Sureyz
    PGM DCL VAR(&ERR) TYPE(*CHAR) LEN(1) DCL VAR(&EROR) TYPE(*DEC) LEN(1) DCL VAR(&MON) TYPE(*CHAR) LEN(2) DCL VAR(&YEA) TYPE(*CHAR) LEN(4) DCL VAR(&MON1) TYPE(*DEC) LEN(2) DCL VAR(&YEA1) TYPE(*DEC) LEN(4) DCL VAR(&DAT1) TYPE(*CHAR) LEN(10) DCL VAR(&DAT2) TYPE(*CHAR) LEN(10) DCL VAR(&DAT3) TYPE(*CHAR) LEN(10) DCL VAR(&DAT4) TYPE(*CHAR) LEN(6) DCL VAR(&TXT1) TYPE(*CHAR) LEN(100) DCLF FILE(REC331DB) SNDF RCDFMT(FTR01) CHGVAR VAR(&QUEUE) VALUE('REC331C4 ') START: SNDF RCDFMT(FTR01) SNDF RCDFMT(MSGR) SNDRCVF RCDFMT(WIN02) RMVMSG CLEAR(*ALL) IF COND(&IN12 *EQ '1') THEN(GOTO CMDLBL(END)) CHGVAR VAR(&IN31) VALUE('0') IF COND(&DAT *EQ 0) THEN(DO) SNDPGMMSG MSGID(LM50054) MSGF(LM5MSGF) TOPGMQ(*SAME) CHGVAR VAR(&IN31) VALUE('1') GOTO CMDLBL(START) ENDDO CHGVAR VAR(&DAT4) VALUE(&DAT) CHGVAR VAR(&MON) VALUE(%SST(&DAT4 1 2)) CHGVAR VAR(&YEA) VALUE(%SST(&DAT4 3 4)) CHGVAR VAR(&MON1) VALUE(&MON) CHGVAR VAR(&YEA1) VALUE(&YEA) IF COND((&MON1 *LE 0) *OR (&MON1 *GT 12)) + THEN(DO) SNDPGMMSG MSG('Invalid Date') TOPGMQ(*SAME) CHGVAR VAR(&IN31) VALUE('1') GOTO START ENDDO IF COND((&YEA1 *LT 1960) *OR (&YEA1 *GT 2039)) + THEN(DO) SNDPGMMSG MSG('Invalid Date') TOPGMQ(*SAME) CHGVAR VAR(&IN31) VALUE('1') GOTO START ENDDO /* CONCATENATING DAY TO THE DATE */ CHGVAR VAR(&DAT1) VALUE(&YEA *CAT '-' *CAT &MON + *CAT '-01') CHGVAR VAR(&DAT2) VALUE(&YEA *CAT '-' *CAT &MON + *CAT '-31') CVTDAT DATE(&DAT2) TOVAR(&DAT3) FROMFMT(*ISO) + TOFMT(*DMYY) TOSEP('-') MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&DAT2) VALUE(&YEA *CAT '-' *CAT &MON + *CAT '-30') CVTDAT DATE(&DAT2) TOVAR(&DAT3) FROMFMT(*ISO) + TOFMT(*DMYY) TOSEP('-') MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&DAT2) VALUE(&YEA *CAT '-' *CAT &MON + *CAT '-29') CVTDAT DATE(&DAT2) TOVAR(&DAT3) FROMFMT(*ISO) + TOFMT(*DMYY) TOSEP('-') MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&DAT2) VALUE(&YEA *CAT '-' *CAT &MON + *CAT '-28') ENDDO /* FOR 28-MM-YYYY*/ ENDDO /* FOR 29-MM-YYYY*/ ENDDO /* FOR 30-MM-YYYY*/ OVRDBF FILE(KALTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OPNQRYF FILE((KALTK00)) QRYSLT('CRPDTE *EQ %RANGE("' + *CAT &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 + *CAT '")') KEYFLD(*FILE) OVRDBF FILE(RECTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OPNQRYF FILE((RECTK00)) QRYSLT('CRPDTE *EQ %RANGE("' + *CAT &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 + *CAT '")') KEYFLD(*FILE) CALL PGM(REC331RU) PARM(&DAT1 &DAT2) CLOF OPNID(KALTK00) CLOF OPNID(RECTK00) OVRDBF FILE(RECTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OVRDBF FILE(KALTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) CHGVAR VAR(&TXT1) VALUE('CRPDTE *EQ %RANGE("' *CAT + &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 *CAT + '")' *CAT ' *AND OTRCTS *NE 0') OPNQRYF FILE((RECTK00)) QRYSLT(&TXT1) KEYFLD(*FILE) OPNQRYF FILE((KALTK00)) QRYSLT(&TXT1) KEYFLD(*FILE) CALL PGM(KAL115RP2) PARM(&DAT1 &DAT2) CLOF OPNID(RECTK00) CLOF OPNID(KALTK00) DLTOVR FILE(RECTK00) DLTOVR FILE(KALTK00) OVRDBF FILE(RECTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OVRDBF FILE(KALTK00) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) CHGVAR VAR(&TXT1) VALUE('CRPDTE *EQ %RANGE("' *CAT + &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 *CAT + '")' *CAT ' *AND CQRTRB *NE 0') /*MIK*/ OPNQRYF FILE((RECTK00)) QRYSLT(&TXT1) KEYFLD(*FILE) /*MIK*/ OPNQRYF FILE((KALTK00)) QRYSLT(&TXT1) KEYFLD(*FILE) /*MIK*/ CALL PGM(KAL115RP5) PARM(&DAT1 &DAT2) /*MIK*/ CLOF OPNID(RECTK00) /*MIK*/ CLOF OPNID(KALTK00) /*MIK*/ DLTOVR FILE(RECTK00) /*MIK*/ DLTOVR FILE(KALTK00) OVRDBF FILE(KALTK15) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OVRDBF FILE(RECTK15) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) /*SUR CLOF OPNID(KALTK15) */ /*SUR CLOF OPNID(RECTK15) */ CHGVAR VAR(&TXT1) VALUE(' ') CHGVAR VAR(&TXT1) VALUE('CRPDTE *EQ %RANGE("' *CAT + &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 *CAT + '")' *CAT ' *AND PRMAGT *NE 0') OPNQRYF FILE((KALTK15)) QRYSLT(&TXT1) KEYFLD((CRDRCD)) OPNQRYF FILE((RECTK15)) QRYSLT(&TXT1) KEYFLD((CRDRCD)) CALL PGM(KAL115RP3) PARM(&DAT1 &DAT2 &BCODE) CLOF OPNID(KALTK15) CLOF OPNID(RECTK15) OVRDBF FILE(KALTK15) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) OVRDBF FILE(RECTK15) POSITION(*START) SHARE(*YES) + SEQONLY(*NO) CHGVAR VAR(&TXT1) VALUE(' ') CHGVAR VAR(&TXT1) VALUE('CRPDTE *EQ %RANGE("' *CAT + &DAT1 *CAT '"' *BCAT '"' *CAT &DAT2 *CAT + '")' *CAT ' *AND DRSAGT *NE 0') OPNQRYF FILE((KALTK15)) QRYSLT(&TXT1) KEYFLD((CRDRCD)) OPNQRYF FILE((RECTK15)) QRYSLT(&TXT1) KEYFLD((CRDRCD)) CALL PGM(KAL115RP4) PARM(&DAT1 &DAT2 &BCODE) CLOF OPNID(KALTK15) CLOF OPNID(RECTK15) END: ENDPGM 
    2,475 pointsBadges:
    report
  • CharlieBrowne
    At what point are you getting the error?My guess  would be you are doing an OVRDBF to a file that is not consistant with the file that the program is trying to use. 
    41,430 pointsBadges:
    report
  • Sureyz
    Hi .. My display file has two fields.. When i press F12 without enter anything on the fileds im getting this error...
    2,475 pointsBadges:
    report
  • TomLiotta
    In that case, change your display file DDS to define the F12-key as CA12 instead of CF12. Recompile the display file and try again. (If the program receives a level-check error, then also recompile the CL program.)   Also, if you could make a few changes to the programs called by this CL, the CL could be reduced by 90% and all of it could be much more efficient. Do you not have the SQL Development Kit available? The cost of a license has to be similar to the cost of coding that CL.   Tom
    125,585 pointsBadges:
    report

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