1,160 pts.
 Can i declare a display file and a physical file in a single CL
Can i declare a display file and a physical file in a single CL.  Also can u share a sample program, which uses the parameters entered in the display file (using SNDRCV command) and processes records from a physical file.

Software/Hardware used:
ASKED: September 9, 2009  12:11 PM
UPDATED: September 10, 2009  5:22 AM

Answer Wiki:
Yes you can. You need to use the OPNID param on the DCLF and SNDRCV / RCVF op codes. PGM DCLF FILE(A1_DSPF) RCDFMT(SPOOLTMP) OPNID(DSP) DCLF FILE(A1_PF) RCDFMT(SPOOLTEMP) + OPNID(PF) RCVF DEV(*FILE) RCDFMT(SPOOLTEMP) OPNID(PF) CHGVAR &DSP_OBJLINK &PF_OBJLINK SNDRCVF DEV(*FILE) RCDFMT(SPOOLTMP) OPNID(DSP) ENDPGM -------------------- I think that you will need to create the program as type CLLE not CLP Phil -------------------- It depends. What version of the OS are you running?
Last Wiki Answer Submitted:  September 9, 2009  6:05 pm  by  philpl1jb   44,060 pts.
All Answer Wiki Contributors:  philpl1jb   44,060 pts. , CharlieBrowne   32,785 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks, it worked, our version is V5R4, we need to use OPNID in DCLF when we use more than one file.

 1,160 pts.