UNLOADDN
The UNLOADDN option provides the following information:
- When unload data sets are allocated in the JCL, an override for the default ddname or prefix of those data sets
- When allocating unload data sets dynamically, the output descriptor or prefix to match to the OUTPUT statement
- An optional ddname or output description name for a secondary unload data set
UNLOADDNPFX
The UNLOADDNPFX keyword enables the following features:
- Use UNLOADDN (SYSREC,SYSRED) UNLOADDNPFX to reference numbered DD names or numbered outputDescriptor names where SYSREC and SYSRED are prefixes for these names. For more information, see UNLOADDNPFX prefixing below.
- Use UNLOADDN (SYSREC,SYSRED) UNLOADDNPFX to generate partition-level output data sets when you unload a partitioned object by referencing SYSREC and SYSRED OUTPUT statements with an &PART variable in the DSNAME value. For more information, see UNLOADDNPFX partition-level output.
- Use UNLOADDN SYSREC UNLOADDNPFX to use a single // SYSREC1 DD or OUTPUT SYSREC01 statement as an alternative name for a //SYSREC DD or OUTPUT SYSREC statement (where the alternative name with the suffix 1 might contain as many leading zeros as will fit into 8 characters). For more information, see UNLOADDNPFX alternative name with a 1 suffix .
If you use UNLOADDNPFX, you must not use the BYPART option. For more information on restrictions for UNLOADDNPFX, see Guidelines.
UNLOADDNPFX prefixing
When you use UNLOADDNPFX for prefixing, you must append a numeric value to the ddnames in your JCL or to the outputDescriptor names in your OUTPUT statements. The specified SYSREC or SYSRED name must not end with a numeric digit in order to avoid confusion with the appended numeric value. These numeric values must correspond to the number of SELECT statements used in an UNLOAD command or to the number of partitions when unloading a partitioned object.
If you use an UNLOAD command with two SELECT statements, BMC AMI Unload recognizes two pairs of OUTPUT statements as output files.
Alternatively, if you use UNLOADDN (SYSREC,SYSRED) UNLOADDNPFX with a five-part table, BMC AMI Unload recognizes the following DD statements as output files, with one pair of SYSREC and SYSRED names per partition.
You must use JCL DD names or outputDescriptor names that have a short enough length so that you can append the appropriate numeric value without exceeding 8 characters. For example, you can append only a numeric value of 1 through 99 using SYSREC. This means that UNLOADDN (SYSREC,SYSRED) UNLOADDNPFX can only be used with 99 partitions or less.
For more information about using UNLOADDNPFX prefixing with partitioned objects, please see Unloading-partitions-in-partitioned-table-spaces-to-multiple-data-sets.
UNLOADDNPFX partition-level output
When you use UNLOADDNPFX with an OUTPUT statement that uses an &PART variable (or &PART1, &PART2, &PART3, &PART4, or &PART5) in the DSNAME value, BMC AMI Unload generates individual data sets for each partition of a partitioned object. In this case, the OUTPUT statement must use the exact name specified in the UNLOADDN option.
If you use two OUTPUT statements and one UNLOAD statement to unload a five-part table, BMC AMI Unload generates ten individual, partition-level, data sets.
When you use two OUTPUT statements and one UNLOAD statement, both OUTPUT statements must have an &PART variable in the DSNAME value.
When you use the above SYSIN statements, BMC AMI Unload generates the following data sets:
SYSREC | SYSRED |
---|---|
MYUID.MYDBD.MYTABLE.SYSC0001 | MYUID.MYDBD.MYTABLE.SYSD0001 |
MYUID.MYDBD.MYTABLE.SYSC0002 | MYUID.MYDBD.MYTABLE.SYSD0002 |
MYUID.MYDBD.MYTABLE.SYSC0003 | MYUID.MYDBD.MYTABLE.SYSD0003 |
MYUID.MYDBD.MYTABLE.SYSC0004 | MYUID.MYDBD.MYTABLE.SYSD0004 |
MYUID.MYDBD.MYTABLE.SYSC0005 | MYUID.MYDBD.MYTABLE.SYSD0005 |
UNLOADDNPFX alternative name with a 1 suffix
When you use UNLOADDN xxxx UNLOADDNPFX with a single, JCL DD or OUTPUT statement, you may append a numeric value of 1 to the specified name to be used instead of the specified name. For example, you may use one of the following statements instead of //XXXX DD or OUTPUT XXXX:
//XXXX1 DD … | OUTPUT XXXX0001 |
//XXXX01 DD … | OUTPUT XXXX001 |
//XXXX001 DD … | OUTPUT XXXX01 |
//XXXX0001 DD … | OUTPUT XXXX1 |
The data set name specified in the JCL DD or OUTPUT statement is used for output. If you erroneously specify both //XXXX and //XXXX1, then BMC AMI Unload uses the original //XXXX JCL DD for output. If you use UNLOADDN (xxxx,yyyy) UNLOADDDPFX, then you might also append a numeric value of 1 to yyyy in the same manner as for xxxx.
When you use the above SYSIN statements, BMC AMI Unload generates the following data sets:
SYSREC | SYSRED |
---|---|
UEA.TEMP.MYDBD.DJQ.NGTUNLD9.SR1 | UEA.TEMP.MYDBD.DJQ.NGTUNLD9.SD1 |
When you use the above SYSIN statements, BMC AMI Unload generates the following data sets:
SYSREC | SYSRED |
---|---|
USER.MYDBD.NGTUNLD0.SREC1 | USER.MYDBD.NGTUNLD0.SRED1 |
If you erroneously specify both xxxx and xxxx1 as JCL ddnames or OUTPUT statement names, then BMC AMI Unload uses the original //xxxx JCL DD or OUTPUT xxxx for output.
UNLOADDNPFX feature combinations
If you want to unload multiple tables, we recommend that you use individual UNLOAD statements. If you have existing JCL that uses multiple SELECT statements in an UNLOAD command, you must combine UNLOADDNPFX prefixing and UNLOADDNPFX partition-level output. Consider the following example, in which MYTABLE1 is a three-partition table and MYTABLE4 is a non-partitioned table:
STORCLAS NGT MGMTCLAS MIG14 SPACE (20,200) CYL
OUTPUT YYYY1 DSNAME 'MYUID.MYDBD.MYTABLE1.ULY&PART3'
STORCLAS NGT MGMTCLAS MIG14 SPACE (20,200) CYL
OUTPUT XXXX2 DSNAME 'MYUID.MYDBD.MYTABLE4.ULX'
STORCLAS NGT MGMTCLAS MIG14 SPACE (20,200) CYL
OUTPUT YYYY2 DSNAME 'MYUID.MYDBD.MYTABLE4.ULY'
STORCLAS NGT MGMTCLAS MIG14 SPACE (20,200) CYL
OUTPUT ZZZZ DSNAME 'MYUID.MYDBD.MYTABLES.ULZ'
STORCLAS NGT MGMTCLAS MIG14 SPACE (1,1) TRK
UNLOAD
CNTLDDN ZZZZ
UNLOADDN (XXXX,YYYY) UNLOADDNPFX
CNTLCARDS DB2LOAD
DIRECT YES
SHRLEVEL CHANGE CONSISTENT NO
SELECT * FROM MYDBD.MYTABLE1;
SELECT * FROM MYDBD.MYTABLE4;
BMC AMI Unload uses UNLOADDNPFX prefixing to assign OUTPUT XXXX1 and OUTPUT YYYY1 to the first SELECT statement (for MYTABLE1) and to assign OUTPUT XXXX2 and OUTPUT YYYY2 to the second SELECT statement (for MYTABLE4). As MYTABLE1 is a partitioned object, BMC AMI Unload uses UNLOADDNPFX partition-level output so that BMC AMI Unload generates individual, partition-level, output data sets for each of the three partitions in MYTABLE1. In total, BMC AMI Unload generates the following data sets:
SYSREC | SYSRED | SYSCNTL | OBJECT |
---|---|---|---|
MYUID.MYDBD.MYTABLE1.ULX0001 | MYUID.MYDBD.MYTABLE1.ULY0001 | MYUID.MYDBD.MYTABLES.ULZ | Partitioned |
MYUID.MYDBD.MYTABLE1.ULX0002 | MYUID.MYDBD.MYTABLE1.ULY0002 | ||
MYUID.MYDBD.MYTABLE1.ULX0003 | MYUID.MYDBD.MYTABLE1.ULY0003 | ||
MYUID.MYDBD.MYTABLE4.ULX | MYUID.MYDBD.MYTABLE4.ULY | Non-Partitioned |
Dynamic allocation
When BMC AMI Unload dynamically allocates unload data sets, the outputDescriptor variable represents an output descriptor name or prefix. This name or prefix enables BMC AMI Unload to match the dynamic allocation option values that you specify on the OUTPUT command with the correct unload data sets.