Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2012-10-05T15:04:51Z by ENO2010
ENO2010
ENO2010
45 Posts
ACCEPTED ANSWER

Pinned topic Property-group : JCL Substitution

‏2012-05-24T13:00:52Z |
Hi,

I want to use the global variable "MEM" which is predefined in global variables.
In the JCL, I can found the declaration


// MSGCLASS=H,MSGLEVEL=(1,1),TIME=(,4),REGION=144M,COND=(16,LT) 
//* 
//        SET MEM=ENODB2


in the bind section, I declare


//SYSTSIN   DD  * DSN SYSTEM(DB9G) BIND PACKAGE(TEST)- OWNER(EMPOT01) - QUALIFIER(EMPOT02) - MEMBER(*&MEM*) - ACTION(REP) - VALIDATE(BIND)


I expect that the variable "&MEN" will be replaced by "ENODB2" but it doesn't! Why?

a second issue in the bind step, I need to add "DSN910.SDSNLOAD" but how?

thanks

Eric
Updated on 2012-10-05T15:04:51Z at 2012-10-05T15:04:51Z by ENO2010
  • SystemAdmin
    SystemAdmin
    1086 Posts
    ACCEPTED ANSWER

    Re: Property-group : JCL Substitution

    ‏2012-05-24T17:23:57Z  in response to ENO2010
    Eric

    As the term "JCL Substitution" implies, the variable substitution is made to JCL. In your case, data input is involved, hence no substitution. One possible solution is to process such statements with a preprocessor.

    I presented a session on this topic (with solutions) at an Enterprise Modernisation conference a couple of years ago: Job Generation Flexibilisation.

    There is also an IBM JCL Substitution plug-in; a detailed description of which is available as whitepaper in the RDz Library (document SC23-7680-00).
    Regards

    Tony
    • ENO2010
      ENO2010
      45 Posts
      ACCEPTED ANSWER

      Re: Property-group : JCL Substitution

      ‏2012-05-25T07:29:21Z  in response to SystemAdmin
      I try the solution you describe in the document. it's nice.
      but in the property-group -> COBOL settings -> JCL Substitution give us the opportunity to define "User Variables" and/or to use "Global Variables".

      My question is how to use those variables?

      Eric
      • ENO2010
        ENO2010
        45 Posts
        ACCEPTED ANSWER

        Re: Property-group : JCL Substitution

        ‏2012-05-25T07:51:36Z  in response to ENO2010
        the goal is to select my cobol program, click right "Generate JCL" -> Compile and link.
        I suppose that this operation will used the global or user variables to fill the jcl.
      • SystemAdmin
        SystemAdmin
        1086 Posts
        ACCEPTED ANSWER

        Re: Property-group : JCL Substitution

        ‏2012-05-26T07:24:57Z  in response to ENO2010
        Eric

        The JCL Substitution plug-in is a special solution that does not have anything to do with property groups. If you want to use PGs and the associated JCL substitutíon variables you must implement your own solution. A solution I implemented (and described in detail in my Flexibilisation document) involved writing, in effect, a postprocessor (written in REXX) that invoked (batch-)ISPF to use file tailoring services on a skeleton that defines the BIND input. To retain flexibility, this BIND input is supplied as inline data. Because the postprocessor is invoked as (additional) JCL, it can be passed JCL substitution variables as parameters that it in turn can make available to the defined BIND input. Although this may seem to be complicated , it actually involves the following steps:
        1. Write base BIND input to a temporary PDS member
        2. Write a REXX exec to invoke Batch ISPF
        2.1 Make EXEC parameters (JCL substitution variables) available to ISPF
        2.2 ISPF FTINCL on this temporary PDS member
        2.3 Write the fail-tailored BIND input to a temporary file
        3. Invoke the DB2 BIND command with this temporary file as input.

        Of course, a better approach would be for RDz to extend variable substitution to data input.

        Regards

        Tony
  • bonils
    bonils
    26 Posts
    ACCEPTED ANSWER

    Re: Property-group : JCL Substitution

    ‏2012-05-31T13:30:17Z  in response to ENO2010
    Hi,
    another solution could be that I have used is to have the //SYSTSIN point to a dataset that can have the &MEM jcl substitution. Of course you have to create that member in advance but that could be done quite easy using RDz Menu Manager.
    In this solution you have to create the Bind member once initially (and whenever you want to change it)
    and then you can specify in the Property Group
    //SYSTSIN DD DSN=your.bind.PARMS(&MEM),DISP=SHR
    This gives you a common BIND JCL for all programs using that propertygroup.

    Bo Nilsson
    • ENO2010
      ENO2010
      45 Posts
      ACCEPTED ANSWER

      Re: Property-group : JCL Substitution

      ‏2012-06-06T17:48:29Z  in response to bonils
      thanks guys, I will test the proposed solutions.

      Eric
    • ENO2010
      ENO2010
      45 Posts
      ACCEPTED ANSWER

      Re: Property-group : JCL Substitution

      ‏2012-10-05T15:04:51Z  in response to bonils
      Hi Bo,

      could you please post a sample?

      thanks

      Eric