Rational Programming Patterns for System z

Micropattern for the implementation of customized SQL accesses

If an SQL access has been customized in the -GG lines of a Segment, you can decide to implement it or to ignore it in the Program which calls this Segment. You must use the SQL micropattern.

Implementation in the Batch Applications function

Customized accesses can be implemented only if the Program -CD lines contain a Block code in the External name field and an organization in the Organization field.

You must explicitly call each customized access you want to generate in the Program.

Open the COBOL code associated with your Program with the PDP COBOL editor and enter the SQL micropattern and its parameters.

You must respect the following syntax:
  • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
  • SQL is the micropattern identifier. It is required.
  • " " must frame the operands.
  • SGPG is the Segment code in the Program. It is required.
  • SS00 is the Segment code in the repository, if it is different from the Segment code in the Program.
  • R is the access type. It is required.
    • If you specify the standard access before the non-standard access, the customization of the non-standard access will complement the standard access.
    • If you specify only the non-standard access without specifying a standard access, the customization of the non-standard access will be implemented. It will constitute a user function unknown to the generator. You will have to describe and manage it with specific code.
    Note: You must separate each operand with one space and you must code the accesses on two positions.
  • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
Important: To implement the multirow function, you must specify the MULTIROW=ssss,xxx option in the -GO lines of the calling Program. (ssss is a Segment and xxx is the maximum index).
Figure 1. Implementation of a customized standard select access from Segment SS00 (Segment code in Program: PGSG):
*{SQL "SGPG SS00 R"
*}
Figure 2. Implementation of a non-standard select access from Segment SS00 (Segment code in Program: PGSG)
*{SQL "SGPG SS00 R R1"
*}

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)