Este comando mantém os dados em memória(CMOS) mesmo após a saída do CICS .
Criação na área de Working ....
77 NCOUNTER PIC S9(08) BINARY VALUE +25.
*
77 COD-RESP PIC S9(04) COMP.
*
77 WS-COUNTER PIC X(16) VALUE 'TSTNOMEARQ'.
Primeiro procedimento , deletar counter number para re-criar
EXEC CICS DELETE
COUNTER (WS-COUNTER)
RESP (COD-RESP)
END-EXEC.
*
IF COD-RESP NOT EQUAL ZEROS
IF (COD-RESP EQUAL 16) AND
(EIBRESP2 EQUAL 201)
NEXT SENTENCE
ELSE
MOVE COD-RESP TO COM-115-COD-ERRO
MOVE WS-MSG01 TO COM-115-MSG-RET
PERFORM 999-E-RETORNO
END-IF
END-IF.
Criar novo procedimento com valores atualizados ,o campo NCOUNTER receber o conteúdo que ficará armazenado em WS-COUNTER que é o nome da fila 'TSTNOMEARQ'.
EXEC CICS DEFINE
COUNTER (WS-COUNTER)
VALUE (NCOUNTER)
MAXIMUM (20)
RESP (COD-RESP)
END-EXEC.
*
IF COD-RESP NOT EQUAL ZEROS
MOVE COD-RESP TO COM-115-COD-ERRO
MOVE WS-MSG02 TO COM-115-MSG-RET
PERFORM 999-E-RETORNO
END-IF.
*
sábado, 23 de julho de 2011
quinta-feira, 21 de julho de 2011
Fontes em Easytrieve - Balance com dois Arqs.
*---------------------------------------------------------------------**00000100
* **00000200
* PROGRAMA : ETST182 **00000300
* **00000400
* ANALISTA : CARDEAL **00000600
* ESCRITO EM : 99/99/9999 **00000700
* **00000800
* OBJETIVO : SELECIONA CLIENTES POR PARA EMISSAO RELATORIO **00000900
* **00001000
*---------------------------------------------------------------------**00001100
* **00001200
* MANUTENCOES **00001300
* **00001400
* SEQ MATRIC. NOME DATA DESCRICAO **00001500
* **00001600
*---------------------------------------------------------------------**00001700
*00001800
* 00001900
FILE TSTD001E 00002000
001E-NIP 001 005 P 00002100
* 00002200
FILE TSTD002E 00002300
002E-NIP 010 005 P 00002400
* 00002500
FILE TSTD001S FB (250 0) 00002600
* 00002700
JOB INPUT (TSTD001E KEY (001E-NIP) + 00002800
TSTD002E KEY (002E-NIP)) 00002900
* 00003000
* 00003100
IF MATCHED 00003200
PUT TSTD001S FROM TSTD002E 00003300
END-IF 00003400
END 00003500
* 00003600
Dicas de Classificação Arquivos Sequenciais - SORT / Exemplos
//*********************************************************************
//*
//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=CAA.MESTW.G0780.D0805,DISP=SHR
//SORTOUT DD DSN=CAA.MESTW.G0780.D0805.AG11E12,
// 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 DSN=&&DET,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,4,A),FORMAT=BI
SUM FIELDS=(5,10,ZD)
//*
//*********************************************************************
//*
//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* INCLUDE COND = *
//* SUM FIELDS = NONE APENAS UM REGISTRO DE CADA CHAVE *
//* A SER GRAVADO NA SAIDA DO SORTE *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CAA.DETDI.G0718.RONO.D2504,DISP=SHR
//SORTOUT DD DSN=CAA.DETDI.G0718.HART.D2504.SUM,
// DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(30,5)),
// DCB=(RECFM=FB,LRECL=140,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(5,4,A,69,5,A,63,4,A,44,1,A),FORMAT=BI
INCLUDE COND=(44,1,CH,EQ,C'D',OR,
44,1,CH,EQ,C'C')
SUM FIELDS=NONE
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2
// MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC33,L=99999
//*
//*-------------------------------------------------------------------*
//* OMIT COND = NAO GRAVA NA SAIDA DO SORTE
//*-------------------------------------------------------------------*
//* CLASSIFICA MOVIMENTO CONTABIL POR: *
//* CD-EMPRESA, CD-AGE-FIL, CD-UNID-CONT, *
//* CD-CONT-INTE, CD-IDEN-PROD, CD-ITEM-PROD, *
//* CD-EMP-ORIG, CD-CR-ORIG, CD-CR-GEST, *
//* DT-CONTAB *
//*-------------------------------------------------------------------*
//SORT01 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CJ@.AF.SARQMOV,DISP=OLD
// DD DSN=CJ@.AF.SARQMOR,DISP=OLD
//SORTOUT DD DSN=CJ@.AF.EARQMOV1,
//* DISP=(,CATLG,DELETE),
// DISP=OLD,
// UNIT=FIXO,SPACE=(CYL,(5,1)),
// DCB=(RECFM=FB,LRECL=569,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(01,5,ZD,A,14,5,ZD,A,19,7,ZD,A,26,7,ZD,A,33,1,ZD,A,
34,9,ZD,A,43,5,ZD,A,48,7,ZD,A,55,7,ZD,A,
06,4,ZD,A,10,2,ZD,A,12,2,ZD,A)
OMIT COND=(06,8,ZD,EQ,20010507)
//*-------------------------------------------------------------------*
//*
//*********************************************************************
//*
//CA89COMP JOB (1,'TP=TNDS'),TGENHAR,CLASS=3,MSGLEVEL=2,MSGCLASS=R,
// TIME=1
/*JOBPARM R=2007,P=PROC03,LINES=999
//*-------------------------------------------------------------------
//*
//* EQUALS PARA MANTER A SEQUENCIA DE ENTRADA NOS IGUAIS
//*
//*-------------------------------------------------------------------
//SORT0001 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=&&GEO1,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=72,BLKSIZE=0)
SORT FIELDS=(2,71,CH,A),EQUALS
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* EQUALS = PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//* SKIPREC = NNNNNN - PARA DESPREZAR OS PRIMEIROS
//* STOPAFT = NNNNNN - PARA GRAVAR NA SAIDA
//*-------------------------------------------------------------------
//*
//SORT0002 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CA@.ARQ1,DISP=SHR
//SORTOUT DD DSN=&&VAL,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,17,CH,A),EQUALS,SKIPREC=NNNNNN,STOPAFT=XXXXXX
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* INREC FIELDS =
//* SUM FIELDS =
//* EQUALS = PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//*-------------------------------------------------------------------
//*
//SORT0003 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&VAL,DISP=OLD
//SORTOUT DD DSN=&&SUM,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,4,CH,A,13,5,CH,A),EQUALS
INREC FIELDS=(1,4,C'99999999',13,88)
SUM FIELDS=(18,8,PD,26,8,PD,34,8,PD,42,8,PD,50,8,PD,86,8,PD)
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//*** PARA ALTERAR A ORDEM DE CLASSIFICACAO HEXA DE UM CARACTER
//*-------------------------------------------------------------------
//*
//SORT0004 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&VAL,DISP=OLD
//SORTOUT DD DSN=&&SUM,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,1,AQ,A),EQUALS
ALTSEQ CODE=(C1C9) /* CARACTER HEXA 'C1' CLASSIF. COMO HEXA 'C9'
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* A PARTIR DE UM ARQUIVO, GERAR DOIS OU MAIS ARQUIVOS
//* OUTREC = GRAVA REGISTROS COM OUTRA FORMATACAO
//*-------------------------------------------------------------------
//*
//SORT0005 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CA@.SDAP.DEZ1,DISP=SHR
//SORTOF1 DD DSN=&&ARQ1,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=60,BLKSIZE=?????)
//SORTOF2 DD DSN=&&ARQ2,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
OUTFIL FILES=1,
INCLUDE=(5,1,CH,EQ,C'C'),
OUTREC=(1,60)
OUTFIL FILES=2,
INCLUDE=(5,1,CH,EQ,C'D'),
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------*
//* SEPARA ARQUIVO POR EMPRESA/GRUPO *
//* GRAVANDO EM SAIDAS DIFERENTES
//*-------------------------------------------------------------------*
//SORT0000 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=EM.PBLM.TEMP.H&HR,DISP=SHR
//SORTOF1 DD DSN=EM.PBL1.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF2 DD DSN=EM.PBL2.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF3 DD DSN=EM.PBL3.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF4 DD DSN=EM.PBL4.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF5 DD DSN=EM.PBL5.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(1,35,A),FORMAT=BI
OUTFIL FILES=1,INCLUDE=(1,4,ZD,EQ,112,OR,1,4,ZD,EQ,115,OR,
1,4,ZD,EQ,117,OR,1,4,ZD,EQ,119)
OUTFIL FILES=2,INCLUDE=(1,4,ZD,EQ,102,OR,1,4,ZD,EQ,103,OR,
1,4,ZD,EQ,104,OR,1,4,ZD,EQ,107,OR,
1,4,ZD,EQ,111,OR,1,4,ZD,EQ,114,OR,
1,4,ZD,EQ,140,OR,1,4,ZD,EQ,152,OR,
1,4,ZD,EQ,153,OR,1,4,ZD,EQ,154,OR,
1,4,ZD,EQ,155)
OUTFIL FILES=3,INCLUDE=(1,4,ZD,EQ,113,OR,1,4,ZD,EQ,116,OR,
1,4,ZD,EQ,118,OR,1,4,ZD,EQ,125,OR,
1,4,ZD,EQ,131)
OUTFIL FILES=4,INCLUDE=(1,4,ZD,EQ,126,OR,1,4,ZD,EQ,166)
OUTFIL FILES=5,INCLUDE=(1,4,ZD,EQ,151)
// //*
//*
//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=CAA.MESTW.G0780.D0805,DISP=SHR
//SORTOUT DD DSN=CAA.MESTW.G0780.D0805.AG11E12,
// 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 DSN=&&DET,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,4,A),FORMAT=BI
SUM FIELDS=(5,10,ZD)
//*
//*********************************************************************
//*
//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* INCLUDE COND = *
//* SUM FIELDS = NONE APENAS UM REGISTRO DE CADA CHAVE *
//* A SER GRAVADO NA SAIDA DO SORTE *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CAA.DETDI.G0718.RONO.D2504,DISP=SHR
//SORTOUT DD DSN=CAA.DETDI.G0718.HART.D2504.SUM,
// DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(30,5)),
// DCB=(RECFM=FB,LRECL=140,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(5,4,A,69,5,A,63,4,A,44,1,A),FORMAT=BI
INCLUDE COND=(44,1,CH,EQ,C'D',OR,
44,1,CH,EQ,C'C')
SUM FIELDS=NONE
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2
// MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC33,L=99999
//*
//*-------------------------------------------------------------------*
//* OMIT COND = NAO GRAVA NA SAIDA DO SORTE
//*-------------------------------------------------------------------*
//* CLASSIFICA MOVIMENTO CONTABIL POR: *
//* CD-EMPRESA, CD-AGE-FIL, CD-UNID-CONT, *
//* CD-CONT-INTE, CD-IDEN-PROD, CD-ITEM-PROD, *
//* CD-EMP-ORIG, CD-CR-ORIG, CD-CR-GEST, *
//* DT-CONTAB *
//*-------------------------------------------------------------------*
//SORT01 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CJ@.AF.SARQMOV,DISP=OLD
// DD DSN=CJ@.AF.SARQMOR,DISP=OLD
//SORTOUT DD DSN=CJ@.AF.EARQMOV1,
//* DISP=(,CATLG,DELETE),
// DISP=OLD,
// UNIT=FIXO,SPACE=(CYL,(5,1)),
// DCB=(RECFM=FB,LRECL=569,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(01,5,ZD,A,14,5,ZD,A,19,7,ZD,A,26,7,ZD,A,33,1,ZD,A,
34,9,ZD,A,43,5,ZD,A,48,7,ZD,A,55,7,ZD,A,
06,4,ZD,A,10,2,ZD,A,12,2,ZD,A)
OMIT COND=(06,8,ZD,EQ,20010507)
//*-------------------------------------------------------------------*
//*
//*********************************************************************
//*
//CA89COMP JOB (1,'TP=TNDS'),TGENHAR,CLASS=3,MSGLEVEL=2,MSGCLASS=R,
// TIME=1
/*JOBPARM R=2007,P=PROC03,LINES=999
//*-------------------------------------------------------------------
//*
//* EQUALS PARA MANTER A SEQUENCIA DE ENTRADA NOS IGUAIS
//*
//*-------------------------------------------------------------------
//SORT0001 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=&&GEO1,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=72,BLKSIZE=0)
SORT FIELDS=(2,71,CH,A),EQUALS
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* EQUALS = PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//* SKIPREC = NNNNNN - PARA DESPREZAR OS PRIMEIROS
//* STOPAFT = NNNNNN - PARA GRAVAR NA SAIDA
//*-------------------------------------------------------------------
//*
//SORT0002 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CA@.ARQ1,DISP=SHR
//SORTOUT DD DSN=&&VAL,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,17,CH,A),EQUALS,SKIPREC=NNNNNN,STOPAFT=XXXXXX
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* INREC FIELDS =
//* SUM FIELDS =
//* EQUALS = PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//*-------------------------------------------------------------------
//*
//SORT0003 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&VAL,DISP=OLD
//SORTOUT DD DSN=&&SUM,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,4,CH,A,13,5,CH,A),EQUALS
INREC FIELDS=(1,4,C'99999999',13,88)
SUM FIELDS=(18,8,PD,26,8,PD,34,8,PD,42,8,PD,50,8,PD,86,8,PD)
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//*** PARA ALTERAR A ORDEM DE CLASSIFICACAO HEXA DE UM CARACTER
//*-------------------------------------------------------------------
//*
//SORT0004 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&VAL,DISP=OLD
//SORTOUT DD DSN=&&SUM,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
SORT FIELDS=(1,1,AQ,A),EQUALS
ALTSEQ CODE=(C1C9) /* CARACTER HEXA 'C1' CLASSIF. COMO HEXA 'C9'
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------
//* A PARTIR DE UM ARQUIVO, GERAR DOIS OU MAIS ARQUIVOS
//* OUTREC = GRAVA REGISTROS COM OUTRA FORMATACAO
//*-------------------------------------------------------------------
//*
//SORT0005 EXEC RSORTD
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CA@.SDAP.DEZ1,DISP=SHR
//SORTOF1 DD DSN=&&ARQ1,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=60,BLKSIZE=?????)
//SORTOF2 DD DSN=&&ARQ2,DISP=(,PASS),
// UNIT=FIXO,SPACE=(CYL,(2,1)),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
OUTFIL FILES=1,
INCLUDE=(5,1,CH,EQ,C'C'),
OUTREC=(1,60)
OUTFIL FILES=2,
INCLUDE=(5,1,CH,EQ,C'D'),
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// MSGCLASS=R,TIME=1
/*JOBPARM R=2007,P=PROC03
//*
//*-------------------------------------------------------------------*
//* SEPARA ARQUIVO POR EMPRESA/GRUPO *
//* GRAVANDO EM SAIDAS DIFERENTES
//*-------------------------------------------------------------------*
//SORT0000 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=EM.PBLM.TEMP.H&HR,DISP=SHR
//SORTOF1 DD DSN=EM.PBL1.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF2 DD DSN=EM.PBL2.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF3 DD DSN=EM.PBL3.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF4 DD DSN=EM.PBL4.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF5 DD DSN=EM.PBL5.TEMP.H&HR,DISP=(,CATLG,DELETE),
// UNIT=FIXO,SPACE=(CYL,(90,30)),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(1,35,A),FORMAT=BI
OUTFIL FILES=1,INCLUDE=(1,4,ZD,EQ,112,OR,1,4,ZD,EQ,115,OR,
1,4,ZD,EQ,117,OR,1,4,ZD,EQ,119)
OUTFIL FILES=2,INCLUDE=(1,4,ZD,EQ,102,OR,1,4,ZD,EQ,103,OR,
1,4,ZD,EQ,104,OR,1,4,ZD,EQ,107,OR,
1,4,ZD,EQ,111,OR,1,4,ZD,EQ,114,OR,
1,4,ZD,EQ,140,OR,1,4,ZD,EQ,152,OR,
1,4,ZD,EQ,153,OR,1,4,ZD,EQ,154,OR,
1,4,ZD,EQ,155)
OUTFIL FILES=3,INCLUDE=(1,4,ZD,EQ,113,OR,1,4,ZD,EQ,116,OR,
1,4,ZD,EQ,118,OR,1,4,ZD,EQ,125,OR,
1,4,ZD,EQ,131)
OUTFIL FILES=4,INCLUDE=(1,4,ZD,EQ,126,OR,1,4,ZD,EQ,166)
OUTFIL FILES=5,INCLUDE=(1,4,ZD,EQ,151)
// //*
Assinar:
Postagens (Atom)