hi guys...i am having a problem with my clle pgm...as you can see on my code below here
after i call the pgm i want to send the object to the designated library but first i have to check the object if is already exist then the program would execute cpyf replace....and if the object doesn't exist
the cl would create it...but so far i'am stuck on the cpyf command because it doesn't send the file to library that i want...please....really need help....thanks
Code:
PGM PARM(&INSCD) DCL VAR(&INSCD) TYPE(*CHAR) LEN(10) ADDLIBLE LIB(BILLPxxx) MONMSG MSGID(CPF0000) CHKOBJ OBJ(QTEMP/LNGxxx) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(DO) CRTDUPOBJ OBJ(LNGxxx) FROMLIB(*LIBL) OBJTYPE(*FILE) + TOLIB(QTEMP) NEWOBJ(*OBJ) DATA(*NO) ENDDO CHKOBJ OBJ(QTEMP/LNGNVATxxx) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(DO) CRTDUPOBJ OBJ(LNGNVATxxx) FROMLIB(*LIBL) OBJTYPE(*FILE) + TOLIB(QTEMP) NEWOBJ(*OBJ) DATA(*NO) ENDDO OVRDBF FILE(LNGxxx) TOFILE(QTEMP/LNGxxx) MBR(*FIRST) OVRDBF FILE(LNGNVATxxx) TOFILE(QTEMP/LNGNVATxxx) + MBR(*FIRST) CALL PGM(LNGNVARNEW) PARM(&INSCD) CHKOBJ OBJ(PMDATPLNS/LNGNVASND) OBJTYPE(*FILE) MONMSG MSGID(CPFA0A0) EXEC(DO) CPYF FROMFILE(*LIBL/LNGNVA) + TOFILE(PMDATPLNS/LNGNVASND) MBROPT(*REPLACE) ENDDO CHKOBJ OBJ(PMDATPLNS/LNGNVASND) OBJTYPE(*FILE) MONMSG MSGID(CPFA0A9) EXEC(DO) CRTDUPOBJ OBJ(LNGNVA) FROMLIB(*LIBL) OBJTYPE(*FILE) + TOLIB(PMDATPLNS) NEWOBJ(LNGNVASND) DATA(*YES) ENDDO RMVLIBLE LIB(BILLPYMN) MONMSG MSGID(CPF0000)
the cl would create it...but so far i'am stuck on the cpyf command because it doesn't send the file to library that i want...please....really need help....thanks
Comment