### JCL Considerations

If you use JCL to run FLCL batch programs, it is recommended to use the parameter file feature for inlining commands. Parameter files can also be used for each object and overlay (see example below):

#### Example

     //FLCLXCNV EXEC PGM=FLCL,REGION=0M,PARM='XCNV=DD:PARM'
     //STEPLIB  DD DSN=&SYSUID..FLAM.LOAD,DISP=SHR
     //SYSOUT   DD SYSOUT=*
     //SYSPRINT DD SYSOUT=*
     //PARM     DD *
        INPUT(
           SAV.FILE
           (
              FIO.REC
              (
                 NAME=s'~input.dataset'
              )
           )
        )
        OUTPUT(
           SAV.FILE
           (
              FMT.BLK
              (
                 METHOD=L4X #conform to PKWARE#
              )
              CNV.ZIP
              (
              )
              FIO.ZIP=DD:ZIPARCH
           )
        )
     /*
     //ZIPARCH  DD *
     (
        NAME=s'~.output.ziparch'
        APPEND #add member to archive#
     )
     /*
     //STDENV   DD *
     LANG=de_DE.IBM1141
     /*

The parameter files (DD:PARM, DD:ZIPARCH) are read by the command line parser and executer (CLE/P). This works only in the expected manner if NUMBER=OFF is specified for this job in the ISPF editor. With NUMBER=ON, the numbering is part of the inline code and will result in a syntax error from the CLE/P. The same is valid for the DD name STDENV. In a parameter file, you can add a semicolon at the end of each line to handle the line number as comment.

Since version 5.1.20-23372: On command level if no parameter given and no parameter file assigned, then the DD name 'FLAMPAR' is read. See the example below:

    //FLCLINFO EXEC PGM=FLCL,REGION=0M,PARM='INFO'
    //STEPLIB  DD DSN=&SYSUID..FLAM.LOAD,DISP=SHR
    //SYSOUT   DD SYSOUT=*
    //SYSPRINT DD SYSOUT=*
    //FLAMPAR  DD *
       GET.SYSTEM
    /*

To execute our commands we recommend the stack and heap definitions for the memory management of the language environment below (the IBM defaults are in comment above). If for example the increments to low (128 bytes), then the run and CPU time could increase significantly.

    //CEEOPTS  DD *
    *RPTSTG(ON)
    ALL31(ON)
    *STACK(128K,128K,ANYWHERE,KEEP,512K,128K) LE default
    STACK(1M,1M,ANYWHERE,KEEP,512K,128K)
    *HEAP(32K,32K,ANYWHERE,KEEP,8K,4K)        LE default
    HEAP(1M,1M,ANYWHERE,KEEP,8K,4K)
    /*

Please use the storage report (above as comment) to determine the best values for your usage. With does a lot of work depending on the parameter given. It could possible depending on what is done with FLAM that better values increase performance and lower CPU utilization.

With ALL31(OFF) and HEAP(,,BELOW,,) the available memory is too small for the stack in some cases, especially when using the FLUC subsystem, table or large-record support. Since version 5.1.25, FLAM uses application-specific run-time option defaults with the CEEUOPT assembly language source program to set these application-specific option defaults. The CEEUOPT3 member used for 31 bits and the CEEUOPT6 member used for 64 bits are located in hlq.FLAM.SRCLIB. We recommend to build and link the examples if you are going to write application that uses our APIs (e.g. FLCREC).

To interpret commands correctly, some of the punctuation characters are on different code points depending on the EBCDIC CCSID used to enter these values. The environment variable LANG must be set to the correct CCSID to interpret tilde and other characters correctly.

see Special EBCDIC code page support of Command Line Processor

Since z/OS 2.1, a new service (CEEGTJS) is available to determine the values for exported JCL symbols in the application. The service is called dynamically and the language environment must be in the steplib concatenation to use it. If the service is not available, the exported JCL symbols cannot be used. If the environment variable replacement fails the exported JCL symbols are tried. This feature allows you to use exported JCL symbols in the control statements of FLCL like environment variables. This is mainly useful to build powerful JCL procedures.

     //E0       EXPORT SYMLIST=(CHAROUT,HASHALGO,HASHLEN)
     //S1       SET    CHAROUT=IBM1141
     //S2       SET    HASHALGO=SHA512
     //S3       SET    HASHLEN=128
     //CONV     EXEC   PGM=FLCL,PARM='CONV=DD:PARM'
     //STEPLIB  DD     DSN=FLAM.LOAD,DISP=SHR
     //SYSPRINT DD     SYSOUT=*
     //SYSOUT   DD     SYSOUT=*
     //PARM     DD     *,SYMBOLS=JCLONLY
     READ.RECORD(FILE=DD:INPUT)
     WRITE.TEXT(FILE=DD:GZIP COMP.GZIP()
       HASH(OUTPUT=DD:HASH
            FORMAT=HEX
            CUT=<HASHLEN>/2  # important out-bytes=HASHLEN*2 if hex #
            CCSID=<CHAROUT>
            ALGO=&HASHALGO.
            )
     )
     //INPUT   ...
     //GZIP    ...
     //HASH    ...DCB=(RECFM=FB,LRECL=&HASHLEN.)...

The environment variables have a higher priority. If there is an environment variable with the same name as an exported JCL symbol, the value of the environment variable is used. System variables available as JCL symbols (if SYSSYM=ALLOW is specified in the class definition) can be exported and used in the control statements. Since version 5.1.17 of FLAM, the system symbols are generally available for replacment (e.g '...<&LDAY>...') if no environment variable with the same name exists. This means that the system symbols have the lowest priority in the replacement process. To export all JCL symbols for an application, you can use 'SYMLIST=*'. The "&name." replacment of JESS (DD *,SYMBOLS=JCLxxxx) can also be utilized if inline coding is used. For an external parameter file, however, the JCL symbols are only available with "<name>".