COMMAND | AS/400 COMMAND | FUNCTION |
Month: June 2012
ENDSBS *ALL ALTERNATIVE
1. SNDBRKMSG to warn all users to sign-off due to Backup in 10 minutes
2. ENDSBS QINTER, QBATCH, QSERVER with OPTION(*CNTRLD) DELAY(*NOLIMIT)
3. After 10 minutes, ENDHOSTSVR SERVER(*ALL)
4. ENDTCP
5. ENDSBS QCMN, QINTER, QBATCH, QSERVER with OPTION(*IMMED) using CPF1054
6. After 5 minutes, start the backup.
7. Restart QCMN, QINTER, QSERVER, & TCP/IP
8. After the backup, restart QBATCH
This assumes that:
1. The procedure is either run from the console, or from a custom batch subsystem and job queue (external from QBATCH subsystem/jobq).
2. All memory resident programs check for the end-job status flag.
3. There are no other active batch or interactive subsystems. Steps 3, 4, & 5 will definitely kick out everyone but the console operator. Step 7 will allow people to connect/signon and initiate some jobs that may interfere with the backup. To remove this possibility, you could interchange steps 7 and 8. However, it is my experience that you should allow people to connect so that in case anything goes wrong, the technical staff can still get in to fix it remotely. You could opt to insert an initial sign-on program into your non-technical users’ user profiles to check if the backup is in progress, and if so, bar them with an informative message.
Start Backup using BRM (STRBKUBRM)
Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Start Backup using BRM (STRBKUBRM) command selects a control group to back up. You can start the backup immediately or you can schedule it using the system job scheduler. Processing can be batch or interactive.
To use this command, you must have the Backup Recovery and Media Services for IBM i licensed program installed.
Restrictions:
- This command should not be used by control group *EXIT item processing as results will be unpredictable.
- You must have *USE authority to backup item exit programs and *EXECUTE authority to libraries containing the backup item exit programs.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
CTLGRP | Control group | Name, *BKUGRP, *SYSGRP, *SYSTEM | Required, Positional 1 |
SCDTIME | Schedule time | Decimal number, *IMMED | Optional |
SBMJOB | Submit to batch | *YES, *CONSOLE, *CTLSBS, *NO | Optional |
STRSEQ | Starting sequence | Element list | Optional |
Element 1: Number | 1-9999, *FIRST | ||
Element 2: Library | Name, *FIRST | ||
APPEND | Append to media | *CTLGRPATR, *BKUPCY, *NO, *YES | Optional |
JOBD | Job description | Single values: *USRPRF Other values: Qualified object name |
Optional |
Qualifier 1: Job description | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
JOBQ | Job queue | Single values: *JOBD Other values: Qualified object name |
Optional |
Qualifier 1: Job queue | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
ACTIVITY | Activity | *CTLGRPATR, *FULL, *INCR | Optional |
RETENTION | Retention | Element list | Optional |
Element 1: Retention type | *CTLGRPATR, *DAYS, *PERM | ||
Element 2: Retain media | 1-9999, 35 | ||
DEV | Device | Values (up to 4 repetitions): Name, *CTLGRPATR, *MEDCLS | Optional |
PRLRSC | Parallel device resources | Element list | Optional |
Element 1: Minimum resources | 1-32, *CTLGRPATR, *NONE, *AVAIL | ||
Element 2: Maximum resources | 1-32, *MIN, *AVAIL | ||
MEDCLS | Media class | Character value, *CTLGRPATR, *SYSPCY | Optional |
MOVPCY | Move policy | Name, *CTLGRPATR, *NONE | Optional |
OMITS | Omits | *PROCESS, *IGNORE | Optional |
Top |
Control group (CTLGRP)
Specifies the name of the control group that you want to schedule for backup.
Backup control groups are groups of libraries, special values and lists that share common backup characteristics. You can create multiple backup control groups to complete your backup strategy.
This is a required field.
- *BKUGRP
- The default backup control group is processed. The default backup user data control group is set up in the BRMS backup policy.
- *SYSGRP
- The default system backup control group is processed. The default backup system data control group is set up when BRMS is installed.
- *SYSTEM
- The default backup control group is processed. The default backup entire system control group is set up in the BRMS backup policy.
- control-group-name
- Specify the name of the backup control group, such as DAILY that you want to process.
Top |
Schedule time (SCDTIME)
Specifies the time that you want BRMS to begin processing the backup.
- *IMMED
- The backups are to begin immediately.
- start-time
- Specify the time in hour and minutes that you want the backup to begin. The time is expressed in 24 hour clock format ‘hhmm’.
Top |
Submit to batch (SBMJOB)
Specifies how you want to process the selected control group.
- *YES
- Submits the processing of the control group to batch. The job is dependent on the job queue and job description specified on subsequent parameters.
- *CONSOLE
- Transfers the processing of the control group to the system console. This special value is used with the console monitoring function in BRMS.
- *CTLSBS
- Submits the control group to the Q1ACTLSBS job queue in the controlling subsystem for batch processing.
Note: This special value is not supported in restricted state.
Note: If the control group requires all subsystems to be ended, this special value should only be used if the backup can complete without operator intervention because the interactive system console job is ended and will not be available.
If the control group requires all subsystems to be ended, system reference code A900 3C70 is displayed while the system is in restricted state. Unresponsive restricted state backups can be ended and the interactive system console job restarted in two ways:
- Start DST from the control panel, sign on to DST, select option 14 – End batch restricted state.
- Specify a value for Maximum time for backup on the System Policy which is large enough to allow the backup job to complete but small enough to end the backup job if the controlling subsystem has not been restarted in the specified time.
- *NO
- Performs the processing of the control group within the current job.
Top |
Starting sequence (STRSEQ)
Specifies the sequence number and library from which you want to restart backup processing.
Note: If you are not restarting a control group, then you will always start at the first sequence number in the control group, regardless of the values specified in the STRSEQ parameter.
Note: You can use the Library element of this parameter when *IBM, *ALLUSR, *ALLPROD, *ALLTEST,*ASPnn or a generic library name is specified as the Save item in the specified sequence number in the control group.
Element 1: Number
- *FIRST
- Backup processing starts with the first item in the control group.
- sequence-number
- Specify the sequence number within the control group from which you want to restart backup processing.
Element 2: Library
- *FIRST
- Backup processing starts with the first library in the specified sequence number.
- library-name
- Specify the name of the library within the sequence number from which you want to restart backup processing.
Top |
Append to media (APPEND)
Specifies whether you want to append the backup data for the backup processing you are restarting to an active volume.
Note: The APPEND parameter applies only to removable media, and must be *NO if media of class *ADSM (TSM server) is used.
- *CTLGRPATR
- Use the value from the control group for Append to media .
- *BKUPCY
- Use the value from the backup policy for Append to media .
- *NO
- Do not append backup data for the backup you are restarting to an active volume.
- *YES
- Append the backup data for the backup you are restarting to an active volume. Backup data is written to the volume immediately following the last active file on the volume.
Top |
Job description (JOBD)
Specifies the job description to be used with this job.
Single values
- *USRPRF
- The job description in the user profile under which the submitted job runs is used as the job description of the submitted job.
Qualifier 1: Job description
- name
- Specify the name of the job description used for the job.
Qualifier 2: Library
- *LIBL
- The library list is used to locate the job description.
- *CURLIB
- The current library for the job is used to locate the job description. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the name of the library where the job description is located.
Top |
Job queue (JOBQ)
Specifies the job queue in which this job is placed.
Single values
- *JOBD
- The submitted job is placed on the job queue named in the specified job description.
Qualifier 1: Job queue
- name
- Specify the name of the job queue on which the submitted job is placed.
Qualifier 2: Library
- *LIBL
- The library list is used to locate the job queue.
- *CURLIB
- The current library for the job is used to locate the job queue. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the name of the library where the job queue is located.
Top |
Activity (ACTIVITY)
The Activity parameter allows you to specify the activity that is to be used when processing the control group. You can specify that theWeekly activity attribute of the control group entries is to be used or specify a specific type of activity which will override the Weekly activity attribute of the control group entries.
Activity overrides must be enabled for the control group specified in the CTLGRP parameter when specifying a value other than *CTLGRPATR for the Activity parameter. Activity overrides for the control group can be enabled or disabled from the properties Activity tab for the BRMS backup policy using the BRMS graphical user interface. The backup policy will have the same name as the control group name.
Diagnostic message BRM400A is sent by the STRBKUBRM validity checking program if activity overrides are disabled and the value for the ACTIVITY parameter is not *CTLGRPATR.
Note: For the *SYSTEM backup control group, a full save will be forced regardless of the default weekly activity.
- *CTLGRPATR
- Specifies the Weekly activity attribute of the control group entries is to be used when processing the control group. This is the default value.
- *FULL
- Specifies the Weekly activity attribute of the control group entries is to be overriden and processed as a full save. The override applies to all days of the week.
- *INCR
- Specifies the Weekly activity attribute of the control group entries is to be overriden and processed as a incremental save. The type of incremental save is determined by the current value of the Incremental type attribute of the control group. The override applies to all days of the week. Each entry in the control group will be processed when the command is run regardless of the current value specified for the Weekly activity attribute for the entry. This includes exit entries. If the control group entry does not support incremental saves, the entry will not be processed and diagnostic message BRM400F will be entered into the job log.
Top |
Retention (RETENTION)
The Retention parameter allows you to specify the retention attributes that are to be applied to objects saved by the control group. You can specify that the retention attributes of the media policies defined in the control group are to be used or specify new retention attributes which will override the media policy retention attributes.
Retention overrides must be enabled for the control group specified in the CTLGRP parameter when specifying a value other than *CTLGRPATR for element 1 of the Retention. Retention overrides for the control group can be enabled or disabled using the properties Media Retention tab for the BRMS backup policy using the BRMS graphical user interface. The backup policy will have the same name as the control group name.
Diagnostic message BRM400B is sent by the STRBKUBRM validity checking program if retention overrides are disabled and the value for element 1 of the Retention parameter is not *CTLGRPATR.
Element 1: Retention type
- *CTLGRPATR
- Specifies the retention attributes of the media policies defined in the control group are to be applied to the saved objects. This is the default value.
- *DAYS
- Specifies days retention is to be applied to all objects saved by this control group. Saved objects remain active for the specified number of days, after which the saved objects expire. The number-of-days must be specified in element 2 when using this retention type.
- *PERM
- Specifies a permanent retention is to be applied to all objects saved by this control group. Permanent retention means the saved objects remain active indefinitely or until explicitly expired.
Element 2: Retain media
- number-of-days
- Specifies a number of days from 1-9999 that saved objects remain active.
Top |
Device (Dev)
Specifies the device or devices to be used by this command.
Single values
- *CTLGRPATR
- Use the value from the control group for Device.
- *MEDCLS
- Devices for this policy or control group are selected based on device types that support the density for the media class specified in the media policy. The *MEDCLS special value is used for devices that are part of a device pool, such as several systems that share a single or set of devices. Devices are specified in the Work with Devices display.
Note: If you want to use more than one device for a serial save operation, the *MEDCLS can be repeated up to four times, once for each device used, except for virtual tape devices which is limited to a single value. The Parallel Device Resource (PRLRSC) parameter must be *NONE. BRMS will attempt to use the maximum number of devices that can be allocated for a save operation. If you want to use more than one device for a parallel save operation the *MEDCLS must only be specified once and the PRLRSC minimum and maximum responses must be greater than one.
You can save data to a TSM (ADSM) server using this command. You can only specify one TSM type server in the list of devices or *MEDCLS, which must select a TSM server. The device type can either be *APPC, which supports SNA network protocol, or *NET, which supports TCPIP protocol.
Other values (up to 4 repetitions)
Specifies the name of the devices to be used for the save operation. the specified device name must already be in the BRMS device table.
Note: Multiple systems can share the use of a tape device or a media library device (MLB). When the device is a tape device (not an MLB device), BRMS can help you manage the use of the stand alone device by multiple systems if you indicate the device is shared.
- device-name
- Specify the names of one or more devices used for the save operation. If you are using more than one device (up to a maximum of four), specify the names of the devices in the order in which they are used.
Note: When doing a serial save, only one media library device or one virtual device can be specified. When doing a parallel save, multiple media library devices or virtual devices can be specified.
Top |
Parallel device resources (PRLRSC)
Specifies the minimum and maximum number of device resources to be used in a parallel save operation.
Note: Transferring save files to tape does not support parallel operations.
Element 1: Minimum Resources
Specifies the minimum number of device resources required for a parallel save.
Note: If a Media Library Device (MLB) is being used and the required resources are not available, the command will wait for the MLB to become available for a time period specified by the user. The wait time is determined by the value specified on the *MLB device description for INLMNTWAIT. If a *TAP device is being used and the required resources are not available, the command will fail.
- *CTLGRPATR
- Use the parallel resource settings that are specified in the control group.
Note: The Maximum resourcevalue is ignored when this special value is specified.
- *NONE
- No device resources are to be used. The save will be performed as a serial save. *NONE must be specified when using a virtual tape device, an optical device, or a virtual optical device.
- *AVAIL
- Use any available devices up to the maximum of what was used for a save. Specifying this value for the minimum will allow BRMS to use any available resources, but will complete using one resource if only one is available at the start of the command.
- 1-32
- Specify the minimum number of device resources to be used with this save command.
Element 2: Maximum Resources
Specifies the maximum number of device resources.
Note: This value is ignored when Minimum resourcesis set to *CTLGRPATR.
- *MIN
- Uses the value specified for the minimum number of device resources.
- *AVAIL
- Use any available devices for the save operation. Specifying this value for the maximum will allow BRMS to use any available resources but at a minimum the value specified in the minimum element.
- 1-32
- Specify the maximum number of device resources to be used with this save command.
Top |
Media class (MEDCLS)
Specifies the media class that you want to use for selection of output volumes used in this save operation.
If this save operation that you are performing is saving data to a device of category *NET or *APPC, you must specify the special value *ADSM (TSM server) for the MEDCLS parameter, since a TSM server controls the use of media in this case, not BRMS.
- *CTLGRATR
- Use the media class that is specified in the control group.
- *SYSPCY
- The value for the media class in the system policy will used to select output volumes for this save operation.
- media-class
- Specify a media class that will be used to select output volumes for this save operation.
Top |
Move policy (MOVPCY)
Specifies the move policy that you want to use for output volumes created as a result of this save operation.
If this save operation that you are performing is saving data to a device of category *NET or *APPC, you must specify the special value *ADSM (TSM server) for the MOVPCY parameter, since a TSM server controls the use of media in this case, not BRMS.
- *CTLGRPATR
- Use the value from the control group for Move Policy.
- *NONE
- There is not a move policy associated with the output volumes that are created as a result of this save operation.
- move-policy
- Specify a move policy that will be assigned to output volumes from this save operation.
Top |
Omits (OMITS)
Specifies whether omit items are to be processed or ignored when the backup control group is run.
Note: This attribute does not apply to backup lists or the *SYSTEM backup control group.
- *PROCESS
- Process omit items during the save. Omit items will be excluded from the save
- *IGNORE
- Ignore omitted items during the save. Omit items will be included in the save.
Top |
Examples
Example 1: Backing up a Control Group
STRBKUBRM CTLGRP(BACK01)
This command submits a batch job for backup control group BACK01. The batch job is not scheduled, so it will start immediately assuming batch job processing is active.
Example 2: Overriding the Save Activity
STRBKUBRM CTLGRP(BACK01) ACTIVITY(FULL)
This command submits a batch job for backup control group BACK01. The control group is set up to normally perform cumulative saves. When this backup is run, the cumulative saves will be overriden and a full save will be performed.
Example 3: Overriding the Save Retention
STRBKUBRM CTLGRP(BACK01) ACTIVITY(FULL) RETENTION(*DAYS 2555)
This command submits a batch job for backup control group BACK01. The control group is set up to normally perform cumulative saves with a retention of 30 days. When this backup is run, the cumulative saves and retention will be overriden. A full save with a retention of 2555 days will be performed.
Example 4: Overriding Omitted Save Items
STRBKUBRM CTLGRP(BACK01) ACTIVITY(FULL) RETENTION(*DAYS 2555) OMITS(*IGNORE)
This command submits a batch job for backup control group BACK01. The control group is set up to normally perform cumulative saves with a retention of 30 days and uses omits defined in the backup policy. When this backup is run, the cumulative saves, retention and omits will be overriden. A full backup which includes the omit items will be performed and a retention of 2555 days will be applied to the save.
Example 5: Submit to System Save to Batch
STRBKUBRM CTLGRP(*SYSTEM) SBMJOB(*CTLSBS)
This command submits the *SYSTEM backup control group to the controlling subsystem for batch processing. Since the backup does not use the BRMS console monitor or any interactive processing, the backup requires complete media management automation.
Top |
Error messages
*ESCAPE Messages
- BRM1034
- Control group &1 type &2 canceled.
- BRM1391
- Control group &2 type &3 canceled.
- BRM1393
- Control group &2 type &3 canceled.
- BRM1917
- Feature not installed.
- BRM1921
- Feature not licensed.
- BRM4041
- Access denied for user &1.
- BRM40A2
- BRMS product initialization required.
- CPF3700
- All CPF37xx messages could be signaled. xx is from 01 to FF.
- CPF3800
- All CPF38xx messages could be signaled. xx is from 01 to FF.
- CPF9800
- All CPF98xx messages could be signaled. xx is from 01 to FF.
Top |
BRMS COMMANDS
CL command finder
Alphabetic list of CL commands by command name | Back to CL command finder |
rtvjoba
RTVJOBA (Retrieve Job Attributes) Command Description
RTVJOBA Command syntax diagram
Purpose
The Retrieve Job Attributes (RTVJOBA) command is used in a CL program or REXX procedure to retrieve the values of one or more job attributes and to place those values into the specified CL variable. The attributes are retrieved for the job in which this command is used. If a job attribute does not exist because the attribute is now supported at the thread level only (e.g. CURUSER), then the thread attribute is retrieved for the thread in which this command is used.
The CL prompt for this command lists the minimum length for retrieved variables next to the appropriate parameters. For character variables, a single number is shown. For decimal variables, two numbers are shown. The first number indicates the minimum variable length and the second number indicates the minimum number of decimal positions.
Restrictions:
- This command is conditionally threadsafe. Refer to “Usage Notes” for additional information.
Optional Parameters
- JOB
- Specifies, if the job name is returned, the name of the CL variable that receives the name of the job. The variable must be a character variable with a minimum length of 10 characters. If the job name has fewer characters than the variable allows, the value is padded on the right with blanks.
- USER
- Specifies, if the user name is returned, the name of the CL variable that receives the name of the user profile associated with the job when the job was started. The user name is the second part of the qualified job name. The variable must be a character variable with a minimum length of 10 characters. If the user name has fewer characters than the variable allows, the value is padded on the right with blanks.
- NBR
- Specifies, if the job number is being returned, the name of the CL variable that receives the unique 6-character number assigned to the job by the system. The job number is the first part of the qualified job name.
- LOGLVL
- Specifies the name of the CL variable that receives the 1-character value, ranging from 0 through 4, that is the message logging level used to determine the type of messages logged in the job log. The variable must be a character variable with a minimum length of 1 character.
- LOGSEV
- Specifies the name of the CL variable that receives the 2-digit value, ranging from 00 through 99, which is the minimum severity level a message must have before it is logged in the job log. The variable must be a 2-digit decimal variable specified with no decimal positions.
- LOGTYPE
- Specifies the name of the CL variable that receives the special value that indicates the level of text that appears for any message written to the job log. The variable must be a character variable with a minimum length of 10 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- LOGCLPGM
- Specifies the name of the CL variable that receives the special value that indicates whether processed commands in a CL program are being logged in the job log. Note that this logging flag only has meaning for commands processed in CL programs which were created with LOG(*JOB) specified on the Create CL Program (CRTCLPGM) command. Additional information on the job’s CL program logging flag is in the LOGCLPGM parameter description in the Change Job (CHGJOB) command. The variable must be a character variable with a minimum length of 10 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- INQMSGRPY
- Specifies the name of the CL variable that receives the special value that indicates how inquiry messages are being handled by the job. Additional information on the value returned in the variable is in the INQMSGRPY parameter description in the Change Job (CHGJOB) command. The variable must be a character variable with a minimum length of 10 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- OUTQ
- Specifies the name of the CL variable that receives the name of the output queue being used by the job for spooled output. The variable must be a character variable with a minimum length of 10 characters. If the output queue name has fewer characters than the variable allows, the value is padded on the right with blanks.The special value *DEV can be retrieved. This value indicates that the output queue with the same name as the printer device, which is specified on either the printer file or the job description, will be used for the spooled output of this job.
- OUTQLIB
- Specifies the name of the CL variable that receives the name of the library that contains the output queue being used by the job for spooled output. The library name is the second part of the qualified output queue name (output-queue/library-name). The variable must be a character variable with a minimum length of 10 characters. If the output queue library name has fewer characters than the variable allows, the value is padded on the right with blanks.
- ACGCDE
- Specifies the name of the CL variable that receives the accounting code for the job. The variable must be a character variable with a minimum length of 15 characters. If the accounting code has fewer characters than the variable allows, the value is padded on the right with blanks.
- DATE
- Specifies, if the job date is to be returned, the name of the CL variable that receives the date assigned to the job by the system when the job was started. The variable must be a character variable with a minimum length of 6 characters. The job date is returned in the date format for the job.
- SWS
- Specifies, if the job switch settings are being returned, the name of the CL variable that receives the status (on or off) value of the eight job switches used by the job. The job switches are retrieved as a single 8-character value with each of the characters specifying a 1 (on) or 0 (off) as the value of the associated switch. The CL variable must be a character variable with a minimum length of 8 characters.
- TYPE
- Specifies, if the type of job environment is being returned, the name of the CL variable that receives the 1-character value representing the environment of the job. A character value of 0 indicates the job is running as a batch job, and a 1 indicates an interactive job. The variable must be a character variable with a minimum length of 1 character.
- RTNCDE
- Specifies (if the completion status of an RPG, COBOL, DFU, or sort utility program is being returned) the name of the CL variable that receives the 5-digit decimal return code. The return code is set by these programs before they return to the programs that called them. The return code indicates the completion status of the last program (of these types) that has completed processing within the job, as follows:
- 0
- Normal return (RPG, COBOL, DFU, or sort Utility)
- 1
- LR (last record) indicator on (RPG)
- 2
- Error-no halt indicator set (RPG, COBOL, DFU, or sort Utility)
- 3
- Halt indicator set on (one of the RPG indicators H1 through H9)
The CL variable must be a five-position decimal variable with no decimal positions.
- ENDSTS
- Specifies, if checking for a controlled end operation, the name of the CL variable that receives the end status. The single-character value indicates whether a controlled end that affects the job is currently being performed. A value of 1 indicates that the system, the subsystem in which the job is running, or the job itself is being ended; a value of 0 indicates no controlled end is being performed. The CL variable must be a character variable with a minimum length of 1 character.
- RUNPTY
- Specifies the name of the CL variable that receives the 2-digit value, ranging from 1 through 99, that is the run (or processing) priority for the job in which this command is used. This value is the highest run priority allowed for any thread within the job. Individual threads within the job may have a lower run priority. To retrieve the run priority for the thread in which one is running, use the Retrieve Current Attributes (QWTRTVCA) API. For additional information on run priority, refer to this parameter description in the Change Job (CHGJOB) command. The variable must be a 2-digit decimal variable specified with no decimal positions.
- TIMESLICE
- Specifies the name of the CL variable that receives the 7-digit value, ranging from 8 through 9999999, that is the maximum number of milliseconds that a thread within this job can run when it is given processing time. For additional information on time slice, refer to this parameter description under the Change Job (CHGJOB) command. The variable must be a 7-digit decimal variable specified with no decimal positions.
- PURGE
- Specifies the name of the CL variable that receives the special value that indicates whether the job is marked as eligible to move from main storage at the end of a time slice or a long wait state. For additional information on job purging, refer to this parameter description under the Change Job (CHGJOB) command. The variable must be a character variable with a minimum length of 10 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- DFTWAIT
- Specifies the name of the CL variable that receives the 7-digit value, ranging from 1 through 9999999 (or -1 if the value is set to *NOMAX), which is the default for the maximum number of seconds that the system waits for a machine instruction to acquire a resource. For additional information on wait-time, refer to the DFTWAIT parameter description under the Change Job (CHGJOB) command. The variable must be a 7-digit decimal variable specified with no decimal positions.
- USRLIBL
- Specifies the name of the CL variable that receives the user portion of the thread’s library list. The variable must be a character variable with up to 275 variables. Each library name returned is left-justified in an 11-character field and padded on the right with blanks.
- SBMMSGQ
- Specifies the name of the CL variable that receives the name of a message queue. If this parameter is coded for a RTVJOBA command in a CL program which is part of a batch job, the value returned is associated with the MSGQ parameter on the JOB or SBMJOB command which caused the batch job to start running. If *NONE was specified for the MSGQ parameter of the JOB or SBMJOB commands, or the CL program that contains the RTVJOBA command is not part of a batch job, *NONE is returned to the CL variable coded for this parameter. The variable must be a character variable with a minimum length of 10 characters. If the message queue name has fewer characters than the variable allows, the value is padded on the right with blanks.
- SBMMSGQLIB
- Specifies the name of the CL variable that receives the name of the library that contains the message queue described above. (See the SBMMSGQ parameter description above.) The library name is the second part of the qualified message queue name. If *NONE is returned for the SBMMSGQ parameter, it is also returned for this parameter. The variable must be a character variable with a minimum length of 10 characters. If the message queue library name has fewer characters than the variable allows, the value is padded on the right with blanks.
- PRTTXT
- Specifies the name of the CL variable that receives the print text for the job. This must be a character variable with a minimum length of 30 characters. More information on this parameter is in PRTTXT parameter.
- DDMCNV
- Specifies the name of a CL variable that receives the special value that indicates the action taken for DDM conversations on the job. The variable must be a character variable with a minimum length of 5 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- BRKMSG
- Specifies the name of a CL variable that receives the special value that indicates the mode for break message handling that is in effect for the job. The variable must be a character variable with a minimum length of 7 characters. If the special value has fewer characters than the variable allows, the value is padded on the right with blanks.
- DATFMT
- Specifies the name of a CL variable that receives the special value being used as the date format for the job. The variable must be a character variable with a minimum length of 4 characters. If the special value has fewer than 4 characters, the value is padded on the right with blanks.
- DATSEP
- Specifies the name of a CL variable that receives the character being used as the date separator character for the job. The variable must be a character variable with a minimum length of 1 character.
- CURLIB
- Specifies the name of a CL variable that is used to retrieve the name of the current library for the thread. The variable must be a character variable with a minimum length of 10 characters. If the current library name has fewer characters than the variable allows, the value is padded on the right with blanks.
Note: If the thread does not have a current library, a value of *NONE is returned in this variable. - PRTDEV
- Specifies the name of the CL variable that receives the name of the printer device. The variable must be a character variable with a minimum length of 10 characters. If the printer device name has fewer characters than the variable allows, the value is padded on the right with blanks.
- SYSLIBL
- Specifies the name of the CL variable that receives the system portion of the thread’s library list. The variable must be a character variable with up to 165 characters. Each library name returned is left-justified in an 11-character field and padded on the right with blanks.
- CURUSER
- Specifies, if the user name is returned, the 10-character CL variable that receives the name of the current user profile. If the current user name has fewer characters than the variable allows, the value is padded on the right with blanks.
- SUBTYPE
- Specifies, if the SUBTYPE of job environment is being returned, the 1-character CL variable that receives the name of the job environment. The valid character values are:
- Character
- Value
- *
- Job has no subtype
- E
- Job is running as an evoked job
- T
- Job is running as a Multiple Requester Terminal (MRT) job
- J
- Job is running as a prestart job
- P
- Job is running as a print driver
- PRTKEYFMT
- Specifies the name of the CL variable that receives the print key format for the job. The variable must have a minimum length of 7 characters. The special value *NONE, *PRTBDR, *PRTHDR, or *PRTALL is returned.
- TIMSEP
- Specifies the name of a CL variable that receives the character being used as the time separator character for the job. The variable must be a character variable with a minimum length of one character.
- TSEPOOL
- Specifies the name of the CL variable that receives the special value indicating whether interactive jobs are moved to another main storage pool when they reach the time slice end. The variable must be a character variable with a minimum length of 10 characters.
- DEVRCYACN
- Specifies the name of the CL variable that receives the special value indicating the recovery action to take for the job when an I/O error is encountered on the *REQUESTER device for interactive jobs. The variable must be a character variable with a minimum length of 13 characters.
- STSMSG
- Specifies the name of the CL variable that receives the special value indicating how status messages are handled for the job. The variable must be a character variable with a minimum length of 7 characters.
- SRTSEQ
- Specifies the name of the CL variable that receives the name of the sort sequence table used for the job. The special value *LANGIDUNQ, *LANGIDSHR, or *HEX can be returned to the variable. The variable must be a character variable with a minimum length of 10 characters.
- SRTSEQLIB
- Specifies the name of the CL variable that receives the name of the library containing the sort sequence table to be used for the job. The variable must be a character variable with a minimum length of 10 characters. If SRTSEQ is *LANGIDUNQ, *LANGIDSHR, or *HEX, blanks are returned in the variable.
- LANGID
- Specifies the name of the CL variable that receives the value indicating the language identifier to be used for the job. The variable must be a character variable with a minimum length of 3 characters.
- CNTRYID
- Specifies the name of the CL variable that receives the value indicating the country identifier to be used for the job. The variable must be a character variable with a minimum length of 2 characters.
- CCSID
- Specifies the name of a CL variable that receives the CCSID value being used for the job. The variable must be a 5-digit decimal variable with no decimal positions.
- JOBMSGQMX
- Specifies the name of a CL variable that receives the maximum size of the job message queue. The variable must be a 2-digit decimal variable with no decimal position.
- JOBMSGQFL
- Specifies the action that should be taken when the job message queue is full. The variable must have a minimum length of 10 characters. The special value *NOWRAP, *WRAP, or *PRTWRAP is returned.
- DFTCCSID
- Specifies the name of a CL variable that receives the DFTCCSID value being used for the job. The variable must be a 5-digit decimal variable with no decimal positions.
- CYMDDATE
- Specifies the name of the CL variable that receives the date assigned to the job by the system when the job was started. The variable must be a character variable with a minimum length of 7 characters. The job date is returned in the format CYYMMDD, where C is the century, YY is the year, MM is the month and DD is the day.
- DECFMT
- Specifies the name of a CL variable that receives the character being used as the decimal format for the job. The variable must be a character variable with a minimum length of 1 character.
- CHRIDCTL
- Specifies the name of a CL variable that receives the value being used as the character identifier control for the job. The variable must be a character variable with a minimum length of 10 characters.
Example for RTVJOBA
RTVJOBA NBR(&JOBNBR) DATE(&JOBDATE) DFTCCSID(&DFTCSID)
This command retrieves the job number and job date attributes from the job in which this command is located. The 6-digit job number is copied into the CL variable &JOBNBR. The job date is copied into the CL variable &JOBDATE; the values for both &JOBNBR and &JOBDATE must be 6 characters in length. The 5-digit DFTCCSID value is copied into the CL variable &DFTCCSID; this value must be 5 characters in length. The format of the date is determined by the contents of the system value QDATFMT, which controls the system date format.
/* Declare Variables */ DCL &LIBL *CHAR 275 DCL &CHGLIBL *CHAR 285 /* save library list */ RTVJOBA USRLIBL(&LIBL) * * * /* temporarily change library list */ CHGLIBL LIBL(MYLIB QGPL) * * * /* build command string */ CHGVAR &CHGLIBL ('CHGLIBL (' *CAT &LIBL *TCAT ')') /* restore library list */ CALL QCMDEXC (&CHGLIBL 285)
The above command retrieves the user portion of the library list so that it later can be restored from its temporary state, where only MYLIB and QGPL were in the user portion of the library list, to its original state.
If there are no libraries on the user portion of the library list, blanks are returned in the variable. If a library on the library list has been deleted, the value ‘*DELETED’ is put in the variable position for that name.
Usage Notes
Considerations for Attributes Scope and Thread Safety
This command is intended to be used to retrieve job attributes for the job in which the command is used. However, if a job attribute does not exist because the attribute is now supported at the thread level only, then the thread attribute is retrieved for the thread in which this command is used.
The Scope column of Table 1 shows whether the attribute is scoped to the Job to the Thread.
The Threadsafe column of Table 1 indicates if the attributes are considered to be threadsafe.
- Yes
- Attributes marked with a Yes can be retrieved safely from either the initial thread or from a secondary thread.
- No
- An attribute marked with this value is not threadsafe, and should not be retrieved in a multi-threaded job.
Table 1. Attribute, Scope, and Thread Safety
Attribute | Scope | Threadsafe |
---|---|---|
Break message handling (BRKMSG) | Job | Yes |
Character identifier control (CHRIDCTL) | Job | Yes |
Coded character set ID (CCSID) | Job | Yes |
Country ID (CNTRYID) | Job | Yes |
Current library (CURLIB) | Thread | Yes |
Current user profile (CURUSER) | Thread | Yes |
Date format (DATFMT) | Job | Yes |
Date separator (DATSEP) | Job | Yes |
DDM conversion handling (DDMCNV) | Job | Yes |
Decimal format (DECFMT) | Job | Yes |
Default coded character set identifier (DFTCCSID) | Job | Yes |
Default wait (DFTWAIT) | Job | Yes |
Device recovery action (DEVRCYACN) | Job | Yes |
End status (ENDSTS) | Job | Yes |
Inquiry message reply (INQMSGRPY) | Job | Yes |
Job accounting code (ACGCDE) | Job | Yes |
Job date with century (CYMDDATE) | Job | Yes |
Job date without century (DATE) | Job | Yes |
Job message queue full action (JOBMSGQFL) | Job | Yes |
Job message queue maximum size (JOBMSGQMX) | Job | Yes |
Job name (JOB) | Job | Yes |
Job number (NBR) | Job | Yes |
Job subtype (SUBTYPE) | Job | Yes |
Job switches (SWS) | Job | Yes |
Job type (TYPE) | Job | Yes |
Language ID (LANGID) | Job | Yes |
Logging Level (LOGLVL) | Job | Yes |
Logging of CL programs (LOGCLPGM) | Job | Yes |
Logging Severity (LOGSEV) | Job | Yes |
Logging Text (LOGTYPE) | Job | Yes |
Output queue library name (OUTQLIB) | Job | Yes |
Output queue name (OUTQ) | Job | Yes |
Print key format (PRTKEYFMT) | Job | Yes |
Print text (PRTTXT) | Job | Yes |
Printer device name (PRTDEV) | Job | Yes |
Program return code (RTNCDE) | Job | No |
Purge (PURGE) | Job | Yes |
Run priority (RUNPTY) | Job | Yes |
Sort sequence (SRTSEQ) | Job | Yes |
Sort sequence library (SRTSEQLIB) | Job | Yes |
Status message handling (STSMSG) | Job | Yes |
Submitter’s message queue library name (SBMMSGQLIB) | Job | Yes |
Submitter’s message queue name (SBMMSGQ) | Job | Yes |
System library list (SYSLIBL) | Thread | Yes |
Time separator (TIMSEP) | Job | Yes |
Time slice (TIMESLICE) | Job | Yes |
Time-slice end pool (TSEPOOL) | Job | Yes |
User library list (USRLIBL) | Thread | Yes |
User name (USER) | Job | Yes |
Error messages for RTVJOBA
None
What to Tip at Hotel
Not everyone agrees what guests should tip at hotels. Here’s what three etiquette and hospitality experts and three hotel companies suggest. |
||||||||||||
|
||||||||||||
Suggested tip by hotel guest |
Etiquette expert Patricia Rossi: |
Etiquette expert Jacqueline Whitmore: |
Hospitality expert Roberta Nedry: |
The Ritz-Carlton: |
Hyatt Hotels: |
Omni Hotels: |
||||||
|
||||||||||||
Opening car door |
$0 |
$0 |
$0 |
$0-$2 |
$0-$2 |
$0 |
||||||
|
||||||||||||
Parking car in valet lot |
$0 |
$0-$3 |
$0 |
$0 |
$0-$2 |
$2 |
||||||
|
||||||||||||
Returning car from valet lot |
$2-$5 |
$2-$5 |
$1 |
$2-$4 |
$1-$5 |
$2-$5 |
||||||
|
||||||||||||
Transporting bags from car to lobby |
$1-$2/bag |
$1-$2/bag |
$1-$5 |
$0 |
$2-$5 |
$1/bag |
||||||
|
||||||||||||
Delivering bags to guest room |
$1-$2/bag |
$1-$2/bag |
$1/bag |
$1/bag; $2/heavy bag |
$1/bag or $5 |
$1-$2/bag |
||||||
|
||||||||||||
Concierge |
$0 for directions/restaurant recommendation; $3-$5 for show tickets/restaurant reservation; $15-$20 for sold-out-event tickets/premier restaurant reservation |
$0 for directions/restaurant reservation; $10-$50 for hard-to-get event tickets/premier restaurant reservation |
$0 for directions, information or simple reservations; $10 minimum for hard-to-get tickets/premier restaurant reservations |
$0; $20-$30 for high-demand theater tickets/premier restaurant reservation |
$0 for an answer to a simple question; $5-$10 for making dinner reservation and arranging transportation; $10-$50 daily for multiple bookings |
$2/errand outside hotel; $1-$5/dinner reservation; $10-$20/reservation if recommended restaurant is outstanding; $5/event tickets; $10-$20/hard-to-get event tickets |
||||||
|
||||||||||||
Maid |
$3-$5/daily |
$1-$2/twice daily |
$1-$2/daily |
$1/daily |
$5 for one-night stay or $2/daily |
$1-$5/daily |
||||||
|
||||||||||||
Pool towel attendant |
$1 |
$0; $1-$2 for special service |
$0 unless special service is provided |
$1-$2 |
$0 |
$1 if towel brought to you |
||||||
|
||||||||||||
Spa personnel |
15%-20%/service |
15%-20% if not included in bill |
15%-20%/service |
$20/service* |
15%-20%/service |
10%-15%/service |
||||||
|
||||||||||||
One drink from bartender |
$1 |
$1-$2 or 10%-15% |
at least $1 |
$3-$4 |
15%-20% |
$1 |
||||||
|
||||||||||||
More than one drink from bartender |
$1/drink |
$1-$2/drink or 10%-15% |
10%-20% |
$5-$7 |
15%-20% |
$1/drink; $5/round of drinks |
||||||
|
||||||||||||
Waiter/waitress in restaurant |
15%-20% |
15%-20% |
10%-20% |
15%-20% |
15%-20% |
15%-20% |
||||||
|
||||||||||||
Waiter/waitress at buffet meal |
10%-15% |
15%-20% |
10%-15% |
$5 |
15%-20% |
10%-15% |
||||||
|
||||||||||||
Wine steward |
15%/wine bill |
10%-20%/wine bill; $20-$30 if very expensive wine is ordered |
10%-15%/wine bill |
10%/wine bill |
$0; tip on bill is sufficient |
15%-20%/wine bill |
||||||
|
||||||||||||
Servers during free food/drink at happy hour |
$0 for food server; $1/drink |
$0 unless tip jar is provided |
$0 if guests get everything themselves |
$0-$2 |
tip based on estimated retail value of free items received |
$0 |
||||||
|
||||||||||||
Front-desk agent |
$0; $3-$5 if give special service |
$0 |
$0 |
$0 unless special service is provided |
$0 unless concierge or bellman service is provided |
$0 unless concierge service is provided |
||||||
|
||||||||||||
Delivery of room-service order |
$1 extra if 15%-18% tip is on bill; $18%-20% if no tip on bill |
$0-$3 extra, plus tip on bill |
$0, plus tip on bill, unless special service is provided |
$2-$3 extra, plus tip on bill |
$0, plus tip on bill |
$0 unless very quick service is provided, plus tip on bill |
||||||
|
||||||||||||
Delivery of extra towel, phone book or other requested item |
$1/item |
$1-$3 |
$0 unless hard-to-do item is requested |
$0-$2 |
$0 unless special service is provided |
$1 |
||||||
|
||||||||||||
Delivery of laundered/ironed clothing |
$1-$3/item |
$1-$3 |
$0; $5-$10 if require very quick turnaround |
$2-$3 |
$0 unless special service is provided |
$1 |
||||||
|
||||||||||||
Repair person fixing a problem in room |
$2-$5 |
$0 |
$0 |
$0-$5 |
$0 unless special service is provided |
$0 |
||||||
|
||||||||||||
* = 10%-15% all-day service; $2 for robe/towel deliverySource: Etiquette and hospitality experts, hotels |
||||||||||||
|
CL PROGRAM to INSERT TO FILE USING SQL
DCL VAR(&SQLSTM) TYPE(*CHAR) LEN(512)
CHGVAR VAR(&SQLSTM) VALUE(‘INSERT INTO FTPHIST +
(HDATE, HTIME, HFTPKEY, HLOGDATA, HUSERID) +
VALUES(‘ +
|| ”” || &INSDATE || ”’, ‘ +
|| ”” || &INSTIME || ”’, ‘ +
|| ”” || &FTPKEY || ”’, ‘ +
|| ”” || &LOGDATA00 || ”’, ‘ +
|| ”” || &USERID || ”’)’)
EXCSQL SQL(&SQLSTM)
CL PROGRAM to parse FIELD eliminating quote's
/* parse log data eliminating quote’s */
/* 071603 start */
LOOP:
IF COND(&POS < 80) THEN(DO)
CHGVAR VAR(&POS) VALUE(&POS + 1)
CHGVAR VAR(&POS00) VALUE(&POS00 + 1)
CHGVAR VAR(%SST(&LOGDATA00 &POS00 1)) +
VALUE(%SST(&LOGDATA &POS 1))
IF COND(%SST(&LOGDATA &POS 1) = "E) THEN(DO)
CHGVAR VAR(&POS00) VALUE(&POS00 + 1)
CHGVAR VAR(%SST(&LOGDATA00 &POS00 1)) VALUE("E)
ENDDO
GOTO LOOP
ENDDO
/* 071603 end */
Simple CL Read
$Read:
RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO $Exit)
MONMSG MSGID(CPF0886) EXEC(GOTO $Read)
CL Program to read File from DSPFD and DSPFFD
/* PROGRAM: DSPFAC */
/* THIS PROGRAM DISPLAYS THE FILE ATTRIBUTES OF A FILE USING */
/* OUTPUT FILES FROM THE DSPFFD AND DSPFD COMMANDS. */
/* FILE = QADSPFFD, FORMAT QWHDRFFD */
/* QAFDACCP QWHFDACP */
/* QADSPDBR QWHDRDBR */
/* QADSPFD QWHFD */
PGM PARM(&FILELIBR &OUTPUT)
DCLF FILE(QADSPOBJ)
DCL VAR(&FILELIBR) TYPE(*CHAR) LEN(20)
DCL VAR(&FILE) TYPE(*CHAR) LEN(10)
DCL VAR(&LIBR) TYPE(*CHAR) LEN(10)
DCL VAR(&OUTPUT) TYPE(*CHAR) LEN(5)
DCL VAR(&IDX) TYPE(*DEC) LEN(2 0) VALUE(0)
DCL VAR(&ERRORSW) TYPE(*LGL)
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(100)
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)
MONMSG MSGID(CPF0000) EXEC(GOTO STDERR1)
CHGVAR VAR(&FILE) VALUE(%SST(&FILELIBR 01 10))
CHGVAR VAR(&LIBR) VALUE(%SST(&FILELIBR 11 10))
/* IF *GENERIC WAS NOT SELECTED – DO */
/* IF *ALL WAS NOT SELECTED – DO */
LOOP:
CHGVAR VAR(&IDX) VALUE(&IDX + 1)
IF COND(%SST(&FILE &IDX 1) *EQ ‘*’) +
THEN(GOTO GENERIC)
IF COND(&IDX < 10) THEN(GOTO LOOP)
/* ASSUME ONLY 1 ENTRY */
CHKOBJ OBJ(&LIBR/&FILE) OBJTYPE(*FILE) AUT(*OBJEXIST)
MONMSG MSGID(CPF0000) EXEC(GOTO STDERR1)
CALL PGM(DSPFAC2) PARM(&FILELIBR &OUTPUT)
GOTO END
/* IF *ALL OR *GENERIC SELECTED */
/* DSPOBJD OF ALL FILES IN LIBRARY */
GENERIC:
DSPOBJD OBJ(&LIBR/&FILE) OBJTYPE(*FILE) +
OUTPUT(*OUTFILE) OUTFILE(QTEMP/XDSPOBJD)
OVRDBF FILE(QADSPOBJ) TOFILE(QTEMP/XDSPOBJD)
READ:
RCVF
MONMSG MSGID(CPF0864) EXEC(DO)
END:
DLTF FILE(QTEMP/X*)
RETURN
ENDDO
IF COND(%SST(&ODOBNM 1 1) = ‘Q’) THEN(GOTO READ)
IF COND(&ODOBAT *EQ ‘PF ‘ +
*OR &ODOBAT *EQ ‘LF ‘) THEN(DO)
CHGVAR VAR(%SST(&FILELIBR 01 10)) VALUE(&ODOBNM)
CHGVAR VAR(%SST(&FILELIBR 11 10)) VALUE(&ODLBNM)
CALL PGM(DSPFAC2) PARM(&FILELIBR &OUTPUT)
ENDDO
GOTO READ
STDERR1:
/* Standard error handling routine */
IF COND(&ERRORSW) THEN(SNDPGMMSG MSGID(CPF9999) +
MSGF(QCPFMSG) MSGTYPE(*ESCAPE)) /* Func +
chk */
CHGVAR VAR(&ERRORSW) VALUE(‘1’) /* Set to fail ir +
error occurs */
STDERR2:
RCVMSG MSGTYPE(*DIAG) MSGDTA(&MSGDTA) MSGID(&MSGID) +
MSGF(&MSGF) MSGFLIB(&MSGFLIB)
IF COND(&MSGID *EQ ‘ ‘) THEN(GOTO +
CMDLBL(STDERR3))
SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
MSGDTA(&MSGDTA) MSGTYPE(*DIAG)
GOTO STDERR2 /* Loop back for addl diagnostics */
STDERR3:
RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
MSGF(&MSGF) MSGFLIB(&MSGFLIB)
SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)
ENDPGM