RPGDS


SDS et INFDS en Free RPG (voir ici en format fixe)





|
      *
      *           DATA STRUCTURES PARTICULIERES EN RPG   
      *
      *
      *
      *          SDS : Data structure d'informations programme 
      *
      *
      *        INFDS : Data structures d'informations fichiers 
      *
      *
       //**********************      
       //*    PSDS (ex SDS)   *      
       //**********************
       dcl-ds *N PSDS;
         nom_du_pgm CHAR(10) POS(1);
         status_code ZONED(5:0) POS(11);
         status_prv  ZONED(5:0) POS(16);
         numero_ligne ZONED(8:0) POS(21);
         routine CHAR(8) POS(29);
         nb_de_parm ZONED(3:0) POS(37);
         mch_ou_cpf CHAR(3) POS(40);
      errorcode CHAR(4) POS(43);       ligneMI   CHAR(4) POS(47);       message CHAR(30)  POS(51);       bibli_du_pgm CHAR(10) POS(81);       dernier_fich CHAR(10)  POS(201);       infos_fichier CHAR(35) POS(209);       JOB CHAR(10)  POS(244);       init_user  CHAR(10) POS(254);       jobnbr   CHAR(6)    POS(264);       dateentree CHAR(6) POS(270);        dateexec   CHAR(6) POS(276);        heureexec  CHAR(6) POS(282);       date_crt   CHAR(6) POS(288);       heure_crt  CHAR(6) POS(294);       compilateur CHAR(4) POS(300);        fichier_src CHAR(10) POS(304);       bib_src  CHAR(10)   POS(314);       mbr_src  CHAR(10)    POS(324);     current_user CHAR(10)POS(358); nb_element_xml_into INT(10) POS(372); // 7.3 Internal_job_ID CHAR(16) POS(380); // 7.4 ou PTF system_name CHAR(8) PSO(396); // 7.4 ou PTF end-ds;

|
      
       //**********************
       //     INFDS           *
       //**********************
       dcl-f fichier disk keyed infds(fichierDs);

dcl-ds fichierDS;
      //        // INFOS FICHIER         //       nomfichier CHAR(8)   POS(1);       fichier_open IND     POS(9); // *on = 'Oui'     fichier_eof  IND    POS(10); // *on = 'Oui'       fichier_status ZONED(5:0) POS(11); // comme %status       code_operation CHAR(6)    POS(16);         routine  CHAR(8)  POS(22);         numero_sequence  CHAR(8)  POS(30);       format CHAR(8)      POS(38);       erreur CHAR(7)            POS(46);

|
         //   OPEN FEEDBACK AREA 
         type_odp CHAR(2)   POS(81); // DS = Device, DB = Database, SP = SPool
         fichier_ouvert  CHAR(10)  POS(83); // fichier réellement ouvert (EXTFILE ou OVRDBF)
         bibliotheque    CHAR(10)  POS(93);
SplNbr ZONED(5:0) POS(123);       lg_maxi INT(10)   POS(125);       Membre CHAR(10)    POS(129);       nb_de_lignes INT(5)POS(152);       nb_de_colonne INT(5) POS(154)       nb_enregs INT(10)   POS(156); // nb de lignes lors de l'Open       type_acces CHAR(2)   POS(160); // KU=Keyed Unique, KF=Keyed Fifo, KL=Keyed Lifo, AR=Arrival       cle_dupliquee CHAR(1) POS(162); // U (unique), D (dup)        source  CHAR(1)    POS(163); // Y = Oui       overflow   INT(5)    POS(188);

|
        //  I-O FEEDBACK AREA  (partie commune) 
         nb_write  INT(10) POS(243);
         nb_read   INT(10) POS(247);
         nb_exfmt  INT(10) POS(251);
         autreio   INT(10) POS(255);
         dernier_format  CHAR(10) POS(261);
         classe_unite    CHAR(2)  POS(271);
         nom_unite       CHAR(10) POS(273);
         lg_dernier      INT(10)  POS(283);
 
        // I-O FEEDBACK AREA  (DSPF) 
         touche CHAR(1)  POS(369);
         // X'31'-X'3C' = F1 à F12,
         // X'B1'-X'BC' = F13 à F24
         // X'BD'       = CLEAR            X'F1'       = Entrée
         // X'F4'/X'F5' = Rolldown/Rollup  X'F3'       = Aide
         // X'F6'       = Print            x'F8'       = Home (pos 1)
         // x'70'-x'7F' = EVENT-ID donné par le mot-clé MOUBTN(*xxx E00-E15)
         ligne    INT(3) POS(370); // curseur : ligne
         colonne  INT(3) POS(371); // curseur : colonne  
         rang_sfl INT(5) POS(376);
         premier_rang_affiche INT(5) POS(378); // placé dans SFLRCNBR on réaffiche même page !
         nbrcd_sfl INT(5) POS(380);
         wlico     INT(5) POS(382). // position curseur, mais dans la fenêtre active

        // I-O FEEDBACK AREA  (PRTF) 
         ligne_en_cours  INT(5)  POS(367);
         page_en_cours   INT(5)  POS(369);
 
       // I-O FEEDBACK AREA  (DataBase)          lg_totale INT(10)  POS(367);         jdftval   CHAR(4)  POS(370); //chaque bit représente un fichier  0=Sans JDFTVAL, 1=Avec         offset_to_null  INT(5)  POS(375);         nbrcd_lock      INT(5)  POS(377);         nbr_de_cles     INT(5)  POS(387);         lg_cle          INT(5)  POS(393);         numero_membre   INT(5)  POS(395);         recno           INT(5)  POS(397);         valeur_cles     CHAR(???)   POS(400);         cles_nulles     CHAR(???)   POS(suivant offset_to_null); end-ds;    //================================================================




©AF400