Dicas Utilitário "SORT" - Vários Exemplos
Autor: Maurício Alves Cardeal | Publicado: 2015-06-08T22:16:00-03:00


//*********************************************************************
//*

INTES EXECUTADOS PELO SORT

1 - ORDENACAO DE &nbsp;REGISTRO DE UM ARQUIVO EM UMA DETERMINADA SEQUENCIA (SORT)
2 - COMBINACAO DE REGISTRO DE ATE 32 ARQUIVOS JA ORDENADOS EM UMA DETERMINADA SEQUENCIA (MERGE)
3 - COPIA DE TODOS OS REGISTROS
4 - COPIA DE PARTE DE PARTE DE REGISTROS (SELECAO DE REGISTROS)
5 - COPIA DE REGISTROS PARCIAIS &nbsp;(SELECAO DE CAMPOS)
6 - CONVERSAO DE CAMPOS E FORMATO DE IMPRESSAO
7 - ELIMINACAO DE REGISTROS COM CHAVES IGUAIS (SUMARIZAÇÃO)
8 - TOTALIZACAO DE CAMPOS NUMERICOS
9 - IMPRESSAO DOS REGISTROS EM RELATORIOS&nbsp;
10 TOTALIZACAO DE CAMPOS NUMERICOS
11 - SAIDAS - OUTFIL
&nbsp; &nbsp; &nbsp; &nbsp;- SAIDA 1 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECAO DE REGISTRO (INCLUDE/OMIT)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFORMATACAO DA SAIDA (OUTREC)
&nbsp; &nbsp; &nbsp; &nbsp;- SAIDA N
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECAO DE REGISTRO (INCLUDE/OMIT)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFORMATAÇÃO DA SAIDA (OUTREC)

COMANDO FUNÇÃO
--------------- &nbsp;--------------------------------------------------------------------------------------------
INCLUDE &nbsp; DETERMINA O CRITÉRIO DE SELEÇÃO DOS REGISTROS LIDOS.

OMIT &nbsp; &nbsp; &nbsp; &nbsp; DETERMINA O CRITÉRIO DE NÃO SELEÇÃO DOS REGISTROS LIDOS.

INREC &nbsp; &nbsp; &nbsp; &nbsp;REFORMATA O REGISTRO LIDO, DE MODO A PERMITIR A SELEÇÃO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DOS CAMPOS, ANTES DO PROCESSAMENTO DO SORT/MERGE/COPIA
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
SORT &nbsp; &nbsp; &nbsp; &nbsp;DETERMINA A SEQUENCIA DE ORDENAÇÃO DOS REGISTROS DO ARQUIVO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DE SAIDA OU A COPIA DOS REGISTROS EM SUA ORDENAÇÃO ORIGINAL

MERGE &nbsp; &nbsp; &nbsp;DETERMINA A SEQUENCIA DE CONCATENAÇÃO DOS REGISTROS DOS&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ARQUIVOS DE ENTRADA OU A SUA COPIA NA SEQUENCIA ORIGINAL

SUM &nbsp; &nbsp; &nbsp; &nbsp;DETERMINA A ELIMINAÇÃO DE REGISTROS COM CHAVE IGUAIS E AS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TOTALIZAÇÕES DE CAMPOS NUMERICOS.

SUM &nbsp; &nbsp; &nbsp; &nbsp;DETERMINA A ELIMINAÇÃO DE REGISTROS COM CHAVES IGUAIS E AS&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TOTALIZAÇÕES DE CAMPOS NUMERICOS.

RECORD &nbsp; &nbsp;INFORMA PARTICULARIDADE SOBRE OS REGISTROS

OUTFIL &nbsp; &nbsp;DESCREVE OS ARQUIVOS DE SAIDA, INCLUSIVE RELATORIOS.

END &nbsp; &nbsp; &nbsp; INDICA O TÉRMINO DOS COMANDOS DE CONTROLE.

// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXEC SORTE
//SYSIN &nbsp; &nbsp; DD &nbsp; &nbsp; &nbsp;*
//SORTWK &nbsp; &nbsp;DD &nbsp; &nbsp; &nbsp; AREAS DE TRABALHO (OPCIONAL)
//SORTIN &nbsp; &nbsp;DD &nbsp; &nbsp; &nbsp; DSN=ARQUIVO DE ENTRADA(SORT/MERGE)
//SORTIN &nbsp; &nbsp;DD &nbsp; &nbsp; &nbsp; DSN=ARQUIVOS DE ENTRADA (MERGE/COPIA)
//SORTOUT &nbsp; DD &nbsp; &nbsp; &nbsp;DSN=ARQUIVO DE SAIDA
//SORTOF &nbsp; &nbsp;DD &nbsp; &nbsp; &nbsp; DSN=ARQUIVO DE SAIDA(MULTIPLAS SAIDAS)

REGRAS PARA CODIFICAÇÃO DOS COMANDOS DE CONTROLE E DE COMENTARIOS
- PODEM SER COLOCADOS EM QUALQUER ORDEM, EXCETO O COANDO "END", QUE DEVE SER O ULTIMO COMANDO.

- CODIFICAR ENTRE AS COLUNAS 02 E 71, INCLUSIVE
- A CONTINUACAO DE COMANDOS PODE SER FEITA COMO NOS EXEMPLOS

SORT FIELDS=(1,10,A,20,5,A,45,7,A,32,2,D, ... ... ,153,14,D),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FORMAT=CH,EQUALS
SORT FIELDS=(1,10,A,20,5,A,45,7,A,32,2,D, ... ...153,14,D), FORMAX (NA COLUNA 71)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AT=CH,EQUALS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !-------------&gt; &nbsp; &nbsp;CONTINUAR NA COLUNA 16

COMENTARIOS
----------------------
- LINHAS DE COMENTARIOS DEVEM TER "*" NA COLUNA 1
- COMENTARIOS PODEM SER INSERIDOS APOS O ULTIMO PARAMETRO OU &nbsp;VIRGULA
- COMENTARIOS DEVE SER ANTECEDIDO DE PELO MENOS 1 ESPAÇO



&nbsp; &nbsp; FORMATOS:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BI &nbsp;- &nbsp;BINARIO, SEM SINAL
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HE O MAIS INDICADO, OTIMIZA TEMPO.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp;- &nbsp;CARATER &nbsp;EBCDIC, SEM SINAL
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PD &nbsp;- &nbsp;COMPACTADO DECIMAL (FIXED), COM SINAL
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AQ &nbsp;- &nbsp;CARATER EBCDIC, COM SEQUENCIA MODIFICADA.

OS FORMATOS PERMITIDOS E RESPECTIVOS CODIGOS (FF) SÃO:

CODIGO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FORMATO
----------- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ----------------------------------------------
BI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BINARIO
ZO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NUMERICO ZONADO
FI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NUMERICO PONTO FIXO
CH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CARACTER
PD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NUMERICO COMPACTADO

- O ENESIMO BYUTE DE UM REGISTRO DE TAMANHO FIXO TEM P=N
- &nbsp;O ENESIMO BYTE DE UM REGISTO DE TAMANHO VARIAVEL TEM P=N+4
- O BYTES 1 A 4 DE UM REGISTRO DE TAMANHO VARIAVEL SÃO RESERVADOS PARA - O "RECORD DESCRIPTOR WORD=ROW"&nbsp;
&nbsp; OS 8 BITS DE UM BYTE SÃO NUMERODS DE 0 A 7, PORTANTO P=7.4 SIGNIFICA QUEO - CAMPO INCIA NO QUINTO (5o) BIT DO (7o) BYTE.
- O MESMO VALE PARA TAMANHJO (t), PORTANTO T=7,4 SIGNIFICA UM CAMPO DE 7 BYTES E 4 BITS
- QUANDO TODOS OS CAMPOS ESPECIFICADOS POSSUEM O MESMO FORMATO, DEVE SER USADO O SUBPARAMETRO "FORMAT=FF"
&nbsp; &nbsp; &nbsp; &nbsp;

RELAÇÃO DAS 'MASCARAS DE EDIÇÃO PADRÃO'


CODIGO &nbsp; &nbsp; &nbsp;FORMATO
------ &nbsp; &nbsp; &nbsp;------------------------
MO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;III...IITS
M1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TTT...TTTS
M2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I,III,I...I,IIT,TTS
M3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I,III,I...I,IIT,TTCR
M4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$I,III,I...I,IIT,TT
M5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$I,III,I...I,IIT,TTS
M6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;III-TTT-TTTT
M7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TTT-TT-TTTT
M8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IT:TT:TT
M9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IT/IT/TT

ONDE 'I' REPRESENTA DIGITO NÃO SIGNIFICATIVO
&nbsp; &nbsp; &nbsp;'T' REPRESENTA DIGITO SIGNIGICATIVO
&nbsp; &nbsp; &nbsp;'S' REPRESENTA CARACTER INDICATIVO DE SINAL





&nbsp; &nbsp; CLASSIFICACAO:

, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A &nbsp;- &nbsp;ASCENDENTE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;D &nbsp;- &nbsp;DESCENDENTE

&nbsp; &nbsp; COND:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EQ &nbsp;- &nbsp;NE &nbsp;- &nbsp;GT &nbsp;- &nbsp;LT &nbsp;- &nbsp;LE

&nbsp; &nbsp; OPERADOR:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp; = AND
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| = OR

&nbsp; &nbsp; OPCOES:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ALTSEQ CODE = (FFTT,FFTT,....,FFTT)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FF = CARATER EM HEX QUE SE QUER MUDAR
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TT = CARATER EM HEX QUE DEVERA SER CLASS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UTILIZADO PARA MUDANCA DE CARATER NA CLASS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EX: QUERO CLASS TODO 9 COMO 0.
INCLUDE
- FUNÇÃO: SELECIONA REGISTROS DO ARQUIVO DE ENTRADA, COMPARANDO UM OU &nbsp; MAIS CAMPOS DO REGISTRO, UM CAMPO PODE SER COMPARADO COM UMA &nbsp; CONSTANTE OU OUTRO CAMPO DO REGISTRO


&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE COND = (P1,T1,F1,COND,|P2,T2,F2-OU CONST-|,(AND,OR,)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE COND = (P1,T1,COND,|P2,T2-OU CONST-|,(AND,OR,)...)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;P1,P2 = POSICAO INICIAL DO CAMPO DO REGISTRO

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1,T2 = TAMANHO DO CAMPO

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;F1,F2 = FORMATO DO CAMPO

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COND &nbsp;= CONDICAO DE COMPARACAO

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CONST = CONSTANTE - PODENDO SER:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- DECIMAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: &nbsp; &nbsp; &nbsp;NUMERO (240)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- CARATER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp; &nbsp; C'LITERAL' (C'CPFL')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- HEXADECIMAL &nbsp;: &nbsp; &nbsp; X'HH, ... ... HH' (X'40') 0
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UTILIZADO PARA SELECIONAR OS REGISTROS QUE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DEVERAO SER GRAVADOS NA SAIDA.





EXEMPLOS
SUPONHA UM ARQUIVO CONTENDO OS ITENS EM ESTOQUE EM CADA ALMOXARIFADO
COM O SEGUINTE LAYOUT
INICIO &nbsp; &nbsp; &nbsp;FIM &nbsp; &nbsp;TAMANHO &nbsp; &nbsp;FORMATO &nbsp; &nbsp; SIGNIFICAO/CONTEUDO

01 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp; &nbsp; &nbsp; Z0 &nbsp; &nbsp; &nbsp; CODIGO DO CONTRATO
12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;12 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
13 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;14 &nbsp; &nbsp; &nbsp; &nbsp;02 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SITUACAO DO CONTRATO
15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23 &nbsp; &nbsp; &nbsp; &nbsp;08 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; DT VENCIMENTO DO CONTRATO
24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;24 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
25 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;39 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO PRINCIPAL
40 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
41 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;55 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO PASSIVO
56 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;56 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
57 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;71 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO ATIVO
72 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;72 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
73 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;81 &nbsp; &nbsp; &nbsp; &nbsp;09 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; NUMERO DO CGC / CPF
82 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;82 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
83 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;86 &nbsp; &nbsp; &nbsp; &nbsp;04 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; FILIAL
87 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;87 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
88 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;89 &nbsp; &nbsp; &nbsp; &nbsp;02 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; DV CONTROLE
90 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;90 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
91 &nbsp; &nbsp; &nbsp; &nbsp; 130 &nbsp; &nbsp; &nbsp; &nbsp;40 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; NOME DA RAZAO SOCIAL
131 &nbsp; &nbsp; &nbsp; &nbsp;200 &nbsp; &nbsp; &nbsp; &nbsp;70 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; FILLER

&nbsp;CODIGO DA SITUACAO &nbsp; &nbsp; &nbsp; &nbsp; DESCRICAO
&nbsp; &nbsp; &nbsp; &nbsp; 00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CONTRATO ATIVO
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 02 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUITADO NO ANO&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIQ ANTECIPADA
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIQ P/ CL
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 05 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EM ATRASO
&nbsp; &nbsp; &nbsp; &nbsp;--------------------------------------- &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGUARDANDO LIBERACAO
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
M &nbsp;
- FAZ SORT CLASSIFICAÇÃO&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; POR TIPO DE SITUACAO DE CONTRATO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDEM ALFABETICA DO NOME DO CLIENTE

&gt; &nbsp; &nbsp; &nbsp; &lt;...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
&nbsp;...... ================================ T O P =================================
&nbsp;000100 //RP68SORT &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000400 //*-------------------------------------------------------------------*&nbsp;
&nbsp;000500 //* &nbsp;SORT - FAZ CLASSIFICAÇÃO DO ARQUIVO POR TIPO DE SITUACAO DE&nbsp;
&nbsp;000510 //* &nbsp;CONTRATO E COLOCA EM ORDEM ALFABETICA POR NOME DE CLIENTE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;000600 //*-------------------------------------------------------------------*&nbsp;
&nbsp;000700 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;000800 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000900 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS,DISP=(OLD,CATLG,DELETE), &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;001000 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;001100 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;001200 &nbsp;SORT FIELDS=(13,2,ZD,A,91,40,CH,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;001300 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;...... ============================= B O T T O M ==============================


EXEMPLO 01 - INCLUDE&nbsp;
SELECIONANDO E ORDENANDO REGISTROS

SELECIONAR &nbsp;POR SITUACAO DO CONTRATO (somente '00' e '02')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDENANDO OS REGISTRO SELECIONADOS POR SITUACAO DO CONTRATO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDENANDO OS REGISTRO POR CONTRATO &nbsp; &nbsp; &nbsp; &nbsp;

...... ================================ T O P =================================
000100 //RP68SO01 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000400 //*-------------------------------------------------------------------*&nbsp;
000500 //* &nbsp;SORT CLASSIFICA POR SIT CONTRATO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000600 //* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;POR ORDEM ALFA DE CLIENTE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000700 //*-------------------------------------------------------------------*&nbsp;
000800 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000900 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001000 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(,CATLG,DELETE), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001100 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001200 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001300 &nbsp;INCLUDE &nbsp; COND(13,2,CH,EQ,C'00',OR,13,2,CH,EQ,C'02') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001400 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,CH,A,1,11,CH,A),STOPAFT=200* copia até 200 registros &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001500 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
...... ============================= B O T T O M ==============================



EXEMPLO 02 - INCLUDE&nbsp;
SELECIONANDO E COPIANDO

SELECIONAR &nbsp;POR SITUACAO DO CONTRATO (somente '00' e '02')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COPIA NA MESMA ORDEM &nbsp; &nbsp;&nbsp;

...... ================================ T O P =================================
000100 //RP68SO03 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000400 //*-------------------------------------------------------------------*&nbsp;
000500 //* &nbsp;USO DO OMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000501 //* &nbsp;SORT EXCLUIR &nbsp; &nbsp;POR SIT CONTRATO (0 OU 2) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000600 //* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FAZ COPIA E MANTEM A ORDEM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000700 //*-------------------------------------------------------------------*&nbsp;
000800 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000900 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001000 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(OLD,CATLG,DELETE), &nbsp; &nbsp; &nbsp;&nbsp;
001100 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001200 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001300 &nbsp;OMIT &nbsp; &nbsp; &nbsp;COND(13,2,CH,EQ,C'00',OR,13,2,CH,EQ,C'02') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001400 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=COPY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001500 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
...... ============================= B O T T O M ============================== &nbsp; &nbsp; &nbsp;



EXEMPLO 03 - OMIT&nbsp;
SELECIONANDO E COPIANDO

SELECIONAR &nbsp;POR SITUACAO DO CONTRATO (somente '00' e '02')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COPIA NA MESMA ORDEM &nbsp; &nbsp;&nbsp;



...... ================================ T O P =================================
000100 //RP68SO03 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000400 //*-------------------------------------------------------------------*&nbsp;
000500 //* &nbsp;USO DO OMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000501 //* &nbsp;SORT EXCLUIR &nbsp; &nbsp;POR SIT CONTRATO (0 OU 2) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000600 //* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FAZ COPIA E MANTEM A ORDEM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000700 //*-------------------------------------------------------------------*&nbsp;
000800 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000900 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001000 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(OLD,CATLG,DELETE), &nbsp; &nbsp; &nbsp;&nbsp;
001100 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001200 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001300 &nbsp;OMIT &nbsp; &nbsp; &nbsp;COND(13,2,CH,EQ,C'00',OR,13,2,CH,EQ,C'02') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001400 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=COPY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001500 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
...... ============================= B O T T O M ==============================



EXEMPLO 04 - INCLUDE + OMIT + SORT&nbsp;
SELECIONANDO REGISTRO E CAMPOS DE ENTRADA ORDENADO

SELECIONAR &nbsp;POR SITUACAO DO CONTRATO (somente '00' e '02')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COPIA NA MESMA ORDEM&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOTALIZAR POR VALORES &nbsp; &nbsp;

selecionar os contratos que tiveram saldo do ativo abaixo de R$1.000,00
Selecionar os campos contrato, situação e data de vencimento
ordenar por situacao do contrato, contrato e data de vencimento

&nbsp; &nbsp; &nbsp; &nbsp;&lt;...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
...... ================================ T O P =================================
000100 //RP68SO04 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000400 //*-------------------------------------------------------------------*&nbsp;
000500 //* &nbsp;USO DO INCLUDE + INREC + SORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000600 //* &nbsp;- SELECIONA CONTRATOS COM SALDO DEV MENOR QUE 1000 OU MAIOR 3000 &nbsp;&nbsp;
000700 //* &nbsp;- RECUPERA APENAS OS CAMPOS CONTRATO, SITUAÇãO E SALDO DEVEDOR &nbsp; &nbsp;&nbsp;
000701 //* &nbsp;- CLASSIFICA PELA SITUACAO DO CONTRA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000702 //* &nbsp;- CLASSIFICA PELA NUMERO DO CONTRATO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000800 //*-------------------------------------------------------------------*&nbsp;
000900 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001000 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001100 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(,CATLG,DELETE), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001200 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001300 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001400 &nbsp;INCLUDE &nbsp; COND(57,15,CH,LE,C'1000',OR,57,15,CH,GE,C'3000') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001500 &nbsp;INREC &nbsp; &nbsp; FIELDS=(1,11,13,2,57,15) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001600 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,CH,A,1,11,CH,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001700 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
...... ============================= B O T T O M ==============================




EXEMPLO 05 - INREC + SORT + SUM
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUMARIZANDO REGISTROS E TOTALIZANDO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SELECIONANDO REGISTRO E CAMPOS DE ENTRADA ORDENADO

PARA OS REGISTROS COM A MESMA SITUACAO DO CONTRANTO, SUMARIZAR LO EM UM UNICO REGISTRO
CONTENDO A TOTALIZAÇÃO DO CAMPO QUANTIDADE, PARA EVITAR ESTOURO DO CAMPO QUANTIDADE ACRESCETAR
2 BYTES VIA COMANDO INREC

&nbsp; &nbsp; &nbsp; &nbsp;&lt;...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
...... ================================ T O P =================================
000100 //RP68SO05 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000400 //*-------------------------------------------------------------------*&nbsp;
000500 //*-------------------------------------------------------------------*&nbsp;
000600 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000700 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000800 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(OLD,CATLG,DELETE), &nbsp; &nbsp; &nbsp;&nbsp;
000900 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001000 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001100 &nbsp;INREC &nbsp; &nbsp; FIELDS=(1,11,13,2,57,15) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001200 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001300 &nbsp;SUM &nbsp; &nbsp; &nbsp; FIELDS=(13,02,ZD) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
001400 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
...... ============================= B O T T O M ==============================



EXEMPLO 06 - INREC + SORT + SUM
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUMARIZANDO REGISTROS E TOTALIZANDO CAMPOS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SELECIONANDO REGISTRO E CAMPOS DE ENTRADA ORDENADO

PARA OS REGISTROS COM A MESMA SITUACAO DO CONTRANTO, SUMARIZAR LO EM UM UNICO REGISTRO
CONTENDO A TOTALIZAÇÃO DO CAMPO QUANTIDADE, PARA EVITAR ESTOURO DO CAMPO QUANTIDADE ACRESCETAR
2 BYTES VIA COMANDO INREC


&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INREC &nbsp; &nbsp; FIELDS=(1,11,13,2,57,15) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SUM &nbsp; &nbsp; &nbsp; FIELDS=(13,02,ZD)

&gt; &nbsp; &nbsp; &nbsp; &lt;...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
&nbsp;...... ================================ T O P =================================
&nbsp;000100 //RP68SO06 &nbsp;JOB (1,'TP=TNDS'),'EDMILS',CLASS=3, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000200 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,REGION=2048K &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000300 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000400 //*-------------------------------------------------------------------*&nbsp;
&nbsp;000500 //*-------------------------------------------------------------------*&nbsp;
&nbsp;000600 //SORT0106 EXEC RSORTD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;000700 //SORTIN &nbsp; DD &nbsp;DSN=RPY.EDMIL.INTE.POSI,DISP=SHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;000800 //SORTOUT &nbsp;DD &nbsp;DSN=RPY.EDMIL.INTE.POSIS1,DISP=(OLD,CATLG,CATLG), &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;001100 // &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(100,20)),DCB=*.SORTIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;001200 //SYSIN &nbsp; &nbsp;DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;001300 &nbsp;INREC &nbsp; &nbsp; FIELDS=(13,2,1,11,57,15) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;001400 &nbsp;SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A) * A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;001500 &nbsp;SUM &nbsp; &nbsp; &nbsp; FIELDS=(1,11,ZD) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;001600 /* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;...... ============================= B O T T O M ==============================




EXEMPLO 07 SELECIONANDO CAMPOS E ELEIMINANDO REGISTROS DUPLICADOS
SELECIONAR TODOS OS REGISTOR LIDOS &nbsp;O CAMPO, SITUACAO DO CONTATO, QUE DEVEM SER ORDENADOS PELO MESMO CAMPO E POSTERIORMENTE SUMRIZADOS EM 1 UNICO
REGISTRO AQUELES COM A MESMA CHAVE (SITUACAO DOCONTRATO)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INREC &nbsp; &nbsp; FIELDS=(1,11,13,2,57,15) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SUM &nbsp; &nbsp; &nbsp; FIELDS=(13,02,ZD)


EXEMPLO 08 ORDENANDO REGISTROS E REPOSICIONANDO CAMPOS
ORDENAR POR DATA/SITUACAO/CONTRATO, FORMATANDO A SAIDA COM OS CAMPOS NESTA ORDEM, DATA, SITUACAO E CONTRATRO E SALDO


SORT &nbsp; FIELDS=(15,2,ZD,A,13,2,ZD,A,11,2,ZD,A,2,5,ZD,A,1,1,CH,A)
OUTREC FIELDS=(11,6,2,5,1,1,7,4)

EXEMPLO 09 COPIANDO REGISTROS , INSERINDO BRANCOS E REPOSICIONANDO CAMPOS
MANTEM A MESMA ORDEM, INSERINDO 1 ESPAÇO ENTRE OS CAMPOS

SORT &nbsp; FIELDS=COPY
OUTREC FILEDS=(1,1,1X,2,5,1X,7,4,1X,11,6)

EXEMPLO 10 COPIANDO, INSERINDO ZEROS BINARIOS E REPOSICIONANDO CAMPOS:
MANTER A MESMA ORDEM, AUMENTANDO EM 2 BYTES O CAMPO QUANTIDADE


SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTREC &nbsp; &nbsp;FIELDS=(13,02,ZD)


EXEMPLO 11 ORDENANDO REGISTRO E EDITANDO CAMPOS
ORDENAR POR SITUACAO DE CONTRATO E NUMERO DE CONTRATO, EDITANDO OS CAMPOS DE QUANTIDADE
(BRANCOS A ESQUERDA) E DATA (BARRAS)


SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTREC &nbsp; &nbsp;FIELDS=(1:1,1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3:2,5
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 9:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;18:11,6,ZD,M9)&nbsp;

EXEMPLO 12 IMPRIMIR RELATORIO COM QUEBRA E EDICAO, SEM CABEÇALHOS
&nbsp;&nbsp;
SORT &nbsp; &nbsp; &nbsp;FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTFIL &nbsp; &nbsp;OUTREC=(5:1,1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15:2,5
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 25:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 35:11,6,ZD,M9,SECTIONS=1,1,SKIP=3L

EXEMPLO13 IMPRIMINDO RELATORIO COM QUEBRA, CABEÇALHOS E PAGINAÇÃO
ORDENAR POR SITUAÇÃO DO CONTRATO, IMPRIMINDO RELATORIO COM CABEÇALHO (CAPA DO RELATORIO, PAGINA E QUEBRA)
COM QUBRA (SALTO DE 2 LINHAS) POR SITUAÇÃO , SEPRADNO OS CAMPOS POR BRANCOS E EDITANDO O SALDO E A DATA

&nbsp;SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;OUTFIL &nbsp; HEADER=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 35:11,6,ZD,M9,SECTIONS=1,1,SKIP=3L
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SECTIONS=(1,1,SKIP=2L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER=(10:'SITUACAO DO CONTRATO',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END

OBS: //SORTOUT DD SYSOUT=L,DCB=(LRECL=133,BLKSIZE=133,RECFM=FBA)

EXEMPLO 14 IMPRIMINDO RELATORIO COM TOTALIZAÇÃO GERAL
ORDENAR POR SITUAÇÃO DO CONTRATO, IMPRIMINDO RELATORIO COM CBELÇALHO, QUEBRA E TOTALIZAÇÃOGERAL DO CAMPO QUANTIDADE

&nbsp;SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 35:11,6,ZD,M9,SECTIONS=1,1,SKIP=3L
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SECTIONS=(1,1,SKIP=2L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER3=(10:'SITUACAO DO CONTRATO',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END

EXEMPLO 15 IMPRIMINDO RELATORIO COMTOTALIZAÇÃO GERAL
ORDENAR POR SITUAÇÃO DO CONTRATO IMPRIMEINDO RELATORIO COM CABEÇALHO,QUEBRA E TOTALIZAÇÃO GERALDOCAMPO QUANTIDADE


&nbsp;SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER=(10:'SITUACAO DO CONTRATO',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TRAILLER=(1,1,SKIP=2L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END

OBS; AO FINAL DO RELATORIO SERA IMPRESSO, EM PAGIN SEPRADA, O TOTAL GERAL

16) IMPRIMINDO RELATORIOCOM TOTALIZAÇÃO DE PAGINA (RODAPÉ)

ORDENAR POR SITUACAO DO CONTRATO IMPRIMINDO RELATORIO COM CABEÇALHO, QUEBRA E TOTALIZAÇÃO GERAL E PARCIAL ACUMULADA POR PAGINA
DO CAMPO QUANTIDADE



&nbsp;SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SECTIONS=(1,1,SKIP-2L, &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER3=(10:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TRAILLER=(1,1,SKIP=2L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;END

AO FINAL DE CADA PAGINA (RODAPE'), SERA' MPRESSO O TOTAL DA PAGINA


EXEMPLO 17 IMPRIMINDO RELATORIO COM TOTALIZAÇÃO DA QUEBRA
ORDENAR POR SITUACAO DO CONTRATO, IMPRIMINDO RELATORIO COM CBEÇALHO, QUEBRA DE SITUAÇÃO COM
TOTAIS DO CAMPO SALDO DEVEDOR E TOTALIZAÇÃO POR PAGINA E GERAL.


SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SECTIONS=(1,1,SKIP-2L, &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER3=(10:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5,1,SKIP=1L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT)))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,MO))&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,1:132'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;END


EXEMPLO 18 IMPRIMINDO RELATORIO COM TOTALIZAÇÃO GERAL DE REGISTROS
ORDENAR POR SITUAÇÃO DO CONTRATO IMPRIMINDO RELATORIO COM CABEÇALHO, QUEBRA E TOTALIZAÇÃO GERAL DO CAMPO QUANTIDADE
E DA QUANTIDADE DE REGISTROS

SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SECTIONS=(1,1,SKIP-2L, &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER3=(10:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5,1,SKIP=1L,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30:TOT=(7,4,PD,MD),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5/,40:'TOTAL DE REGISTROS.: ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;69:COUNT)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,MO))&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,1:132'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;END


EXEMPLO 19 IMPRIMINDO RELATORIO COM TOTALIZAÇÃO DE REGISTROS A CADA QUEBRA
ORDENAR POR SITUAÇÃO DE CONTRATO IMPRIMINDO RELATORIO COM CABEÇALHO, QUEBRA, TOTALIZAÇÃO GERAL, POR PAGINA
(RODAPÉ) E NA QUEBRA DO CAMPO QUANTIDADE E DO TOTAL DE REGISTROS, GERAL E PARCIAL


SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A,1,11,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTFIL &nbsp; HEADER1=(15/,50:'DEPARTAMENTO DE EMPRESTIMOS ESPECIALIZADOS',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,55:'POSICAO DA CARTEIRA',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4/,60:'2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER2=(1:'DATA...: ',&amp;DATA,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55:'POSIÇÃO DO ESTOQUE / 2006',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116:'PAGINA...: ',&amp;PAGE,/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1:132'-',//),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC=(15:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 40:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60:7,4,PD,MO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 90:11,6,ZD,M9,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;132:1X),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SECTIONS=(1,1,SKIP-2L, &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER3=(10:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40:'NUMERO DO CONTRATO'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;60:'SALDO DO ATIVO' &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80:'DATA DE VENCIMENTO',//))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER3=(/,10:57'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /40:'TOTAL DE REGISTROS DA QUEBRA.: ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUNT,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /40:'TOTAL DE REGISTROS ATÉ A QUEBRA.: ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SUBCOUNT)),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER1=(5/,40:'TOTAL EM ESTOQUE...: ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;62:TOT=(7,4,PD,MD)),
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRAILLER=(/,1:132'-',/,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30:'TOTAL-SITUAÇÃO ',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;58:TOT=(7,4,PD,EDIT=(I,III,IIT))) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;END


EXEMPLO 20 GERANDO MULTIPLA SAIDAS COM SELEÇÃO DE REGISTGROS
ORDENAR POR SITUACAO DE CONTRATO
SELECIONANDO SOMENTE OS&nbsp;
CONTYRATOS DE &nbsp;SITUAÇÃO DO CONTRATO '00' E "02",&nbsp;
GRAVANDO OS EM ARQUIVOS DISTINTOS

SORT &nbsp; &nbsp; FIELDS=(13,2,ZD,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
OUTFIL &nbsp; FILES=1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE=(13,2,CH,EQ.C'00')
OUTFIL &nbsp; FILES=2,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE=(13,2,CH,EQ.C'02')
OUTFIL &nbsp; FILES=3,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE=(13,2,CH,EQ.C'05')

OBS:&nbsp;
//SORTOF1 &nbsp; DD ...(FILE-1)
//SORTOF2 &nbsp; DD ...(FILE-2)
//SORTOF3 &nbsp; DD ...(FILE-3)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;


EXEMPLO 21 COPIANDO REGISTROS DE TAMANHO VARIAVEL, GRERANDO 3 ARQUIVOS DE SAIDA
- UM VARIAVEL, IMAGEM DA ENTRADA
= OS OUTROS DOIS FIXOS, COM SELEÇÃO DE REGISTROS E REFORMATAÇÃO DE CAMPOS

SUPONHA UM ARQUIVO ONDE CADA REGISTRO REPRESENTA UM BEM E SEUS RESPECTIVOS SALDO DEVEDOR&nbsp;
EM CADA AGENCIA COM SEU O LAIAUTE ABAIXO &nbsp; &nbsp; &nbsp; &nbsp;

EXEMPLOS
SUPONHA UM ARQUIVO CONTENDO OS ITENS EM ESTOQUE EM CADA ALMOXARIFADO
COM O SEGUINTE LAYOUT
INICIO &nbsp; &nbsp; &nbsp;FIM &nbsp; &nbsp;TAMANHO &nbsp; &nbsp;FORMATO &nbsp; &nbsp; SIGNIFICAO/CONTEUDO

01 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp; &nbsp; &nbsp; Z0 &nbsp; &nbsp; &nbsp; CODIGO DO CONTRATO
12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;12 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
13 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;14 &nbsp; &nbsp; &nbsp; &nbsp;02 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SITUACAO DO CONTRATO
15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23 &nbsp; &nbsp; &nbsp; &nbsp;08 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; DT VENCIMENTO DO CONTRATO
24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;24 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
25 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;39 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO PRINCIPAL
40 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
41 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;55 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO PASSIVO
56 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;56 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
57 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;71 &nbsp; &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; SALDO DEVEDOR DO ATIVO
72 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;72 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
73 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;81 &nbsp; &nbsp; &nbsp; &nbsp;09 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; NUMERO DO CGC / CPF
82 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;82 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
83 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;86 &nbsp; &nbsp; &nbsp; &nbsp;04 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; FILIAL
87 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;87 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
88 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;89 &nbsp; &nbsp; &nbsp; &nbsp;02 &nbsp; &nbsp; &nbsp; &nbsp; ZO &nbsp; &nbsp; &nbsp; DV CONTROLE
90 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;90 &nbsp; &nbsp; &nbsp; &nbsp;01 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; ASTERISCO
91 &nbsp; &nbsp; &nbsp; &nbsp; 130 &nbsp; &nbsp; &nbsp; &nbsp;40 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; NOME DA RAZAO SOCIAL
131 &nbsp; &nbsp; &nbsp; &nbsp;200 &nbsp; &nbsp; &nbsp; &nbsp;70 &nbsp; &nbsp; &nbsp; &nbsp; CH &nbsp; &nbsp; &nbsp; FILLER

&nbsp;CODIGO DA SITUACAO &nbsp; &nbsp; &nbsp; &nbsp; DESCRICAO
&nbsp; &nbsp; &nbsp; &nbsp; 00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CONTRATO ATIVO
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 02 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUITADO NO ANO&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIQ ANTECIPADA
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIQ P/ CL
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------
&nbsp; &nbsp; &nbsp; &nbsp; 05 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EM ATRASO
&nbsp; &nbsp; &nbsp; &nbsp;--------------------------------------- &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGUARDANDO LIBERACAO
&nbsp; &nbsp; &nbsp; &nbsp;---------------------------------------

COPIAR OS REGISTROS DE ENTRADA (TAMANHO VARIAVEL), GRAVANDO OS EM 3 ARQUIVOS:

PRIMEIRO ARQUIVO
(SORTOUT), TODOS OS REGISTROS DE ENTRADA DEVERÃO SER SELECIONADOS, MANTENDO O TAMANHO VARIAVEL.

SEGUNDO ARQUIVO
(//SORTOF1), SOMENTE SERÃO GRAVADOS CONTRATOS COM SITUAÇÃO '00'
E SOMENTE O CAMPO NUMERO DO CONTRATO COM TAMANHO FIXO

TERCEIRO ARQUIVO
SOMENTE SERAO GRAVADOS OS REGISTROS COM 3 OCORRENCIAS (EM TODOS OS CONTRATOS)
COM TODOS OS CAMPOS DE ENTRADA COM TANAHO FIXO

SORT &nbsp; &nbsp; &nbsp; &nbsp; FIELDS=COPY
OUTFIL &nbsp; &nbsp; &nbsp; FILES=1,INCLUDE=(5,5,ZD,EQ,5),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC=(5,5),CONVERT
OUTFIL &nbsp; &nbsp; &nbsp; FILES=2,INCLUDE=(10,1,ZO,EQ,3),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC=(5,21),CONVERT
END


OBS:

//SORTOUT &nbsp; &nbsp; DD &nbsp;...ARQUIVO VARIAVEL
//SORTOF1 &nbsp; &nbsp; DD &nbsp;...ARQUIVO FIXO (FILES=1)
//SORT0F2 &nbsp; &nbsp; DD &nbsp;...ARQUIVO FIXO (FILES=2)

SE O "O SORTOUT" NAO FOR CODIFICADO, NENHUM ARQUIVO SERÁ GERADO
AO SER REFERECIADA A POSIÇÃO DE INICIO DE CADA CAMPO,&nbsp;
ADICIONAR 0S 4 BYTES DO "ROW".
O PRIMEIRO CAMPO COMEÇA NO BYTE 5

EXEMPLO 22 SUMARIZANDO REGISTROS E TOTALIZANDO A QUANTIDADE DE REGISTROS COM MESMA CHAVE

PARA OS REGISTROS COM MESMA CHAVE (SITUAÇÃO DO CONTRATO),
SUMARIZA LOS EM 1 UNICO REGISTRO CONTENDO O TOTAL DE REGISTROS


INREC &nbsp;FILEDS=(2,5,X'00001F')
SORT &nbsp; FIELDS=(1,5,ZD,A)
SUM &nbsp; &nbsp;FIELDS=(6,3,PD)

EXEMPLO 23 GERANDO MAIS QUE UM REGISTRO DE SAIDA A PARTIR DE UM REGISTRO DE ENTRADA

PARA CADA REGSITRO LIDO, GERAR QUATRO (4) DE SAIDA

O PRIMEIRO CONTENDO SITUAÇÃO DO CONTRATO
O SEGUNDO CONTENDO O NUMERO DO CONTRATO
O TERCEIRO EM BRANCO
O QUARTO COM O SALDO DEVEDOR

OBS: O TAMANHO DOS REGISTROS DE SAIDA SERÁ O DO MAIRORGISTRO GERDO, COM PREENCHIMENTO DE BRANCOS Á DIREITA

EXEMPLO 24 CONVERTENDO O ARQUIVO COM RESGISTROS DE TAMANHO VARIAVEL PARA FIXO

COPIAR OS RESGISTRO DO ARQUVIO DE ENTRADA PARA O ARQUIVO DE SAIDA DE&nbsp;
MODO QUE OS REGISTROS SEJAM CONVERTIDOS DE TAMANHO VARIAVEL PARA FIXO

SORT FILEDS=COPY
OUREC FIELDS=(5,2),CONVERT

OBS: SERÁ ASSUMIDO COMO 'LRECL' O TAMANHO DOMAIRO REGISTRO DE ENTRADA
OS REGSITROS COM TAMANHO MENO SERÃO PREENCHIDOS COM BRANCOS 'A DIREITA'


EXEMPLO 25 CONVERTENDO O ARQUIVO COM REGISTROS DE TAMANHO VARIAVEL PARA FIXO,
SELECIONANDO CAMPOS DA PARTE VARIAVEL

SORT &nbsp; &nbsp;FIELDS=COPY
OUTFIL &nbsp;FILES=01,OUTREC=(5,11),CONVERT
OUTFIL &nbsp;FILES=02,OUTREC=(21,5),CONVERT

OBS
SERÁ ASSUMIDO COMO 'LRECL' O TAMANHO ESPECIFICADO NO COMANADO 'OUTREC',&nbsp;
OS REGSITROS DE ENTRADA CUJOS CAMPOS REFERENCIADOS NÃO EXISTAM,&nbsp;
PRODUZIRÃO CAMPOS EM BRANCO NO REGISTRO DE SAIDA

EXEMPLO 26 SELECIONANDO REGISTROS MEDIANTE A OMPARACAO DE 'BIT'
SELECIONAR OS REGSITROS QUE POSSUAM NO BYTE &nbsp;156, O BIT MAIS Á DIREITA
(BIT DE VALOR 1) LIGADO (BIT MASK)

INCLUDE &nbsp;COND=(16,1,BI,ALL,B'000000001'
SORT &nbsp; &nbsp; FIELDS=COPY

SELECIONAR OS REGISTROS QUE POSSUEM NO BYTE 16, OS 4 PRIMEIROS
BITS MAIS 'A DIREITA (BITS DE VALOR 1,2,3,4, E 8)&nbsp;
COM O VALOR 1,OU SEJA, BIT DE VALOR 1 LIGADO E OS OUTROS DESLIGADOS (BIT PATTERN)

INCLUDE COND=(16.1.BI,EQ,B'00000001')
SORT &nbsp; &nbsp;FILDS=COPY

EXEMPLO 27 COPIANDO &nbsp;OS REGISTROS DE ENTRADA , AUMENTANDO O SEU TAMANHO NO ARQUVIO DE SAIDA

COPIAR TODO O REGISTRO DE ENTRADA, SEM FORMATAÇÃO

SORT &nbsp; &nbsp; &nbsp;FIELDS=COPY
OBS; SERÃO PREENCHIDOS 'ZEROS BINARIOS' A DIRETITA DO REGISTROS ORIGINAL
INDICAR NA 'DCB' DO ARQUIVO DE SAIDA O NOVO 'LRECL'

//SORTOUT &nbsp;DD DSN=&amp;&amp;SAIDA,UNIT=SYSDA,DISP=(,PASS)...
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DCB=(LRECL=30,BLKSIZE=3000,RECFM=(FB) ...

COPIAR O REGISTRO DE ENTRADA, FORMATANDO O REGISTRO DE SAIDA

SORT &nbsp; &nbsp; &nbsp; FIELDS=COPY
OUTREC &nbsp; &nbsp; FIELDS=(1:1,1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10:2,5,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 20:7,4,PD,MD,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 30:11,6,ZD,M9)

OBS: SERÃO PREENCHIDOS BRANCOS NOS BYTES NÃO REFERENCIADOS


EXEMPLO 28 FORMATANDO 2 ARQUIVOS DE SAIDA, CADA UM COM SEU CRITÉRIO DE SELEÇÃO DE REGISTROS,&nbsp;
COM LEIAUTE DE MESMO TAMANHO, POREM COM CAMPOS DIFERENTES


INCLUDE &nbsp; &nbsp; COND=(1,1,CH,EQ,C'A',OR,1,1,CH,EQ,C'X')
SORT &nbsp; &nbsp; &nbsp; &nbsp;FIELDS=COPY
OUTFIL &nbsp; &nbsp; &nbsp;FILES=01,INCLUDE=(15,2,ZD,EQ,2006),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(1,1,2,5,7,4,C'ANO 2006')
OUTFIL &nbsp; &nbsp; &nbsp;FILES=02,INCLUDE=(15,2,ZD,EQ,2006

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTREC=(1,1,2,5,7,4,C'ANO 2006')
&nbsp;&nbsp;
//SORT &nbsp; &nbsp; FIELDS=COPY

&nbsp; &nbsp;&nbsp;
//RP68SELE JOB (1,'TP=TNDS'),'TiNS010',CLASS=C,MSGLEVEL=2,
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp;STOPAFT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp; LIMITE DE REGISTROS DE SAIDA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp;INCLUDE &nbsp;COND &nbsp; &nbsp;= &nbsp; SELECIONA &nbsp;PARA SAIR NO SORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//******************************************************************************
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arquivo de entrada &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
//******************************************************************************
//SORTIN &nbsp; DD &nbsp; DSN=RPY.EDMIL.INTE.CADAS,DISP=SHR * arquivo de entrada
//******************************************************************************
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arquivo de saida &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//******************************************************************************
//SORTOUT &nbsp;DD &nbsp; DSN=RPY.EDMIL.INTE.CADAS.SORT,&nbsp;
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DISP=(,CATLG,DELETE), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(20,5)), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=850,BLKSIZE=0) &nbsp; &nbsp; &nbsp; ************************* &nbsp;&nbsp;
//* SORT FIELDS=(05,4,A,62,4,A),FORMAT=BI,STOPAFT=200 * criterio de seleção
//SYSIN DD * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SORT FIELDS=(05,4,A,62,6,A),FORMAT=BI
&nbsp; INCLUDE COND=((5,4,CH,EQ,C'0011',OR,5,4,CH,EQ,C'0012'),AND,62,6,CH,EQ,C'200105')
//
&nbsp; INCLUDE COND=(17,2,CH,EQ,C'EC',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C'TS99',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C'0088',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C' &nbsp;72')
//
&nbsp; INCLUDE COND=(1,4,CH,EQ,C'0116',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;69,4,CH,EQ,C'2644',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80,9,CH,EQ,C'562644016')
//
&nbsp; INCLUDE COND=(1,4,CH,EQ,C'0116',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;69,4,CH,EQ,C'2644',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80,9,CH,EQ,C'562644016')
//
//*********************************************************************
//* INCLUDE COM OMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*********************************************************************
//*

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OMIT &nbsp; &nbsp;COND = (P1,T1,F1,COND,|P2,T2,F2-OU CONST-|,(AND,OR,)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OMIT &nbsp; &nbsp;COND = (P1,T1,COND,|P2,T2-OU CONST-|,(AND,OR,)...)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IDEM &nbsp;INCLUDE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UTILIZADO PARA NAO GRAVAR OS REGISTROS QUE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SATISFACAM A CONDICAO.
//**********************************************************************
//*INCLUDE COM INREC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//**********************************************************************
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INREC &nbsp;FIELDS= &nbsp;(S,P,T,A,...S,P,T,A)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UTILIZADO PARA FORMATAR O REGISTRO DE ENTRA
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DA ANTES DA CLASSIFICACAO, PARA DIMINUIR A
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QUANTIDADE DE RECURSOS A SEREM UTILIZADOS,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CASO NAO NECESSARIO A UTILIZACAO.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EX: O REGISTRO DE ENTRADA TEM 5K MAS SO SERA
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UTILIZADO 50 BYTES.

//************************************************************************
//* INCLUDE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC
//************************************************************************
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC FIELDS= &nbsp;(S,P,T,A,...S,P,T,A)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S = PARAMETRO OPCIONAL
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (N)X - QTD DE BYTES A SEREM INCLUIDOS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COM BRANCOS.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (N)Z - QTD DE BYTES A SEREM INCLUIDOS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COM ZEROS.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P = PRIMEIRA POSICAO DO CAMPO A SER MOVIDO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; T = TAMANHO DO CAMPO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; A = ALINHAMENTO DO CAMPO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; H - HALFWORD
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F - FULLWORD
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; D - DOUBLEWORD
//***************************************************************************
//* INCLUDE COM SUM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
//***************************************************************************
- FUNÇÃO: SUM - Elimina registros com igualdade de chaves, de modo que somente 1 (um) r4gistro será gravado para cada valor da chave, opcionalmente poderá totalizar campos numéricos do registro sumarizado.&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;FIELDS=(P,T,F,...P,T,F)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;FIELDS=(P,T,...P,T),FORMAT=F
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;FIELDS=NONE

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDS - INDICA OS CAMPOS NUMERICOS QUE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SERAO SOMADOS.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;P &nbsp; &nbsp; &nbsp;- PRIMEIRA POSICAO DO CAMPO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T &nbsp; &nbsp; &nbsp;- TAMANHO DO CAMPO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;F &nbsp; &nbsp; &nbsp;- FORMATO DO CAMPO
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NONE &nbsp; - INDICA QUE DOS REGISTROS DUPLICADOS
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; APENAS UM DEVERA SER GRAVADO,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NAO SOMANDO OS REGISTROS.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM - ESPECIFICA QUE SEMPRE QUE FOREM ENCON
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRADOS REGISTROS COM A MESMA CHAVE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;APENAS UM DEVERA SER GRAVADO, COM A
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SOMATORIA DE TODOS OS IGUAIS.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EQUALS &nbsp; &nbsp; &nbsp; = &nbsp;INDICA QUE OS REGISTROS IGUAIS DEVERAO PERMA
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NECER CLASS NA MESMA ORDEM DE ENTRADA.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QUANDO DESNECESSARIO &nbsp;NAO &nbsp;USAR.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DEGRADA MUITO A UTILIZACAO.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SKIPREC &nbsp; &nbsp; &nbsp;= &nbsp;NNNNNN
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DESPREZA REGISTROS DO INICIO DO ARQUIVO DE
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ENTRADA

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;STOPAFT &nbsp; &nbsp; &nbsp;= &nbsp;NNNNNN
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LIMITE DE REGISTROS PARA O ARQUIVO DE SAIDA
//*
//*********************************************************************
//*
//CA89SELE JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2,
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp;STOPAFT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp; LIMITE DE REGISTROS DE SAIDA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp;INCLUDE &nbsp;COND &nbsp; &nbsp;= &nbsp; SELECIONA &nbsp;PARA SAIR NO SORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=RPY.EDMIL.INTE.CADAS,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=RPY.EDMIL.INTE.CADAS.SORT,
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(20,5)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=850,BLKSIZE=0)
//* SORT FIELDS=(05,4,A,62,4,A),FORMAT=BI,STOPAFT=200
//SYSIN DD *
&nbsp;SORT FIELDS=(05,4,A,62,6,A),FORMAT=BI
&nbsp; INCLUDE COND=((5,4,CH,EQ,C'0011',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5,4,CH,EQ,C'0012'),AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 62,6,CH,EQ,C'200105')
//
&nbsp; INCLUDE COND=(17,2,CH,EQ,C'EC',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C'TS99',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C'0088',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17,4,CH,EQ,C' &nbsp;72')
//
&nbsp; INCLUDE COND=(1,4,CH,EQ,C'0116',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;69,4,CH,EQ,C'2644',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80,9,CH,EQ,C'562644016')
//
&nbsp; INCLUDE COND=(1,4,CH,EQ,C'0116',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;69,4,CH,EQ,C'2644',AND,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80,9,CH,EQ,C'562644016')
//
//*
//*********************************************************************
//*
//CA89SORT JOB &nbsp;(1,'TP=TNDS'),TGENHAR,CLASS=C,MSGCLASS=R, MSGLEVEL=0,
// TIME=5,REGION=5M
/*JOBPARM &nbsp;R=2007,P=PROC03,L=9999
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp; SORT &nbsp; = &nbsp; COPIA &nbsp;DE &nbsp;ARQUIVOS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*--------------------------------------------------------------------*
//SORT0215 EXEC RSORTD
//SORTIN &nbsp; DD &nbsp; DSN=CD@.CIDEN,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=CD@.ELI.IDEN,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(5,1),RLSE),
// &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=1700,BLKSIZE=0)
//SYSIN &nbsp; &nbsp;DD &nbsp; *
&nbsp; SORT FIELDS=COPY
//*
//*********************************************************************
//*
//CA89LIST JOB &nbsp; (1,'TP=TNDS'),TGENHAR,CLASS=C,MSGCLASS=R,MSGLEVEL=2
/*JOBPARM R=2007,P=PROC03,L=999
//*-------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp; &nbsp;SORT &nbsp; = &nbsp; COPY &nbsp; &nbsp; USADO &nbsp;PARA &nbsp;LISTAR &nbsp;PGM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*-------------------------------------------------------------------*
//STEP0101 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//*SORTIN &nbsp; DD &nbsp; DSN=MB.FND05(CATRDETA),DISP=SHR
//SORTIN &nbsp; DD &nbsp; DSN=CA@.PGH.HART.TRA01(CATRDETA),DISP=SHR
//SORTOUT &nbsp;DD &nbsp; SYSOUT=*
//SYSIN &nbsp; &nbsp;DD &nbsp; *
&nbsp;SORT FIELDS=COPY
//
//*
//*********************************************************************
//*
//CA89CRI2 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//*
//* &nbsp;SUM FIELDS = NONE
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INDICA QUE DEVERA SER GRAVADO NA SAIDA
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;APENAS UM REGISTRO DE CADA CHAVE CLASSIFICADA
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CAA.DETDI.MOVOK.RONO.D2504,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=CAA.DETDI.MOVOK.RONO.D2504.SUM,
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(30,5)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=140,BLKSIZE=0)
&nbsp; SORT FIELDS=(05,13,A,44,1,A),FORMAT=BI
&nbsp; SUM FIELDS=NONE
//
//*
//*********************************************************************
//*
//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp;OUTREC &nbsp;FIELDS = &nbsp;FORMATACAO DO REGISTRO DE SAIDA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CAA.DETDI.Y2K.RONOA,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=&amp;&amp;DET,DISP=(,PASS,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; DCB=*.SORTIN,SPACE=(CYL,250)
//SYSIN &nbsp; &nbsp; DD *
&nbsp;SORT FIELDS=COPY
&nbsp;OUTREC FIELDS=(17,4,C'0000000001')
//*
//*********************************************************************
//*
//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp; SUM FIELDS = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=&amp;&amp;DET,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; SYSOUT=*
//SYSIN &nbsp; &nbsp; DD *
&nbsp;SORT FIELDS=(1,4,A),FORMAT=BI
&nbsp;SUM FIELDS=(5,10,ZD)
//*
//*********************************************************************
//*
//CA89CRI1 JOB (1,'TP=TNDS'),'TGENHAR',CLASS=J,MSGLEVEL=2,
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC03
//*
//*--------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE &nbsp;COND &nbsp;= &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
//* &nbsp; &nbsp; &nbsp; &nbsp;SUM &nbsp;FIELDS &nbsp; &nbsp;= &nbsp;NONE &nbsp; &nbsp; APENAS UM REGISTRO DE CADA CHAVE *
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; A SER GRAVADO NA SAIDA DO SORTE &nbsp;*
//*--------------------------------------------------------------------*
//*
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CAA.DETDI.G0718.RONO.D2504,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=CAA.DETDI.G0718.HART.D2504.SUM,
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(30,5)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=140,BLKSIZE=0)
//SYSIN DD *
&nbsp; SORT FIELDS=(5,4,A,69,5,A,63,4,A,44,1,A),FORMAT=BI
&nbsp; INCLUDE COND=(44,1,CH,EQ,C'D',OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 44,1,CH,EQ,C'C')
&nbsp; SUM FIELDS=NONE
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=10,REGION=10000K
/*JOBPARM R=2007,P=PROC33,L=99999
//*
//*-------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp; OMIT &nbsp;COND &nbsp;= &nbsp; NAO &nbsp;GRAVA &nbsp;NA SAIDA DO SORTE
//*-------------------------------------------------------------------*
//* &nbsp;CLASSIFICA MOVIMENTO CONTABIL POR: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CD-EMPRESA, CD-AGE-FIL, CD-UNID-CONT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CD-CONT-INTE, CD-IDEN-PROD, CD-ITEM-PROD, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CD-EMP-ORIG, CD-CR-ORIG, CD-CR-GEST, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DT-CONTAB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//*-------------------------------------------------------------------*
//SORT01 &nbsp; EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CJ@.AF.SARQMOV,DISP=OLD
// &nbsp; &nbsp; &nbsp; &nbsp; DD &nbsp; DSN=CJ@.AF.SARQMOR,DISP=OLD
//SORTOUT &nbsp;DD &nbsp; DSN=CJ@.AF.EARQMOV1,
//* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DISP=OLD,
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(5,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=569,BLKSIZE=0)
//SYSIN &nbsp; &nbsp;DD &nbsp; *
&nbsp;SORT FIELDS=(01,5,ZD,A,14,5,ZD,A,19,7,ZD,A,26,7,ZD,A,33,1,ZD,A,
&nbsp; &nbsp; &nbsp; 34,9,ZD,A,43,5,ZD,A,48,7,ZD,A,55,7,ZD,A,
&nbsp; &nbsp; &nbsp; 06,4,ZD,A,10,2,ZD,A,12,2,ZD,A)
&nbsp;OMIT COND=(06,8,ZD,EQ,20010507)
//*-------------------------------------------------------------------*
//*
//*********************************************************************
//*
//CA89COMP &nbsp; JOB &nbsp;(1,'TP=TNDS'),TGENHAR,CLASS=3,MSGLEVEL=2,MSGCLASS=R,
// TIME=1
/*JOBPARM &nbsp; &nbsp;R=2007,P=PROC03,LINES=999
//*-------------------------------------------------------------------
//*
//* &nbsp; &nbsp; &nbsp; &nbsp;EQUALS &nbsp; &nbsp;PARA MANTER A SEQUENCIA DE ENTRADA NOS IGUAIS
//*
//*-------------------------------------------------------------------
//SORT0001 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; *
//SORTOUT &nbsp;DD &nbsp; DSN=&amp;&amp;GEO1,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=72,BLKSIZE=0)
&nbsp; SORT FIELDS=(2,71,CH,A),EQUALS
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAC0000
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
/*JOBPARM R=2007,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
//*
//*-------------------------------------------------------------------
//* &nbsp; &nbsp;EQUALS &nbsp;= &nbsp; PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//* &nbsp; &nbsp;SKIPREC = &nbsp; NNNNNN &nbsp;- &nbsp;PARA DESPREZAR OS PRIMEIROS
//* &nbsp; &nbsp;STOPAFT = &nbsp; NNNNNN &nbsp;- &nbsp;PARA GRAVAR NA SAIDA
//*-------------------------------------------------------------------
//*
//SORT0002 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CA@.ARQ1,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DSN=&amp;&amp;VAL,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
&nbsp; SORT FIELDS=(1,17,CH,A),EQUALS,SKIPREC=NNNNNN,STOPAFT=XXXXXX
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAC0000
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
/*JOBPARM R=2007,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
//*
//*-------------------------------------------------------------------
//* &nbsp; &nbsp;INREC FIELDS &nbsp;=
//* &nbsp; &nbsp;SUM &nbsp; FIELDS &nbsp;=
//* &nbsp; &nbsp;EQUALS &nbsp;= &nbsp; PARA MANTER OS REGISTROS IGUAIS NA ORDEM DE ENTRADA
//*-------------------------------------------------------------------
//*
//SORT0003 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=&amp;&amp;VAL,DISP=OLD
//SORTOUT &nbsp;DD &nbsp; DSN=&amp;&amp;SUM,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
&nbsp; SORT FIELDS=(1,4,CH,A,13,5,CH,A),EQUALS
&nbsp; INREC FIELDS=(1,4,C'99999999',13,88)
&nbsp; SUM &nbsp; 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, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAC0000
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
/*JOBPARM R=2007,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
//*
//*-------------------------------------------------------------------
//*** &nbsp;PARA ALTERAR A ORDEM DE CLASSIFICACAO HEXA DE UM CARACTER
//*-------------------------------------------------------------------
//*
//SORT0004 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=&amp;&amp;VAL,DISP=OLD
//SORTOUT &nbsp;DD &nbsp; DSN=&amp;&amp;SUM,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
&nbsp; SORT FIELDS=(1,1,AQ,A),EQUALS
&nbsp; ALTSEQ CODE=(C1C9) &nbsp; /* CARACTER HEXA 'C1' CLASSIF. COMO HEXA 'C9'
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAC0000
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
/*JOBPARM R=2007,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
//*
//*-------------------------------------------------------------------
//* &nbsp; &nbsp; &nbsp;A PARTIR DE UM ARQUIVO, GERAR DOIS OU MAIS ARQUIVOS
//* &nbsp; &nbsp; &nbsp;OUTREC &nbsp; = &nbsp; &nbsp; GRAVA REGISTROS COM OUTRA FORMATACAO
//*-------------------------------------------------------------------
//*
//SORT0005 EXEC RSORTD
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CA@.SDAP.DEZ1,DISP=SHR
//SORTOF1 &nbsp;DD &nbsp; DSN=&amp;&amp;ARQ1,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=60,BLKSIZE=?????)
//SORTOF2 &nbsp;DD &nbsp; DSN=&amp;&amp;ARQ2,DISP=(,PASS),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(2,1)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=100,BLKSIZE=?????)
//SYSIN &nbsp; &nbsp;DD &nbsp;*
&nbsp; &nbsp; &nbsp; SORT FIELDS=(1,8,CH,A)
&nbsp; &nbsp; &nbsp; OUTFIL FILES=1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE=(5,1,CH,EQ,C'C'),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTREC=(1,60)
&nbsp; &nbsp; &nbsp; OUTFIL FILES=2,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE=(5,1,CH,EQ,C'D'),
//
//*
//*********************************************************************
//*
//CA89SORT JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGLEVEL=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAC0000
// &nbsp; &nbsp; &nbsp;MSGCLASS=R,TIME=1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
/*JOBPARM R=2007,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAC0000
//*
//*-------------------------------------------------------------------*
//* &nbsp; &nbsp; &nbsp; &nbsp;SEPARA ARQUIVO POR EMPRESA/GRUPO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *
//* &nbsp; &nbsp; &nbsp; &nbsp;GRAVANDO EM SAIDAS DIFERENTES
//*-------------------------------------------------------------------*
//SORT0000 EXEC PGM=SORT
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=EM.PBLM.TEMP.H&amp;HR,DISP=SHR
//SORTOF1 &nbsp;DD &nbsp; DSN=EM.PBL1.TEMP.H&amp;HR,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(90,30)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF2 &nbsp;DD &nbsp; DSN=EM.PBL2.TEMP.H&amp;HR,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(90,30)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF3 &nbsp;DD &nbsp; DSN=EM.PBL3.TEMP.H&amp;HR,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(90,30)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF4 &nbsp;DD &nbsp; DSN=EM.PBL4.TEMP.H&amp;HR,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(90,30)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SORTOF5 &nbsp;DD &nbsp; DSN=EM.PBL5.TEMP.H&amp;HR,DISP=(,CATLG,DELETE),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNIT=FIXO,SPACE=(CYL,(90,30)),
// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SYSIN &nbsp; &nbsp;DD &nbsp; *
&nbsp;SORT FIELDS=(1,35,A),FORMAT=BI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0001
&nbsp;OUTFIL FILES=1,INCLUDE=(1,4,ZD,EQ,112,OR,1,4,ZD,EQ,115,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,117,OR,1,4,ZD,EQ,119)
&nbsp;OUTFIL FILES=2,INCLUDE=(1,4,ZD,EQ,102,OR,1,4,ZD,EQ,103,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,104,OR,1,4,ZD,EQ,107,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,111,OR,1,4,ZD,EQ,114,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,140,OR,1,4,ZD,EQ,152,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,153,OR,1,4,ZD,EQ,154,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,155)
&nbsp;OUTFIL FILES=3,INCLUDE=(1,4,ZD,EQ,113,OR,1,4,ZD,EQ,116,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,118,OR,1,4,ZD,EQ,125,OR,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1,4,ZD,EQ,131)
&nbsp;OUTFIL FILES=4,INCLUDE=(1,4,ZD,EQ,126,OR,1,4,ZD,EQ,166)
&nbsp;OUTFIL FILES=5,INCLUDE=(1,4,ZD,EQ,151)
&nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000020
//*
//*********************************************************************
//*
&nbsp; SORT FIELDS=(1,5,A,6,12,A,21,4,A,26,9,A,25,1,A,54,6,A),FORMAT=BI
&nbsp; OUTFIL FILES=1,INCLUDE=(1,5,CH,EQ,C'00001',AND,21,4,CH,NE,C'3331')
&nbsp; OUTFIL FILES=2,INCLUDE=(1,5,CH,EQ,C'00150',AND,21,4,CH,NE,C'3331')
&nbsp; OUTFIL FILES=3,INCLUDE=(1,5,CH,EQ,C'00001',AND,21,4,CH,EQ,C'3331')
&nbsp; OUTFIL FILES=4,INCLUDE=(1,5,CH,EQ,C'00150',AND,21,4,CH,EQ,C'3331')
//*
//*********************************************************************
//*
//CJ89SORT &nbsp;JOB (1,'TP=TNDS'),'TGENHAR',CLASS=C,MSGCLASS=R
// MSGLEVEL=1,REGION=3000K,TIME=1
/*JOBPARM &nbsp; R=2007,LINES=999,P=PROC03
//*---------------------------------------------
//*
//* &nbsp; &nbsp;SORT &nbsp;COM &nbsp;SELECAO &nbsp;DE &nbsp;CAMPO &nbsp;COMPACTADO
//*
//*---------------------------------------------
//SORT0101 EXEC PGM=SORT
//SYSOUT &nbsp; DD &nbsp; SYSOUT=*
//SORTIN &nbsp; DD &nbsp; DSN=CJA.SALDO.EM.D1909,DISP=SHR
//SORTOUT &nbsp;DD &nbsp; DUMMY
//SYSIN &nbsp; &nbsp;DD &nbsp; *
&nbsp;SORT FIELDS=(1,3,CH,A)
&nbsp;INCLUDE COND=(1,3,PD,EQ,01001)
//*
//*

Exemplo de sort1

000001 &nbsp; SORT FIELDS=(1,3,BI,A,35,2,BI,A,41,4,BI,A,210,30,CH,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000002 &nbsp; OMIT COND=(1,3,ZD,NE,19,OR,45,2,ZD,EQ,5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000003 &nbsp; OUTFIL FILES=OUT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000004 &nbsp; &nbsp; &nbsp; &nbsp; INCLUDE=(35,2,ZD,NE,6,AND,35,2,ZD,NE,12,AND,35,2,ZD,NE,13,AND, C&nbsp;
000005 &nbsp; &nbsp; &nbsp; &nbsp; 35,2,ZD,NE,14) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000006 &nbsp; OUTFIL FILES=1,INCLUDE=(35,2,ZD,EQ,6) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000007 &nbsp; OUTFIL FILES=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000008 &nbsp; &nbsp; &nbsp; &nbsp; INCLUDE=(35,2,ZD,EQ,12,OR,35,2,ZD,EQ,13,OR,35,2,ZD,EQ,14) &nbsp; &nbsp; &nbsp; &nbsp;
000009 &nbsp; END &nbsp;N=RPSORT4X,P=04MENS&nbsp;

Exemplo de sort2


000001 &nbsp; SORT FIELDS=(1,3,BI,A,35,2,BI,A,40,5,BI,A,210,30,CH,A) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000002 &nbsp; OMIT COND=(1,3,ZD,NE,43,OR,45,2,ZD,EQ,5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000003 &nbsp; OUTFIL FILES=OUT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000004 &nbsp; &nbsp; &nbsp; &nbsp; INCLUDE=(35,2,ZD,NE,6,AND,35,2,ZD,NE,12,AND,35,2,ZD,NE,13,AND, C&nbsp;
000005 &nbsp; &nbsp; &nbsp; &nbsp; 35,2,ZD,NE,14) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000006 &nbsp; OUTFIL FILES=1,INCLUDE=(35,2,ZD,EQ,6) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000007 &nbsp; OUTFIL FILES=2, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000008 &nbsp; &nbsp; &nbsp; &nbsp; INCLUDE=(35,2,ZD,EQ,12,OR,35,2,ZD,EQ,13,OR,35,2,ZD,EQ,14) &nbsp; &nbsp; &nbsp; &nbsp;
000009 &nbsp; END &nbsp;N=RPSORT4T,P=04MENS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

LISTA VIEW ADABAS

000001 //RP68FILE &nbsp;JOB (1,'TP=TNDS'),'ARION',CLASS=C,REGION=2048K, &nbsp; &nbsp; &nbsp;
000002 // &nbsp; &nbsp; &nbsp; MSGCLASS=R,MSGLEVEL=1,TIME=10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000003 /*JOBPARM R=1108,P=PROC03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000004 //* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000005 //* &nbsp; &nbsp;OBS: &nbsp;LISTA DICIONARIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000006 //* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000007 //*ADD01 EXEC ADDDRCP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
000008 //ADD01 EXEC ADDDRCQ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
000009 RPCONTRATO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
001100 // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
...... ============================= B O T T O M =======================