Tokenization of z/OS UNIX directories
How do I tokenize one or multiple z/OS UNIX directories?
Using the z/OS Change Tracker tokenization technology, one or
multiple z/OS UNIX directories may be tokenized. In the following example all
regular files in both directories are tokenized. z/OS Change Tracker opens the
specified directory and makes a list of all regular files sorted according to the
suffixes of the files. For example, all files with the suffix of
.src will be grouped together. For each file a token is
generated and stored in the external token file referred to by the //DD1.
...
//DD1 DD DISP=SHR,DSN=node.ZOSUNIX.OLDTOKEN
//CYGIN DD *
*
SYSUT1=PATH='/u/jones/*.*'
SYSUT1=PATH='/u/smith/*.*'
SAVEDD=DD1
//*
Refer to the sample job CYGU2TOK in Sample jobs.
Can I compare files in two z/OS UNIX directories without first tokenizing them?
Yes. Using the following sample job you may compare regular files in
two z/OS UNIX directories. Since both directories are available on the same
processor tokenization is not required. Note that the USSPATHREPL
command is required to establish matching path names.
//CYGIN DD *
OPTION=MODS
*
SYSUT1=PATH='/u/home/base/*.*'
SYSUT2=PATH='/u/home/target/*.*'
*
USSPATHREPL=('/u/home/base','/u/home/targ')
PATHCOMPARE
//* Other possible reporting options are the following: OPTION=CHANGEONLYShorter report of changes onlyOPTION=MISMATCHreport mismatch file names ADD or DELOPTION=DIFFIf two files are matched in name, DIFF examinedOPTION=SAMESameness examined
Can I tokenize specific file types in a directory (specific suffixes)?
Yes. z/OS Change Tracker allows users to indicate which file types need to be tokenized. In the following example, multiple specific file types are tokenized rather than all files in the specified directory.
...
//DD1 DD DISP=SHR,DSN=node.ZOSUNIX.OLDTOKEN
//CYGIN DD *
*
SYSUT1=PATH='/u/jones/*.jcl'
SYSUT1=PATH='/u/jones/*.src'
SYSUT1=PATH='/u/jones/*.txt'
SAVEDD=DD1
//*
What is the advantage of tokenization for z/OS UNIX files?
Similar to the discussions for z/OS environment tokenization, the tokenization
technology for z/OS UNIX environments enables users to identify changes and report
the changes to other systems. To accomplish this, the same environment may be
tokenized over a period of time. By comparing the OLDTOKEN file and
the NEWTOKEN file, all changes are identified and reported.
How do I compare z/OS UNIX token files to identify and report the changes?
The following statements compare two pre-generated token files using the
PATHCOMPARE command.
...
//DD1 DD DISP=SHR,DSN=node.ZOSUNIX.OLDTOKEN
//DD2 DD DISP=SHR,DSN=node.ZOSUNIX.NEWTOKEN
//CYGIN DD *
LOADDD=DD1
LIST
LOADDD=DD2
LIST
*
PATHCOMPARE
//*
Can I compare two z/OS UNIX environments where the beginning pathnames are different?
Yes. Suppose that the following two directories are tokenized, and the tokens are now stored in
the files OLDTOKEN and NEWTOKEN.
SYSUT1=PATH='u/home/base/*.*' tokens are stored in OLDTOKEN
SYSUT1=PATH='u/home/target/*.*' tokens are stored in NEWTOKEN
Using the USSPATHREPL command, associate the path names to cause a matching path
between the two environments and then compare the files tokens.
...
//DD1 DD DISP=SHR,DSN=node.ZOSUNIX.OLDTOKEN
//DD2 DD DISP=SHR,DSN=node.ZOSUNIX.NEWTOKEN
//CYGIN DD *
USSPATHREPL=('/u/home/base','/u/home/target')
*
LOADDD=DD1
LIST
LOADDD=DD2
LIST
*
PATHCOMPARE
//*
How do I resolve directories recursively for z/OS Change Tracker to tokenize?
See sample jobs CYGU2TBF and CYGU3TAF for examples of recursive tokenization.