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 « *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... »)
 
(17 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
 +
<languages/>
 
'''Description'''
 
'''Description'''
  
Ligne 8 : Ligne 9 :
 
Use a specific replacement zone in your Designer template.
 
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 the time information in the Mapping zone and change the zone type to 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.
  
  
Ligne 15 : Ligne 16 :
 
*Add a specific replacement zone into the layout (e.g. called DATE)
 
*Add a specific replacement zone into the layout (e.g. called DATE)
 
*Generate the format and import it onto the IBM i
 
*Generate the format and import it onto the IBM i
*Modify the specific replacement CL (see the section below)
+
*Edit the specific replacement CL (see the section below)
 
*Add the MAPRTVNFO command to the spooled file processing (see the section below)
 
*Add the MAPRTVNFO command to the spooled file processing (see the section below)
 
+
<br>
  
 
'''Tips'''
 
'''Tips'''
Ligne 26 : Ligne 27 :
 
*Choose option 3 Manage Members
 
*Choose option 3 Manage Members
 
*Select the QSPECIF file in Opale
 
*Select the QSPECIF file in Opale
*Copy the MAP_SPECIF member under another name (e.g. MAPSPEC_S)
+
*Copy the MAPSPECIF member under another name (e.g. MAPSPEC_S)
 
*Type 2 (Edit) in front of the MAP_SPECIF member
 
*Type 2 (Edit) in front of the MAP_SPECIF member
 
*Declare the working variables as follows: DCL      VAR(&DATE  ) TYPE(*CHAR) LEN(10)
 
*Declare the working variables as follows: DCL      VAR(&DATE  ) TYPE(*CHAR) LEN(10)
Ligne 41 : Ligne 42 :
 
*Caution: '''DATE''' in bold corresponds to the Mapping zone name
 
*Caution: '''DATE''' in bold corresponds to the Mapping zone name
 
*Save, exit and recompile the MAP_SPECIF member
 
*Save, exit and recompile the MAP_SPECIF member
 +
<br>
  
 
Adding the MAPRTVNFO command to the spooled file processing
 
Adding the MAPRTVNFO command to the spooled file processing
Ligne 57 : 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 79 : 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