USING THE IEBGENER UTILITY AT USC



Introduction
JCL for Using IEBGENER
Creating a Copy of a Sequential Data Set
Creating and Edited Copy of a Sequential Data Set
Messages
Related Documentation

Introduction

IEBGENER is an IBM-supplied utility program designed to generate copies of data sets when disk storage or tape is involved.  This documentation discusses the most commonly used features of IEBGENER, namely:

  • Creating a copy of a sequential data set
  • Creating a copy of a sequential data set with a logical record length that is different from that of the original, or creating a copy with rearranged, omitted, or changed fields.

    To print CMS files, the CMS command PRINT should be used after spooling output to a remote printer with the USCROUTE command.  Enter the commands 'HELP USC USCROUTE' and 'HELP PRINT' from CMS for details.

    For a complete discussion of the capabilities of IEBGENER, and detailed information concerning the Job Control Language discussed in connection with IEBGENER, consult Related Documentation for references to more information.

    For information on copying datasets on CMS to/from DASD using the Internet TCP/IP command FTP, refer to the MVSTCPIP documentation.

    Do not use IEBGENER to copy SAS data sets or partitioned data sets.  Use SAS PROC COPY for SAS data sets and the IBM utility IEBCOPY for partitioned data sets.  See Related Documentation for references to more information.

    This documentation was produced by the Academic Research and Data Center of USC.  Questions about its contents should be referred to a consultant at 777-6865.

    JCL for Using IEBGENER

    The Job Control Language (JCL) statements necessary to execute IEBGENER are:

       //  JOB statement
       // EXEC PGM=IEBGENER
       //SYSIN    DD  (necessary DD parameters)
       //SYSPRINT DD  (necessary DD parameters)
       //SYSUT1   DD  (necessary DD parameters)
       //SYSUT2   DD  (necessary DD parameters)
     
    Note that the user must supply the DD parameters necessary to define the data set.  For information concerning DD parameters, consult the JCL documentation.
     All four data sets must be included, though they may appear in any order.  The function of each of the data sets is as follows:

    SYSIN - defines the input control data set used for changing or rearranging fields in each record (in most cases, the statement //SYSIN DD DUMMY is used)
    SYSPRINT - defines the output data set used for printing error messages and normal termination messages from IEBGENER (in most cases, the statement //SYSPRINT DD SYSOUT=* can be used)
    SYSUT1 - defines the input data set to be copied
    SYSUT2 - defines the output data set, that is, the new copy

    Creating a Copy of a Sequential Data Set

    When no DCB information is coded on the SYSUT2 DD statement for the new data set and no editing commands are supplied in the SYSIN DD statement, IEBGENER will automatically use the LRECL and RECFM information of the SYSUT1 data set for the new copy.  When copying to MVS DASD volumes or magnetic tape volumes, IEBGENER will re-block the output data set with a block size that is most efficient for the output device.  DASD block sizes will be approximately 28Kb, tape block sizes will be approximate 32Kb.  If you require a specific block size for the output file, code that block size in the DCB (LRECL, BLKSIZE, RECFM and, if needed, DEN or TRTCH) information on the SYSUT2 DD statement.

    Examples:

    A. Sample JCL setup to copy a CMS file to disk:

       //  JOB statement
       //  EXEC PGM=IEBGENER
       //SYSIN DD DUMMY
       //SYSPRINT DD SYSOUT=*
       //SYSUT1 DD *
         Merge contents of file to be copied here
         (Must not include any JCL statements)
       /*
       //SYSUT2 DD DSN=name,UNIT=DASD,
       //  DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(6,1),RLSE),
       //  DCB=(LRECL=80,RECFM=FB)
    
    name - replace with a valid data set name.  NOTE: For assistance in calculating the appropriate BLKSIZE and SPACE allocation for a 3390 data set, enter the command DISKSTOR from CMS.


    B. Sample JCL setup to print a paper copy of a disk storage data set:

       //  JOB statement
       //  EXEC PGM=IEBGENER
       //SYSIN DD DUMMY
       //SYSPRINT DD SYSOUT=*
       //SYSUT1 DD DSN=name,DISP=SHR
       //SYSUT2 DD SYSOUT=*
    
    name - replace with a valid data set name.

    In addition to printing a copy of a data set stored on disk, this sample JCL setup could be used to copy a data set from disk to CMS by coding a JCL ROUTE statement for the job in the following format:

       /*ROUTE PRINT VM.userid  
    userid - the number of the CMS account to which the data set is to be sent.
    NOTE: Only the first 132 characters of each logical record will be printed.


    C. Sample JCL setup to copy a data set stored on disk to tape:

       //  JOB statement
       //  EXEC PGM=IEBGENER
       //SYSIN DD DUMMY
       //SYSPRINT DD SYSOUT=*
       //SYSUT1 DD DSN=name1,DISP=SHR
       //SYSUT2 DD DSN=name2,UNIT=TAPE9,VOL=SER=xxxxxx,
       // LABEL=(1,SL,,OUT),DISP=(NEW,PASS)
    
    name1 and name2 - replace with valid data set names
    xxxxxx - replace with the volume serial number of the data set
    NOTE: If the tape file being written to is a TTV (temporary tape volume) another the LABEL parameter should be coded:
       LABEL=(1,SL,,OUT,EXPDT=98000) 

    Creating an Edited Copy of a Sequential Data Set

    IEBGENER utility control statements enable the user to create a copy of a data set in which:

    (1) the fields of each record have been rearranged, omitted, or replaced by a literal, and/or
    (2) the logical record length has been changed.  The two utility control statements necessary for making such changes are the GENERATE and RECORD statements.


    GENERATE statement:

    The GENERATE statement is used to tell IEBGENER that editing is to be performed.  The operands are:

       MAXFLDS=x
       MAXLITS=y
    
    x - replace with the total number of field operands in the RECORD statements (discussed below).
    y - replace with the total number of characters in the literals in the RECORD statements.

    For example:

       GENERATE MAXFLDS=9,MAXLITS=99  

    RECORD Statement:

    The RECORD statement is used to define the fields and literals for editing.  The operands are:

       FIELD=(l,il,,ol) 
    l - replace with the length of the field to be copied or the literal to be inserted.
    il - replace with the location of the beginning of the field in the input record or the literal enclosed in single quotes that is to be inserted in the field.
    ol - replace with the location of the beginning of the field in the output record.  The FIELD operand is repeated for each field to be copied.  If part of a record is not included in any field operand, it is omitted from the output data set.

    The logical record length of the output data set can be calculated by adding the length values of all the fields.

    For example:

       RECORD FIELD=(10,50,,1),FIELD=(5,'ABCDE',,11)
    These utility control statements are included as input in the SYSIN data set.  Utility control statements begin in column 2 and end in or before column 71.  To continue a statement, break at a comma and begin the continuation statement somewhere between columns 4 and 16.

    Examples:

    A. Sample JCL setup to copy to disk (using the least space) a CMS file that has information in only the first 35 columns:

       //  JOB statement
       //  EXEC PGM=IEBGENER
       //SYSIN DD *
        GENERATE MAXFLDS=1
        RECORD FIELD=(35,1,,1)
       /*
       //SYSPRINT DD SYSOUT=*
       //SYSUT1 DD *
         Data set to be copied
       /*
       //SYSUT2 DD DSN=name,UNIT=DASD,
       //  DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(3,1),RLSE),
       //  DCB=(LRECL=35,RECFM=FB)
    
    name - replace with a valid data set name.


    B. Sample JCL setup to copy a disk data set to another disk data set after inserting an identifier:

       //  JOB statement
       //  EXEC PGM=IEBGENER
       //SYSIN DD *
        GENERATE MAXFLDS=2,MAXLITS=7
        RECORD FIELD=(7,'USC1280',,1),FIELD=(80,1,,8)
       /*
       //SYSPRINT DD SYSOUT=*
       //SYSUT1 DD DSN=name1,DISP=SHR
       //SYSUT2 DD DSN=name2,UNIT=DASD,
       //  DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(2,1),RLSE),
       //  DCB=(LRECL=87,RECFM=FB)
    
    name1 and name2 - replace with valid data set names.

    Messages

    Below is a discussion of several frequently encountered IEBGENER messages.  For information on other IEBGENER messages, consult Related Documentation.


    Normal Termination Messages:

       DATA SET UTILITY - GENERATE
       PROCESSING ENDED AT EOD
    
    These messages are printed when the IEBGENER job step is successful.  They indicate that the data set to be copied has been copied as specified.  NOTE: 'EOD' is an abbreviation for 'end of data'.
       DATA SET UTILITY - GENERATE
       IEB3521I WARNING: OUTPUT RECFM/LRECL/BLKSIZE COPIED FROM INPUT 
       PROCESSING ENDED AT EOD
    
    These messages are printed when no DCB parameters were specified for the output data set (that is, the new copy).  They inform you that the DCB parameters that have been used for the output data set are copied from the input data set; they do not indicate an error.


    Abnormal Termination Messages:

       DATA SET UTILITY - GENERATE
       IEB311I CONFLICTING DCB PARAMETERS
    
    This message means that the DCB parameters specified for the output data set are not compatible with those specified for the input data set.  One common reason for this message is the omission of a block size specification for a file containing fixed (F) or fixed block (FB) records.
        DATA SET UTILITY - GENERATE
       IEB339I COMMAND MISSING PRECEDING COL. nn
    
    This message usually means that a control statement was typed in column 1 of a line ('nn' represents an integer in this example).  If a control statement is typed in column 1, even though the control statement ('COMMAND') is present, it is not recognized since control statements must begin in column 2.

    Related Documentation

    For detailed information on IEBGENER and IEBCOPY, consult the IBM manual OS/VS2 MVS Utilities (GC26-3902), which is available for reference at Computer Services and at some remote sites.  This manual is also available for purchase from IBM.

    For detailed information on IEBGENER messages, consult the IBM manual OS/VS Message Library: VS2 MVS Utilities (GC26-3920), which is available for reference at CS and at some remote sites.  It can also be purchased from IBM.

    For information concerning copying SAS data sets, consult the SAS User's Guide: Basics, available from SAS Institute, Box 8000, Cary, NC 17511.  This manual is also available for reference at ARDC.  The JCL documentation provides more in depth information on coding Job Control Language.  Documentation on various topics related to computer use at USC are available at the ARDC Documentation site, at the ARS Handouts site, and the Academic Resources Support Receptionist, third floor, Computer Services Building.


    ARDC Documentation     ARDC Home Page     USC Home Page



    *SAS is the registered trademark of SAS Institute Inc., Cary, N.C. 27511, U.S.A.

    This page updated March 14, 2001 by Amy W. Yarbrough, Academic Research and Data Center.
    Copyright © 1999, The Board of Trustees of the University of South Carolina.
    URL http://www.sc.edu/ardc/docs/iebgen.html