01 Aug 2015 Text Resolver© is About Ready to Launch
When integrity is highly required for some text files such as JCL (jobs or procedures), parameters definitions or others, which are used differently among different scopes, normally you have to prepare their templates which contain fixed text and substitutable symbols. z/OS system provides some built-in system symbols for JCL and parameters text which are automatically resolved each time the text is referred. Users can also provide their own local symbols. The dictionary of local symbols must be defined and listed in IEASYMxx system parameter and effective once per IPL. You can utilize this facility unless your requirements are beyond its capabilities.
Your requirements might more complex than what IEASYMxx provide. Lets say you need built-in system symbols &SYSCLONE, &SYSNAME and &SYSR1 in your procedure template below for LPAR scope. Meanwhile, you also need 2 other symbol sets for 2 operation scopes, cycle (daily, weekly, monthly etc.) and type (batch and online). Cycle scope is symbolized as @symbols (yellow) and type scope as %symbols (blue). Below is an example of the template of a procedure JCL.
Text Resolver© is a small z/OS utility program. Its main module and most of subroutines are written in Rexx language, which is very users friendly. Only some certain special parsers are written in assembly to gain better performance. But it might very useful to keep integrity of complicated text based operations. It can resolve the above example of template. It can even resolve system &symbols without annoying the system.
Called as "Resolver" because it is not just substitution. Resolve means substitute and adjust. When a symbol is found somewhere in an input text file, it is then substituted with its defined dictionary in the parameter file. The text is then adjusted to accommodate the size of its value, depends on the type of the input text. If the type is JCL for instant, record length is limited only 80 bytes whereas normally the text only occupy the first 71 bytes, substitution sometime could spilled out to the next line for more space. In certain condition, spilling the text out to the next line is not very simple. That is the main reason why Text Resolver© is needed.
The dictionary to which variable symbols resolving is referred, must be prepared in a flat text file called as Text Resolver© parameters file which referred as PARMFILE file. In PARMFILE, a special variable symbol is written as the following example:
%ABC = (TEXTLIB,TXTLIB,USER.TXTLIB,USER.TEXT.LIBRARY)
There can be more than one reference value defined for one symbol. However, Text Resolver© only uses one of them each execution time, depends on selected scope. Let say you have defined 4 scope, DVLP, TEST, PROD and BKUP in your PARMFILE as the following example:
SCOPE = (DVLP,TEST,PROD,BKUP)
Then you execute Text Resolver© and pass PROD as an argument,
This means, Text Resolver© will use PROD as substitution reference scope. Hence, for each variable symbol, it only uses one reference which is positioned at the same order as PROD in SCOPE parameter, is the third. So, for the above %ABC, only the third value, USER.TXTLIB is selected as a reference value. Therefore, when the following text string is processed,
Text Resolver© will substitute %ABC with USER.TXTLIB, and produce the following output:
Once Text Resolver© is started, initially it collects all variable symbols values according to selected scope, and build internal reference table for substitution. In such the above case, only third value of each defined variable symbols are collected.
Moreover, you can insert variable symbols within the dictionary definition of other variable symbol. Dictionary that contains variable symbols will be resolved first prior to substitution of which this dictionary is referred, as shown in the following example:
SCOPE = (DVLP,TEST,PROD,BKUP)
%A = (SYS1.%B.%C, SYS2.%B.%C, SYS3.%B.%C, SYS4.%B.%C)
%B = (DEV,UAT,PRO,DRC)
%C = (AP%X,QA%X,OP%X,OP%X)
%X = (SA,QE,TS,SE)
In order to resolve the text files or PDS members, Text Resolver© utility must be executed as a batch job. Resolved texts are stored in output file of the utility job. It can also be automated by automation tools such as zJOS/Sekar© or zJOS/Puspa© or SDLC tools such as CA-Endevor or other.
In case you are interested and curious to do the trials, kindly contact us or just leave a comment.