Home | History | Annotate | Download | only in os400
      1 /*      XMLCATALOG CL command.                                                */
      2 /*                                                                            */
      3 /*      See Copyright for the status of this software.                        */
      4 /*                                                                            */
      5 /*      Author: Patrick Monnerat <pm (at) datasphere.ch>, DATASPHERE S.A.          */
      6 
      7 /*      Interface to program XMLCATLGCL                                       */
      8 
      9              CMD        PROMPT('XML/SGML catalog  tool')
     10 
     11              /* Catalog file path. */
     12 
     13              PARM       KWD(INSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)    +
     14                           CASE(*MIXED) EXPR(*YES) MIN(1) SPCVAL((*NEW ''))     +
     15                           CHOICE('Stream file path')                           +
     16                           PROMPT('XML/SGML catalog file')
     17 
     18              /* Catalog kind: XML/SGML. */
     19 
     20              PARM       KWD(KIND) TYPE(*CHAR) LEN(7) VARY(*YES *INT2)          +
     21                           EXPR(*YES) RSTD(*YES) DFT(*XML)                      +
     22                           SPCVAL((*XML '') (*SGML '--sgml'))                   +
     23                           PROMPT('Catalog kind')
     24 
     25              /* Output file. */
     26 
     27              PARM       KWD(OUTSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
     28                           CASE(*MIXED) EXPR(*YES) DFT(*STDOUT)                 +
     29                           SPCVAL((*STDOUT '') (*INSTMF X'00'))                 +
     30                           CHOICE('*STDOUT, *INSTMF or file path')              +
     31                           PROMPT('Output stream file path')
     32 
     33              /* Convert SGML to XML catalog. */
     34 
     35              PARM       KWD(CONVERT) TYPE(*CHAR) LEN(10) VARY(*YES *INT2)      +
     36                           RSTD(*YES) SPCVAL((*YES '--convert') (*NO ''))       +
     37                           EXPR(*YES) DFT(*NO) PMTCTL(TYPEXML)                  +
     38                           PROMPT('Convert SGML to XML catalog')
     39 
     40              /* SGML super catalog update. */
     41 
     42              PARM       KWD(SUPERUPD) TYPE(*CHAR) LEN(17) VARY(*YES *INT2)     +
     43                           SPCVAL((*YES '') (*NO '--no-super-update'))          +
     44                           EXPR(*YES) DFT(*YES) RSTD(*YES) PMTCTL(TYPESGML)     +
     45                           PROMPT('Update the SGML super catalog')
     46 
     47              /* Verbose/debug output. */
     48 
     49              PARM       KWD(VERBOSE) TYPE(*CHAR) LEN(4) VARY(*YES *INT2)       +
     50                           RSTD(*YES) SPCVAL((*YES '-v') (*NO ''))              +
     51                           EXPR(*YES) DFT(*NO)                                  +
     52                           PROMPT('Output debugging information')
     53 
     54              /* Interactive shell not supported. */
     55 
     56              /* Values to delete. */
     57 
     58              PARM       KWD(DELETE) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
     59                           CASE(*MIXED) MAX(64) EXPR(*YES)                      +
     60                           CHOICE('Identifier value')                           +
     61                           PROMPT('Delete System/URI identifier')
     62 
     63              /* Values to add. */
     64 
     65              PARM       KWD(ADD) TYPE(XMLELEM) MAX(10) PMTCTL(TYPEXML)         +
     66                           PROMPT('Add definition')
     67 XMLELEM:     ELEM       TYPE(*CHAR) LEN(16) VARY(*YES *INT2) DFT(*PUBLIC)      +
     68                           PROMPT('Entry type')                                 +
     69                           EXPR(*YES) RSTD(*YES) SPCVAL(                        +
     70                             (*PUBLIC         'public')                         +
     71                             (*SYSTEM         'system')                         +
     72                             (*URI            'uri')                            +
     73                             (*REWRITESYSTEM  'rewriteSystem')                  +
     74                             (*REWRITEURI     'rewriteURI')                     +
     75                             (*DELEGATEPUBLIC 'delegatePublic')                 +
     76                             (*DELEGATESYSTEM 'delegateSystem')                 +
     77                             (*DELEGATEURI    'delegateURI')                    +
     78                             (*NEXTCATALOG    'nextCatalog')                    +
     79                           )
     80              ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
     81                           CASE(*MIXED) PROMPT('Original reference/file name')
     82              ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
     83                           CASE(*MIXED) PROMPT('Replacement entity URI')
     84 
     85              PARM       KWD(SGMLADD) TYPE(SGMLELEM) MAX(10)                    +
     86                           PMTCTL(TYPESGML) PROMPT('Add SGML definition')
     87 SGMLELEM:    ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
     88                           CASE(*MIXED) PROMPT('SGML catalog file name')
     89              ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
     90                           CASE(*MIXED) PROMPT('SGML definition')
     91 
     92              /* Entities to resolve. */
     93 
     94              PARM       KWD(ENTITY) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
     95                           CASE(*MIXED) EXPR(*YES) MAX(150)                     +
     96                           PROMPT('Resolve entity')
     97 
     98              /* Additional catalog files. */
     99 
    100              PARM       KWD(CATALOG) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
    101                           CASE(*MIXED) EXPR(*YES) MAX(150) DFT(*DEFAULT)       +
    102                           CHOICE('Catalog stream file path')                   +
    103                           PROMPT('Additional catalog file') SPCVAL(            +
    104                             (*DEFAULT       '/etc/xml/catalog')                +
    105                             (*NONE          '')                                +
    106                           )
    107 
    108 
    109              /* Conditional prompting. */
    110 
    111 TYPEXML:     PMTCTL     CTL(KIND) COND((*EQ ''))
    112 TYPESGML:    PMTCTL     CTL(KIND) COND((*NE ''))
    113