DCLF FILE(EMP001P)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
                                                         Â
RCvF RcdFmt(EMPREC)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
                                                         Â
OVRDBF FILE(EMP001P) TOFILE(EMP001P) MBR(SECOND) + SHARE(*YES)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
MONMSG MSGID(CPF0000)Â EXEC(SNDUSRMSGÂ MSG("ERROR") )Â Â Â Â Â
                                                         Â
RCvF RcdFmt(EMPREC)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
Here, I'm unable to overwrite the EMP001P file with second record. pls suggest correct way to do it.
Software/Hardware used:
ASKED:
October 22, 2009 2:18 PM
UPDATED:
October 22, 2009 8:57 PM
Here, I’m unable to overwrite the EMP001P file with second member. pls suggest correct way to do it.
That’s right. The override isn’t going to override a file that’s already been opened in your CL program. The override could only affect a second CL program that you might call after the override.
You don’t say anything about what OS version/release you are working with. If you’re at V5R4 or later, you might be able to declare two different file names. Override the first file name to your first actual file and override the second file name to your second actual file. I’ve never seen any need to do this, so I haven’t tried it — I don’t know how the conflicting field names might be handled by CL.
I probably wouldn’t do this in CL in the first place. CL is not a language for data manipulation other than basic input.
Tom