MVSCMDAUTH(1)

MVSCMDAUTH(1)             ZOAU Command Syntax           MVSCMDAUTH(1)

NAME

    mvscmdauth - Run an authorized MVS command (program) that resides in
    a PDS or PDSE from the UNIX System Services (USS) command line.
    To run an unauthorized MVS command (program), use mvscmd.

SYNOPSIS


        mvscmdauth [opt]*
    where opt is one or more of:
     --buildinfo | -b (build information of this program)
     --help | -h (this help)
     --info | -h (this help)
     --pgm=<name> | -p=<name>  (the program to run, e.g. -p=iebcopy).
    --steplib=<dataset> (specify dataset to search for program, e.g. --steplib=MY.DATASET).
        By default, mvscmdauth searches the STEPLIB linklist for the specified program.
     --args=<args> | -a=<args> (the program arguments, e.g. -a='MARGINS(1,72)'.
        Default is ''.
     --verbose | -v (verbose messages).
        Default is off.
     --debug | -d (even more verbose messages).
        Default is off.
     --tmphlq=<tmphlq> | -Q=<tmphlq>
        Use an alternative high-level qualifier for temporary dataset name
        Will override TMPHLQ environment variable as well
     --<ddname>=<value>,[<options>]*
        Specify a DDName to associate with a dataset, UNIX file or volume.
        Typically no options are required. Options are ignored for STEPLIB DDNames.
        Valid options are:
            excl : allocate this dataset exclusively. If other jobs have
                   allocated this dataset already, the allocation will
                   fail. If the allocation succeeds, no other job can
                   allocate this datset until this program completes.
            old  : synonym for excl
            mod  : allocate dataset or file for update (modification).
            vol  : allocate the DD name to a volume. Unlike dataset
                   allocation, the value specified is the volume name.
            volume:synonym for vol
            vio  : allocate the dataset as a virtual I/O DD name,
                if possible

            new: create data set. Dataset creation default values are the same for mvscmd, mvscmdauth, and dtouch.
                suboptions:
                    type: may be one of: KSDS, ESDS, RRDS, LDS, SEQ/BASIC, LARGE, PDS, PDSE/LIBRARY, HFS.
                            Default is PDSE.
                            Either name may be used for types with multiple names (SEQ/BASIC, PDSE/LIBRARY).
                    primary: is the amount of primary space to allocate for the dataset.
                            Default is 5M.
                            Size may include a suffix of K or KB (kilobytes), M or MB (megabytes),
                            G or GB (gigabytes), C or CYL (cylinders), T or TRK (tracks)
                    secondary: the amount of secondary space to allocate for the dataset.
                            Size of extents. Defaults to 1/10 of primary space.
                            Size may include a suffix of K or KB (kilobytes), M or MB (megabytes),
                            G or GB (gigabytes), C or CYL (cylinders), T or TRK (tracks)
                    spfrm: the format of allocated space to use when allocating the dataset.
                            May be one of:
                                ALX - Different areas of contiguous space are to be allocated.
                                MXIG - Maximum contiguous space is required.
                                CONTIG - Space must be contiguous.
                    normdisp: tells the system what to do with the data set after normal termination of the program.
                            May be one of delete, keep, catalog, uncatalog.
                            Defaults to catalog.
                    conddisp: tells the system what to do with the data set after abnormal termination of the program.
                            May be one of delete, keep, catalog, uncatalog.
                            Defaults to catalog.
                    dirblks: is the number of directory blocks for a PDS.
                            Optional parameter for PDS datasets.
                            Defaults is 5.
                    blksize: is the block size of the dataset.
                            Default is 32718 for record format FBA,
                            32720 for FB,
                            32743 for VBA,
                            32760 for VB and U.
                    recfm: is one of FB, VB, FBA, VBA, U.
                            Default is FB.
                    lrecl: is expressed in bytes
                            Default is 80 for fixed datasets (FB, FBA),
                            137 for variable datasets (VB, VBA)
                            0 for unformatted datasets (U)
                            For variable datasets, the length must include the 4-byte
                            prefix area.
                    dsorg: is the data set organization of the dataset.
                            May be one of GS, PS, PSU, PO, POU, DA, DAU, IS, ISU.
                            Default is PS for sequential datasets (SEQ/BASIC/LARGE),
                            PS for HFS datasets,
                            PO for partitioned datasets (PDS/PDSE/LIBRARY).
                    storclas: is the storage class for an SMS-managed dataset.
                            Required for SMS-managed datasets that do not match an SMS-rule.
                            Not valid for datasets that are not SMS-managed.
                            Note that all non-linear VSAM datasets are SMS-managed.
                    dataclas: is the data class for an SMS-managed dataset.
                            Optional for SMS-managed datasets that do not match an SMS-rule.
                            Not valid for datasets that are not SMS-managed.
                            Note that all non-linear VSAM datasets are SMS-managed.
                    mgmtclas: is the management class for an SMS-managed dataset.
                            Optional for SMS-managed datasets that do not match an SMS-rule.
                            Not valid for datasets that are not SMS-managed.
                            Note that all non-linear VSAM datasets are SMS-managed.
                    keylen: Required for Key Sequenced Datasets (KSDS)
                    keyoffset: Required for Key Sequenced Datasets (KSDS)
                    volumes: a list of comma separated volume serials.
                            When providing multiple volumes, processing will begin with
                            the first volume in the provided list. Offline volumes are not considered.
                            Volumes can always be provided when not using SMS.
                            When using SMS, volumes can be provided when the storage class being used
                            has GUARANTEED_SPACE=YES specified. Otherwise, the allocation will fail.
                    dskeylbl: The label for the encryption key used by the system to encrypt the data set.
                            Only applicable when using encrypted datasets.
                    keylab1: The label for the key encrypting key used by the Encryption Key Manager.
                            Only applicable when using encrypted datasets.
                    keycd1: How the label for the key encrypting key specified by keylab1 is encoded by the Encryption Key Manager.
                            May be one of: L, H
                            Only applicable when using encrypted datasets.
                    keylab2: The label for the key encrypting key used by the Encryption Key Manager.
                            Only applicable when using encrypted datasets.
                    keycd2: How the label for the key encrypting key specified by keylab2 is encoded by the Encryption Key Manager.
                            May be one of: L, H
                            Only applicable when using encrypted datasets.

        for UNIX files:
            normdisp: tells the system what to do with the UNIX file after normal termination of the program.
                May be one of keep, delete.
                Defaults to keep.
            conddisp: tells the system what to do with the UNIX file after abnormal termination of the program.
                May be one of keep, delete.
                Defaults to keep.
            pathmode: The file access attributes for the UNIX file being allocated.
                Provide in chmod-like number format. (e.g. 0644, 1777)
                If missing leading number assumes 0 (e.g. 644 == 0644)
            statusgroup: the status for UNIX file being allocated.
                Specify up to 6 of: OCREAT, OEXCL, OAPPEND, ORDWR, ORDONLY, OWRONLY, ONOCTTY, ONONBLOCK, OSYNC, OTRUNC.
                Provide multiple attributes as comma separated list.
            filedata: the type of data that is (or will be) stored in the UNIX file.
                May be one of binary, text, record
            lrecl: use the specified logical record length for the
                UNIX file being allocated. This is required in
                situations where the data will be processed as
                records and therefore, the record length, block
                size and record format need to be supplied since
                an UNIX file would normally be treated as a stream
                of bytes.
            blksize: use the specified block size for the UNIX file
                being allocated since an UNIX file would normally
                be treated as a stream of bytes.
            recfm: use the specified record format for the UNIX file
                being allocated since an UNIX file would normally
                be treated as a stream of bytes.

ENVIRONMENT VARIABLES
	TMPHLQ:	overrides the current high-level qualifier used for temporary dataset name

DESCRIPTION


    Run an authorized MVS program in the current shell. This is analogous
    to a job step in JCL.
    In addition, mvscmdauth lets you read input from stdin and write output
    to stdout, which is very convenient for running mvscmdauth as part of a
    series of steps.

    By default, mvscmdauth searches for the program (--pgm=<name>) in the linklist defined
    by the STEPLIB enviornmental variable. However, if you want to add a specific
    dataset to search for the program, you can use --steplib=MY.DATASET to append this
    dataset to STEPLIB for this command. Users can display the list of datasets currently
    contained in STEPLIB by executing 'pll' on the command line.

    mvscmdauth is identical to mvscmd except for it's name and that it
    runs authorized MVS programs instead of unauthorized MVS programs.
    For more details, see mvscmd.

EXAMPLES


    Dataset example:
        allocate the DDName SYSIN to the dataset IBMUSER.TEST.OBJ
        --sysin=IBMUSER.TEST.OBJ

    Concatenated dataset example:
        allocate the ddname SYSLIB to the dataset concatenation CEE.SCEELKED:CEE.SCEELKEX.
        --syslib=CEE.SCEELKED:CEE.SCEELKEX

    Concatenated dataset and path example:
        allocate the ddname SYSLIB to the dataset and UNIX path concatenation CEE.SCEELKED:/u/sysadm/sysfile.
        --syslib=CEE.SCEELKED:/u/sysadm/sysfile

    Concatenated dataset example allocating second dataset:
        allocate the ddname SYSLIB to the dataset concatenation MVSCMD.DSN1:MVSCMD.DS2 where MVSCMD.DS2 is created.
        --syslib=MVSCMD.DSN1:MVSCMD.DS2,NEW,TYPE=SEQ,LRECL=80

    Console example:
        allocate the DDName SYSPRINT to stdout (which can then be piped to other processes).
        --sysprint=*

    Console example (alternate):
        --sysprint=stdout

    stdin example:
        allocate the DDName SYSIN to an FB 80 temporary sequential dataset that has
        stdin written to it (stdin can be piped in from other processes):

        --sysin=stdin

    Dummy Dataset example:
        allocate the DDName SYSIN to DUMMY:
        --sysin=dummy:

    Dataset allocated as 'exclusive' (i.e. DISP=OLD) example:
        --archive=IBMUSER.MVSCMD.DAR,EXCL

    Dataset allocated as 'mod' (i.e. DISP=MOD) example:
        --archive=IBMUSER.MVSCMD.DAR,MOD

    Dataset allocated as 'new' (i.e. DISP=NEW) example:
        --archive=IBMUSER.MVSCMD.DAR,NEW,TYPE=pdse,LRECL=80,BLKSIZE=32720,VOLUMES=SCR03,MYVOL1

    UNIX file allocated as 'mod' (i.e. DISP=MOD or 'append') example:
        --archive=/tmp/mylog,mod

    Volume example:
        allocate the DDname DD2 to the VOLUME USER01 (as opposed to a particular dataset):
        --dd2=user01,vol

    Specify program location:
        Specify a certain dataset to search for a particular program example:
        mvscmdauth --pgm=<name> --steplib=MY.DATASET

EXIT VALUES


    0               mvscmdauth completed without error.

    non-zero        mvscmdauth failed or the MVS command (program) returns a non-zero value. See error messages for details.

SEE ALSO

mvscmd(1)