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, CAC0000// MSGCLASS=R,TIME=1 CAC0000/*JOBPARM R=2007,P=PROC03 CAC0000//*//*-------------------------------------------------------------------//* 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, CAC0000// MSGCLASS=R,TIME=1 CAC0000/*JOBPARM R=2007,P=PROC03 CAC0000//*//*-------------------------------------------------------------------//* 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, CAC0000// MSGCLASS=R,TIME=1 CAC0000/*JOBPARM R=2007,P=PROC03 CAC0000//*//*-------------------------------------------------------------------//*** 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, CAC0000// MSGCLASS=R,TIME=1 CAC0000/*JOBPARM R=2007,P=PROC03 CAC0000//*//*-------------------------------------------------------------------//* 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, CAC0000// MSGCLASS=R,TIME=1 CAC0000/*JOBPARM R=2007,P=PROC03 CAC0000//*//*-------------------------------------------------------------------*//* 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 0001 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) // 00000020//*//*********************************************************************//* SORT FIELDS=(1,5,A,6,12,A,21,4,A,26,9,A,25,1,A,54,6,A),FORMAT=BI OUTFIL FILES=1,INCLUDE=(1,5,CH,EQ,C'00001',AND,21,4,CH,NE,C'3331') OUTFIL FILES=2,INCLUDE=(1,5,CH,EQ,C'00150',AND,21,4,CH,NE,C'3331') OUTFIL FILES=3,INCLUDE=(1,5,CH,EQ,C'00001',AND,21,4,CH,EQ,C'3331') OUTFIL FILES=4,INCLUDE=(1,5,CH,EQ,C'00150',AND,21,4,CH,EQ,C'3331')//*//*********************************************************************//*//CJ89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGCLASS=R// MSGLEVEL=1,REGION=3000K,TIME=1/*JOBPARM R=2007,LINES=999,P=PROC03//*---------------------------------------------//*//* SORT COM SELECAO DE CAMPO COMPACTADO//*//*---------------------------------------------//SORT0101 EXEC PGM=SORT//SYSOUT DD SYSOUT=*//SORTIN DD DSN=CJA.SALDO.EM.D1909,DISP=SHR//SORTOUT DD DUMMY//SYSIN DD * SORT FIELDS=(1,3,CH,A) INCLUDE COND=(1,3,PD,EQ,01001)//*//*Exemplo de sort1000001 SORT FIELDS=(1,3,BI,A,35,2,BI,A,41,4,BI,A,210,30,CH,A) 000002 OMIT COND=(1,3,ZD,NE,19,OR,45,2,ZD,EQ,5) 000003 OUTFIL FILES=OUT, 000004 INCLUDE=(35,2,ZD,NE,6,AND,35,2,ZD,NE,12,AND,35,2,ZD,NE,13,AND, C 000005 35,2,ZD,NE,14) 000006 OUTFIL FILES=1,INCLUDE=(35,2,ZD,EQ,6) 000007 OUTFIL FILES=2, 000008 INCLUDE=(35,2,ZD,EQ,12,OR,35,2,ZD,EQ,13,OR,35,2,ZD,EQ,14) 000009 END N=RPSORT4X,P=04MENS Exemplo de sort2000001 SORT FIELDS=(1,3,BI,A,35,2,BI,A,40,5,BI,A,210,30,CH,A) 000002 OMIT COND=(1,3,ZD,NE,43,OR,45,2,ZD,EQ,5) 000003 OUTFIL FILES=OUT, 000004 INCLUDE=(35,2,ZD,NE,6,AND,35,2,ZD,NE,12,AND,35,2,ZD,NE,13,AND, C 000005 35,2,ZD,NE,14) 000006 OUTFIL FILES=1,INCLUDE=(35,2,ZD,EQ,6) 000007 OUTFIL FILES=2, 000008 INCLUDE=(35,2,ZD,EQ,12,OR,35,2,ZD,EQ,13,OR,35,2,ZD,EQ,14) 000009 END N=RPSORT4T,P=04MENS LISTA VIEW ADABAS000001 //RP68FILE JOB (1,'TP=TNDS'),'ARION',CLASS=C,REGION=2048K, 000002 // MSGCLASS=R,MSGLEVEL=1,TIME=10 000003 /*JOBPARM R=1108,P=PROC03 000004 //* 000005 //* OBS: LISTA DICIONARIO 000006 //* 000007 //*ADD01 EXEC ADDDRCP 000008 //ADD01 EXEC ADDDRCQ 000009 RPCONTRATO 001100 // ...... ============================= B O T T O M =======================