Use Source Statement Retrievals to catalog definitions to a new COMLIB / M4LIB
search cancel

Use Source Statement Retrievals to catalog definitions to a new COMLIB / M4LIB

book

Article ID: 31059

calendar_today

Updated On:

Products

Vision:Builder

Issue/Introduction

How do I use Source Statement Retrievals to catalog definitions to a new COMLIB / M4LIB?

 

 

Resolution

SSR is a useful tool to copy selected items to a different M4LIB.


First, to see what you have and list the item names in each M4LIB library by item type:

//LIST EXEC PGM=MARKIV
//STEPLIB DD DISP=SHR,DSN=visionBuilder.loadlib
//M4LIB   DD DISP=SHR,DSN=your.m4lib
//M4LIST  DD SYSOUT=what.your.site.uses
//M4INPUT DD *
LISTMLIBRC
        CTLIN                    <<<< CT starts in column 9
/*
//

Now retrieve the source for file definitions:

//RETRIEVE EXEC PGM=MARKIV
//STEPLIB DD DISP=SHR,DSN=visionBuilder.loadlib
//M4LIB   DD DISP=SHR,DSN=your.m4lib
//M4LIST  DD SYSOUT=what.your.site.uses
//M4SSOUT DD DSN=sysout.file,DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//              SPACE=(TRK,n,n),RLSE)
//M4INPUT DD *
RETRIEVERC                           S    <<<<< S is in column 38
        CTRFD                             <<<<< CT starts in col 9
/*
//

To retrieve the source for definitions of tables, arrays and logical dataviews, transaction groups, and, requests and request groups, substitute RTD, RAD, RDB, RGD and RRG, respectively, for RFD on the second M4INPUT statement.

After you initialize a new M4LIB you can catalog all definitions into a new M4LIB by simply adding the following to the top of the source datasets you have created: CATALOG1RC and point M4INPUT to the dataset and execute the first JCL example above.

Cataloging requests cannot be done in mass because they must be associated with a file definition. You can use a CTLST for each FD to see which requests are associated, then re-catalog.