|Compilation error RNF5199|
Hi, we are trying to create one display file that is created sucessfully and then the RPGLE program using DSPF and trying to compile that rpgle program using DSPF.
Below is the DSPF source code for display file named DSPF_1.
A R RCD1 A 10 ALARM
Below is the RPGLE program source code DSPF_1RPG using display file named DSPF_1.
FDSPF_1 IF E WORKSTN /Free *in10 = *on; exfmt RCD1; *in10 = *off; *inlr = *on; /End-Free
The compile time error RNF5199 occurs during program compilation step which says "Factor 2 operand is not valid for EXFMT operation."
when checked the compilation report then error description was "Factor 2 operand is not valid for EXFMT operation. "
What is the cause of error RNF5199?
The solution to this RNF5199 error is in the above program the DSPF defined as Input-only file and EXFMT is (WRITE(Output) + READ(Input)) operation i.e. performed the combined operation. So, we cannot use EXFMT on an input-only file.
So, please change above f-spec from IF (input full-procedural) to CF (combined full procedural) and your program will be successfully compiled.
Therefore, the final code will be
FDSPF_1 CF E WORKSTN /Free *in10 = *on; exfmt RCD1; *in10 = *off; *inlr = *on; /End-Free