SilvioClaro
Technical User
Executando qmfbatch com variavel
1) jcl
//STEP1 EXEC DB2QMFBT
//QMFBATCH.DSQPRINT DD DSN=MV.PCDB.PRV.TESTE,
// SPACE=(CYL,(600,300),RLSE),
// DISP=(,CATLG,DELETE),UNIT=(DISCO,15),
// DCB=(MV.A,LRECL=999,RECFM=VB,DSORG=PS)
//SYSTSIN DD *
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) -
PARM(S=DB2, +
M=B, +
I=PCP972.P_PRED_PARTC( +
&&DATA_INICIO='''01.01.2015''' +
&&DATA_FIM='''31.01.2015''' )
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=Y
//*
2) query
--------------------------------------------------------
SQL QUERY PCP972.Q_PREDITIVO_PARTICIPANTE
select *
from tabela
where
T29.DVDA_PRODT_PREVD >= &DATA_INICIO
AND T29.DVDA_PRODT_PREVD <= &DATA_FIM
WITH UR;
3) proc
--------------------------------------------------------
PROC PCP972.P_PRED_PARTC
SET GLOBAL (QUOTE ='
SET GLOBAL (DATA_INICIO=&DATA_INICIO
SET GLOBAL (DATA_FIM=&DATA_FIM
RUN PCP972.Q_PREDITIVO_PARTICIPANTE
PRINT REPORT(PA=NO DATETIME=NO CC=NO LENGTH=CONT)
1) jcl
//STEP1 EXEC DB2QMFBT
//QMFBATCH.DSQPRINT DD DSN=MV.PCDB.PRV.TESTE,
// SPACE=(CYL,(600,300),RLSE),
// DISP=(,CATLG,DELETE),UNIT=(DISCO,15),
// DCB=(MV.A,LRECL=999,RECFM=VB,DSORG=PS)
//SYSTSIN DD *
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) -
PARM(S=DB2, +
M=B, +
I=PCP972.P_PRED_PARTC( +
&&DATA_INICIO='''01.01.2015''' +
&&DATA_FIM='''31.01.2015''' )
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=Y
//*
2) query
--------------------------------------------------------
SQL QUERY PCP972.Q_PREDITIVO_PARTICIPANTE
select *
from tabela
where
T29.DVDA_PRODT_PREVD >= &DATA_INICIO
AND T29.DVDA_PRODT_PREVD <= &DATA_FIM
WITH UR;
3) proc
--------------------------------------------------------
PROC PCP972.P_PRED_PARTC
SET GLOBAL (QUOTE ='
SET GLOBAL (DATA_INICIO=&DATA_INICIO
SET GLOBAL (DATA_FIM=&DATA_FIM
RUN PCP972.Q_PREDITIVO_PARTICIPANTE
PRINT REPORT(PA=NO DATETIME=NO CC=NO LENGTH=CONT)