Lenny2113
115 pts. | Apr 9 2009 8:21PM GMT
Martin, Phil :
Thank you for your help. My background is mainframe where JCL is used instead of CL…
I am not sure how this can be done. Please pardon my ignorance.
If in my CL program I do RUNSQLSTM command should the source for CREATE VIEW be in a specific file type?
This is a code from my CL program which defines physical file called &WKPF:
CRTPF FILE(QS36F/&WKPF) SRCFILE(LENNYTEST/QDDSSRC) +
SRCMBR(G4TENSWK) OPTION(*NOSRC *NOLIST) +
LVLCHK(*NO)
RUNSQLSTM SRCFILE(LENNYTEST/QDDSSRC) SRCMBR(CRTQRY1)
/* CRTLF FILE(QS36F/&WKLF) SRCFILE(LENNYTEST/QDDSSRC) +
SRCMBR(G4TENSLF) */
/* */
/* */
In CREATE VIEW statement can I code symbolic parameters which are given value in my CL program?
CREATE VIEW &WKLF — (parameter is supplied from CL)
AS SELECT COMPNY,
PROJNO,
BLDNUM,
UNTNUM
FROM &WKPF ;
This is my logical file that I need to replace by “create view”
A R G4TENSR PFILE(G4TENSWK)
A*
A K COMPNY
A K PROJNO
A K BLDNUM
A K UNTNUM
Thank you !
Lenny
Supriyob2
165 pts. | Jan 19 2010 12:28PM GMT
Can this be done using CPYF…I mean once the temporary PF is created ,if we copy the data from the temporary file to a permanant PF using a CL pgm by CPYF..and then create a LF on this PF.. I assume that the strucrure is temporary file is known. Please correct me if wrong.
Regards,
Supriyo






