Move Spooled Files using BRM (MOVSPLFBRM)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Move Spooled Files using BRM (MOVSPLFBRM) command provides for the movement of selected spooled files to a specified library-qualified output queue. Selection criteria includes library-qualified from output queue name, from auxiliary storage pool, spooled file, job name, job user, job number, user data, create date range, last used date range, and size range. A run option of *REPORT is provided to allow the user to review the "Move Spooled Files using BRM" report prior to moving the selected spooled files. The report, if printed, is written to printer file QP1AMSF.

Using the output queues' spooled file auxiliary storage pool attribute, BRMS determines whether spooled files will actually move from one auxiliary storage pool to another when moved from one output queue to another. If a spooled file that moves from one outq to another does not move from one auxiliary storage pool to another then BRMS does not check the auxiliary storage pool high storage threshold since the spooled file does not move. If a spooled file that moves from one outq to another also moves from one auxiliary storage pool to another, then before requesting the spooled file to move BRMS determines if the target auxiliary storage pool has sufficient space to accommodate the spooled file without exceeding the high storage threshold. If the spooled file cannot be moved without exceeding this threshold, BRMS will show that the file was not moved, and the file will be included in the summary section detail which indicates the number of files and amount of spooled data that could not be moved.

To use this command, you must have the Backup Recovery and Media Services for iSeries, 5722-BR1, licensed program installed.

Restriction:

Top

Parameters

Keyword Description Choices Notes
OPTION Option *REPORT, *MOVE Optional, Positional 1
TOOUTQ To output queue Qualified object name Optional, Positional 2
Qualifier 1: To output queue Name
Qualifier 2: Library Name
FROMOUTQ From output queue Qualified object name Optional, Positional 3
Qualifier 1: From output queue Generic name, name, *ALL
Qualifier 2: Library Name, *ALL
FILE File Name, *ALL Optional, Positional 4
JOB Job name Name, *ALL, * Optional
USER User Name, *ALL Optional
USRDTA User data Name, *ALL Optional
FROMASP From ASP Character value, *ALL, *SYSTEM Optional
SLTCRTDATE Select create date Element list Optional
Element 1: From date Character value, *BEGIN, *CURRENT
Element 2: To date Character value, *END, *CURRENT
SLTUSEDATE Select last used date Element list Optional
Element 1: From date Character value, *BEGIN, *CURRENT
Element 2: To date Character value, *END, *CURRENT
SLTSIZE Select size Element list Optional
Element 1: Size type *KB, *MB, *GB, *PAGES
Element 2: Minimum size 0-999999, 0
Element 3: Maximum size 0-999999, *NOMAX
Top

Run option (OPTION)

Specifies whether you want to produce a report of spooled file candidates for movement or process a move operation.

Note: You should always run a report of move candidates (*REPORT option) prior to processing the move operation.

*REPORT
You want to produce the Move Spooled Files using BRM report. The report is written to printer file QP1AHSF.
*MOVE
You want to process a move operation.
Top

To output queue (TOOUTQ)

Specifies the name of the library and output queue to which you want to move spooled files. The result can be either a report or movement of spooled files to output queue from another output queue.

Qualifier 1: To output queue

to-output-queue-name
Specify the name of an output queue to which you want to move the spooled files.

Qualifier 2: Library

library-name
Specify the name of a library that contains the output queue.
Top

From output queue (FROMOUTQ)

Specifies the name of the library and output queue from which you want to move spooled files. A special value of *ALL is provided to indicate that all output queues on the system are to be processed. If *ALL is specified, no value can be specified for a library name. When *ALL is not specified for the From output queue name, a library name must be specified to indicate which library contains the from output queue. A special value of *ALL is supported for the From output queue library meaning all libraries in the system, including QSYS, are searched. The result can be either a report or movement of spooled files from an output queue to another output queue.

Qualifier 1: From output queue

*ALL
Include all output queues in the report or move process. No value can be specified for library when using the special value *ALL.
generic*-from-output-queue-name
Specify the generic name for the output queue. A generic name is a character string of one or more characters followed by an asterisk (*): for example, ABC*. The asterisk (*) substitutes for any valid characters. A generic name specifies all output queues with names that begin with the generic prefix, for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete output queue name.
from-output-queue-name
Specify the name of an output queue that you want to include in the report or move process.

Qualifier 2: Library You must specify a library name or the special value *ALL when you specify the from output queue name.

*ALL
All libraries in the system including QSYS are searched.
library-name
Specify the name of a library that is to be searched for the spooled file.
Top

Select file (FILE)

Specifies which spooled files based on file names are to be moved.

*ALL
Include all spooled files regardless of name in the report or move operation.
spooled-file-name
Specify the name of a spooled file that you want to include in the report or move operation.
Top

Select job name (JOB)

Specifies which spooled files, based on the name of the job that created them, are to be moved.

*ALL
Include all spooled files, regardless of the job that created them, in the report or move operation.
*
All spooled files for the jobs whose name matches the job running this command are selected.
job-name
Specify the name of a job whose spooled files are to be included in the report or move operation.
Top

Select user (USER)

Specifies which spooled files based on the name of the user that created them are to be included in the report or move operation.

*ALL
Include spooled files for all users in the report or move operation.
user-name
Specify the name of a user whose spooled files are to be included in the report or move operation.
Top

Select user data (USRDTA)

Specifies which spooled files, based on the associated user data tag, are to be included in the report or move operation.

*ALL
Include spooled files with any data tag in the report or move operation.
user-data
Specify the user data that you want to include in the report or move operation.
Top

From ASP (FROMASP)

Restricts spool file search to include only data from output queues contained in libraries residing in the specified auxiliary storage pool.

*ALL
Include all auxiliary storage pools in the report or move operation.
*SYSTEM
Include only the system (1) auxiliary storage pool in the report or move operation.
from-ASP-name
Specify the name of an auxiliary storage pool that you want to include in the report or move operation.
from-ASP-number
Specify the number of an auxiliary storage pool that you want to include in the report or move operation.

Note: UDFS, primary and secondary auxiliary storage pools are not supported for this parameter.

Top

Select create date (SLTCRTDATE)

Specifies a range of creation dates that you want to use when reporting or moving spooled files. The From date is the beginning of a date range and the To date is the end of the date range. Only spooled files that were created on or after the From date and on or before the To date are included in the selected spooled files.

Note: Using this parameter, it is possible to enter a date with no separator, or a number of days which can be up to 5 digits in length. For instance, if you are using month/day/year format, the number 12904 would be formatted as January 29, 2004. If on the other hand, you entered a number 13904, BRMS assume that this is not a date, but rather is a number. BRMS always tries to calculate a calendar date first when a number is entered and then if the date it calculates is not valid, assumes that it is a number of days. If the number that is entered is over 5 digits and the date that it calculates is not valid, you receive an error message.

Element 1: From date

*BEGIN
The earliest creation date is the beginning date of a date range.
*CURRENT
The current date is the beginning date of a date range.
from-create-date
Specify the date in job date format with or without date separators that you want to be the beginning date of a date range.
number-of-days
Specify the number of days before the current day that is used to determine the starting date of the date range.

Element 2: To date

*END
The last date found is the end of the date range for the search.
*CURRENT
The current date is the ending date of the date range.
to-create-date
Specify the date in job date format with or without date separators that you want to be the ending date of a date range.
number-of-days
Specify the number of days before the current day that is used to determine the ending date of the date range.
Top

Select last used date (SLTUSEDATE)

Specifies a range of last used dates that you want to use when reporting or moving spooled files. The From date is the beginning of a date range and the To date is the end of the date range. Only spooled files that were last used on or after the From date and on or before the To date are included in the selected spooled files.

Note: Using this parameter, it is possible to enter a date with no separator, or a number of days which can be up to 5 digits in length. For instance, if you are using month/day/year format, the number 12904 would be formatted as January 29, 2004. If on the other hand, you entered a number 13904, BRMS assume that this is not a date, but rather is a number. BRMS always tries to calculate a calendar date first when a number is entered and then if the date it calculates is not valid, assumes that it is a number of days. If the number that is entered is over 5 digits and the date that it calculates is not valid, you receive an error message.

Element 1: From date

*BEGIN
The earliest last used date is the beginning date of a date range.
*CURRENT
The current date is the beginning date of a date range.
from-use-date
Specify the date in job date format with or without date separators that you want to be the beginning date of a date range.
number-of-days
Specify the number of days before the current day that is used to determine the starting date of the date range.

Element 2: To date

*END
The last date found is the end of the date range for the search.
*CURRENT
The current date is the ending date of the date range.
to-use-date
Specify the date in job date format with or without date separators that you want to be the ending date of a date range.
number-of-days
Specify the number of days before the current day that is used to determine the ending date of the date range.
Top

Select size (SLTSIZE)

Specifies the size of spooled files that are to be included in the report or move operation. Three positional values can be be specified to select the files. Only files that are larger in size than the Minimum size or smaller in size than the Maximum size are selected.

Element 1: Size type

*KB
The spooled file size is specified in kilobytes.
*MB
The spooled file size is specified in megabytes.
*GB
The spooled file size is specified in gigabytes.
*PAGES
The spooled file size is specified in pages.

Element 2: Minimum size

0
Spooled files with a size that is greater than zero are included.
minimum-size
Specify the size that a spooled file must equal or exceed to be included in the report or move operation. The spooled file size can range from 0 to 999,999 and is used with the Size type and Maximum size values to determine which files to include.

Element 3: Maximum size

*NOMAX
All spooled are included that are greater than or equal to the value specified in the Minimum size parmameter.
maximum-size
Specify the size that a spooled file must not exceed to be included in the report or move operation. To be included in the selection, the specified size must also be equal to or greater than the minimum size specification and less than or equal to the specified size. The spooled file size can range from 1 to 999,999 and is used with the Size type value to determine which files to include.
Top

Examples

Example 1: Move Large Spooled Files in System ASP

MOVSPLFBRM OPTION(*MOVE) TOOUTQ(MYLIB/MYOUTQ)
           FROMASP(*SYSTEM) SLTSIZE(*MB 50 *NOMAX)

This command moves all spooled files currently in the system ASP that are fifty or more megabytes in size to the output queue named MYOUTQ in the library named MYLIB. This example assumes MYLIB is not in the system ASP, and the ASP attribute of the spooled file for the MYOUTQ output queue specifies that spooled files are placed in the same ASP as the output queue.

Top

Error messages

*ESCAPE Messages

BRM1131
Library &1 not found or not available.
BRM1917
Feature not installed.
BRM1921
Feature not licensed.
BRM1F18
No output queues were found meeting selection criteria.
BRM2112
ASP &2 not valid.
BRM1F27
Operation not allowed, resources not available.
BRM1F28
Migration not performed.
BRM2112
ASP &2 not valid.
BRM2270
Output queue &2 in library &3 cannot be used for migration.
BRM4040
Access denied for user &1.
BRM40A2
BRMS product initialization required.
CPF9800
All CPF98xx messages could be signaled. xx is from 01 to FF.
Top