星期三, 11月 08, 2023

2008-03-29 如何取得 Journal 的屬性?(Command RTVJRNA with API QjoRetrieveJournalInformation)


如何取得 Journal 的屬性?(Command RTVJRNA with API QjoRetrieveJournalInformation)


File   : QCLSRC
Member : RTVJRNA
Type   : CLLE
Usage  : CRTBNDCL PGM(RTVJRNA)


/*  ===============================================================  */
/*  = Command RtvJrnA    CPP                                      =  */
/*  =   RtvJrnA    CLLE                                           =  */
/*  ===============================================================  */
/*  = Date  : 2008/03/14                                          =  */
/*  = Author: Vengoal Chang                                       =  */
/*  ===============================================================  */

PGM PARM(&QUALJRN &RTNLIB &ASP &MSGQ &MSGQLIB &MNGRCV &DLTRCV +
         &MNGRCVDLY &DLTRCVDLY &JRNTYP &JRNSTS &JRNDLVMODE +
         &RCVSIZMFIX                      +
         &RCVSIZRMVI                      +
         &RCVSIZOPT1                      +
         &RCVSIZOPT2                      +
         &RCVSIZOPT3                      +
         &NBRRCV                          +
         &ATCJRNRCV                       +
         &ATCJRNRCVL                      +
         &JRNCACHE                        +
         &RMTJRNTYP                       +
         &JRNOBJ                          +
         &JRNOBJLMT                       +
         &MINJRNENTD                      +
         &MINJRNENTF                      +
         &JRNRCVCNT                       +
         &TEXT                            )

     DCL VAR(&QUALJRN) TYPE(*CHAR) LEN(20)
     DCL VAR(&JRNNAME) TYPE(*CHAR) LEN(10)
     DCL VAR(&JRNLIB) TYPE(*CHAR) LEN(10)
     DCL VAR(&RTNLIB) TYPE(*CHAR) LEN(10)      /* STR  LEN*/
     DCL VAR(&ASP   ) TYPE(*DEC ) LEN(3 0)     /*  33    4*/
     DCL VAR(&MSGQ  ) TYPE(*CHAR) LEN(10)      /*  37   10*/
     DCL VAR(&MSGQLIB) TYPE(*CHAR) LEN(10)     /*  47   10*/
     DCL VAR(&MNGRCV ) TYPE(*CHAR) LEN(10)     /*  57    1*/
     DCL VAR(&DLTRCV ) TYPE(*CHAR) LEN( 4)     /*  58    1*/
     DCL VAR(&MNGRCVDLY) TYPE(*DEC) LEN(7 0)   /* 257    4*/
     DCL VAR(&DLTRCVDLY) TYPE(*DEC) LEN(7 0)   /* 261    4*/
     DCL VAR(&JRNTYP   ) TYPE(*CHAR) LEN(10)   /*  66    1*/
     DCL VAR(&JRNSTS   ) TYPE(*CHAR) LEN(10)   /*  68    1*/
     DCL VAR(&JRNDLVMODE) TYPE(*CHAR) LEN(10)  /*  69    1*/
     DCL VAR(&RCVSIZMFIX) TYPE(*CHAR) LEN( 4)  /*  60    1*/
     DCL VAR(&RCVSIZRMVI) TYPE(*CHAR) LEN( 4)  /*  59    1*/
     DCL VAR(&RCVSIZOPT1) TYPE(*CHAR) LEN( 4)  /*  61    1*/
     DCL VAR(&RCVSIZOPT2) TYPE(*CHAR) LEN( 4)  /*  62    1*/
     DCL VAR(&RCVSIZOPT3) TYPE(*CHAR) LEN( 4)  /*  63    1*/
     DCL VAR(&NBRRCV    ) TYPE(*DEC ) LEN(5 0) /* 197    4*/
     DCL VAR(&ATCJRNRCV ) TYPE(*CHAR) LEN(10)  /* 201   10*/
     DCL VAR(&ATCJRNRCVL) TYPE(*CHAR) LEN(10)  /* 211   10*/
     DCL VAR(&JRNCACHE  ) TYPE(*CHAR) LEN( 4)  /* 196    1*/
     DCL VAR(&RMTJRNTYP ) TYPE(*CHAR) LEN(10)  /*  67    1*/
     DCL VAR(&JRNOBJ    ) TYPE(*DEC ) LEN(15 0)/* 309    4*/
     DCL VAR(&JRNOBJLMT ) TYPE(*CHAR) LEN(1)   /* 308    1*/
     DCL VAR(&MINJRNENTD) TYPE(*CHAR) LEN(1)   /* 186    1*/
     DCL VAR(&MINJRNENTF) TYPE(*CHAR) LEN(1)   /* 187    1*/
     DCL VAR(&JRNRCVCNT ) TYPE(*DEC ) LEN(11 0)/* 341    4*/
     DCL VAR(&TEXT      ) TYPE(*CHAR) LEN(50)  /* 136   50*/

     DCL        VAR(&WORK) TYPE(*CHAR) LEN(4)
     DCL VAR(&RCVRNAME) TYPE(*CHAR) LEN(10)
     DCL VAR(&RCVRLIB) TYPE(*CHAR) LEN(10)

     DCL VAR(&RCV) TYPE(*CHAR) LEN(512)
     DCL VAR(&RCVLEN) TYPE(*CHAR) LEN(4)
     DCL VAR(&JRNRCV) TYPE(*CHAR) LEN(20)
     DCL VAR(&SEQNBR) TYPE(*CHAR) LEN(20)
     DCL VAR(&RCVRINFO) TYPE(*CHAR) LEN(20)

     DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)
     DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(256)
     DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10)
     DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)
     DCL        VAR(&MSGTXT) TYPE(*CHAR) LEN(256)

     MONMSG     MSGID(CPF0000 MCH0000) EXEC(GOTO CMDLBL(ERROR))

     CHGVAR     VAR(&JRNNAME) VALUE(%SST(&QUALJRN  1 10))
     CHGVAR     VAR(&JRNLIB) VALUE(%SST(&QUALJRN 11 10))
     CHKOBJ     OBJ(&JRNLIB/&JRNNAME) OBJTYPE(*JRN)

     IF (&JRNLIB *EQ '*LIBL') Do
             RTVOBJD    OBJ(&JRNLIB/&JRNNAME) OBJTYPE(*JRN) +
                          RTNLIB(&RTNLIB)
             MONMSG     MCH3601
     EndDo
     Else Do
             CHGVAR     VAR(&RTNLIB) VALUE(&JRNLIB)
             MONMSG     MCH3601
     EndDo

     CHGVAR   VAR( %bin(&RCVLEN ))  VALUE(512)
     CHGVAR   %SST(&RCVRINFO 1 10) &JRNNAME
     CHGVAR   %SST(&RCVRINFO 11 10) &JRNLIB

     CALLPRC PRC('QjoRetrieveJournalInformation') +
          PARM((&RCV) (&RCVLEN) (&RCVRINFO) +
          ('RJRN0100') (X'00000000') +
          (*OMIT))
/* ASP */
     CHGVAR VAR(&JRNRCV) VALUE(%SST(&RCV 201 20))
     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 33 4))
     CHGVAR     VAR(&ASP) VALUE(%BIN(&WORK))
     MONMSG     MCH3601

     CHGVAR VAR(&MSGQ    ) VALUE(%SST(&RCV 37  10))
     MONMSG     MCH3601
     CHGVAR VAR(&MSGQLIB) VALUE(%SST(&RCV  47 10))
     MONMSG     MCH3601
     CHGVAR VAR(&ATCJRNRCV)  VALUE(%SST(&RCV 201 10))
     MONMSG     MCH3601
     CHGVAR VAR(&ATCJRNRCVL) VALUE(%SST(&RCV 211 10))
     MONMSG     MCH3601
     CHGVAR VAR(&ATCJRNRCVL) VALUE(%SST(&RCV 211 10))
     MONMSG     MCH3601
     CHGVAR VAR(&JRNOBJLMT ) VALUE(%SST(&RCV 308  1))
     MONMSG     MCH3601
     CHGVAR VAR(&MINJRNENTD) VALUE(%SST(&RCV 186  1))
     MONMSG     MCH3601
     CHGVAR VAR(&MINJRNENTF) VALUE(%SST(&RCV 187  1))
     MONMSG     MCH3601

/* MNGRCV ' '   remote journal */
/*        '0'   user manage    */
/*        '1'   system manage  */
     If (%SST(&RCV 57  1 ) *EQ '1')  Do
       CHGVAR VAR(&MNGRCV  ) VALUE('*SYSTEM')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 57  1 ) *EQ '0')  Do
       CHGVAR VAR(&MNGRCV  ) VALUE('*USER')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 57  1 ) *EQ ' ')  Do
       CHGVAR VAR(&MNGRCV  ) VALUE(' ')
       MONMSG     MCH3601
     EndDo

     If (%SST(&RCV 58  1 ) *EQ '1')  Do
       CHGVAR VAR(&DLTRCV ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&DLTRCV ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo

     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 257 4))
     CHGVAR     VAR(&MNGRCVDLY) VALUE(%BIN(&WORK))
     MONMSG     MCH3601

     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 261 4))
     CHGVAR     VAR(&DLTRCVDLY) VALUE(%BIN(&WORK))
     MONMSG     MCH3601

/* Journal type          */
     If (%SST(&RCV 66  1 ) *EQ '1')  Do
       CHGVAR VAR(&JRNTYP ) VALUE('*REMOTE')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&JRNTYP ) VALUE('*LOCAL')
       MONMSG     MCH3601
     EndDo

/* Journal state         */
     If (%SST(&RCV 68  1 ) *EQ '0')  Do
       CHGVAR VAR(&JRNSTS ) VALUE('*INACTIVE')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 68  1 ) *EQ '1')  Do
       CHGVAR VAR(&JRNSTS ) VALUE('*ACTIVE')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 68  1 ) *EQ '2')  Do
       CHGVAR VAR(&JRNSTS ) VALUE('*FAILED')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 68  1 ) *EQ '4')  Do
       CHGVAR VAR(&JRNSTS ) VALUE('*INACTPEND')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 68  1 ) *EQ '5')  Do
       CHGVAR VAR(&JRNSTS ) VALUE('*STANDBY')
       MONMSG     MCH3601
     EndDo

/* Journal delivery mode */
     If (%SST(&RCV 69  1 ) *EQ '0')  Do
       CHGVAR VAR(&JRNDLVMODE) VALUE('*NA'   )
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 69  1 ) *EQ '1')  Do
       CHGVAR VAR(&JRNDLVMODE) VALUE('*ASYNC')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 69  1 ) *EQ '2')  Do
       CHGVAR VAR(&JRNDLVMODE) VALUE('*SYNC')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 69  1 ) *EQ '3')  Do
       CHGVAR VAR(&JRNDLVMODE) VALUE('*ASYNCPEND')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 69  1 ) *EQ '4')  Do
       CHGVAR VAR(&JRNDLVMODE) VALUE('*SYNCPEND')
       MONMSG     MCH3601
     EndDo

/* Receiver size option *RMVINTENT */
     If (%SST(&RCV 59  1 ) *EQ '1')  Do
       CHGVAR VAR(&RCVSIZRMVI ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&RCVSIZRMVI ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo

/* Receiver size option *MINFIXLEN */
     If (%SST(&RCV 60  1 ) *EQ '1')  Do
       CHGVAR VAR(&RCVSIZMFIX ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&RCVSIZMFIX ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo
/* Receiver size option *MAXOPT1   */
     If (%SST(&RCV 61  1 ) *EQ '1')  Do
       CHGVAR VAR(&RCVSIZOPT1 ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&RCVSIZOPT1 ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo
/* Receiver size option *MAXOPT2   */
     If (%SST(&RCV 62  1 ) *EQ '1')  Do
       CHGVAR VAR(&RCVSIZOPT2 ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&RCVSIZOPT2 ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo
/* Receiver size option *MAXOPT3   */
     If (%SST(&RCV 63  1 ) *EQ '1')  Do
       CHGVAR VAR(&RCVSIZOPT3 ) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     Else Do
       CHGVAR VAR(&RCVSIZOPT3 ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo

/* Number of receiver  */
     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 197 4))
     CHGVAR     VAR(&NBRRCV   ) VALUE(%BIN(&WORK))
     MONMSG     MCH3601

/* Journal cache       */
/*        ' '   remote journal */
/*        '0'   no cache       */
/*        '1'   cache          */
     If (%SST(&RCV 196 1 ) *EQ ' ')  Do
       CHGVAR VAR(&JRNCACHE) VALUE('*NA' )
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 196 1 ) *EQ '1')  Do
       CHGVAR VAR(&JRNCACHE) VALUE('*YES')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 196 1 ) *EQ '0')  Do
       CHGVAR VAR(&JRNCACHE ) VALUE('*NO')
       MONMSG     MCH3601
     EndDo

/* Remote journal type */
     If (%SST(&RCV 67 1 ) *EQ '0')  Do
       CHGVAR VAR(&RMTJRNTYP) VALUE('*LOCAL')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 67 1 ) *EQ '1')  Do
       CHGVAR VAR(&RMTJRNTYP) VALUE('*TYPE1')
       MONMSG     MCH3601
     EndDo
     If (%SST(&RCV 67 1 ) *EQ '2')  Do
       CHGVAR VAR(&RMTJRNTYP) VALUE('*TYPE2')
       MONMSG     MCH3601
     EndDo

/* Number of object journaled */
     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 309 4))
     CHGVAR     VAR(&JRNOBJ   ) VALUE(%BIN(&WORK))
     MONMSG     MCH3601
/* Journal recovery count from V5R4   */
     CHGVAR     VAR(&WORK) VALUE(%SST(&RCV 341 4))
     CHGVAR     VAR(&JRNRCVCNT) VALUE(%BIN(&WORK))
     MONMSG     MCH3601

     Return

/*  ===============================================================  */
/*  = Error routine                                               =  */
/*  ===============================================================  */

Error:

  RcvMsg     MsgType( *Excp )                                         +
             MsgDta( &MsgDta )                                        +
             MsgID( &MsgID )                                          +
             MsgF( &MsgF )                                            +
             MsgFLib( &MsgFLib )
  MonMsg     ( CPF0000 MCH0000 )

SndMsg:

  SndPgmMsg  MsgID( &MsgID )                                          +
             MsgF( &MsgFLib/&MsgF )                                   +
             MsgDta( &MsgDta )                                        +
             MsgType( *Escape )
  MonMsg     ( CPF0000 MCH0000 )

/*  ===============================================================  */
/*  = End of program                                              =  */
/*  ===============================================================  */

ENDPGM


File   : QCMDSRC
Member : RTVJRNA
Type   : CMD
Usage  : CRTCMD CMD(your-lib/RTVJRNA) PGM(your-lib/RTVJRNA) ALLOW(*IPGM *BPGM) 

/*  ===============================================================  */
/*  = Command....... RtvJrnA                                      =  */
/*  = CPP........... RtvJrnA    CLLE                              =  */
/*  = Description... Retrieve journal attributes                  =  */
/*  =                                                             =  */
/*  = CrtCmd      Cmd( RtvJrnA    )                               =  */
/*  =             Pgm( RtvJrnA    )                               =  */
/*  =             Pgm( RtvJrnA    )                               =  */
/*  =             SrcFile( YourSourceFile )                       =  */
/*  =             Allow(*Ipgm *Bpgm)                              =  */
/*  ===============================================================  */
/*  = Date  : 2008/03/14                                          =  */
/*  = Author: Vengoal Chang                                       =  */
/*  ===============================================================  */
/*  = Parameter     Description                                   =  */
/*  =   JRN         The qualified name of the journal to be retrieved*/
/*  =   RTNLIB      The library containing the journal.           =  */
/*  =   ASP         The Auxiliary Storage pool containing the     =  */
/*  =               journal.                                      =  */
/*  =   MSGQ        The Message Queue where messages from the     =  */
/*  =               journal sent.such as if the threshold has     =  */
/*  =               been reached.                                 =  */
/*  =   MSGQLIB     The Message Queue Library where messages from =  */
/*  =               the journal are sent such as if the threshold =  */
/*  =               has been reached.                             =  */
/*  =   MNGRCV      The Manage Receiver option as specified on    =  */
/*  =               CRTJRN. Either *USER or *SYSTEM is returned.  =  */
/*  =   DLTRCV      The Delete Receiver option as specified on    =  */
/*  =               CRTJRN. Either *NO or *YES is returned.       =  */
/*  =   MNGRCVDLY   The time in  minutes to be used to delay the  =  */
/*  =               attempt to delete a journal receiver, if the  =  */
/*  =               system cannot allocate it and  DLTRCV(*YES)   =  */
/*  =               is  specified.                                =  */
/*  =   DLTRCVDLY   The time in  minutes to be used to delay the  =  */
/*  =               next attempt to attach a new journal receiver =  */
/*  =               for system managed receivers.                 =  */
/*  =   JRNTYP      The type of journal.                          =  */
/*  =               *LOCAL or *REMOTE is returned.                =  */
/*  =   JRNSTS      The status of the journal.                    =  */
/*  =               *INACTIVE, *ACTIVE, *FAILED, or *INACTPEND    =  */
/*  =               will be returned.                             =  */
/*  =   JRNDLVMODE  The delivery mode of the journal.             =  */
/*  =               *NA  if it is not applicable, such as local   =  */
/*  =               journal.                                      =  */
/*  =               *ASYNC, *SYNC, *ASYNCPEND, and *SYNCPEND will =  */
/*  =               will be returned for remote journal.          =  */
/*  =   RCVSIZMFIX  The CRTJRN RCVSIZOPT(*MINFIXLEN) option.      =  */
/*  =               Blank is returned for remote journal.         =  */
/*  =               *YES or *NO is returned depending on whether  =  */
/*  =               *MINFIXLEN  was specified.                    =  */
/*  =   RCVSIZRMVI  The CRTJRN RCVSIZOPT(*RMVINTENT) option.      =  */
/*  =               Blank is returned for remote journal.         =  */
/*  =               *YES or *NO is returned depending on whether  =  */
/*  =               *RMVINTENT  was specified.                    =  */
/*  =   RCVSIZOPT1  The CRTJRN RCVSIZOPT(*MAXOPT1)   option.      =  */
/*  =               Blank is returned for remote journal.         =  */
/*  =               *YES or *NO is returned depending on whether  =  */
/*  =               *MAXOPT1    was specified.                    =  */
/*  =   RCVSIZOPT2  The CRTJRN RCVSIZOPT(*MAXOPT2)   option.      =  */
/*  =               Blank is returned for remote journal.         =  */
/*  =               *YES or *NO is returned depending on whether  =  */
/*  =               *MAXOPT2    was specified.                    =  */
/*  =   RCVSIZOPT3  The CRTJRN RCVSIZOPT(*MAXOPT3)   option.      =  */
/*  =               Blank is returned for remote journal.         =  */
/*  =               *YES or *NO is returned depending on whether  =  */
/*  =               *MAXOPT3    was specified.                    =  */
/*  =   NBRRCV      The number of receivers currently attached.   =  */
/*  =   ACTJRNRCV   The name of the current attached journal      =  */
/*  =               receiver.                                     =  */
/*  =   ACTJRNRCVL  The name of the library of the attached       =  */
/*  =               journal receiver.                             =  */
/*  =   JRNCACHE    Whether journal entries will be cached, before=  */
/*  =               being written out to disk.                    =  */
/*  =               *NA for remote journal, *YES, *NO will be     =  */
/*  =               returned.                                     =  */
/*  =   RMTJRNTYP   The type of Remote Journal. *LOCAL, *TYPE1    =  */
/*  =               or *TYPE2 will be returned.                   =  */
/*  =   JRNOBJ      The total number of objects being journaled   =  */
/*  =               to the journal.                               =  */
/*  =   JRNOBJLMT   The maximum number of objects that may be     =  */
/*  =               journaled to the journal.(From V5R4)          =  */
/*  =   MINJRNENTD  Whether journal entries to data areas will be =  */
/*  =               minimized in size.                            =  */
/*  =   MINJRNENTF  Whether journal entries to files will be      =  */
/*  =               minimized in size.                            =  */
/*  =   JRNRCVCNT   Journal recovery count (From V5R4)            =  */
/*  =               Describes whether a faster abnormal IPL will  =  */
/*  =               occur.                                        =  */
/*  =   TEXT        The text description of the Journal.          =  */
/*  =                                                             =  */
/*  ===============================================================  */
             CMD        PROMPT('Retrieve Journal Attributes')

             PARM       KWD(JRN) TYPE(QUAL) MIN(1) +
                          PROMPT('Journal')

             PARM       KWD(RTNLIB) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
                          PROMPT('CL var for RTNLIB       (10)')
             PARM       KWD(ASP) TYPE(*DEC) LEN(3 0) RTNVAL(*YES) +
                          PROMPT('CL var for ASP         (3 0)')
             PARM       KWD(MSGQ  ) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
                          PROMPT('CL var for MSGQ         (10)')
             PARM       KWD(MSGQLIB) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          MSGQLIB      (10)')
             PARM       KWD(MNGRCV ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          MNGRCV       (10)')
             PARM       KWD(DLTRCV) TYPE(*CHAR) LEN( 4) RTNVAL(*YES) +
                          PROMPT('CL var for DLTRCV       (10)')
             PARM       KWD(MNGRCVDLY) TYPE(*DEC) LEN( 7 0) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          MNGRCVDLY  (15 0)')
             PARM       KWD(DLTRCVDLY) TYPE(*DEC) LEN( 7 0) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          DLTRCVDLY  (15 0)')
             PARM       KWD(JRNTYP ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNTYP       (10)')
             PARM       KWD(JRNSTS ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNSTS       (10)')
             PARM       KWD(JRNDLVMODE ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNDLVMODE   (10)')
             PARM       KWD(RCVSIZMFIX ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RCVSIZMFIX   ( 4)')
             PARM       KWD(RCVSIZRMVI ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RCVSIZRMVI   ( 4)')
             PARM       KWD(RCVSIZOPT1 ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RCVSIZOPT1   ( 4)')
             PARM       KWD(RCVSIZOPT2 ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RCVSIZOPT2   ( 4)')
             PARM       KWD(RCVSIZOPT3 ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RCVSIZOPT3   ( 4)')
             PARM       KWD(NBRRCV    ) TYPE(*DEC) LEN( 5 0) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          NBRRCV      (5 0)')
             PARM       KWD(ACTJRNRCV ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          ACTJRNRCV    (10)')
             PARM       KWD(ACTJRNRCVL) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          ACTJRNRCVL   (10)')
             PARM       KWD(JRNCACHE  ) TYPE(*CHAR) LEN( 4) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNCACHE     ( 4)')
             PARM       KWD(RMTJRNTYP ) TYPE(*CHAR) LEN(10) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          RMTJRNTYP    (10)')
             PARM       KWD(JRNOBJ   ) TYPE(*DEC) LEN(15 0) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNOBJ     (15 0)')
             PARM       KWD(JRNOBJLMT ) TYPE(*CHAR) LEN( 1) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNOBJLMT    ( 1)')
             PARM       KWD(MINJRNENTD ) TYPE(*CHAR) LEN( 1) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          MINJRNENTD   ( 1)')
             PARM       KWD(MINJRNENTF ) TYPE(*CHAR) LEN( 1) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          MINJRNENTF   ( 1)')
             PARM       KWD(JRNRCVCNT) TYPE(*DEC) LEN(11 0) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          JRNRCVCNT  (11 0)')
             PARM       KWD(TEXT     ) TYPE(*CHAR) LEN(50) +
                          RTNVAL(*YES) PROMPT('CL var for +
                          TEXT         (50)')


 QUAL:       QUAL       TYPE(*NAME) LEN(10) SPCVAL((*ALL)) EXPR(*YES)
             QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                          SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                          PROMPT('Library')




File   : QCLSRC
Member : RTVJRNAT
Type   : CLP
Usage  : 測試程式 
         CRTCLPGM RTVJRNAT
         CALL RTVJRNRCVT 

PGM
     DCL VAR(&JRNNAME) TYPE(*CHAR) LEN(10)
     DCL VAR(&JRNLIB) TYPE(*CHAR) LEN(10)
     DCL VAR(&RTNLIB) TYPE(*CHAR) LEN(10)   /*STR  LEN*/
     DCL VAR(&ASP   ) TYPE(*DEC ) LEN(3 0)  /* 33    4*/
     DCL VAR(&MSGQ  ) TYPE(*CHAR) LEN(10)   /* 37   10*/
     DCL VAR(&MSGQLIB) TYPE(*CHAR) LEN(10)  /* 47   10*/
     DCL VAR(&MNGRCV ) TYPE(*CHAR) LEN(10)  /* 57    1*/
     DCL VAR(&DLTRCV ) TYPE(*CHAR) LEN( 4)  /* 58    1*/
     DCL VAR(&MNGRCVDLY) TYPE(*DEC) LEN(7 0) /* 257  4*/
     DCL VAR(&DLTRCVDLY) TYPE(*DEC) LEN(7 0) /* 261  4*/
     DCL VAR(&JRNTYP   ) TYPE(*CHAR) LEN(10)/* 66    1*/
     DCL VAR(&JRNSTS   ) TYPE(*CHAR) LEN(10)/* 68    1*/
     DCL VAR(&JRNDLVMODE) TYPE(*CHAR) LEN(10)/* 69    1*/
     DCL VAR(&RCVSIZMFIX) TYPE(*CHAR) LEN( 4)/* 60    1*/
     DCL VAR(&RCVSIZRMVI) TYPE(*CHAR) LEN( 4)/* 59    1*/
     DCL VAR(&RCVSIZOPT1) TYPE(*CHAR) LEN( 4)/* 61    1*/
     DCL VAR(&RCVSIZOPT2) TYPE(*CHAR) LEN( 4)/* 62    1*/
     DCL VAR(&RCVSIZOPT3) TYPE(*CHAR) LEN( 4)/* 63    1*/
     DCL VAR(&NBRRCV    ) TYPE(*DEC ) LEN(5 0)/* 197    4*/
     DCL VAR(&ATCJRNRCV ) TYPE(*CHAR) LEN(10)/* 201   10*/
     DCL VAR(&ATCJRNRCVL) TYPE(*CHAR) LEN(10)/* 211   10*/
     DCL VAR(&JRNCACHE  ) TYPE(*CHAR) LEN( 4)/* 196    1*/
     DCL VAR(&RMTJRNTYP ) TYPE(*CHAR) LEN(10)/*  67    1*/
     DCL VAR(&JRNOBJ    ) TYPE(*DEC ) LEN(15 0)/* 309  4*/
     DCL VAR(&JRNOBJLMT ) TYPE(*CHAR) LEN(1)   /* 308  1*/
     DCL VAR(&MINJRNENTD) TYPE(*CHAR) LEN(1)   /* 186  1*/
     DCL VAR(&MINJRNENTF) TYPE(*CHAR) LEN(1)   /* 187  1*/
     DCL VAR(&JRNRCVCNT ) TYPE(*DEC ) LEN(11 0)   /* 341  4*/
     DCL VAR(&TEXT      ) TYPE(*CHAR) LEN(50)  /* 136 50*/

             RTVJRNA    JRN(QAUDJRN) RTNLIB(&RTNLIB) ASP(&ASP) +
                          MSGQ(&MSGQ) MSGQLIB(&MSGQLIB) +
                          MNGRCV(&MNGRCV) DLTRCV(&DLTRCV) +
                          MNGRCVDLY(&MNGRCVDLY) +
                          DLTRCVDLY(&DLTRCVDLY) JRNTYP(&JRNTYP) +
                          JRNSTS(&JRNSTS) JRNDLVMODE(&JRNDLVMODE) +
                          RCVSIZMFIX(&RCVSIZMFIX) +
                          RCVSIZRMVI(&RCVSIZRMVI) +
                          RCVSIZOPT1(&RCVSIZOPT1) +
                          RCVSIZOPT2(&RCVSIZOPT2) +
                          RCVSIZOPT3(&RCVSIZOPT3) NBRRCV(&NBRRCV) +
                          ACTJRNRCV(&ATCJRNRCV) +
                          ACTJRNRCVL(&ATCJRNRCVL) +
                          JRNCACHE(&JRNCACHE) RMTJRNTYP(&RMTJRNTYP) +
                          JRNOBJ(&JRNOBJ) JRNOBJLMT(&JRNOBJLMT) +
                          MINJRNENTD(&MINJRNENTD) +
                          MINJRNENTF(&MINJRNENTF) +
                          JRNRCVCNT(&JRNRCVCNT) TEXT(&TEXT)

   DMPCLPGM

ENDPGM


                        




沒有留言: