IMS Snippets are included in the Snippets view only if the installable feature IMS Code Generators is installed in the product. The Snippets view is included by default in the z/OS Projects perspective.
If your snippet begins with a new line of code, begin your snippet with a blank line. This action ensures that the inserted code begins at the correct column position.
The categories for IMS snippets are as follows:
You can use the first four snippets categories to add IMS DL/I calls to your COBOL program. Each snippet in these categories corresponds to an individual DL/I function. Requesting one of these snippets opens a window that prompts you for details of the specific DL/I function call. At the top of the window, you specify the interface type to use in the DL/I call from the list of interfaces compatible with the selected DL/I function call. The remaining fields correspond to the parameters of the corresponding DL/I call, with the following exceptions:
When you use these snippets with the System z LPEX Editor or COBOL Editor, references to nested fields of the AIB or PCB control blocks in the snippet code are replaced automatically with the actual fields present in the referenced AIB or control block. For example, when you generate the line of code MOVE LENGTH OF AIB TO AIBRLEN OF AIB, the snippet generator looks up the field that is defined at offset 8 of the AIB control block that is selected in the window and uses that as the name for the AIBRLEN field. If the AIB block cannot be parsed out of the code, a default value for the field is used.
When you generate the DL/I call, the snippet code generator tries to look up a level 77 field whose VALUE clause equals the DL/I function and use that in the call. For example, when you create the code for the GHN snippet, the generator parses the code and might find the following declaration:
77 GET-HOLD-NEXT PICTURE X(4) VALUE 'GHN '.
At that point, GET-HOLD-NEXT is substituted into the function call. If no match is found, the snippet name (GHN in this case) is used in the function call.
These snippets add commonly used COBOL data structures to your program.
These snippets add the DL/I function names as level 77 data structures.