OPALE - 10.0 - Utilisation - Récupérer en critère d'archivage la date du spool d'origine/en

Différence entre versions

De MappingDoc
(Page créée avec « OPALE:10.0:Usage: Retrieving the date of an original spooled file as archiving criterion »)
 
 
(30 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
 +
<languages/>
 
'''Description'''
 
'''Description'''
  
Pour archiver des spools en récupérant en critère d'archivage la date de création du spool d'origine et non pas uniquement celle d'archivage.
+
Use this to archive spooled files by retrieving the date on which the spooled file was originally created and use it as an archiving criterion (not only the archiving date).
  
  
'''Principe'''
+
'''General Principle'''
  
Dans Designer, utiliser dans la maquette, une zone de type remplacement spécifique.
+
Use a specific replacement zone in your Designer template.
  
Coté AS/400, utiliser la commande '''MAPRTVNFO''' qui permet de récupérer les informations Date et Heure d'un spool. Vous modifierez le CL de remplacement spécifique, pour récupérer ces informations temporelles dans la zone du Mapping et changerez le type de la zone en type Archive.
+
Use the '''MAPRTVNFO''' command on the IBM i to retrieve the Date and Time information of a spooled file. Edit the specific replacement CL to retrieve time information in the Mapping zone and change the zone type to Archive.
  
  
'''Procédure'''
+
'''Procedure'''
  
*Ajouter dans la maquette une zone de type remplacement spécifique (nommée par exemple DATE).
+
*Add a specific replacement zone into the layout (e.g. called DATE)
*Générer le mapping et l'importer sur l'AS/400
+
*Generate the format and import it onto the IBM i
*Modifier le CL de remplacement spécifique Comment ?
+
*Edit the specific replacement CL (see the section below)
*Ajouter la commande MAPRTVNFO dans le traitement du spool Comment ?
+
*Add the MAPRTVNFO command to the spooled file processing (see the section below)
 +
<br>
  
 +
'''Tips'''
  
'''Conseils'''
+
Editing the specific replacement CL:
  
Modifier le CL de remplacement spécifique:
+
*In a command prompt type STRPDM
 
+
*Choose option 3 Manage Members
Sur une ligne de commande taper STRPDM
+
*Select the QSPECIF file in Opale
Choisissez l'option 3 Gestion des Membres
+
*Copy the MAPSPECIF member under another name (e.g. MAPSPEC_S)
Sélectionnez le fichier QSPECIF de MAP400
+
*Type 2 (Edit) in front of the MAP_SPECIF member
Copier le membre MAPSPECIF sous un autre nom (ex MAPSPEC_S)
+
*Declare the working variables as follows: DCL      VAR(&DATE  ) TYPE(*CHAR) LEN(10)
Taper 2 (Editer) devant le membre MAP_SPECIF
+
*Add the following to the program body (be careful where you are adding it):  
Déclarer les variables de travail comme suit :
 
    DCL      VAR(&DATE  ) TYPE(*CHAR) LEN(10)
 
Ajouter dans le corps du programme (attention à l'endroit où vous l'ajouter) :  
 
  
 
       IF        COND(%SST(&ZONNAM 1 4) *EQ 'DATE') THEN(DO)
 
       IF        COND(%SST(&ZONNAM 1 4) *EQ 'DATE') THEN(DO)
Ligne 40 : Ligne 40 :
  
  
*Attention : '''DATE''' signalé en gras correspond au nom de la zone Mapping
+
*Caution: '''DATE''' in bold corresponds to the Mapping zone name
*Sauvegarder, quitter et re-compiler le membre MAP_SPECIF
+
*Save, exit and recompile the MAP_SPECIF member
 +
<br>
  
Ajouter la commande MAPRTVNFO dans le traitement du spool
+
Adding the MAPRTVNFO command to the spooled file processing
  
Modification d'une action du robot :
+
To edit a robot action:
  
*Choisir l'option 14 du menu Mapping de l'AS/400 : Menu d'exploitation
+
*Choose option 14 of the IBM i Mapping menu: Operations Menu
*Choisir l'option 2 Gérer les Actions et lignes de commande / Action
+
*Choose option 2 Managing actions and command lines / Action
*Taper F6 Création d'une nouvelle action et nommer la nouvelle action (ex: DATEMAP)
+
*Type F6 Creating a new action and give it a name (e.g. DATEMAP)
*5 (Lignes de commande) devant la nouvelle action
+
*5 (Command Lines) in front of the new action
*Taper F6 Création puis MAPRTVNFO et F4
+
*Type F6 Create then MAPRTVNFO and press F4
*Remplir les paramètres comme suit :
+
*Fill in the parameters as follows:
  
  
Ligne 58 : Ligne 59 :
  
  
*Valider puis créer une nouvelle ligne de commande : F6
+
*Confirm then create a new command line with F6
*Remetter ici la même ligne de commande qui vous permettez de remapper le spool : MAPCPYSPLF...
+
*Type the command you used to re-map the spooled file: MAPCPYSPLF...
  
  
Remarque :  
+
Note:  
  
Pour récupérer l'heure du spool, procéder de la même manière, avec une autre zone de type remplacement spécifique (ex : TIME) et une modification du CL MAP_SPECIF de la manière suivante :
+
To retrieve the spooled file time, repeat the same steps with another specific replacement zone (e.g. TIME) and change the MAP_SPECIF CL like so:
  
  
'''Déclaration des variables :'''  
+
'''Declaring variables:'''  
  
DCL        VAR(&HEURE ) TYPE(*CHAR) LEN(6)
+
DCL        VAR(&TIME ) TYPE(*CHAR) LEN(6)
  
 
DCL        VAR(&HH    ) TYPE(*CHAR) LEN(2)
 
DCL        VAR(&HH    ) TYPE(*CHAR) LEN(2)
Ligne 80 : Ligne 81 :
  
  
''' Partie de programme à ajouter'''
+
'''Code bits to be added:'''
 +
 
 +
        IF        COND(%SST(&ZONNAM 1 4) *EQ 'TIME') THEN(DO)
 +
 
 +
RTVDTAARA DTAARA(QTEMP/TIME (1 6)) RTNVAR(&TIME)
 +
 
 +
CHGVAR &HH (%SST(&TIME 1 2))                         
 +
 
 +
CHGVAR &MM (%SST(&TIME 3 2))                         
 +
 
 +
CHGVAR &SS (%SST(&TIME 5 2))                         
 +
 
 +
CHGVAR    VAR(&STRVAL) VALUE(&HH *CAT &SEP *CAT &MM +
 +
 
 +
            *CAT &SEP *CAT &SS)                     
 +
 
 +
CHGVAR    VAR(%BIN(&STRLEN)) VALUE(8)               
 +
 
 +
GOTO END                                             
  
        IF        COND(%SST(&ZONNAM 1 4) *EQ 'TIME') THEN(DO)
+
ENDDO
        RTVDTAARA DTAARA(QTEMP/TIME (1 6)) RTNVAR(&HEURE)
 
        CHGVAR &HH (%SST(&HEURE 1 2))                         
 
        CHGVAR &MM (%SST(&HEURE 3 2))                         
 
        CHGVAR &SS (%SST(&HEURE 5 2))                         
 
        CHGVAR    VAR(&STRVAL) VALUE(&HH *CAT &SEP *CAT &MM +
 
          *CAT &SEP *CAT &SS)                     
 
        CHGVAR    VAR(%BIN(&STRLEN)) VALUE(8)               
 
        GOTO FIN                                             
 
        ENDDO
 

Version actuelle datée du 6 juin 2019 à 09:46

Autres langues :
English • ‎français

Description

Use this to archive spooled files by retrieving the date on which the spooled file was originally created and use it as an archiving criterion (not only the archiving date).


General Principle

Use a specific replacement zone in your Designer template.

Use the MAPRTVNFO command on the IBM i to retrieve the Date and Time information of a spooled file. Edit the specific replacement CL to retrieve time information in the Mapping zone and change the zone type to Archive.


Procedure

  • Add a specific replacement zone into the layout (e.g. called DATE)
  • Generate the format and import it onto the IBM i
  • Edit the specific replacement CL (see the section below)
  • Add the MAPRTVNFO command to the spooled file processing (see the section below)


Tips

Editing the specific replacement CL:

  • In a command prompt type STRPDM
  • Choose option 3 Manage Members
  • Select the QSPECIF file in Opale
  • Copy the MAPSPECIF member under another name (e.g. MAPSPEC_S)
  • Type 2 (Edit) in front of the MAP_SPECIF member
  • Declare the working variables as follows: DCL VAR(&DATE ) TYPE(*CHAR) LEN(10)
  • Add the following to the program body (be careful where you are adding it):
     IF         COND(%SST(&ZONNAM 1 4) *EQ 'DATE') THEN(DO)
     RTVDTAARA DTAARA(QTEMP/DATE (1 10)) RTNVAR(&DATE)
     CHGVAR     VAR(&STRVAL) VALUE(&DATE)             
     CHGVAR     VAR(%BIN(&STRLEN)) VALUE(9)            
     GOTO FIN                                          
     ENDDO


  • Caution: DATE in bold corresponds to the Mapping zone name
  • Save, exit and recompile the MAP_SPECIF member


Adding the MAPRTVNFO command to the spooled file processing

To edit a robot action:

  • Choose option 14 of the IBM i Mapping menu: Operations Menu
  • Choose option 2 Managing actions and command lines / Action
  • Type F6 Creating a new action and give it a name (e.g. DATEMAP)
  • 5 (Command Lines) in front of the new action
  • Type F6 Create then MAPRTVNFO and press F4
  • Fill in the parameters as follows:



  • Confirm then create a new command line with F6
  • Type the command you used to re-map the spooled file: MAPCPYSPLF...


Note:

To retrieve the spooled file time, repeat the same steps with another specific replacement zone (e.g. TIME) and change the MAP_SPECIF CL like so:


Declaring variables:

DCL VAR(&TIME ) TYPE(*CHAR) LEN(6)

DCL VAR(&HH ) TYPE(*CHAR) LEN(2)

DCL VAR(&MM ) TYPE(*CHAR) LEN(2)

DCL VAR(&SS ) TYPE(*CHAR) LEN(2)

DCL VAR(&SEP ) TYPE(*CHAR) LEN(1)


Code bits to be added:

       IF         COND(%SST(&ZONNAM 1 4) *EQ 'TIME') THEN(DO)

RTVDTAARA DTAARA(QTEMP/TIME (1 6)) RTNVAR(&TIME)

CHGVAR &HH (%SST(&TIME 1 2))

CHGVAR &MM (%SST(&TIME 3 2))

CHGVAR &SS (%SST(&TIME 5 2))

CHGVAR VAR(&STRVAL) VALUE(&HH *CAT &SEP *CAT &MM +

            *CAT &SEP *CAT &SS)                       

CHGVAR VAR(%BIN(&STRLEN)) VALUE(8)

GOTO END

ENDDO