No Adabas frequentemente executamos uma variedade de jobs e utilitários para lidar com diversas situações. Para rodar um job, é necessário acessar a biblioteca, localizar o JCL (geralmente demandando uma busca manual pelo JCL específico a ser utilizado). Após algum tempo refletindo sobre como otimizar esse processo, surgiu a ideia de criar um menu de opções em Natural que, ao final, submeteria o job desejado. Este menu ofereceria a flexibilidade de inserir 1, 2 ou 3 parâmetros (tais como banco, ID do banco, número do file ou outros parâmetros específicos), e, ao selecionar a opção desejada, o job seria submetido. Com base nos jobs mais frequentemente utilizados, foi elaborado um menu intuitivo para facilitar a execução dessas tarefas.
Este é o programa natural do nosso menu inicial
10 - MIGRATE FILES ADABAS
Esta é a tela inicial - esta opção pega as definições de campos de um file e jogamos para outro banco - usamos muito para deixar o file do banco produção com as mesmas definições dos campos igual ao desenvolvimento
Programa menu inicial
Tela inicial do migrate;
Programa
20 - BACKUP BANCO/FILE
Essa são as opções disponivies para fazer backup;
Programa menu de backups
Opção 20
Opção 10 - programa natural de exemplo - Escolher o backup do banco Online/Offline;
Programa natural de backups
Backup do banco online
Backup do banco Offline;
30 - NATUNLD/NATLOAD
Criei a opção de backup de uma biblioteca
programa natural
40 - ADAREP DOS BANCOS
Essa seria a opção que rodamos um job de ADAREP do banco;
Programa natural
50 - REORDB/REORFILE
Essas são as duas opções que temos para reorganizar, REORDB e a REORFILE
Programa natural menu
Tela da opção 10 (REORDB)
Programa Natural
Tela da opção 20 (REORFILE)
Programa natural
60 - GENERATE ADACMP
Esta opção gravamos em um membro de uma biblioteca as definições de um campo
Programa natural
70 - NATURAL SCAN UTILITY
Programa natural
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPMENU
18:35:18 ------------------------------------------------------------ 12/05/21
MAIN MENU DBA ADABAS01
+------------------------------------------------+
| 10 - MIGRATE FILES ADABAS |
| 20 - BACKUP BANCO/FILE |
| 30 - NATUNLD/NATLOAD |
| 40 - ADAREP DOS BANCOS |
| 50 - REORDB/REORFILE |
| 60 - GENERATE ADACMP |
| 70 - NATURAL SCAN UTILITY |
| 80 - LOCK/UNLOCKU FILE |
+------------------------------------------------+
DIGITE A OPCAO DESEJADA __
TECLE PF3 PARA SAIR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Exit
Este é o programa natural do nosso menu inicial
> > + Program DBAPMENU Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ==================================================================== *
0020 * FUNCAO: AUTO MENU DE OPCOES DE SUBMETER JOBS DBA *
0030 * AUTOR: CLAUDEMAR MARTINS DE SA *
0040 * ==================================================================== *
0050 DEFINE DATA LOCAL
0060 1 #ARQ1 (A2)
0070 END-DEFINE
0080 * ==================================================================== *
0090 FORMAT KD=ON
0100 SET KEY
0110 TREQ NAMED ' '
0120 PF3 = PGM NAMED 'Exit'
0130 PF2 PF5 PF6 PF9 PF10 PF11
0140 PF13 PF14 PF15 PF16 PF17 PF18
0150 PF19 PF20 PF21 PF22 PF23 PF24
0160 * ==================================================================== *
0170 REPEAT
0180 INPUT (IP=OFF SG=OFF AD=MIL'_')
0190 02T '-' (78)
0200 / 02T *USER
0210 30T 'DBA ADABAS MAINFRAME' (I)
0220 72T *PROGRAM
0230 / 02T *TIME(AL=8)
0240 11T '-' (60)
0250 72T *DATE
0260 / 35T 'MAIN MENU'(I) 72T *LIBRARY-ID /
0270 /14T
0280 '+------------------------------------------------+'
0290 /14T
0300 '| 10 - MIGRATE FILES ADABAS |'
0310 /14T
0320 '| 20 - BACKUP BANCO/FILE |'
0330 /14T
0340 '| 30 - NATUNLD/NATLOAD |'
0350 /14T
0360 '| 40 - ADAREP DOS BANCOS |'
0370 /14T
0380 '| 50 - REORDB/REORFILE |'
0410 /14T
0420 '| 60 - GENERATE ADACMP |'
0430 /14T
0440 '| 70 - NATURAL SCAN UTILITY |'
0450 /14T
0460 '| 80 - LOCK/UNLOCKU FILE |'
0470 /14T
0480 '+------------------------------------------------+'
0490 //27T'DIGITE A OPCAO DESEJADA'(YE) #ARQ1(AD=MIL'_')
0500 //30T'TECLE PF3 PARA SAIR'(I)
0510 *
0520 IF #ARQ1 EQ '10' FETCH 'DBAP0010'
0530 IF #ARQ1 EQ '20' FETCH 'DBAP0020'
0540 IF #ARQ1 EQ '30' FETCH 'DBAPJ832'
0550 IF #ARQ1 EQ '40' FETCH 'DBAPCS80'
0560 IF #ARQ1 EQ '50' FETCH 'DBAPJ210'
0580 IF #ARQ1 EQ '60' FETCH 'DBAPJ950'
0590 IF #ARQ1 EQ '70' FETCH 'DBAPJ951'
0610 END
....+....1....+....2....+....3....+....4....+....5....+... S 61 L 1
10 - MIGRATE FILES ADABAS
Esta é a tela inicial - esta opção pega as definições de campos de um file e jogamos para outro banco - usamos muito para deixar o file do banco produção com as mesmas definições dos campos igual ao desenvolvimento
-----------------------------------------------------------------------------
ADABAS01 DBA ADABAS MAINFRAME DBAMCS20
08/03/21 ---------------------------------------------------------- 16:28:55
MIGRATE - DES/PROD
+-------------------------------------------+
| 10 - MIGRATE - 230/240 - (DES/PROD) |
| 20 - MIGRATE - 110/210 - (DES/PROD) |
| 30 - MIGRATE - 082/080 - (DES/PROD) |
| 40 - MIGRATE - 072/070 - (DES/PROD) |
| 50 - MIGRATE - 082/141 - (DES/TREI) |
+-------------------------------------------+
DIGITE A OPCAO DESEJADA = ___
TECLE PF3 PARA SAIR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa menu inicial
> > + Program DBAP0010 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ==================================================================== *
0020 * FUNCAO: MENU OPCOES MIGRATE *
0030 * AUTOR: CLAUDEMAR MARTINS DE SA *
0040 * ==================================================================== *
0050 DEFINE DATA LOCAL
0060 1 #ARQ1 (A2)
0070 END-DEFINE
0080 * ==================================================================== *
0090 FORMAT KD=ON
0100 SET KEY
0110 TREQ NAMED ' '
0120 PF3 = PGM NAMED 'Exit'
0130 PF2 PF5 PF6 PF9 PF10 PF11
0140 PF13 PF14 PF15 PF16 PF17 PF18
0150 PF19 PF20 PF21 PF22 PF23 PF24
0160 * ==================================================================== *
0170 REPEAT
0180 INPUT (IP=OFF SG=OFF AD=MIL'_')
0190 02T '-' (78)
0200 / 02T *USER
0210 30T 'DBA ADABAS MAINFRAME' (I)
0220 72T *PROGRAM
0230 / 02T *TIME(AL=8)
0240 11T '-' (60)
0250 72T *DATE
0260 / 30T 'MIGRATE - DES/PROD'(I) 72T *LIBRARY-ID /
0270 /16T
0280 '+-------------------------------------------+'
0290 /16T
0300 '| 10 - MIGRATE - 230/240 - (DES/PROD) |'
0310 /16T
0320 '| 20 - MIGRATE - 110/210 - (DES/PROD) |'
0330 /16T
0340 '| 30 - MIGRATE - 082/080 - (DES/PROD) |'
0350 /16T
0360 '| 40 - MIGRATE - 072/070 - (DES/PROD) |'
0370 /16T
0380 '| 50 - MIGRATE - 082/141 - (DES/TREI) |'
0390 /16T
0400 '+-------------------------------------------+'
0410 //27T'DIGITE A OPCAO DESEJADA'(YE) #ARQ1(AD=MIL'_')
0420 //30T'TECLE PF3 PARA SAIR'(I)
0430 * ==================================================================== *
0440 IF *PF-KEY EQ 'PF3'
0450 FETCH 'DBAPMENU'
0460 * ==================================================================== *
0470 IF #ARQ1 EQ '10' FETCH 'DBAPCS10'
0480 IF #ARQ1 EQ '20' FETCH 'DBAPCS20'
0490 IF #ARQ1 EQ '30' FETCH 'DBAPCS30'
0500 IF #ARQ1 EQ '40' FETCH 'DBAPCS80'
0510 IF #ARQ1 EQ '50' FETCH 'DBAPJ200'
0520 END
Tela inicial do migrate;
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPC021
14:31:29 ------------------------------------------------------------ 09/03/21
MIGRATE 230/240 ADABAS01
Transferencia de Arquivos do PREDICT para Producao
+----------------------------------------------------------------+
| |
| Nome do File Fisico : ________________________________ |
| |
+----------------------------------------------------------------+
Obs: Nome do Arquivo pode ser Truncado com '*'
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa
> > + Program DBAPC021 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: MIGRATE 230 PARA O 240 *
0030 * ------------------------------------------------------------------- *
0040 DEFINE DATA LOCAL
0050 1 #CALLER (A4) INIT <'NAT '>
0060 1 #JOBNUM (A8)
0070 1 REDEFINE #JOBNUM
0080 2 #JOBA (A3)
0090 2 #JOBN (N5)
0100 1 #I (P3)
0110 1 #RC (B4)
0120 1 #TOT (B2)
0130 1 #ARQ (A32)
0140 1 #ULD (A20) INIT <'UNLOAD FILE'>
0150 1 #C01 (A80) INIT
0160 <'//AAFPNATB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0170 1 REDEFINE #C01
0180 2 FILLER 2X
0190 2 #JOBNAME (A8)
0200 2 #FIL1 (A06)
0210 2 #ACC (A04)
0220 2 #FIL2 (A06)
0230 2 #USER (A07)
0240 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0250 1 #C03 (A80) INIT
0260 <'//PREDICT EXEC NATURALD,ID="|",PARM2="ESIZE=36,DATSIZE=80",'>
0270 1 #C04 (A80) INIT
0280 * ---------------------- BANCO DE ORIGEM ----------------------- *
0290 <'// PARM1="SYS=D,MT=0,IM=D,MAXCL=0,MADIO=0,INTENS=1"'>
0300 * -------------------------------------------------------------- *
0310 1 #C05 (A80) INIT <'//*'>
0320 1 #C06 (A80) INIT
0330 <'//CMWKF01 DD DSN=&&DDM1,DISP=(NEW,PASS),UNIT=SYSDA,'>
0340 1 #C07 (A80) INIT <'// SPACE=(CYL,15)'>
0350 1 #C08 (A80) INIT <'//DADOS DD *'>
0360 1 #C09 (A80)
0370 1 #C10 (A80) INIT <'.'>
0380 1 #C11 (A80) INIT <'/*'>
0390 1 #C12 (A80) INIT <'//SYSIN DD *'>
0400 1 #C13 (A80) INIT <'LOGON SYSDICBE'>
0410 1 #C14 (A80) INIT <'MENU'>
0420 1 #C15 (A80) INIT <'FIN'>
0430 1 #C16 (A80) INIT <'/*'>
0440 1 #C17 (A80) INIT <'//LOADDDM EXEC NATURAL,COND=(0,NE),'>
0450 1 #C18 (A80) INIT
0460 * ---------------------- BANCO DE DESTINO ---------------------- *
0470 <'// PARM1="SYS=P MT=0 IM=D INTENS=1,OBJIN=N,ESIZE=36,DATSIZE=80",'>
0480 * -------------------------------------------------------------- *
0490 1 #C19 (A80) INIT <'// PARM2="STACK=(LOGON SYSDICBE)",ID="|"'>
0500 1 #C20 (A80) INIT <'//CMWKF01 DD DSN=&&DDM1,DISP=(OLD,DELETE)'>
0510 1 #C21 (A80) INIT <'//SYSIN DD *'>
0520 1 #C22 (A80) INIT <'MENU'>
0530 ** 1 #C23 (A80) INIT <'RESTART'>
0540 1 #C23 (A80) INIT <'LOAD FILE *|REPLACE=Y|CODE=Y'>
0550 1 #C24 (A80) INIT <'FIN'>
0560 1 #C25 (A80) INIT <'/*'>
0570 1 #C26 (A80) INIT <'//'>
0580 1 #Y2K (A1) INIT <'N'>
0590 END-DEFINE
0600 *
0610 FORMAT KD=ON
0620 SET CONTROL 'U'
0630 SET KEY PF3 NAMED 'MENU'
0640 PF8 NAMED ' ' PF9 NAMED ' '
0650 MOVE *INIT-USER TO #USER
0660 REPEAT
0670 RESET #ARQ
0680 RESET INITIAL #Y2K
0690 *
0700 INPUT (IP=OFF SG=OFF AD=MIL'_')
0710 02T '-' (78)
0720 / 02T *USER
0730 30T 'DBA ADABAS MAINFRAME' (I)
0740 72T *PROGRAM
0750 / 02T *TIME(AL=8)
0760 11T '-' (60)
0770 72T *DATE
0780 / 31T 'MIGRATE 230/240'(I) 72T *LIBRARY-ID /
0790 *
0800 / 15T 'Transferencia de Arquivos do PREDICT para Producao' (I)
0810 //
0820 06T '+----------------------------------------------------------------+'
0830 /
0840 06T '| |'
0850 * ///// 07T ' Account - Nome : ' #ACC
0860 /
0870 06T '| Nome do File Fisico : ' #ARQ ' |'
0880 /
0890 06T '| |'
0900 /
0910 06T '+----------------------------------------------------------------+'
0920 * // 07T ' Migrar p/ o Ambiente : ' #Y2K (AD=M CD=YE)
0930 * 42T ' N'(I) '= Do Desenv. P/ Producao'
0940 * / 42T ' T'(I) '= DO DESENV. P/ Teste'
0950 // 18T 'Obs: Nome do Arquivo pode ser Truncado com' '"*"' (I)
0960 //30T'TECLE PF3 PARA VOLTAR'(I)
0970 IF *PF-KEY EQ 'PF3'
0980 FETCH 'DBAP0010'
0990 END-IF
1000 * comentado #Y2K
1010 * IF NOT (#Y2K EQ 'T' OR EQ 'N')
1020 * REINPUT 'Destino tem que ser "N" ou "T"' ALARM
1030 * END-IF
1040 *
1050 IF #ARQ = ' '
1060 REINPUT 'Nome do Arquivo deve ser Informado' MARK *#ARQ ALARM
1070 END-IF
1080 *
1090 COMPRESS #ARQ '|ALL=Y|INTERNAL-ID=N|CODE=Y' INTO #C09 LEAVING NO
1100 COMPRESS #ULD #C09 INTO #C09
1110 *
1120 * comentado #Y2K
1130 * IF #Y2K EQ 'T'
1140 * MOVE
1150 * '// PARM1="SYS=T MT=0 IM=D INTENS=1,OBJIN=N,ESIZE=36,DATSIZE=80",'
1160 * TO #C18
1170 * END-IF
1180 COMPUTE #TOT = 26 * 80
1190 *
1200 CALL 'RJE' #RC #C01 #TOT
1210 CALL 'GETJOB' #JOBNUM #CALLER
1220 *
1230 INPUT NO ERASE 18/12 'Job ' #JOBNAME(AD=IO) 'de N.' #JOBN(AD=IO)
1240 ' Submetido OK.'
1250 FETCH 'DBAPCS20'
1260 END-REPEAT
1270 END
....+....1....+....2....+....3....+....4....+....5....+... S 127 L 101
20 - BACKUP BANCO/FILE
Essa são as opções disponivies para fazer backup;
-----------------------------------------------------------------------------
ADABAS01 DBA ADABAS MAINFRAME DBAMCS30
09/03/21 ---------------------------------------------------------- 19:22:29
BACKUP/BANCO/FILE
+------------------------------------------------------+
| 10 - BACKUP ADASAV - BANCO |
| 20 - BACKUP ADASAV - FILE |
| 30 - BACKUP ADAULD - FILE |
+------------------------------------------------------+
DIGITE A OPCAO = ___
TECLE PF3 PARA SAIR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa menu de backups
> > + Program DBAP0020 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ==================================================================== *
0020 * FUNCAO: MENU OPCOES BACKUP *
0030 * AUTOR: CLAUDEMAR MARTINS DE SA *
0040 * ==================================================================== *
0050 DEFINE DATA LOCAL
0060 1 #ARQ1 (A2)
0070 END-DEFINE
0080 * ==================================================================== *
0090 FORMAT KD=ON
0100 SET KEY
0110 TREQ NAMED ' '
0120 PF3 = PGM NAMED 'Exit'
0130 PF2 PF5 PF6 PF9 PF10 PF11
0140 PF13 PF14 PF15 PF16 PF17 PF18
0150 PF19 PF20 PF21 PF22 PF23 PF24
0160 * ==================================================================== *
0170 REPEAT
0180 INPUT (IP=OFF SG=OFF AD=MIL'_')
0190 02T '-' (78)
0200 / 02T *USER
0210 31T 'DBA ADABAS MAINFRAME' (I)
0220 72T *PROGRAM
0230 / 02T *TIME(AL=8)
0240 11T '-' (60)
0250 72T *DATE
0260 / 32T 'BACKUP/BANCO/FILE'(I) 72T *LIBRARY-ID /
0270 /14T
0280 '+------------------------------------------------------+'
0290 /14T
0300 '| 10 - BACKUP ADASAV - BANCO |'
0310 /14T
0320 '| 20 - BACKUP ADASAV - FILE |'
0330 /14T
0340 '| 30 - BACKUP ADAULD - FILE |'
0350 /14T
0360 '+------------------------------------------------------+'
0370 //27T'DIGITE A OPCAO DESEJADA'(YE) #ARQ1(AD=MIL'_')
0380 //30T'TECLE PF3 PARA SAIR'(I)
0390 * ==================================================================== *
0400 IF *PF-KEY EQ 'PF3'
0410 FETCH 'DBAPMENU'
0420 * ==================================================================== *
0430 IF #ARQ1 EQ '10' FETCH 'DBAPCS10'
0440 IF #ARQ1 EQ '20' FETCH 'DBAPCS20'
0450 IF #ARQ1 EQ '30' FETCH 'DBAPCS30'
0460 * ==================================================================== *
0470 END
Opção 20
Opção 10 - programa natural de exemplo - Escolher o backup do banco Online/Offline;
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPCS10
20:36:00 ------------------------------------------------------------ 11/05/21
BACKUP/BANCO/FILE ADABAS01
+------------------------------------------------------+
| 10 - ADASAV DE BANCO - BANCO ONLINE |
| 20 - ADASAV DE BANCO - BANCO OFFLINE |
+------------------------------------------------------+
DIGITE A OPCAO DESEJADA __
TECLE PF3 PARA SAIR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Exit
Programa natural de backups
> > + Program DBAPCS10 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ==================================================================== *
0020 * FUNCAO: MENU OPCOES BACKUP - ONLINE/OFFLINE *
0030 * AUTOR: CLAUDEMAR MARTINS DE SA *
0040 * ==================================================================== *
0050 DEFINE DATA LOCAL
0060 1 #ARQ1 (A2)
0070 END-DEFINE
0080 * ==================================================================== *
0090 FORMAT KD=ON
0100 SET KEY
0110 TREQ NAMED ' '
0120 PF3 = PGM NAMED 'Exit'
0130 PF2 PF5 PF6 PF9 PF10 PF11
0140 PF13 PF14 PF15 PF16 PF17 PF18
0150 PF19 PF20 PF21 PF22 PF23 PF24
0160 * ==================================================================== *
0170 REPEAT
0180 INPUT (IP=OFF SG=OFF AD=MIL'_')
0190 02T '-' (78)
0200 / 02T *USER
0210 31T 'DBA ADABAS MAINFRAME' (I)
0220 72T *PROGRAM
0230 / 02T *TIME(AL=8)
0240 11T '-' (60)
0250 72T *DATE
0260 / 32T 'BACKUP/BANCO/FILE'(I) 72T *LIBRARY-ID /
0270 /14T
0280 '+------------------------------------------------------+'
0290 /14T
0300 '| 10 - ADASAV DE BANCO - BANCO ONLINE |'
0310 /14T
0320 '| 20 - ADASAV DE BANCO - BANCO OFFLINE |'
0330 /14T
0340 '+------------------------------------------------------+'
0350 //27T'DIGITE A OPCAO DESEJADA'(YE) #ARQ1(AD=MIL'_')
0360 //30T'TECLE PF3 PARA SAIR'(I)
0370 * ==================================================================== *
0380 IF *PF-KEY EQ 'PF3'
0390 FETCH 'DBAPMENU'
0400 * ==================================================================== *
0410 IF #ARQ1 EQ '10' FETCH 'DBAPC033'
0420 IF #ARQ1 EQ '20' FETCH 'DBAPC034'
0430 * ==================================================================== *
0440 END
Backup do banco online
> > + Program DBAPC034 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: BACKUP DE UM BANCO ADABAS - BACKUP COM O BANCO FORA DO AR *
0030 * AUTOR: CLAUDEMAR MARTINS *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'ADABAS.C.SAVE.DBXXX'>
0150 1 #DBID (A3)
0160 1 #FILE (N3)
0170 1 #C01 (A80) INIT
0180 <'//AAFPSAVE JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0190 1 REDEFINE #C01
0200 2 FILLER 2X
0210 2 #JOBNAME (A8)
0220 2 #FIL1 (A06)
0230 2 #ACC (A04)
0240 2 #FIL2 (A06)
0250 2 #USER (A07)
0260 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0270 1 #C03 (A80) INIT
0280 <'//* -----------------------------------------------------'>
0290 1 #C04 (A80) INIT
0300 <'//* SAVE DO BANCO ADABAS'>
0310 1 #C05 (A80) INIT
0320 <'//* -----------------------------------------------------'>
0330 1 #C06 (A80)
0340 1 #C07 (A80)
0350 1 #C08 (A80) INIT
0360 <'// DISP=(NEW,KEEP),UNIT=CVRT,LABEL=(1,SL)'>
0370 1 #C09 (A80) INIT
0380 <'//* ------------------------------------------------------'>
0390 1 #C10 (A80) INIT
0400 <'//DDCARD DD *'>
0410 1 #C11 (A80)
0420 1 #C12 (A80) INIT
0430 <'//DDKARTE DD *'>
0440 1 #C13 (A80)
0450 1 #C14 (A80) INIT
0460 <'/*'>
0470 1 #Y2K (A1) INIT <'N'>
0480 END-DEFINE
0490 * ==================================================================== *
0500 FORMAT KD=ON
0510 SET CONTROL 'U'
0520 SET KEY PF3 NAMED 'MENU'
0530 PF8 NAMED ' ' PF9 NAMED ' '
0540 MOVE *INIT-USER TO #USER
0550 REPEAT
0560 * RESET #ARQ
0570 RESET INITIAL #Y2K
0580 * ==================================================================== *
0590 INPUT (IP=OFF SG=OFF AD=MIL'_')
0600 02T '-' (78)
0610 / 02T *USER
0620 30T 'DBA ADABAS MAINFRAME' (I)
0630 72T *PROGRAM
0640 / 02T *TIME(AL=8)
0650 11T '-' (60)
0660 72T *DATE
0670 / 24T 'BACKUP DE BANCO - BANCO OFFLINE' (I)
0680 *
0690 //
0700 06T '+----------------------------------------------------------------+'
0710 /
0720 06T '| |'
0730 /
0740 06T '| DBID do Banco Adabas .....: ' #DBID
0750 ' |'
0760 /
0770 06T '| |'
0780 /
0790 06T '| Nome do arquivo da fita ..: ' #ARQ ' |'
0800 /
0810 06T '| |'
0820 /
0830 06T '+----------------------------------------------------------------+'
0840 //28T'TECLE PF3 PARA VOLTAR'(I)
0850 IF *PF-KEY EQ 'PF3'
0860 FETCH 'DBAPCS10'
0870 END-IF
0880 * ==================================================================== *
0890 IF #DBID = ' '
0900 REINPUT 'Digite o DBID do banco' MARK *#DBID ALARM
0910 END-IF
0920 * ==================================================================== *
0930 IF #ARQ = ' '
0940 REINPUT 'Nome do Arquivo deve ser Informado' MARK *#ARQ ALARM
0950 END-IF
0960 * ==================================================================== *
0970 COMPRESS '//SAVE EXEC AAFAU' #DBID ',TIME=1440'
0980 INTO #C06 LEAVING NO
0990 * ==================================================================== *
1000 COMPRESS '//DDSAVE1 DD DSN=' #ARQ ','
1010 INTO #C07 LEAVING NO
1020 * ==================================================================== *
1030 COMPRESS 'ADARUN PROG=ADASAV,DBID=' #DBID ',PLOGRQ=NO'
1040 INTO #C11 LEAVING NO
1050 * ==================================================================== *
1060 COMPRESS 'ADASAV SAVE' INTO #C13 LEAVING NO
1070 * ==================================================================== *
1080 COMPUTE #TOT = 26 * 80
1090 CALL 'RJE' #RC #C01 #TOT
1100 CALL 'GETJOB' #JOBNUM #CALLER
1110 CALL 'GETJOB' #JOBNUM #CALLER
1120 * ==================================================================== *
1130 INPUT NO ERASE 18/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1140 ' Submetido OK.'
1150 //27T'TECLE ENTER PARA VOLTAR'(I)
1160 FETCH 'DBAPCS31'
1170 END-REPEAT
1180 END
Backup do banco Offline;
> > + Program DBAPC034 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: BACKUP DE UM BANCO ADABAS - BACKUP COM O BANCO FORA DO AR *
0030 * AUTOR: CLAUDEMAR MARTINS *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'ADABAS.C.SAVE.DBXXX'>
0150 1 #DBID (A3)
0160 1 #FILE (N3)
0170 1 #C01 (A80) INIT
0180 <'//AAFPSAVE JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0190 1 REDEFINE #C01
0200 2 FILLER 2X
0210 2 #JOBNAME (A8)
0220 2 #FIL1 (A06)
0230 2 #ACC (A04)
0240 2 #FIL2 (A06)
0250 2 #USER (A07)
0260 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0270 1 #C03 (A80) INIT
0280 <'//* -----------------------------------------------------'>
0290 1 #C04 (A80) INIT
0300 <'//* SAVE DO BANCO ADABAS'>
0310 1 #C05 (A80) INIT
0320 <'//* -----------------------------------------------------'>
0330 1 #C06 (A80)
0340 1 #C07 (A80)
0350 1 #C08 (A80) INIT
0360 <'// DISP=(NEW,KEEP),UNIT=CVRT,LABEL=(1,SL)'>
0370 1 #C09 (A80) INIT
0380 <'//* ------------------------------------------------------'>
0390 1 #C10 (A80) INIT
0400 <'//DDCARD DD *'>
0410 1 #C11 (A80)
0420 1 #C12 (A80) INIT
0430 <'//DDKARTE DD *'>
0440 1 #C13 (A80)
0450 1 #C14 (A80) INIT
0460 <'/*'>
0470 1 #Y2K (A1) INIT <'N'>
0480 END-DEFINE
0490 * ==================================================================== *
0500 FORMAT KD=ON
0510 SET CONTROL 'U'
0520 SET KEY PF3 NAMED 'MENU'
0530 PF8 NAMED ' ' PF9 NAMED ' '
0540 MOVE *INIT-USER TO #USER
0550 REPEAT
0560 * RESET #ARQ
0570 RESET INITIAL #Y2K
0580 * ==================================================================== *
0590 INPUT (IP=OFF SG=OFF AD=MIL'_')
0600 02T '-' (78)
0610 / 02T *USER
0620 30T 'DBA ADABAS MAINFRAME' (I)
0630 72T *PROGRAM
0640 / 02T *TIME(AL=8)
0650 11T '-' (60)
0660 72T *DATE
0670 / 24T 'BACKUP DE BANCO - BANCO OFFLINE' (I)
0680 *
0690 //
0700 06T '+----------------------------------------------------------------+'
0710 /
0720 06T '| |'
0730 /
0740 06T '| DBID do Banco Adabas .....: ' #DBID
0750 ' |'
0760 /
0770 06T '| |'
0780 /
0790 06T '| Nome do arquivo da fita ..: ' #ARQ ' |'
0800 /
0810 06T '| |'
0820 /
0830 06T '+----------------------------------------------------------------+'
0840 //28T'TECLE PF3 PARA VOLTAR'(I)
0850 IF *PF-KEY EQ 'PF3'
0860 FETCH 'DBAPCS10'
0870 END-IF
0880 * ==================================================================== *
0890 IF #DBID = ' '
0900 REINPUT 'Digite o DBID do banco' MARK *#DBID ALARM
0910 END-IF
0920 * ==================================================================== *
0930 IF #ARQ = ' '
0940 REINPUT 'Nome do Arquivo deve ser Informado' MARK *#ARQ ALARM
0950 END-IF
0960 * ==================================================================== *
0970 COMPRESS '//SAVE EXEC AAFAU' #DBID ',TIME=1440'
0980 INTO #C06 LEAVING NO
0990 * ==================================================================== *
1000 COMPRESS '//DDSAVE1 DD DSN=' #ARQ ','
1010 INTO #C07 LEAVING NO
1020 * ==================================================================== *
1030 COMPRESS 'ADARUN PROG=ADASAV,DBID=' #DBID ',MODE=SINGLE,PLOGRQ=NO'
1040 INTO #C11 LEAVING NO
1050 * ==================================================================== *
1060 COMPRESS 'ADASAV SAVE' INTO #C13 LEAVING NO
1070 * ==================================================================== *
1080 COMPUTE #TOT = 26 * 80
1090 CALL 'RJE' #RC #C01 #TOT
1100 CALL 'GETJOB' #JOBNUM #CALLER
1120 * ==================================================================== *
1130 INPUT NO ERASE 18/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1140 ' Submetido OK.'
1150 //27T'TECLE ENTER PARA VOLTAR'(I)
1160 FETCH 'DBAPCS31'
1170 END-REPEAT
1180 END
30 - NATUNLD/NATLOAD
Criei a opção de backup de uma biblioteca
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ832
12:01:25 ------------------------------------------------------------ 12/05/21
BACKUP NATUNLD
+----------------------------------------------------------------+
| |
| SYS DO BANCO ADABAS ......: ____ |
| |
| NOME DA BIBLIOTECA .......: __________ |
| |
| DATASET DO CARTUCHO ......: NATURAL.C.SAVE.DBXXX.XXXX_______ |
| |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
programa natural
> > + Program DBAPJ832 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: NATUNLD - BACKUP DOS PROGRAMAS DA BIBLIOTECA - 1 BIBLIOTECA *
0030 * AUTOR: CLAUDEMAR MARTINS *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'NATURAL.C.SAVE.DBXXX.XXXX'>
0150 1 #BIBLIOTECA1 (A10)
0160 1 #BIBLIOTECA2 (A10)
0170 1 #BIBLIOTECA3 (A10)
0180 1 #BIBLIOTECA4 (A10)
0190 1 #DBID (A4)
0200 1 #FILE (N3)
0210 1 #C01 (A80) INIT
0220 <'//AAFSNATB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0230 1 REDEFINE #C01
0240 2 FILLER 2X
0250 2 #JOBNAME (A8)
0260 2 #FIL1 (A06)
0270 2 #ACC (A04)
0280 2 #FIL2 (A06)
0290 2 #USER (A07)
0300 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0310 1 #C03 (A80) INIT
0320 <'//* -----------------------------------------------------'>
0330 1 #C04 (A80) INIT
0340 <'//* SALVA OS PROGRAMAS DA BIBLIOTECA EM UM CARTUCHO'>
0350 1 #C05 (A80) INIT
0360 <'//* NATUNLD ALL - SAVE/CAT'>
0370 1 #C06 (A80) INIT
0380 <'//* -----------------------------------------------------'>
0390 1 #C07 (A80) INIT
0400 <'//NATUNLD EXEC NATURALD,'>
0410 1 #C08 (A80)
0420 1 #C09 (A80) INIT <'// PARM2="STACK=(LOGON SYSTEM)"'>
0430 1 #C10 (A80) INIT
0440 <'//* -----------------------------------------------------'>
0450 1 #C11 (A80)
0460 1 #C12 (A80) INIT
0470 <'// DISP=(NEW,KEEP),UNIT=CVRT,LABEL=(1,SL)'>
0480 1 #C13 (A80) INIT <'//SYSIN DD *'>
0490 1 #C14 (A80)
0500 1 #C15 (A80) INIT <'FIN'>
0510 1 #C16 (A80) INIT <'/*'>
0520 1 #Y2K (A1) INIT <' '>
0530 END-DEFINE
0540 * ==================================================================== *
0550 FORMAT KD=ON
0560 SET CONTROL 'U'
0570 SET KEY PF3 NAMED 'MENU'
0580 PF8 NAMED ' ' PF9 NAMED ' '
0590 MOVE *INIT-USER TO #USER
0600 REPEAT
0610 * RESET #ARQ
0620 RESET INITIAL #Y2K
0630 * ==================================================================== *
0640 INPUT (IP=OFF SG=OFF AD=MIL'_')
0650 02T '-' (78)
0660 / 02T *USER
0670 30T 'DBA ADABAS MAINFRAME' (I)
0680 72T *PROGRAM
0690 / 02T *TIME(AL=8)
0700 11T '-' (60)
0710 72T *DATE
0720 / 32T 'BACKUP NATUNLD' (I)
0730 *
0740 //
0750 06T '+----------------------------------------------------------------+'
0760 /
0770 06T '| |'
0780 /
0790 06T '| SYS DO BANCO ADABAS ......: ' #DBID
0800 '
0810 /
0820 06T '| |'
0830 /
0840 06T '| NOME DA BIBLIOTECA .......: ' #BIBLIOTECA1
0850 ' |'
0860 /
0870 06T '| |'
0880 /
0890 06T '| DATASET DO CARTUCHO ......: ' #ARQ
0900 '|'
0910 /
0920 06T '| |'
0930 /
0940 06T '+----------------------------------------------------------------+'
0950 //28T'TECLE PF3 PARA VOLTAR'(I)
0960 IF *PF-KEY EQ 'PF3'
0970 FETCH 'DBAPMENU'
0980 END-IF
0990 * ==================================================================== *
1000 IF #DBID = ' '
1010 REINPUT 'Digite o DBID do banco' MARK *#DBID ALARM
1020 END-IF
1030 * ==================================================================== *
1040 IF #BIBLIOTECA1 = ' '
1050 REINPUT 'Digite o nome da BIBLIOTECA' MARK *#BIBLIOTECA1 ALARM
1060 END-IF
1070 * ==================================================================== *
1080 COMPRESS '// PARM1="SYS=' #DBID
1090 ',MT=0,MADIO=0,IM=D,INTENS=1,MAXCL=0,OBJIN=N",'
1100 INTO #C08 LEAVING NO
1110 * ==================================================================== *
1120 COMPRESS '//CMWKF01 DD DSN=' #ARQ ',' INTO #C11 LEAVING NO
1130 * ==================================================================== *
1140 COMPRESS 'NATUNLD ALL * FROM ' #BIBLIOTECA1 'WITH TYPE *' INTO #C14
1150 * ==================================================================== *
1160 COMPUTE #TOT = 26 * 80
1170 CALL 'RJE' #RC #C01 #TOT
1180 CALL 'GETJOB' #JOBNUM #CALLER
1190 * ==================================================================== *
1200 INPUT NO ERASE 18/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1210 ' Submetido OK.'
1220 //27T'TECLE ENTER PARA VOLTAR'(I)
1230 FETCH 'DBAPCS33'
1240 END-REPEAT
1250 END
40 - ADAREP DOS BANCOS
Essa seria a opção que rodamos um job de ADAREP do banco;
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ200
11:41:15 ------------------------------------------------------------ 12/05/21
RELATORIO DO BANCO - ADAREP
+----------------------------------------------------------------+
| |
| DBID do banco Adabas .....: ___ |
| |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa natural
> > + Program DBAPJ200 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: ADAREP DE UM BANCO ADABAS *
0030 * AUTOR: CLAUDEMAR MARTINS *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'ADABAS.C.SAVE.DBXXX.FXXX'>
0150 1 #DBID (A3)
0160 1 #FILE (N3)
0170 * 1 #ULD (A20) INIT <'UNLOAD FILE'>
0180 1 #C01 (A80) INIT
0190 <'//AAFSNATB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0200 1 REDEFINE #C01
0210 2 FILLER 2X
0220 2 #JOBNAME (A8)
0230 2 #FIL1 (A06)
0240 2 #ACC (A04)
0250 2 #FIL2 (A06)
0260 2 #USER (A07)
0270 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0280 1 #C03 (A80) INIT
0290 <'//* -----------------------------------------------------'>
0300 1 #C04 (A80) INIT
0310 <'//* ADAREP DO BANCO DE DADOS'>
0320 1 #C05 (A80) INIT
0330 <'//* -----------------------------------------------------'>
0340 1 #C06 (A80)
0350 1 #C07 (A80) INIT <'//DDDRUCK DD SYSOUT=G'>
0360 1 #C08 (A80) INIT <'//DDCARD DD *'>
0370 1 #C09 (A80)
0380 1 #C10 (A80) INIT <'//DDKARTE DD *'>
0390 1 #C13 (A80) INIT <'ADAREP CPEXLIST,NOFILE'>
0400 1 #C14 (A80) INIT <'/*'>
0410 1 #Y2K (A1) INIT <'N'>
0420 END-DEFINE
0430 * ==================================================================== *
0440 FORMAT KD=ON
0450 SET CONTROL 'U'
0460 SET KEY PF3 NAMED 'MENU'
0470 PF8 NAMED ' ' PF9 NAMED ' '
0480 MOVE *INIT-USER TO #USER
0490 REPEAT
0500 RESET INITIAL #Y2K
0510 * ==================================================================== *
0520 INPUT (IP=OFF SG=OFF AD=MIL'_')
0530 02T '-' (78)
0540 / 02T *USER
0550 30T 'DBA ADABAS MAINFRAME' (I)
0560 72T *PROGRAM
0570 / 02T *TIME(AL=8)
0580 11T '-' (60)
0590 72T *DATE
0600 / 24T 'RELATORIO DO BANCO - ADAREP' (I)
0610 *
0620 //
0630 06T '+----------------------------------------------------------------+'
0640 /
0650 06T '| |'
0660 /
0670 06T '| DBID do banco Adabas .....: ' #DBID
0680 ' |'
0690 /
0700 06T '| |'
0710 /
0720 06T '+----------------------------------------------------------------+'
0730 //28T'TECLE PF3 PARA VOLTAR'(I)
0740 IF *PF-KEY EQ 'PF3'
0750 FETCH 'DBAPMENU'
0760 END-IF
0770 * ==================================================================== *
0780 IF #DBID = ' '
0790 REINPUT 'Digite o DBID do banco' MARK *#ARQ ALARM
0800 END-IF
0810 * ==================================================================== *
0820 COMPRESS '//REP EXEC AAFAU' #DBID ',REGION=0M'
0830 INTO #C06 LEAVING NO
0840 * ==================================================================== *
0850 COMPRESS 'ADARUN PROG=ADAREP,DBID=' #DBID
0860 INTO #C09 LEAVING NO
0870 * ==================================================================== *
0880 COMPUTE #TOT = 26 * 80
0890 CALL 'RJE' #RC #C01 #TOT
0900 CALL 'GETJOB' #JOBNUM #CALLER
0910 * ==================================================================== *
0920 INPUT NO ERASE 14/17 'JOB ' #JOBNAME(AD=IO) 'de N.' #JOBN(AD=IO)
0930 ' Submetido OK.'
0940 //27T'TECLE ENTER PARA VOLTAR'(I)
0950 FETCH 'DBAPMENU'
0960 END-REPEAT
0970 END
50 - REORDB/REORFILE
Essas são as duas opções que temos para reorganizar, REORDB e a REORFILE
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ210
18:16:03 ------------------------------------------------------------ 12/05/21
BACKUP/BANCO/FILE ADABAS01
+------------------------------------------------------+
| 10 - REORGANIZACAO DE BANCO - (REORDB) |
| 20 - REORGANIZACAO DE FILE - (REORFILE) |
+------------------------------------------------------+
DIGITE A OPCAO DESEJADA __
TECLE PF3 PARA SAIR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Exit
Programa natural menu
> > + Program DBAPJ210 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ==================================================================== *
0020 * FUNCAO: MENU OPCOES REORGANIZACAO - REORDB/REORFILE *
0030 * AUTOR: CLAUDEMAR MARTINS DE SA *
0040 * ==================================================================== *
0050 DEFINE DATA LOCAL
0060 1 #ARQ1 (A2)
0070 END-DEFINE
0080 * ==================================================================== *
0090 FORMAT KD=ON
0100 SET KEY
0110 TREQ NAMED ' '
0120 PF3 = PGM NAMED 'Exit'
0130 PF2 PF5 PF6 PF9 PF10 PF11
0140 PF13 PF14 PF15 PF16 PF17 PF18
0150 PF19 PF20 PF21 PF22 PF23 PF24
0160 * ==================================================================== *
0170 REPEAT
0180 INPUT (IP=OFF SG=OFF AD=MIL'_')
0190 02T '-' (78)
0200 / 02T *USER
0210 31T 'DBA ADABAS MAINFRAME' (I)
0220 72T *PROGRAM
0230 / 02T *TIME(AL=8)
0240 11T '-' (60)
0250 72T *DATE
0260 / 32T 'BACKUP/BANCO/FILE'(I) 72T *LIBRARY-ID /
0270 /14T
0280 '+------------------------------------------------------+'
0290 /14T
0300 '| 10 - REORGANIZACAO DE BANCO - (REORDB) |'
0310 /14T
0320 '| 20 - REORGANIZACAO DE FILE - (REORFILE) |'
0330 /14T
0340 '+------------------------------------------------------+'
0350 //27T'DIGITE A OPCAO DESEJADA'(YE) #ARQ1(AD=MIL'_')
0360 //30T'TECLE PF3 PARA SAIR'(I)
0370 * ==================================================================== *
0380 IF *PF-KEY EQ 'PF3'
0390 FETCH 'DBAPMENU'
0400 * ==================================================================== *
0410 IF #ARQ1 EQ '10' FETCH 'DBAPJ860'
0420 IF #ARQ1 EQ '20' FETCH 'DBAPJ861'
0430 * ==================================================================== *
0440 END
Tela da opção 10 (REORDB)
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ860
18:09:41 ------------------------------------------------------------ 12/05/21
REORDB - BANCO ADABAS
+----------------------------------------------------------------+
| |
| DBID do BANCO ADABAS .....: ___ |
| |
| Informe ADARUN LP ........: 0______ |
| |
| Informe ADARUN LWKP2 .....: 0______ |
| |
| Nome do arquivo da fita ..: ADABAS.C.REORDB.DBXXX___________ |
| |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa Natural
> > + Program DBAPJ860 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: REORDB - REORGANIZANDO UM BANCO DE DADOS ADABAS; *
0030 * autor: claudemar Martins *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'ADABAS.C.REORDB.DBXXX'>
0150 1 #DBID (A3)
0160 1 #ADARUN-LP (N7)
0170 1 #ADARUN-LWKP2 (N7)
0180 1 #C01 (A80) INIT
0190 <'//AAFAREDB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0200 1 REDEFINE #C01
0210 2 FILLER 2X
0220 2 #JOBNAME (A8)
0230 2 #FIL1 (A06)
0240 2 #ACC (A04)
0250 2 #FIL2 (A06)
0260 2 #USER (A07)
0270 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0280 1 #C03 (A80) INIT
0290 <'//* -----------------------------------------------------'>
0300 1 #C04 (A80) INIT
0310 <'//* REORGANIZA O DATA E O ASSO DO BANCO'>
0320 1 #C05 (A80) INIT
0330 <'//* -----------------------------------------------------'>
0340 1 #C06 (A80)
0350 1 #C07 (A80)
0360 1 #C08 (A80) INIT
0370 <'// DISP=(NEW,KEEP),UNIT=CVRT,LABEL=(1,SL)'>
0380 1 #C09 (A80) INIT
0390 <'//* ------------------------------------------------------'>
0400 1 #C10 (A80) INIT <'//DDCARD DD *'>
0410 1 #C11 (A80)
0420 1 #C12 (A80)
0430 1 #C13 (A80) INIT <'//DDKARTE DD *'>
0440 1 #C14 (A80) INIT <'ADAORD REORDB'>
0450 1 #C15 (A80) INIT <'/*'>
0460 1 #Y2K (A1) INIT <'N'>
0470 END-DEFINE
0480 * ==================================================================== *
0490 FORMAT KD=ON
0500 SET CONTROL 'U'
0510 SET KEY PF3 NAMED 'MENU'
0520 PF8 NAMED ' ' PF9 NAMED ' '
0530 MOVE *INIT-USER TO #USER
0540 REPEAT
0550 * RESET #ARQ
0560 RESET INITIAL #Y2K
0570 * ==================================================================== *
0580 INPUT (IP=OFF SG=OFF AD=MIL'_')
0590 02T '-' (78)
0600 / 02T *USER
0610 30T 'DBA ADABAS MAINFRAME' (I)
0620 72T *PROGRAM
0630 / 02T *TIME(AL=8)
0640 11T '-' (60)
0650 72T *DATE
0660 / 29T 'REORDB - BANCO ADABAS' (I)
0670 *
0680 //
0690 06T '+----------------------------------------------------------------+'
0700 /
0710 06T '| |'
0720 /
0730 06T '| DBID do BANCO ADABAS .....: ' #DBID
0740 ' |'
0750 /
0760 06T '| |'
0770 /
0780 06T '| Informe ADARUN LP ........: ' #ADARUN-LP
0790 ' |'
0800 /
0810 06T '| |'
0820 /
0830 06T '| Informe ADARUN LWKP2 .....: ' #ADARUN-LWKP2
0840 ' |'
0850 /
0860 06T '| |'
0870 /
0880 06T '| Nome do arquivo da fita ..: ' #ARQ ' |'
0890 /
0900 06T '| |'
0910 /
0920 06T '+----------------------------------------------------------------+'
0930 //28T'TECLE PF3 PARA VOLTAR'(I)
0940 IF *PF-KEY EQ 'PF3'
0950 FETCH 'DBAPJ210'
0960 END-IF
0970 * ==================================================================== *
0980 IF #DBID = ' '
0990 REINPUT 'Digite o DBID do banco' MARK *#DBID ALARM
1000 END-IF
1010 * ==================================================================== *
1020 IF #ADARUN-LP = 0
1030 REINPUT 'Digite o valor LP do banco' MARK *#ADARUN-LP ALARM
1040 END-IF
1050 * ==================================================================== *
1060 IF #ADARUN-LWKP2 = 0
1070 REINPUT 'Digite o valor do LWKP2 do banco' MARK *#ADARUN-LWKP2
1080 ALARM
1090 END-IF
1100 * ==================================================================== *
1110 IF #ARQ = ' '
1120 REINPUT 'Nome do Arquivo deve ser Informado' MARK *#ARQ ALARM
1130 END-IF
1140 * ==================================================================== *
1150 COMPRESS '//REORDB EXEC AAFAU' #DBID ',TIME=1440'
1160 INTO #C06 LEAVING NO
1170 * ==================================================================== *
1180 COMPRESS '//DDFILEA DD DSN=' #ARQ ','
1190 INTO #C07 LEAVING NO
1200 * ==================================================================== *
1210 COMPRESS 'ADARUN PROG=ADAORD,MODE=SINGLE,DBID=' #DBID ',PLOGRQ=NO'
1220 INTO #C11 LEAVING NO
1230 * ==================================================================== *
1240 COMPRESS 'ADARUN LP=' #ADARUN-LP ',LWKP2=' #ADARUN-LWKP2
1250 INTO #C12 LEAVING NO
1260 * ==================================================================== *
1270 COMPUTE #TOT = 15 * 80
1280 CALL 'RJE' #RC #C01 #TOT
1290 CALL 'GETJOB' #JOBNUM #CALLER
1300 * ==================================================================== *
1310 INPUT NO ERASE 18/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1320 ' Submetido OK.'
1330 //27T'TECLE ENTER PARA VOLTAR'(I)
1340 FETCH 'DBAPC070'
1350 END-REPEAT
1360 END
Tela da opção 20 (REORFILE)
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ861
18:09:58 ------------------------------------------------------------ 12/05/21
VALORES COM ZERO FICARAO COMENDADOS NO JCL
+----------------------------------------------------------------+
| |
| DBID do Banco Adabas .....: ___ campo obrigatorio |
| Informe numero do file....: 0______ campo obrigatorio |
| Informe o ISNSIZE ........: 0 |
| Informe o NISIZE .........: 0________ BLOCOS |
| Informe o UISIZE .........: 0________ BLOCOS |
| Informe o DSSIZE .........: 0________ BLOCOS |
| Informe o MAXISN .........: 0____________ |
| Nome do arquivo da fita ..: ADABAS.C.REORFILE.DBXXX.FXXX____ |
| |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa natural
> > + Program DBAPJ861 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: REORFILE - REORGANIZANDO UM FILE DO BANCO ADABAS *
0030 * AUTOR: CLAUDEMAR MARTINS *
0040 * ------------------------------------------------------------------- *
0050 DEFINE DATA LOCAL
0060 1 #CALLER (A4) INIT <'NAT '>
0070 1 #JOBNUM (A8)
0080 1 REDEFINE #JOBNUM
0090 2 #JOBA (A3)
0100 2 #JOBN (N5)
0110 1 #I (P3)
0120 1 #RC (B4)
0130 1 #TOT (B2)
0140 1 #ARQ (A32) INIT <'ADABAS.C.REORFILE.DBXXX.FXXX'>
0150 1 #DBID (A3)
0160 1 #FILE (N7)
0170 1 #ISNSIZE (N1)
0180 1 #NISIZE (N9)
0190 1 #UISIZE (N9)
0200 1 #DSSIZE (N9)
0210 1 #MAXISN (N13)
0220 1 #C01 (A80) INIT
0230 <'//AAFAREDB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0240 1 REDEFINE #C01
0250 2 FILLER 2X
0260 2 #JOBNAME (A8)
0270 2 #FIL1 (A06)
0280 2 #ACC (A04)
0290 2 #FIL2 (A06)
0300 2 #USER (A07)
0310 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0320 1 #C03 (A80) INIT
0330 <'//* -----------------------------------------------------'>
0340 1 #C04 (A80) INIT
0350 <'//* REORGANIZANDO UM FILE ADABAS'>
0360 1 #C05 (A80) INIT
0370 <'//* -----------------------------------------------------'>
0380 1 #C06 (A80)
0390 1 #C07 (A80)
0400 1 #C08 (A80) INIT
0410 <'// DISP=(NEW,KEEP),UNIT=CVRT,LABEL=(1,SL)'>
0420 1 #C09 (A80) INIT
0430 <'//* ------------------------------------------------------'>
0440 1 #C10 (A80) INIT <'//DDCARD DD *'>
0450 1 #C11 (A80)
0460 1 #C12 (A80) INIT <'//DDKARTE DD *'>
0470 1 #C13 (A80) INIT <'ADAORD REORFILE'>
0480 1 #C14 (A80)
0490 1 #C15 (A80)
0500 1 #C16 (A80) INIT <'ADAORD INDEXCOMPRESSION=YES'>
0510 1 #C17 (A80)
0520 1 #C18 (A80)
0530 1 #C19 (A80)
0540 1 #C20 (A80)
0550 1 #Y2K (A1) INIT <'N'>
0560 END-DEFINE
0570 * ==================================================================== *
0580 FORMAT KD=ON
0590 SET CONTROL 'U'
0600 SET KEY PF3 NAMED 'MENU'
0610 PF8 NAMED ' ' PF9 NAMED ' '
0620 MOVE *INIT-USER TO #USER
0630 REPEAT
0640 * RESET #ARQ
0650 RESET INITIAL #Y2K
0660 * ==================================================================== *
0670 INPUT (IP=OFF SG=OFF AD=MIL'_')
0680 02T '-' (78)
0690 / 02T *USER
0700 30T 'DBA ADABAS MAINFRAME' (I)
0710 72T *PROGRAM
0720 / 02T *TIME(AL=8)
0730 11T '-' (60)
0740 72T *DATE
0750 / 19T 'VALORES COM ZERO FICARAO COMENDADOS NO JCL' (I)
0760 *
0770 //
0780 06T '+----------------------------------------------------------------+'
0790 /
0800 06T '| |'
0810 /
0820 06T '| DBID do Banco Adabas .....: ' #DBID
0830 ' campo obrigatorio |'
0840 /
0850 06T '| Informe numero do file....: ' #FILE
0860 ' campo obrigatorio |'
0870 /
0880 06T '| Informe o ISNSIZE ........: ' #ISNSIZE
0890 ' |'
0900 /
0910 06T '| Informe o NISIZE .........: ' #NISIZE
0920 'BLOCOS |'
0930 /
0940 06T '| Informe o UISIZE .........: ' #UISIZE
0950 'BLOCOS |'
0960 /
0970 06T '| Informe o DSSIZE .........: ' #DSSIZE
0980 'BLOCOS |'
0990 /
1000 06T '| Informe o MAXISN .........: ' #MAXISN
1010 ' |'
1020 /
1030 06T '| Nome do arquivo da fita ..: ' #ARQ ' |'
1040 /
1050 06T '| |'
1060 /
1070 06T '+----------------------------------------------------------------+'
1080 //28T'TECLE PF3 PARA VOLTAR'(I)
1090 IF *PF-KEY EQ 'PF3'
1100 FETCH 'DBAPJ210'
1110 END-IF
1120 * ==================================================================== *
1130 IF #DBID = ' '
1140 REINPUT 'Digite o DBID DO BANCO' MARK *#DBID ALARM
1150 END-IF
1160 * ==================================================================== *
1170 IF #FILE = 0
1180 REINPUT 'Digite o NUMERO DO FILE' MARK *#FILE ALARM
1190 END-IF
1200 * ==================================================================== *
1210 IF #ARQ = ' '
1220 REINPUT 'Nome do Arquivo deve ser Informado' MARK *#ARQ ALARM
1230 END-IF
1240 * ==================================================================== *
1250 COMPRESS '//REORFILE EXEC AAFAU' #DBID ',TIME=1440'
1260 INTO #C06 LEAVING NO
1270 * ==================================================================== *
1280 COMPRESS '//DDFILEA DD DSN=' #ARQ ','
1290 INTO #C07 LEAVING NO
1300 * ==================================================================== *
1310 COMPRESS 'ADARUN PROG=ADAORD,DBID=' #DBID
1320 INTO #C11 LEAVING NO
1330 * ==================================================================== *
1340 COMPRESS 'ADAORD FILE=' #FILE INTO #C14 LEAVING NO
1350 * ==================================================================== *
1360 IF #ISNSIZE EQ 0
1370 COMPRESS '* ADAORD ISNSIZE=' #ISNSIZE INTO #C15 LEAVING NO
1380 ELSE
1390 COMPRESS 'ADAORD ISNSIZE=' #ISNSIZE INTO #C15 LEAVING NO
1400 END-IF
1410 * ==================================================================== *
1420 IF #NISIZE EQ 0
1430 COMPRESS '* ADAORD NISIZE=' #NISIZE INTO #C17 LEAVING NO
1440 ELSE
1450 COMPRESS 'ADAORD NISIZE=' #NISIZE 'B' INTO #C17 LEAVING NO
1460 END-IF
1470 * ==================================================================== *
1480 IF #UISIZE EQ 0
1490 COMPRESS '* ADAORD UISIZE=' #UISIZE INTO #C18 LEAVING NO
1500 ELSE
1510 COMPRESS 'ADAORD UISIZE=' #UISIZE 'B' INTO #C18 LEAVING NO
1520 END-IF
1530 * ==================================================================== *
1540 IF #DSSIZE EQ 0
1550 COMPRESS '* ADAORD DSSIZE=' #DSSIZE INTO #C19 LEAVING NO
1560 ELSE
1570 COMPRESS 'ADAORD DSSIZE=' #DSSIZE 'B' INTO #C19 LEAVING NO
1580 END-IF
1590 * ==================================================================== *
1600 IF #MAXISN EQ 0
1610 COMPRESS '* ADAORD MAXISN=' #MAXISN INTO #C20 LEAVING NO
1620 ELSE
1630 COMPRESS 'ADAORD MAXISN=' #MAXISN INTO #C20 LEAVING NO
1640 END-IF
1650 * ==================================================================== *
1660 COMPUTE #TOT = 20 * 80
1670 CALL 'RJE' #RC #C01 #TOT
1680 CALL 'GETJOB' #JOBNUM #CALLER
1690 * ==================================================================== *
1700 INPUT NO ERASE 19/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1710 ' Submetido OK.'
1720 //27T'TECLE ENTER PARA VOLTAR'(I)
1730 FETCH 'DBAPC070'
1740 END-REPEAT
1750 END
60 - GENERATE ADACMP
Esta opção gravamos em um membro de uma biblioteca as definições de um campo
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ950
18:38:59 ------------------------------------------------------------ 12/05/21
GRAVAR AS DEFINICOES DOS CAMPOS DE UM FILE EM UM DATASET
+----------------------------------------------------------------+
| DBID DO BANCO ADABAS .....: 0__ |
| SYS DO BANCO ADABAS ......: ____ |
| NOME DO FILE FISICO ......: ______________________________ |
| NOME DA BIBLIOTECA (PS) ..: AAB.DIST.JCLS(CLAU999)________ |
| NOME BIBLIOTECA NATURAL ..: ADACMP__ |
| NOME DO PROGRAMA NATURAL .: CLAU999_ |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa natural
> > + Program DBAPJ950 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: GENERATE ADACMP - FILE FISICO *
0030 * GERAR O FILE FISICO EM UMA BIBLIOTECA NATURAL E PS PARA *
0040 * PREPARAR O JOB DE ADACMP COMPRESS *
0050 * AUTOR: CLAUDEMAR MARTINS *
0060 * ------------------------------------------------------------------- *
0070 DEFINE DATA LOCAL
0080 1 #CALLER (A4) INIT <'NAT '>
0090 1 #JOBNUM (A8)
0100 1 REDEFINE #JOBNUM
0110 2 #JOBA (A3)
0120 2 #JOBN (N5)
0130 1 #I (P3)
0140 1 #RC (B4)
0150 1 #TOT (B2)
0160 1 #DBID (N3)
0170 1 #SYS (A4)
0180 1 #FILE (A30)
0190 1 #BIBLIOTECA1 (A08) INIT <'ADACMP'>
0200 1 #PROGRAMA-NATURAL (A08) INIT <'CLAU999'>
0210 1 #BIBLIOTECA2 (A30) INIT <'AAB.DIST.JCLS(CLAU999)'>
0220 1 #C01 (A80) INIT
0230 <'//AAFPNATB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0240 1 REDEFINE #C01
0250 2 FILLER 2X
0260 2 #JOBNAME (A8)
0270 2 #FIL1 (A06)
0280 2 #ACC (A04)
0290 2 #FIL2 (A06)
0300 2 #USER (A07)
0310 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0320 1 #C03 (A80) INIT
0330 <'//* -----------------------------------------------------'>
0340 1 #C04 (A80) INIT
0350 <'//* GENERATE ADACMP - FILE FISICO'>
0360 1 #C05 (A80) INIT
0370 <'//* -----------------------------------------------------'>
0380 1 #C06 (A80) INIT
0390 <'//LOADDDM EXEC NATURAL,COND=(0,NE),'>
0400 1 #C07 (A80)
0410 1 #C08 (A80) INIT
0420 <'// PARM2="STACK=(LOGON SYSDIC),EDPSIZE=48",ID="|"'>
0430 1 #C09 (A80)
0440 1 #C10 (A80) INIT <'//SYSIN DD *'>
0450 1 #C11 (A80) INIT <'MENU'>
0460 1 #C12 (A80) INIT <'GENERATE ADACMP'>
0470 1 #C13 (A80)
0480 1 #C14 (A80)
0490 1 #C15 (A80) INIT <'PUNCH=Y%'>
0500 1 #C16 (A80)
0510 1 #C17 (A80)
0520 1 #C18 (A80) INIT <'REPLACE=Y%'>
0530 1 #C19 (A80) INIT <'FILE-ATTRIBUTES=Y%'>
0540 1 #C20 (A80) INIT <'SORTSIZE=500%'>
0550 1 #C21 (A80) INIT <'TEMPSIZE=500'>
0560 1 #C22 (A80) INIT <'FIN'>
0570 1 #C23 (A80) INIT <'//CMEDIT DD DSN=&&DDM2,DISP=(NEW,PASS),'>
0580 1 #C24 (A80) INIT <'// UNIT=SYSDA,SPACE=(CYL,15)'>
0590 1 #Y2K (A1) INIT <'N'>
0600 END-DEFINE
0610 * ==================================================================== *
0620 FORMAT KD=ON
0630 SET CONTROL 'U'
0640 SET KEY PF3 NAMED 'MENU'
0650 PF8 NAMED ' ' PF9 NAMED ' '
0660 MOVE *INIT-USER TO #USER
0670 REPEAT
0680 * RESET #ARQ
0690 RESET INITIAL #Y2K
0700 * ==================================================================== *
0710 INPUT (IP=OFF SG=OFF AD=MIL'_')
0720 02T '-' (78)
0730 / 02T *USER
0740 30T 'DBA ADABAS MAINFRAME' (I)
0750 72T *PROGRAM
0760 / 02T *TIME(AL=8)
0770 11T '-' (60)
0780 72T *DATE
0790 * / 25T 'GENERATE ADACMP - FILE FISICO' (I)
0800 /13T
0810 'GRAVAR AS DEFINICOES DOS CAMPOS DE UM FILE EM UM DATASET' (I)
0820 //
0830 06T '+----------------------------------------------------------------+'
0840 /
0850 06T '| DBID DO BANCO ADABAS .....: ' #DBID
0860 ' |'
0870 /
0880 06T '| SYS DO BANCO ADABAS ......: ' #SYS
0890 ' |'
0900 /
0910 06T '| NOME DO FILE FISICO ......: ' #FILE
0920 ' |'
0930 /
0940 06T '| NOME DA BIBLIOTECA (PS) ..: ' #BIBLIOTECA2
0950 ' |'
0960 /
0970 06T '| NOME BIBLIOTECA NATURAL ..: ' #BIBLIOTECA1
0980 ' |'
0990 /
1000 06T '| NOME DO PROGRAMA NATURAL .: ' #PROGRAMA-NATURAL
1010 ' |'
1020 /
1030 06T '+----------------------------------------------------------------+'
1040 //28T'TECLE PF3 PARA VOLTAR'(I)
1050 IF *PF-KEY EQ 'PF3'
1060 FETCH 'DBAPMENU'
1070 END-IF
1080 * ==================================================================== *
1090 IF #DBID = 0
1100 REINPUT 'Digite o DBID DO BANCO' MARK *#DBID ALARM
1110 END-IF
1120 * ==================================================================== *
1130 IF #SYS = ' '
1140 REINPUT 'DIGITE O SYS DO BANCO' MARK *#SYS ALARM
1150 END-IF
1160 * ==================================================================== *
1170 IF #FILE = ' '
1180 REINPUT 'DIGITE O FILE FISICO BANCO' MARK *#FILE ALARM
1190 END-IF
1200 * ==================================================================== *
1210 COMPRESS '// PARM1="SYS=' #SYS
1220 ' MT=0 IM=D INTENS=1,OBJIN=N,ESIZE=36,DATSIZE=80",'
1230 INTO #C07 LEAVING NO
1240 * ==================================================================== *
1250 COMPRESS '//CMWKF01 DD DSN=' #BIBLIOTECA2 ',DISP=SHR'
1260 INTO #C09 LEAVING NO
1270 * ==================================================================== *
1280 COMPRESS 'FILE-ID=' #FILE '%'
1290 INTO #C13 LEAVING NO
1300 * ==================================================================== *
1310 COMPRESS 'DBNR=' #DBID '%'
1320 INTO #C14 LEAVING NO
1330 * ==================================================================== *
1340 COMPRESS 'MEM=' #PROGRAMA-NATURAL '%'
1350 INTO #C16 LEAVING NO
1360 * ==================================================================== *
1370 COMPRESS 'LIB=' #BIBLIOTECA1 '%'
1380 INTO #C17 LEAVING NO
1390 * ==================================================================== *
1400 COMPUTE #TOT = 24 * 80
1410 CALL 'RJE' #RC #C01 #TOT
1420 CALL 'GETJOB' #JOBNUM #CALLER
1430 * ==================================================================== *
1440 INPUT NO ERASE 15/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1450 ' Submetido OK.'
1460 //27T'TECLE ENTER PARA VOLTAR'(I)
1470 FETCH 'DBAPMENU'
1480 END-REPEAT
1490 END
70 - NATURAL SCAN UTILITY
------------------------------------------------------------------------------
DB02542 DBA ADABAS MAINFRAME DBAPJ951
18:47:21 ------------------------------------------------------------ 12/05/21
NATURAL SCAN UTILITY
+----------------------------------------------------------------+
| |
| SYS DO BANCO ADABAS ......: ____ |
| |
| NOME BIBLIOTECA NATURAL ..: ________ |
| |
| PALAVA A SER PROCURADA ...: ________________________________ |
| |
+----------------------------------------------------------------+
TECLE PF3 PARA VOLTAR
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
MENU
Programa natural
> > + Program DBAPJ951 Lib ADABAS01
Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
0010 * ------------------------------------------------------------------- *
0020 * FUNCAO: NATURAL SCAN UTILITY *
0030 * PROCURANDO TABELAS EM PROGRAMAS NATURAL *
0040 * AUTOR: CLAUDEMAR MARTINS *
0050 * ------------------------------------------------------------------- *
0060 DEFINE DATA LOCAL
0070 1 #CALLER (A4) INIT <'NAT '>
0080 1 #JOBNUM (A8)
0090 1 REDEFINE #JOBNUM
0100 2 #JOBA (A3)
0110 2 #JOBN (N5)
0120 1 #I (P3)
0130 1 #RC (B4)
0140 1 #TOT (B2)
0150 1 #DBID (N3)
0160 1 #SYS (A4)
0170 1 #FILE (A30)
0180 1 #BIBLIOTECA1 (A08)
0190 1 #SCAN-VALUE (A32)
0200 1 #C01 (A80) INIT
0210 <'//AAFSNATB JOB (XXXX,OSB),XXXXXXX,CLASS=S,MSGCLASS=A,TYPRUN=HOLD'>
0220 1 REDEFINE #C01
0230 2 FILLER 2X
0240 2 #JOBNAME (A8)
0250 2 #FIL1 (A06)
0260 2 #ACC (A04)
0270 2 #FIL2 (A06)
0280 2 #USER (A07)
0290 1 #C02 (A80) INIT <'//*UQ ALLOW'>
0300 1 #C03 (A80) INIT
0310 <'//* -----------------------------------------------------'>
0320 1 #C04 (A80) INIT
0330 <'//* NATURAL SCAN UTILITY - PROCURANDO TABELAS EM PROGRAMAS'>
0340 1 #C05 (A80) INIT
0350 <'//* -----------------------------------------------------'>
0360 1 #C06 (A80) INIT <'//NATURAL EXEC NATURAL,'>
0370 1 #C07 (A80)
0380 1 #C08 (A80)
0390 1 #C09 (A80) INIT <'//CMPRINT DD SYSOUT=G'>
0400 1 #C10 (A80) INIT <'//CMWKF01 DD SYSOUT=G'>
0410 1 #C11 (A80) INIT <'//CMWKF02 DD SYSOUT=G'>
0420 1 #C12 (A80) INIT <'//CMPRT01 DD SYSOUT=G,HOLD=YES'>
0430 1 #C13 (A80) INIT <'//SYSIN DD *'>
0440 1 #C14 (A80)
0450 1 #C15 (A80) INIT <'//SYSIN DD *'>
0460 1 #Y2K (A1) INIT <'N'>
0470 END-DEFINE
0480 * ==================================================================== *
0490 FORMAT KD=ON
0500 SET CONTROL 'U'
0510 SET KEY PF3 NAMED 'MENU'
0520 PF8 NAMED ' ' PF9 NAMED ' '
0530 MOVE *INIT-USER TO #USER
0540 REPEAT
0550 * RESET #ARQ
0560 RESET INITIAL #Y2K
0570 * ==================================================================== *
0580 INPUT (IP=OFF SG=OFF AD=MIL'_')
0590 02T '-' (78)
0600 / 02T *USER
0610 30T 'DBA ADABAS MAINFRAME' (I)
0620 72T *PROGRAM
0630 / 02T *TIME(AL=8)
0640 11T '-' (60)
0650 72T *DATE
0660 / 29T 'NATURAL SCAN UTILITY' (I)
0670 //
0680 06T '+----------------------------------------------------------------+'
0690 /
0700 06T '| |'
0710 /
0720 06T '| SYS DO BANCO ADABAS ......: ' #SYS
0730 ' |'
0740 /
0750 06T '| |'
0760 /
0770 06T '| NOME BIBLIOTECA NATURAL ..: ' #BIBLIOTECA1
0780 ' |'
0790 /
0800 06T '| |'
0810 /
0820 06T '| PALAVA A SER PROCURADA ...: ' #SCAN-VALUE
0830 ' |'
0840 /
0850 06T '| |'
0860 /
0870 06T '+----------------------------------------------------------------+'
0880 //28T'TECLE PF3 PARA VOLTAR'(I)
0890 IF *PF-KEY EQ 'PF3'
0900 FETCH 'DBAPMENU'
0910 END-IF
0920 * ==================================================================== *
0930 IF #SYS = ' '
0940 REINPUT 'DIGITE O SYS DO BANCO' MARK *#SYS ALARM
0950 END-IF
0960 * ==================================================================== *
0970 COMPRESS '// PARM1="MT=0,SYS=' #SYS
0980 ',MADIO=0,IM=D,INTENS=1,MAXCL=0,OBJIN=N",'
0990 INTO #C07 LEAVING NO
1000 * ==================================================================== *
1010 COMPRESS '// PARM2="STACK=(' #BIBLIOTECA1 ')"'
1020 INTO #C08 LEAVING NO
1030 * ==================================================================== *
1040 COMPRESS 'SCAN FUNC=S SVAL=' #SCAN-VALUE
1050 INTO #C14 LEAVING NO
1060 * ==================================================================== *
1070 COMPUTE #TOT = 15 * 80
1080 CALL 'RJE' #RC #C01 #TOT
1090 CALL 'GETJOB' #JOBNUM #CALLER
1100 * ==================================================================== *
1110 INPUT NO ERASE 16/17 'JOB ' #JOBNAME(AD=IO) 'DE N.' #JOBN(AD=IO)
1120 ' Submetido OK.'
1130 //27T'TECLE ENTER PARA VOLTAR'(I)
1140 FETCH 'DBAPMENU'
1150 END-REPEAT
1160 END
0 comentários:
Enviar um comentário