Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create a sql hold file.

Status
Not open for further replies.

jackyzsn

Programmer
May 17, 2007
14
CA
have trouble to convert a batch report(MVS) to online format. In batch JCL I have 3 SQL hold files, it's running fine. I tried to convert it to online(so user can use web to get report instead of submit a JCL), it complains the SQL hold files...has following error

Code:
0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 0 ERROR AT OR NEAR LINE     46  IN PROCEDURE FOCSQL02FOCEXEC *
 (FOC012) THE WORD 'FILE' OR THE FILENAME APPEARS TWICE
 BYPASSING TO END OF COMMAND
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 0 ERROR AT OR NEAR LINE     81  IN PROCEDURE fs2203  FOCEXEC *
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: TPROPP
 0 ERROR AT OR NEAR LINE     88  IN PROCEDURE fs2203  FOCEXEC *
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: TPROPP
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: TPROPP
 BYPASSING TO END OF COMMAND
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: TPROPP
 BYPASSING TO END OF COMMAND

This is the code I tried to create a SQL hold file, have 3 like this but different hold file name...

Code:
SQL
  SELECT  A.CO_ID, A.POL_ID, A.CVG_NUM,
          B.INSRD_CLI_ID, C.CLI_INDV_EFF_DT,
          C.ENTR_SUR_NM,
          C.ENTR_GIV_NM,
          C.CLI_INDV_SUR_NM,
          C.CLI_INDV_GIV_NM
          FROM MRFKROPP A, MRFKCVGC B, MRFKCLNM C
          WHERE A.CO_ID = B.CO_ID AND
                A.POL_ID = B.POL_ID AND
                A.CVG_NUM = B.CVG_NUM AND
                B.CVG_CLI_REL_TYP_CD = 'P' AND
                A.CO_ID = C.CO_ID AND
                B.INSRD_CLI_ID = C.CLI_ID AND
                C.CLI_INDV_EFF_DT =
   (SELECT MAX(C.CLI_INDV_EFF_DT)
                FROM MRFKROPP A, MRFKCVGC B, MRFKCLNM C
                WHERE A.CO_ID = B.CO_ID AND
                      A.POL_ID = B.POL_ID AND
                      A.CVG_NUM = B.CVG_NUM AND
                      B.CVG_CLI_REL_TYP_CD = 'P' AND
                      A.CO_ID = C.CO_ID AND
                      B.INSRD_CLI_ID = C.CLI_ID AND
                      C.CLI_INDV_EFF_DT <=
                      A.ROP_PAYO_EFF_DT);
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TPNAME
END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top