quarta-feira, maio 20, 2020

ISNREUSE de (ON) para (NO)

Quando um registro de um file Adabas é deletado, o ISN que era usavado desse registro tem duas alternativas, (1) ele pode ser reutilizado quando for inserido um novo registro ou (2) ele nunca mais vai ser usado, sempre vai ser liberado um novo ISN de forma crescente - o parametro no file que controla essa opção é o ISNREUSE - o problema todo de usar o ISN REUSE (ON - reutilizar o ISN) é que na hora que o analista vai de listar em ordem de ISN, por exemplo um ISN inserido pode utilizar um número de ISN antigo, na hora que for listar na tela (se estiver definido para colocar na ordem de ISN) vai ocorrer do registro mais novo não aparecer com os ISN novos, para desabilitar a reutilização de ISN do file temos que mudar a opção do ISNREUSE de YES para NO (é bem simples);

Passo a Passo

Para fazer essa alteração via FILE ninguem pode estar acessando o file (nem inserindo e nem acessando o file) - no file em questão tem 25 usuários acessando - O analista mandou fazer depois das 22 horas - esse horario ninguem mais vai estar acessando
 STC00291  F ADADB001,DFILES=220                                                
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 File= 00220,ACC=025                
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by BROKER22(000DDD99)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by BROKER22(000E07AD)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by BROKER01(000BD5FF)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by BROKER02(00087011)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by BROKER02(00087511)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000E9A00)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EB808)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBC98)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC351)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000E98F7)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBD4E) 
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC1EF)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBDB9)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000E9BA1)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC1F5)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBB23)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBDE0)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EBD11)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC0D4)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EB68D)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC042)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC2AE)         
 STC03169  +ADAN31 00001 2020-05-20 14:11:50 used by COMPLETP(000EC045)         
 STC03169  +ADAN41 00001 2020-05-20 14:11:50 Function completed 

Para alterar o ISNREUSE de ON (reutilizar os ISN liberados) para OFF (não reutilizar os ISN liberados) tem um jcl simples para fazer isso;
 MEMBER=ADADBS13 000012 REC SAVE:18.05.2020 22:05 BY   USERID DBAMASTER  R=00000001
DSN=AAB.DIBD.JCLS                                LIB=S3 VOL=PRL303 UNIT=1526    
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
//AAFSNATB JOB (AAFP,DIBD),CLAU,CLASS=S,MSGCLASS=A TYPRUN=HOLD                  
//*UQ ALLOW                                                                     
//* ----------------------------------------------------------                  
//*      NAO UTILIZAR ISN LIBERADO NO FILE - ISNREUSE NO                        
//* ----------------------------------------------------------                  
//ADADBS   EXEC AAFAU001                                                        
//DDCARD   DD *                                                                 
ADARUN PROG=ADADBS,DBID=001                                                     
//DDPRINT  DD  SYSOUT=A                                                         
//DDKARTE  DD *                                                                 
ADADBS ISNREUSE FILE=220,MODE=OFF                                               
/*

Antes de rodar estava assim (ISN Reusage = YES)
  22:17:19          ***** A D A B A S  BASIC  SERVICES *****       2020-05-20   
  DBID 001                    - Display File Layout -                 PDRF012   
   ****************                                                             
   *  File 220    *   AE-FISICO-220                                           
   ****************                                                             
                                                                                
   Records loaded ....>               Date loaded .......... 1999-04-19 15:29:50
   TOP ISN ............ 1366143       Date of last update .. 2020-05-20 01:55:16
   Max ISN expected ... 2501245       Max Compr Rec Lngth .. 10792              
   Minimum ISN ........ 1             Asso/Data Padding .... 10%/10%            
   Size of ISN ........ 3 Bytes       Highest Index Level .. 3                  
   Number of Updates .. 2600428       Index Compression .... YES                
   ISN Reusage ........ YES           USERISN .............. NO                 
   Space Reusage ...... YES           MIXDSDEV ............. NO                 
   ADAM File .......... NO            PGMREFRESH ........... NO                 
   Ciphered File ...... NO            NOACEXTENSION ........ NO                 
   Coupled Files ...... NONE                                                    
   Blk per DS Extent .. 0                                                       
   Blk per UI Extent .. 0                                                       
   Blk per NI Extent .. 0             Length of Owner ID ... 0                  
                                                                                
  PF1----- PF2------ PF3------ PF4------ PF6----- PF7----- PF8----- PF12-----   
  Help               Exit      Refresh                              Menu        

Depois de rodar ficou assim (ISN Reusage = NO)
  22:35:28          ***** A D A B A S  BASIC  SERVICES *****       2020-05-20   
  DBID 001                    - Display File Layout -                 PDRF012   
   ****************                                                             
   *  File 220    *   AE-FISICO-220                                           
   ****************                                                             
                                                                                
   Records loaded ....>               Date loaded .......... 1999-04-19 15:29:50
   TOP ISN ............ 1366143       Date of last update .. 2020-05-20 01:55:16
   Max ISN expected ... 2501245       Max Compr Rec Lngth .. 10792              
   Minimum ISN ........ 1             Asso/Data Padding .... 10%/10%            
   Size of ISN ........ 3 Bytes       Highest Index Level .. 3                  
   Number of Updates .. 2600428       Index Compression .... YES                
   ISN Reusage ........ NO            USERISN .............. NO                 
   Space Reusage ...... YES           MIXDSDEV ............. NO                 
   ADAM File .......... NO            PGMREFRESH ........... NO                 
   Ciphered File ...... NO            NOACEXTENSION ........ NO                 
   Coupled Files ...... NONE                                                    
   Blk per DS Extent .. 0                                                       
   Blk per UI Extent .. 0                                                       
   Blk per NI Extent .. 0             Length of Owner ID ... 0                  
                                                                                
  PF1----- PF2------ PF3------ PF4------ PF6----- PF7----- PF8----- PF12-----   
  Help               Exit      Refresh                              Menu        

0 comentários:

Enviar um comentário