CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs

DOCWEB Logo PDF Available

Utilities: IEBGENER Cataloged Procedure

CNS Document ID: D0081
Last Updated: 06/27/2002

Abstract

This document describes basic capabilities of the IBM utility IEBGENER to copy disk or tape data sets. A cataloged procedure, IEBGENER, simplifies using the utility. The document shows examples to copy sequential data sets to or from disk and tape; or to a printer.

Related search topics include JCL, z/OS (OS/390), PDS, partitioned data set, SL, NL, jobs.


UF Computing & Networking Services

CNS Information Services

2124 NE Waldo Rd, Suite 2100
Gainesville Florida  32609-8922
(352) 392.2061


Table of Contents

IEBGENER
Introduction to IBM's IEBGENER Program
JCL for the IEBGENER Cataloged Procedure
Examples Using the IEBGENER Cataloged Procedure
Questions and Documentation

IEBGENER

This information has been adapted from a CIRCA handout titled "IEBGENER: Basic Uses of the IEBGENER Program."

This document describes how to use a local cataloged procedure, named IEBGENER, to access the IBM program called IEBGENER to copy a sequential data set from one place to another. It shows the basic capabilities of IEBGENER for some common tasks, such as to copy a sequential data set to disk or tape, or a printer. For documentation on the more advanced applications of IBM's IEBGENER, such as editing capabilities and working with variable-length records, refer to the IBM MVS/DFP Utilities manual. Be sure to note the restrictions listed in the manual and beware of possible DCB conflicts before running a more complicated IEBGENER job.

This information assumes you have some knowledge of JCL and running z/OS (OS/390) batch jobs. In particular, it is necessary to be familiar with DD statements. There are several locally written procedures, such as CARDTAPE, CARDDISK, TAPEDISK and DISKTAPE, that copy data sets, all of which use IEBGENER and require a very minimum knowledge of JCL to use. If you are a novice with JCL, one of these procedures may be all you need to copy your data set.

If you are using magnetic tapes, there are also local utilities and procedures that copy tape files to another tape. TPUTIL is an easy-to-use utility for copying magnetic tapes.

You can find information about utilities in various CNS documents by getting into DOCWEB and searching on the term "util" to find references about utilities.

Introduction to IBM's IEBGENER Program

IEBGENER is an IBM program which copies sequential data sets from one place to another (e.g., to another disk data set, to a tape, to an output device such a line printer, etc.). IEBGENER allows you to:

  • create backups of sequential data sets or members of a partitioned data set

  • create a partitioned data set or member from a sequential input data set

  • reblock or change other data set characteristics

  • copy a file to a printer

IEBGENER also has editing facilities that allow you to change data set characteristics. These capabilities, however, are not described in this document.

Neither IEBGENER, nor any procedure which invokes IEBGENER, is intended for copying load module libraries, SAS data sets, VSAM data sets, and several other types of direct-access data sets. You should check other documents in DOCWEB to see if there is a utility or procedure that is more suitable for your type of file. If you are not sure what kind of data set you have, please contact the CNS Support Desk before attempting to copy or move your file.

JCL for the IEBGENER Cataloged Procedure

To simplify using the IEBGENER program for basic copy jobs, there is a local cataloged procedure also named IEBGENER. Using this procedure, the basic IEBGENER job consists of the JCL shown in Figure 1. You must supply the information for the DD statements.

Figure 1. JCL for Using the IEBGENER Cataloged Procedure.

//GENERJOB JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
...setup statement(s) if needed...
//  EXEC  IEBGENER
//SYSUT1   DD  input data set
//SYSUT2   DD  output data set

In all IEBGENER jobs,

SYSUT1

specifies the input data set to be copied. This sequential file may be an OS disk data set, tape file, or sequential member of a partitioned data set (PDS). The input data set may consist of two or more concatenated data sets if the record formats (RECFM) of those data sets are alike and they reside on the same type devices.

For tape files, the tapes may be standard-labeled (SL) or non-labeled (NL).

The SYSUT1 data set or file must always exist at the beginning of the job.

SYSUT2

specifies an output data set or a device to which the input is copied. This may be a disk data set, tape file, or printer. If the file is to be copied to disk, the output data set must be a sequential data set, a member of a new partitioned data set, or member of an existing partitioned data set.

An output tape file may be to SL or NL tapes, either cartridges or reels.

The SYSUT2 data set may already exist or it can be created during the job.

If the output data set is being created (DISP=NEW) and you do not specify DCB attributes, the input data set's DCB attributes are used by default. For this reason, if the output is to a printer you should always code the DCB attributes on the SYSUT2 statement since these require unblocked records.

In all examples shown in this document, the logical record lengths (LRECL) of the input and output data sets must be the same. (If you want to use IEBGENER's editing features to change the LRECL, refer to IBM's documentation.)

You can use the IEBGENER cataloged procedure to re-block a data set. You can specify a different block size (BLKSIZE) on the SYSUT2 DD statement from that on the SYSUT1 statement. This is useful when copying from one type of device to another (e.g., from tape to disk) to make the blocking factor more efficient for the output data set. For fixed-length records, the output BLKSIZE must be a multiple of the logical record length (LRECL).

When copying to a printer, the output BLKSIZE should always equal the LRECL (that is, unblocked records). If the BLKSIZE is greater than the LRECL, only the first record of each block will be copied.

Remember to include the appropriate SETUP statement(s) when you are using cartridge or reel tapes.

Examples Using the IEBGENER Cataloged Procedure

All tape and disk data sets are assumed to be fixed (RECFM=F) or fixed blocked (RECFM=FB).

On standard-labeled tapes, if you catalog the data set name it must conform to CNS's data set naming conventions.

As a general rule, the SYSUT1 and SYSUT2 DD statements can be in any order.

This job copies a cataloged OS disk data set named UF.userid.DISKDATA to the first file on tape MYTAPE and names it TAPEFILE. MYTAPE is a standard-labeled, cartridge tape. Since no DCB attributes appear on SYSUT2, the tape file will have the same DCB attributes as the disk data set. This job creates a new first file on the tape, so if any other files previously existed on the tape, they will be lost.

Figure 2. Copy a Disk Data Set to a Standard-Labeled Cartridge Tape.

//TOTAPE JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
/*SETUP TAPEC,1
// EXEC IEBGENER
//SYSUT1  DD DSN=UF.userid.DISKDATA,DISP=SHR
//SYSUT2  DD DSN=TAPEFILE,UNIT=TAPEC,
//           DISP=(NEW,KEEP),
//           VOL=SER=MYTAPE,LABEL=(1,SL)

This job copies the third file on the standard-labeled tape, TAPEA, to the first file on the non-labeled tape, TAPEB. The DCB attributes for the output tape file are the same as those of the input tape file. The input tape file and the output tape file may never reside on the same tape.

Figure 3. Copy SL Tape File to a NL Tape File.

//SLTONL JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
/*SETUP TAPEC,1
/*SETUP TAPE9,1
//  EXEC IEBGENER
//SYSUT1 DD DSN=ACCTS,DISP=SHR,UNIT=TAPEC,LABEL=(3,SL),
//       VOL=SER=TAPEA
//SYSUT2 DD UNIT=TAPE9,DISP=(NEW,KEEP),VOL=SER=TAPEB,
//       LABEL=(1,NL)

This job copies file 4 of the non-labeled tape, TAPENL, to file 2 of standard-labeled tape, TAPESL, and names it NEW.FILE. The DCB attributes must be specified for the input tape because the attributes are not stored with the data set as they are on SL tapes. The new output data set is reblocked to a block size (BLKSIZE) of 6160. Both 6400 and 6160 are multiples of the logical record length of 80.

Figure 4. Copy a NL Tape File to a SL Tape and Re-block.

//REBLK JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
/*SETUP TAPEC,2
// EXEC IEBGENER
//SYSUT1 DD VOL=SER=TAPENL,UNIT=TAPEC,DISP=OLD,LABEL=(4,NL),
//       DCB=(RECFM=FB,LRECL=80,BLKSIZE=6400)
//SYSUT2 DD DSN=NEW.FILE,UNIT=TAPEC,DISP=(NEW,KEEP),
//       LABEL=(2,SL),VOL=SER=TAPESL,
//       DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)

In this job, file 2 (MYPROG) of 9-track, standard-labeled tape TAPOLD is copied to a new member of an existing PDS. The new member is named NEWMEM. Because the PDS already exists, the DISP parameter is DISP=OLD, even though the member is new. DCB attributes are not specified for the output data set. Because it is an existing data set, it already has attributes associated with it, and these are used. If the pre-existing DCB attributes are not the same as the input data set's, they must conform to reblocking restrictions; that is, the BLKSIZE must be a multiple of the LRECL.

Figure 5. Copy SL Tape File To A New Member of a PDS.

//SLTOPDS JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
/*SETUP TAPE9,1
// EXEC IEBGENER
//SYSUT2  DD  DSN=UF.userid.PDS(NEWMEM),DISP=OLD
//SYSUT1  DD  DSN=MYPROG,UNIT=TAPE9,VOL=SER=TAPOLD,
//        DISP=OLD,LABEL=(2,SL)

Member MYPROG of the partitioned data set UF.userid.PROGRAMS.SOURCE is sent to a line printer. The LRECL of the input data set and the output data set must be the same. When a line printer is used as the output device, DCB attributes should always be specified and the LRECL cannot be greater than 133. In this example, it is assumed that the input data set does not have carriage control characters. For an example with carriage control, see below.

Figure 6. Copy a PDS Member to the Printer.

//TOPRT JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
// EXEC IEBGENER
//SYSUT2  DD SYSOUT=A,DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
//SYSUT1  DD DSN=UF.userid.PROGRAMS.SOURCE(MYPROG),DISP=SHR

Assume that disk data set UF.userid.RESEARCH.TEXT is a text file that contains carriage control characters in column 1 for printing to a line printer. The output RECFM should be FA, which means that the character in column 1 of each record (line) is interpreted as a carriage control character. Carriage control characters are used to control line skips and top-of-form in printing text and other readable documents. You should specify carriage control ONLY when you know that carriage control characters are included in the file you are copying. If the data set or file which you have copied to a printer does not contain readable data or carriage control characters in column 1, IEBGENER will attempt to print it anyway, producing a lot of garbage and wasted paper.

Figure 7. Copy a Listing File to the Printer Using Carriage Control.

//TOPRTCC JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE  PRINT node.location
// EXEC  IEBGENER
//SYSUT1 DD DSN=UF.userid.RESEARCH.TEXT,DISP=SHR
//SYSUT2 DD SYSOUT=A,DCB=(RECFM=FA,LRECL=133,BLKSIZE=133)

This job concatenates the disk data set UF.userid.FILE6 with disk data set UF.userid.FILE2 and copies the result to file 1 of the standard-labeled tape TAPEC, naming it UF.userid.NEWFILE. The input disk data sets must have the same RECFM and LRECL and reside on the same type devices. The output data set that is being created has no DCB attributes specified, so the attributes of the input data sets are used.

Figure 8. Copy Concatenated Disk Data Sets to SL Tape.

//CATCPY JOB (,,time,lines),'your name',CLASS=class
/*ROUTE  PRINT node.location
/*SETUP TAPEC,1
// EXEC IEBGENER
//SYSUT2  DD  DSN=UF.userid.NEWFILE,
//            UNIT=TAPEC,DISP=(NEW,CATLG),
//            LABEL=(1,SL),VOL=SER=MYTAPE
//SYSUT1  DD  DSN=UF.userid.FILE6,DISP=SHR
//        DD  DSN=UF.userid.FILE2,DISP=SHR

Questions and Documentation

If you have questions about the IEBGENER program or the local IEBGENER cataloged procedure, please call the CNS Support Desk at (352) 392-2061, or send e-mail to consult@lists.ufl.edu.

See the CNS General Information: CNS Software and Software References document (D0009) for a list of recommended references on IBM utilities, JCL, and z/OS (OS/390) batch jobs.

For information about using OS data sets, see CNS DOCWEB document D0045, z/OS (OS/390) Disk Data Sets at CNS: Utilities for z/OS (OS/390) Disk Data Sets.

For information about using magnetic tapes, see CNS DOCWEB document D0017, Using Magnetic Tapes at CNS: Utilities for Magnetic Tapes.

There are also DOCWEB documents for various other local utilities and procedures.

Your Comments are Welcome

We welcome your comments and suggestions on this and all CNS documentation. Please send your comments to:


CNS Information Services

2124 NE Waldo Rd, Suite 2100
Gainesville Florida  32609-8922
(352) 392.2061

UF Computing & Networking Services
2124 NE Waldo Rd, Suite 2100
Gainesville, Florida 32609-8922

Phone: (352) 392.2061
E-mail: editor@cns.ufl.edu

CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs