* arquivo de entrada//******************************************************************************//* arquivo de saida *//******************************************************************************//SORTOUT DD DSN=RPY.EDMIL.INTE.CADAS.SORT, // DISP=(,CATLG,DELETE), // UNIT=FIXO,SPACE=(CYL,(20,5)), // DCB=(RECFM=FB,LRECL=850,BLKSIZE=0) ************************* //* SORT FIELDS=(05,4,A,62,4,A),FORMAT=BI,STOPAFT=200 * criterio de selecao//SYSIN DD * SORT FIELDS=(05,4,A,62,6,A),FORMAT=BI INCLUDE COND=((5,4,CH,EQ,C'0011',OR,5,4,CH,EQ,C'0012'),AND,62,6,CH,EQ,C'200105')// INCLUDE COND=(17,2,CH,EQ,C'EC',OR, 17,4,CH,EQ,C'TS99',OR, 17,4,CH,EQ,C'0088',OR, 17,4,CH,EQ,C' 72')// INCLUDE COND=(1,4,CH,EQ,C'0116',AND, 69,4,CH,EQ,C'2644',AND, 80,9,CH,EQ,C'562644016')// INCLUDE COND=(1,4,CH,EQ,C'0116',AND, 69,4,CH,EQ,C'2644',AND, 80,9,CH,EQ,C'562644016')////*********************************************************************//* INCLUDE COM OMIT *//*********************************************************************//* OMIT COND = (P1,T1,F1,COND,|P2,T2,F2-OU CONST-|,(AND,OR,) OMIT COND = (P1,T1,COND,|P2,T2-OU CONST-|,(AND,OR,)...) IDEM INCLUDE UTILIZADO PARA NAO GRAVAR OS REGISTROS QUE SATISFACAM A CONDICAO.//**********************************************************************//*INCLUDE COM INREC *//********************************************************************** INREC FIELDS= (S,P,T,A,...S,P,T,A) UTILIZADO PARA FORMATAR O REGISTRO DE ENTRA DA ANTES DA CLASSIFICACAO, PARA DIMINUIR A QUANTIDADE DE RECURSOS A SEREM UTILIZADOS, CASO NAO NECESSARIO A UTILIZACAO. EX: O REGISTRO DE ENTRADA TEM 5K MAS SO SERA UTILIZADO 50 BYTES.//************************************************************************//* INCLUDE COM OUTREC//************************************************************************ OUTREC FIELDS= (S,P,T,A,...S,P,T,A) S = PARAMETRO OPCIONAL (N)X - QTD DE BYTES A SEREM INCLUIDOS COM BRANCOS. (N)Z - QTD DE BYTES A SEREM INCLUIDOS COM ZEROS. P = PRIMEIRA POSICAO DO CAMPO A SER MOVIDO T = TAMANHO DO CAMPO A = ALINHAMENTO DO CAMPO H - HALFWORD F - FULLWORD D - DOUBLEWORD//***************************************************************************//* INCLUDE COM SUM *//***************************************************************************- FUNCAO: SUM - Elimina registros com igualdade de chaves, de modo que somente 1 (um) r4gistro sera gravado para cada valor da chave, opcionalmente podera totalizar campos numericos do registro sumarizado. SUM = FIELDS=(P,T,F,...P,T,F) SUM = FIELDS=(P,T,...P,T),FORMAT=F SUM = FIELDS=NONE FIELDS - INDICA OS CAMPOS NUMERICOS QUE SERAO SOMADOS. P - PRIMEIRA POSICAO DO CAMPO T - TAMANHO DO CAMPO F - FORMATO DO CAMPO NONE - INDICA QUE DOS REGISTROS DUPLICADOS APENAS UM DEVERA SER GRAVADO, NAO SOMANDO OS REGISTROS. SUM - ESPECIFICA QUE SEMPRE QUE FOREM ENCON TRADOS REGISTROS COM A MESMA CHAVE APENAS UM DEVERA SER GRAVADO, COM A SOMATORIA DE TODOS OS IGUAIS. EQUALS = INDICA QUE OS REGISTROS IGUAIS DEVERAO PERMA NECER CLASS NA MESMA ORDEM DE ENTRADA. QUANDO DESNECESSARIO NAO USAR. DEGRADA MUITO A UTILIZACAO. SKIPREC = NNNNNN DESPREZA REGISTROS DO INICIO DO ARQUIVO DE ENTRADA STOPAFT = NNNNNN LIMITE DE REGISTROS PARA O ARQUIVO DE SAIDA//*//*********************************************************************//*//CA89SELE JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,// MSGCLASS=R,TIME=1,REGION=10000K/*JOBPARM R=2007,P=PROC03//*//*--------------------------------------------------------------------*//* STOPAFT = LIMITE DE REGISTROS DE SAIDA *//* INCLUDE COND = SELECIONA PARA SAIR NO SORT *//*--------------------------------------------------------------------*//*//SORT0001 EXEC RSORTD//SYSOUT DD SYSOUT=*//SORTIN DD DSN=RPY.EDMIL.INTE.CADAS,DISP=SHR//SORTOUT DD DSN=RPY.EDMIL.INTE.CADAS.SORT,// DISP=(,CATLG,DELETE),// UNIT=FIXO,SPACE=(CYL,(20,5)),// DCB=(RECFM=FB,LRECL=850,BLKSIZE=0)//* SORT FIELDS=(05,4,A,62,4,A),FORMAT=BI,STOPAFT=200//SYSIN DD * SORT FIELDS=(05,4,A,62,6,A),FORMAT=BI INCLUDE COND=((5,4,CH,EQ,C'0011',OR, 5,4,CH,EQ,C'0012'),AND, 62,6,CH,EQ,C'200105')// INCLUDE COND=(17,2,CH,EQ,C'EC',OR, 17,4,CH,EQ,C'TS99',OR, 17,4,CH,EQ,C'0088',OR, 17,4,CH,EQ,C' 72')// INCLUDE COND=(1,4,CH,EQ,C'0116',AND, 69,4,CH,EQ,C'2644',AND, 80,9,CH,EQ,C'562644016')// INCLUDE COND=(1,4,CH,EQ,C'0116',AND, 69,4,CH,EQ,C'2644',AND, 80,9,CH,EQ,C'562644016')////*//*********************************************************************//*//CA89SORT JOB (1,'TP=TNDS'),TGENHAR,CLASS=C,MSGCLASS=R, MSGLEVEL=0,// TIME=5,REGION=5M/*JOBPARM R=2007,P=PROC03,L=9999//*--------------------------------------------------------------------*//* SORT = COPIA DE ARQUIVOS *//*--------------------------------------------------------------------*//SORT0215 EXEC RSORTD//SORTIN DD DSN=CD@.CIDEN,DISP=SHR//SORTOUT DD DSN=CD@.ELI.IDEN,DISP=(,CATLG,DELETE),// UNIT=FIXO,SPACE=(CYL,(5,1),RLSE),// DCB=(RECFM=FB,LRECL=1700,BLKSIZE=0)//SYSIN DD * SORT FIELDS=COPY//*//*********************************************************************//*//CA89LIST JOB (1,'TP=TNDS'),TGENHAR,CLASS=C,MSGCLASS=R,MSGLEVEL=2/*JOBPARM R=2007,P=PROC03,L=999//*-------------------------------------------------------------------*//* SORT = COPY USADO PARA LISTAR PGM *//*-------------------------------------------------------------------*//STEP0101 EXEC RSORTD//SYSOUT DD SYSOUT=*//*SORTIN DD DSN=MB.FND05(CATRDETA),DISP=SHR//SORTIN DD DSN=CA@.PGH.HART.TRA01(CATRDETA),DISP=SHR//SORTOUT DD SYSOUT=*//SYSIN DD * SORT FIELDS=COPY////*//*********************************************************************//*//CA89CRI2 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,// MSGCLASS=R,TIME=10,REGION=10000K/*JOBPARM R=2007,P=PROC03//*//*--------------------------------------------------------------------*//*//* SUM FIELDS = NONE//* INDICA QUE DEVERA SER GRAVADO NA SAIDA//* APENAS UM REGISTRO DE CADA CHAVE CLASSIFICADA//* *//*--------------------------------------------------------------------*//*//SORT0001 EXEC RSORTD//SYSOUT DD SYSOUT=*//SORTIN DD DSN=CAA.DETDI.MOVOK.RONO.D2504,DISP=SHR//SORTOUT DD DSN=CAA.DETDI.MOVOK.RONO.D2504.SUM,// DISP=(,CATLG,DELETE),// UNIT=FIXO,SPACE=(CYL,(30,5)),// DCB=(RECFM=FB,LRECL=140,BLKSIZE=0) SORT FIELDS=(05,13,A,44,1,A),FORMAT=BI SUM FIELDS=NONE////*//*********************************************************************//*//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,// MSGCLASS=R,TIME=10,REGION=10000K/*JOBPARM R=2007,P=PROC03//*//*--------------------------------------------------------------------*//* OUTREC FIELDS = FORMATACAO DO REGISTRO DE SAIDA *//*--------------------------------------------------------------------*//*//SORT0001 EXEC RSORTD//SYSOUT DD SYSOUT=*//SORTIN DD DSN=CAA.DETDI.Y2K.RONOA,DISP=SHR//SORTOUT DD DSN=&&DET,DISP=(,PASS,DELETE),// DCB=*.SORTIN,SPACE=(CYL,250)//SYSIN DD * SORT FIELDS=COPY OUTREC FIELDS=(17,4,C'0000000001')//*//*********************************************************************//*//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,// MSGCLASS=R,TIME=10,REGION=10000K/*JOBPARM R=2007,P=PROC03//*//*--------------------------------------------------------------------*//* SUM FIELDS = *//*--------------------------------------------------------------------*//*//SORT0001 EXEC RSORTD//SYSOUT DD SYSOUT=*//SORTIN DD