Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto JCLNew to Visual Studio Code? Get it now.
Auto JCL

Auto JCL

David Canto

|
173 installs
| (0) | Free
Automatic definition of a job or step that invokes a batch program
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

auto-jcl README

This extension add's a menu item to cobol program's open in the editor to automatically create a JCL Job that executes the cobol program open in the editor based on a template replacing a selected group of variables based on the program and the extension settings. The job will automatically identify input, output and extend files the existence of sysin

Tip: There are diferente templates in the settings. All templates can be personalized.

  • Job templates depending on the existence of DB2 elements in the program:

    • Programs with DB2
    • Programs without DB2
  • File templates depending on access type defined in the program:

    • Input files
    • Output files
    • Extend/I-O files
  • SYSIN when accept is used in the program

Features

  • Menu item only available to cobol programs to generates jcl automatically.

  • Identification all files defined in file section.

    • Identification file access type and inclusion of the respective template to the job:

      • Input
      • Output
      • Extend/I-O
    • Identification of the lrec for the existing files independently if the file definition is declared on the program or on a copybook.

  • Identification of the existence of ACCEPT instruction and inclusion of Sysin template in the Job.

    Tip: There are different templates that can be defined for the different file types.

  • Variables to be used on the templates and replaced on the Job generation.

Variables divided by type:

  • Templates - Used to position specific sub templates:

    • ${InputFiles}: Position of the list of input files from the cobol soure code generated with the Input File Template.

      //${File} DD DSN=${UserID}.FILE.${Program}.${File},
      //            DISP=SHR
      
    • ${OutputFiles}: Position of the list of output files from the cobol soure code generated with the Output File Template.

      //${File} DD DSN=${UserID}.FILE.${Program}.${File},
      //            DISP=(NEW,CATLG),
      //            SPACE=(TRK,(5,5),RLSE),
      //            DCB=(RECFM=FB,LRECL=${Lrec})
      
    • ${ExtendFiles}: Position of the list of extend files from the cobol soure code generated with the Extend File Template.

      //${File} DD DSN=${UserID}.FILE.${Program}.${File},
      //            DISP=(OLD,CATLG),
      //            SPACE=(TRK,(5,5),RLSE),
      //            DCB=(RECFM=FB,LRECL=${Lrec})
      
    • ${DeleteFiles}: List om delete instructions for output files to be used with program IDCAMS.

      DELETE ${UserID}.FILE.${Program}.${File} PURGE
      
    • ${Sysin}: Position of the sysin instruction generated with the Sysin Template.

  • File specific - To be used only on file templates and defined automatically from the cobol source code:

    • ${File} - File name defined on Cobol source code

    • ${Lrec} - Total Lrec size for the file

  • Others - defined in Settings:

    • ${Steplib} - Steplib library to be used on the steplib definition. Can be more than one library.

    • ${UserID}: TSO User ID

    • ${JobName}: Namme of the Job in the job card

    • ${Class}: Class definition in job card

    • ${MsgClass}: MsgClass definition in job card

    • ${StepName}: StepName for the step of the program to execute. If not define will be defined with the program name

    • ${System}: DB2 System where the program will be executed

    • ${Plan}: DB2 Plan where the program will be executed

    • ${StatusInput}: Disp definition for input files.

      Possible values:

      • SHR - Default
      • NEW
      • MOD
      • OLD
    • ${StatusOutput}: "Disp definition for output files.

      Possible values:

      • SHR
      • NEW - Default
      • MOD
      • OLD
    • ${TerminationOutput}: Disp definition for output files

      Possible values:

      • DELETE
      • KEEP
      • CATLG - Default
      • UNCATLG
    • ${Abstr}: Space definition for output files

      Possible values:

      • TRK - Default
      • CYL
    • ${PrimaryQuantity}: Space definition, primary quantity

      Default: 05

    • ${SequndaryQuantity}: Space definition, sequndary quantity

      Default: 05

    • ${NotUsedSpace}: What to do to the space allocated to an output data set, but not use

      Possible values:

      • RLSE - Default
      • CONTIG
      • MXIG
      • ALX
      • ROUND
    • ${Recfm}: Recfm definition for output files "default": "FB",

      Possible values:

      • UA
      • UM
      • UT
      • UTA
      • UTM
      • V
      • VA
      • VM
      • VB
      • VBA
      • VBM
      • VS
      • VSA
      • VSM
      • VT
      • VTA
      • VTM
      • VBS
      • VBSA
      • VBSM
      • VBT
      • VBTA
      • VBTM
      • VBST
      • VBSTA
      • VBSTM
      • F
      • FA
      • FM
      • FB - Default
      • FBA
      • FBM
      • FT
      • FTA
      • FTM
      • FBT
      • FBTA
      • FBTM
      • FS
      • FSA
      • FSM
      • FBS
      • FBSA
      • FBSM
      • D
      • DA
      • DB
      • DBA
      • DS
      • DSA
      • DBS
      • DBSA
    • ${Lrec}: Default lrec definition for output files

      default: 80

Requirements

n/a

Extension Settings

  • auto-jcl.CopybookLibrary: Local Copybook temporary library used to read file definition copybooks.
  • auto-jcl.TemplateDB2: Template for a JCL job that calls a programa with DB2.
  • auto-jcl.Template: Template for a JCL job that calls a programa without DB2.
  • auto-jcl.DeleteStep: Delete step to eliminate files before execution
  • auto-jcl.Steplib: List of librarys to include on Steplib DD declaration"
  • auto-jcl.VariablesToReplaceInTemplate: List of variables to replace on JCL Templates. The variables must be represented as ${Variable} in order to be replace by the extension when generating the jcl.
  • auto-jcl.InputFileTemplate: Input files template.
  • auto-jcl.OutputFileTemplate: File template to be used for output files open as write only.
  • auto-jcl.ExtendFileTemplate: File template to be used for files open as read and write defined opened as I-O or EXTEND.
  • auto-jcl.SysinTemplate: Sysin Template.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

1.0.0

Initial release of Auto-JCL

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft