Saturday, 11 August 2012

IEFBR14 utility


IEFBR14 utility


This utility used to create , delete,  uncatlog,  catlog  a PS dataset or PDS dataset.

I can handle all these stuff using ISPF main menu so why I use this utility?

As you can create, delete, etc through ISPF main menu but consider a scenario wher you have to copy a dataset data into a new dataset so here in your program only you are creating a file and copying a content from one file to another file.


      Program of IEFBR14 utility as below.



     This program will create the PDS with above specification. 

      Here I am not using the control card i.e sysin dd  so I have written sysin dd dummy.
      This PDS file have a record length of 80 bytes.
      Block size is 800 bytes.
      Record format is fixed block and
       Dataset organization is PO.

 For PDS dataset we write DSORG=PO and for PS there is no any DSORG filed so it creates a PS dataset.

    This job will run at maxcc=0 .

      Now I will show you the specification that I have given in my program will matching or not.





As you know while creating a PS file we keep the field organization as blank.

So I will keep the organization field as blank to create a PS dataset.





Output message.


Properties of file.





For deleting the Dataset use the same utility but in dd statement write

DDname dd dsn=’ file which to be deleted it’s name’

                    Disp=(old,delete,delete)



It will delete your mentioned file.
Similarly to catlog the file use disp=(old,catlg).
To uncatlog the file use disp=(old,uncatlg).












1 comment: