Go to LeighWeb Home Page            

Back To LeighWeb Mainframe Utilities Page

View the module associated with this documentation

 The CONTENTS edit macro works similarly to the VIEW edit macro.  Type the
 command CONTENTS on the command line in an edit session, place the cursor on
 the beginning of a dataset name, and press .  CONTENTS then parses the
 line and extracts the dataset name, reads the dataset sequentially, and places
 the data from the dataset into the datasey being edited.

 The datalines from the target dataset are, by default, inserted as edit
 "message lines" (not real data).  In ISPF 3.0 and higher, these lines can be
 made into data lines with the MD line command.  You can, however, specify the
 parameter WRITE when invoking CONTENTS to insert the contents of the file as
 actual data lines.

 The obvious application for CONTENTS comes in creating some test JCL.  For
 instance, if you are editing some JCL which you've copied from production, and
 it invokes IDCAMS, there will be some SYSIN cards associated with it.  If the
 SYSIN cards are in another dataset and do a DELETE/DEFINE on a production VSAM
 dataset, you may want to do the same DELETE/DEFINE on a test dataset instead.
 What you would do is type CONTENTS WRITE on the command line, place your cursor
 on the first position of the SYSIN dataset name, and press .  The
 contents of that file are then inserted into your JCL.  You can make your
 changes and invoke the SYSIN cards in-stream instead of in a dataset name.