Migrating an ADCD z/OS release to the next release.

With traditional z/OS you upgrade products one at a time. For example, you use one release of CICS, install the next release of CICS, and check it works. You then roll it out to all z/OS images. You take the next product and repeat it.

With z/OS you create a new IPL image, using all of the old components, such as master catalog, page sets etc, do a test IPL and resolve any problems.

With ADCD you have one complete system for example with system data sets on volumes beginning with D4, and the next “release” has volumes beginning with D5. It is not just a matter of IPLing the new system because your data, and any configuration you did will not be on the new system.

In this post, I’ll cover some of the steps you need to take to be able to run on a newer level of ADCD. The list will not be complete or detailed enough, so please let me have any suggestion and comments to improve it.

What to you need to think about?

There is a series of pre-requisites that are needed in the migration process.

My initial thoughts list is

  • Define the zPTD devmap configuration file with the new disks, so the new and old systems can see all of the DASD volumes
  • In any old configuration you want to use, change explicit volumes to their symbolic volume. The operator command D SYMBOLS gives you the symbol names. For example change ….Z24C… to …&SYSVER… This means it will pick up the current level which ever system you have IPLed
  • Import any user catalogs
  • Define the alias for COLIN.* data sets into the new master catalog. You can now use COLIN.* data sets from the new system.
  • Use your old RACF database, or make a copy for the new system to use
  • Copy system Unix files. For example in /etc/. It is easiest to backup and restore them
  • Copy user Unix files. If you have a ZFS for all your files, this may be as simple as mounting it on the newer system. If you have files in the system provided file system, you will have to backup and restore them, or move them to your ‘user ZFS’.
  • Copy across your members in USER.* members. it is worth reviewing these and deleting old ones which are not used. I compared the USER.old.parmlib members with the ADCD.old.parmlib member to see what changes I had made. 
  • Once you IPL the new system it will use your new members
  • Copy across ICSF definitions
  • Check out all started tasks.

First steps

You need to copy data sets and files from the old system to the new system, for example user.z24c.proclib to user.z25d.proclib. It is easiest to have the volumes from both systems available to the z24 and z25 systems.

The user.z24c.proclib will be cataloged on the z24 system, and the user.z25d.proclib will be cataloged on the z25 system, so you’ll need to cross catalog the data sets. These configuration data sets will be on the xxCFG1 volume, so you can use ISPF 3.4, specify the volume and use the ‘C’ line command to catalog the datasets so they can be seen on both systems.

User data – for example all my RACF define jobs are in a PDS under COLIN. These are in a user catalog which can be imported into the newer system.

You need to create an alias in the master catalog

DEFINE ALIAS (NAME(COLIN ) RELATE('A4USR1.ICFCAT') )

With this, I can now refer to COLIN.* data sets from the older system.

Detailed instructions

TCPIP

I had to change the TCPIP Resolver (of IP names and addresses).

In ADCD.Z31A.TCPPARMS(GBLTDATA) I changed the commented LOOKUP statement. Then I stopped and restarted the RESOLVER. Without this change requests to lookup caused 30 second delays.

; LOOKUP DNS LOCAL 
; Colin's change 
  LOOKUP     LOCAL 

Using the RACF DDS server I got messages

ICH420I PROGRAM GPMDDSRV FROM LIBRARY SYS1.SERBLNKE CAUSED THE
ENVIRONMENT TO BECOME UNCONTROLLED.

I also needed to do the RACF commands

RALTER PROGRAM * ADDMEM('SYS1.SERBLNKE'//NOPADCHK)
RALTER PROGRAM * ADDMEM('SYS1.SGRBLINK'//NOPADCHK)
SETROPTS WHEN(PROGRAM) REFRESH

Save and copy /etc

Migrating an ADCD z/OS release: user data sets, user catalogs and High Level Qualifier

Start here:Migrating an ADCD z/OS release to the next release.

I have covered datasets, aliases and catalogs in One minute mvs: catalogs and datasets.

If your master catalog is a mess

If you have your personal data sets in the master catalog instead of a user catalog, see Here’s another nice mess I’ve gotten into!

You could start again on the new system and do it properly.

Note down which volumes your data sets are on. On the new system define a user catalog and alias, and use ISPF 3.4, to list the contents of the volume and use the C local command to catalog the data set.

I found the easiest way of doing VSAM datasets is a backup and restore

If you have a user catalog for your user data sets

You need to get a list of the user aliases in the master catalog on the old system, and the user catalogs the aliases refer to, before trying to import them into the new system. I could not find a way to list the master catalog from another system. See here for example JCL

To access your data sets in a user catalog you need to import the catalog into the master catalog on the new system, and define the aliases for your data to the catalog.

On your new system, you will not have immediate access to your data sets, so you either need

  • to access a dataset, and specify the volser information,
  • or you need to have a copy of the JCL to import a user catalog, and define alias, stored in a note pad area outside of z/OS. Edit a member such as USER.*.PROCLIB(TEMP) and paste the import catalog JCL. When that has worked, paste in the add alias to your datasets ( COLIN.*). Once you have done this, you can use ISPF 3.4 and use COLIN.* to locate your data sets.

Once you have your list of aliases and user catalogs, you can IPL the new system and import the user catalogs, and define the aliases.

Product data sets

There is usually an alias in the master catalog for a program product. The alias may have the product release as part of the name. If you have customised any of the product owned datasets, you may need to copy the data off.

Migrating an ADCD z/OS release: datasets

Start here:Migrating an ADCD z/OS release to the next release.

What to you need to think about?

ADCD provided data sets you may have changed

This should only be USER.*.* data sets, but you may have updated ADCD data sets. You should copy any changes into the USER.*. data sets. On the new system, you can copy this to the newer (and empty) USER.*.* data sets.

Some of the data sets I updated are

  • USER.Z24C.PARMLIB
  • USER.Z24C.PROCLIB
  • USER.Z24C.CLIST
  • USER.Z24C.SYSEXEC
  • USER.Z24C.TCPPARMS
  • USER.Z24C.VTAMLST
  • ADCD.Z24C.PARMLIB(JES*)
  • ADCD.Z24C.TCPPARMS. I should have create a copy of the TCPIP procedure in USER.Z24C.PROCLIB, and changed ADCD.Z24C.TCPPARMS to USER.Z24C.TCPPARMS

You can use ISPF 3.4 to display the contents of a PDS, and use sort changed or tab to the Changed column and press enter. Check the date and userid.

If you haven’t changed the ADCD.* members, compare the old and new, and change your USER.* to incorporate any changes if necessary. You can use the ISPF editor command “compare” to show you the differences between members.

User data

I have a lot of data sets with a high level qualifier of COLIN. Fortunately I set up an IDCAMS alias so all COLIN.** data sets were cataloged in a user catalog. On the new system, I just have to import the catalog.

If you did not set up a user catalog for your personal data sets.

You could set up a user catalog on the old system, set up an alias such as COLIN1, then rename all COLIN.* to COLIN1. On the new system you import the user catalog, and define the alias COLIN1. Set up a new user catalog, and a new alias, then copy/rename the data set from COLIN1 to COLIN.

Migrating an ADCD z/OS release: VSAM files

Start here:Migrating an ADCD z/OS release to the next release.

It is not very easy to copy VSAM files from one system to another.

Backup

You can backup files, including VSAM files using DFDSS, DUMP DATASET command

//IBMDFDSS JOB 1,MSGCLASS=H 
// SET BACKUP=COLIN.BACKUP.CSF
//SDE EXEC PGM=IEFBR14,REGION=0M
//TARGET DD DSN=&BACKUP,DISP=(MOD,DELETE),
// SPACE=(CYL,(1,1))

//S1 EXEC PGM=ADRDSSU,REGION=0M
//TARGET DD DSN=&BACKUP,DISP=(MOD,CATLG),
// SPACE=(CYL,(50,50),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DUMP -
DATASET(INCLUDE(CSF.CSFCKDS.NEW, -
CSF.CSFPKDS.NEW, -
CSF.CSFTKDS.NEW ) -
BY(DSCHA,EQ,1)) -
RESET -
OUTDDNAME(TARGET) -
COMPRESS
/*
  • If you specify REGION=0M,PARM=’TYPRUN=SCAN’ it will check the syntax of the commands without executing them.
  • You can use BY(DSCHA… to do incremental backups – so backup what has changed. It is the data-set-changed flag is on or off.

The DSCHA,EQ,1To perform incremental backups with DFSMSdss, you can filter with
BY(DSCHA,EQ,1) to dump only data sets that have changed since the last dump was taken. If you also code the RESET keyword, DFSMSdss changes the data-set-changed indicator (DSCHA) after successfully dumping the data set. For more information about the RESET keyword

The RESET says if the dump was successful, reset the data-set-changed flag to off.

The output was

ADR101I TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'DUMP '
ADR109I 2024.002 12:04:53 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED
ADR016I RACF LOGGING OPTION IN EFFECT FOR THIS TASK
ADR006I 2024.002 12:04:53 EXECUTION BEGINS
ADR788I PROCESSING COMPLETED FOR CLUSTER CSF.CSFCKDS.NEW, 1 RECORD(S) PROCESSED, REASON 0
ADR788I PROCESSING COMPLETED FOR CLUSTER CSF.CSFPKDS.NEW, 6 RECORD(S) PROCESSED, REASON 0
ADR788I PROCESSING COMPLETED FOR CLUSTER CSF.CSFTKDS.NEW, 987 RECORD(S) PROCESSED, REASON 0
ADR801I 2024.002 12:04:53 DATA SET FILTERING IS COMPLETE. 3 OF 3 DATA SETS WERE SELECTED:
  0 FAILED SERIALIZATION
  AND 0 FAILED FOR OTHER REASONS
ADR454I THE FOLLOWING DATA SETS WERE SUCCESSFULLY PROCESSED
  CLUSTER NAME CSF.CSFCKDS.NEW
  CATALOG NAME CATALOG.Z24C.MASTER
  COMPONENT NAME CSF.CSFCKDS.NEW.DATA
  COMPONENT NAME CSF.CSFCKDS.NEW.INDEX
CLUSTER NAME CSF.CSFPKDS.NEW
  CATALOG NAME CATALOG.Z24C.MASTER
  COMPONENT NAME CSF.CSFPKDS.NEW.DATA
  COMPONENT NAME CSF.CSFPKDS.NEW.INDEX
CLUSTER NAME CSF.CSFTKDS.NEW
  CATALOG NAME CATALOG.Z24C.MASTER
COMPONENT NAME CSF.CSFTKDS.NEW.DATA
COMPONENT NAME CSF.CSFTKDS.NEW.INDEX
ADR006I 2024.002 12:04:53 EXECUTION ENDS
ADR013I 2024.002 12:04:53 TASK COMPLETED WITH RETURN CODE 0000
ADR012I 2024.002 12:04:53 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0000

When I reran the job I got

ADR383W DATA SET CSF.CSFCKDS.NEW NOT SELECTED, 01                               
ADR383W DATA SET CSF.CSFPKDS.NEW NOT SELECTED, 01
ADR383W DATA SET CSF.CSFTKDS.NEW NOT SELECTED, 01
ADR415W NO DATA SETS WERE COPIED, DUMPED, OR RESTORED FROM ANY VOLUME
ADR006I 2024.002 12:28:48 EXECUTION ENDS
ADR013I 2024.002 12:28:48 TASK COMPLETED WITH RETURN CODE 0004

Where ADR383W reason code 1 is

The data set was not selected due to the following reason (reason_code):
01 The fully qualified data set name did not pass the INCLUDE, EXCLUDE, and/or BY filtering criteria.

because the VSAM file had not been changed since the previous backup.

To always backup remove the reset and BY() statement

DUMP  - 
DATASET(INCLUDE(CSF.CSFCKDS.NEW, -
CSF.CSFPKDS.NEW, -
CSF.CSFTKDS.NEW ) -
) -
OUTDDNAME(TARGET) -
COMPRESS

Restore

The RESTORE command has many parameters

//IBMDFDSS JOB 1,MSGCLASS=H 
//S1 EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//TARGET DD DSN=COLIN.BACKUP.CSF,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
RESTORE -
RENAME(COLINN) -
DATASET(INCLUDE(**) ) -
INDDNAME(TARGET)
/*
  • If you specify TYPRUN=NORUN, it will list what datasets would be restored – to allow you to check. Remove TYPRUN=NORUN to execute and restore the data.
  • The RENAME says replace the HLQ with COLINN. This way you do not overwrite any existing data sets.

The output of the job was

ADR489I (001)-TDLOG(02), CLUSTER COLINN.CSFCKDS.NEW WAS SELECTED                   
CATALOG CATALOG.Z24C.MASTER
COMPONENT COLINN.CSFCKDS.NEW.DATA
COMPONENT COLINN.CSFCKDS.NEW.INDEX
ADR489I (001)-TDLOG(02), CLUSTER COLINN.CSFPKDS.NEW WAS SELECTED
CATALOG CATALOG.Z24C.MASTER
COMPONENT COLINN.CSFPKDS.NEW.DATA
COMPONENT COLINN.CSFPKDS.NEW.INDEX
ADR489I (001)-TDLOG(02), CLUSTER COLINN.CSFTKDS.NEW WAS SELECTED
CATALOG CATALOG.Z24C.MASTER
COMPONENT COLINN.CSFTKDS.NEW.DATA
COMPONENT COLINN.CSFTKDS.NEW.INDEX
ADR040I (001)-TDLOG(01), PROCESSING BYPASSED DUE TO NORUN OPTION

Without TYPRUN=NORUN, the output was like

ADR711I DATA SET CSF.CSFPKDS.NEW HAS BEEN ALLOCATED WITH NEWNAME COLINN.CSFPKDS.NEW 
USING STORCLAS SCBASE, NO DATACLAS, AND NO MGMTCLAS
ADR788I PROCESSING COMPLETED FOR CLUSTER CSF.CSFPKDS.NEW, 6 RECORD(S) PROCESSED

When I reran the restore job I got

ADR380E DATA SET CSF.CSFCKDS.NEW NOT PROCESSED, 37

where code 37 means

The new name specified with RENAME or RENAMEUNCONDITIONAL already exists on the volume and the REPLACEUNCONDITIONAL keyword was not specified. The REPLACE keyword cannot be used to replace a data set that is being renamed.

Migrating an ADCD z/OS release to the next release: ICSF

Start here:Migrating an ADCD z/OS release to the next release.

Depending on your setup, migrating ICSF to a newer level can be trivial.

With my original ADCD system, it had ICSF set up to use data sets like CSF.CSFCKDS. When I moved to a new level of ADCD, there were the same data set names.

I backed up the datasets, and restored them on the new system with a new name

//IBMDFDSS JOB 1,MSGCLASS=H 
// SET BACKUP=COLIN.CSF.Z24C.BACKUP
//SDE EXEC PGM=IEFBR14,REGION=0M
//TARGET DD DSN=&BACKUP,DISP=(MOD,DELETE),
// SPACE=(CYL,(1,1))
//S1 EXEC PGM=ADRDSSU,REGION=0M
//TARGET DD DSN=&BACKUP,DISP=(MOD,CATLG),
// SPACE=(CYL,(50,50),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DUMP -
DATASET(INCLUDE(CSF.SCSFCKDS, -
CSF.SCSFPKDS, -
CSF.SCSFTKDS )-
) -
OUTDDNAME(TARGET) -
COMPRESS
/*

I restored them on the same system using

//IBMDFDSS JOB 1,MSGCLASS=H                           
//S1 EXEC PGM=ADRDSSU,REGION=0M PARM='TYPRUN=NORUN'
//TARGET DD DISP=SHR,DSN=COLIN.CSF.Z24C.BACKUP
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
RESTORE -
DATASET(INCLUDE(**) ) -
RENAME(COLIN ) -
INDDNAME(TARGET)
/*

I now had data sets like COLIN.SCSFPKDS.

Remember to change your backup processes to backup the new data sets.

The default CSF procedure is

//CSF PROC 
//CSF EXEC PGM=CSFINIT,REGION=0M,TIME=1440,MEMLIMIT=NOLIMIT
//CSFPARM DD DSN=ADCD.&SYSVER..PARMLIB(CSFPRM00),DISP=SHR

Which does not easily allow you to override it. In USER…PROCLIB(CSF) I created

//CSF  PROC PRM=CP 
//CSF EXEC PGM=CSFINIT,PARM=&PRM,REGION=0M,TIME=1440,MEMLIMIT=NOLIMIT

and in USER….PARMLIB(CSFPRMCP) created

CKDSN(COLIN.SCSFCKDS) 
PKDSN(COLIN.SCSFPKDS)
TKDSN(COLIN.SCSFTKDS)
DOMAIN(0)
COMPAT(NO)
SSM(NO)
CHECKAUTH(NO)
CTRACE(CTICSF00)
USERPARM(USERPARM)
REASONCODES(ICSF) f

Compared to the ADCD provided member, my member has

  • Different dataset names
  • A TKDSN dataset
  • DOMAIN(0)

Creating a TKDS

As part of my use of ICSF tokens for certificates I had to create a TKDS.

I used Steps to create the TKDS, using data set name COLIN.SCSFTKDS.

Don’t forget to add it to your list of data sets to backup regularly.

Starting ICSF

With the ADCD system you start ICSF using the operator command S CSF or S CSF,PRM=xx .

From ISPF go to option 6 TSO and use the @ICSF command

Migrating an ADCD z/OS release to the next release: OMVS

Start here:Migrating an ADCD z/OS release to the next release.

There are several parts to migrating OMVS.

  • Making your user file systems available to the new level of z/OS
  • Making data from your old system file systems available to the new level of z/OS. Files I updated and copied include
    • /etc csssmtp.env this is used in the mail protocol procedure CSSMTP
    • /etc/hosts this is used in TCPV4 name query lookup
    • /etc/pkiserv/… for the PKI Server for managing digital certificates
    • /etc/resolv.conf this is used in TCPIP DNS
    • /etc/gskssl/… for system ssl.
    • /etc/syslog.conf for managing the SYSLOGD daemon, and where (TCPIP) Unix tasks write their output in the file system
    • /etc/zexpl/… for use with RSEAPI procedure, and z/OS Explorer
  • Copying any customisation from the old system to the new system. This should be in the /etc directory, or in the JCL procedures.
  • Checking your overall OMVS configuration is consistent

The ZFS for /etc is ZFS.S0W1.ETC. This is the same on the Z31A, and the Z25D systems, so cannot you use both copies on the same system. This means you need to use backup and restore; or copy the files to a ZFS which can be used on both systems.

Making your user file systems available to the new level of z/OS

This should just be a matter of making sure your BPXPRMxx with your mount statements is used in the new system, and IPLing with the correct IEASYS member.

HFS is not supported on z/OS 3.1 so you will need to migrate these to ZFS before you try to migrate; and remove and HFS definition statements.

Making your old system file systems available to the new level of z/OS.

On the old system I found all the files I had changed in /etc, and backed them up to a PAX file. I could have copied the directories to a user ZFS file system.

The potential directories of interest are

  • /etc this has configuration files for system tasks such as syslogd
  • /var this contains log files etc as used by system tasks. You usually do not want to copy the files across.
  • /opt program product information which you usually do not want to copy across

How do you find changed files?

See How do I diff on Z/OS with Unix files and directories for a full description.

You can use the command ls -ltr . to list files in the current directory, with the latest changes at the bottom of the list. Or you can use the find command

find . -mtime -100 -a -type f

which lists the files within the last 100 days (-mtime -100); -mtime 100 is exactly 100 days ago; -mtime +100 is over 100 days ago. This way is not very helpful. You can say find files newer than ‘this’ file.

You can create an empty file and set the date on it using

touch -t 2401181400 ~/Jan182024.file    

Where the -t value is yymmddhhmm

You can list files changed more recently than this file file using

find . -newer ~/Jan182024.file  -a -type f

This gives you a list of files

You can use a command to do more processing. The following also lists information about the files.

find . -newer ~/Jan182024.file   -a -type f -exec ls -al {} \;   

How to backup files

You can pipe the information from the find command into other commands such as pax. This takes the stream of filenames, and copies the file contents into a PAX fiile.

find . -newer ~/Jan182024.file  -a -type f | pax -W "seqparms='space=(cyl,(30,30))'" -wzvf "//'COLIN.PAX.TEST2'" -x os390

On the other system you can read the pax file and load the files.

How to see what’s in a pax file

You can see what is in the pax file use

pax   -vf "//'COLIN.PAX.TEST2'" 

Note of warning. You should be careful backing up and restoring when using absolute path names. See Oh p*x, I’ve lost my changes.

How to restore the data

pax -rfk  "//'COLIN.PAX.TEST2'"  

Where the -k option means do not overwrite.

Checking your overall OMVS configuration is consistent

You can use the D OMVS,PFS command to display the in use physical file systems. Issue this command on both old and new systems, and compare the output

z/OS 2.5D D OMVS,PFS output

The -FS GFSCINIT data is for an HFS file system. You need to remove any FILESYSTYPE TYPE(HFS) ENTRYPOINT(GFSCINIT) … entries from systems before using z/OS 3.1

OMVS     0010 ACTIVE             OMVS=(TC,00,01,BP,IZ,RZ,BB,ZW,US)                               
PFS CONFIGURATION INFORMATION
PFS TYPE ENTRY ASNAME DESC ST START/EXIT TIME
-FS GFSCINIT N/A U 2024/08/29 12.56.04
INET EZBPFINI N/A SOCKETS I
-FS GFSCINIT N/A U 2024/08/29 12.56.03
ZFS IOEFSCM N/A LOCAL A 2024/08/29 12.55.59
AUTOMNT BPXTAMD N/A LOCAL A 2024/08/29 12.55.59
UDS BPXTUINT N/A SOCKETS A 2024/08/29 12.55.59
CINET BPXTCINT N/A SOCKETS A 2024/08/29 12.55.59

PFS TYPE DOMAIN MAXSOCK OPNSOCK HIGHUSED
UDS AF_UNIX 10000 2 2
CINET AF_INET6 50000 4 4
AF_INET 64000 8 9

SUBTYPES OF COMMON INET
PFS NAME ENTRY START/EXIT TIME STATUS FLAGS
TCPIP EZBPFINI 2024/08/29 12.56.24 ACT SC
TCPIP2 EZBPFINI INACT
TCPIP3 EZBPFINI INACT
TCPIP4 EZBPFINI INACT

z/OS 3.1A D OMVS,PFS output

Note the missing entry for -FS GFSCINIT.

OMVS     0010 ACTIVE             OMVS=(TC,00,01,BP,IZ,RZ,BB,ZW,US)      
PFS CONFIGURATION INFORMATION
PFS TYPE ENTRY ASNAME DESC ST START/EXIT TIME
INET EZBPFINI N/A SOCKETS I
ZFS IOEFSCM ZFS LOCAL A 2024/08/29 13.00.24
AUTOMNT BPXTAMD N/A LOCAL A 2024/08/29 13.00.24
UDS BPXTUINT N/A SOCKETS A 2024/08/29 13.00.24
CINET BPXTCINT N/A SOCKETS A 2024/08/29 13.00.24

PFS TYPE DOMAIN MAXSOCK OPNSOCK HIGHUSED
UDS AF_UNIX 10000 2 3
CINET AF_INET6 50000 4 4
AF_INET 64000 8 8

SUBTYPES OF COMMON INET
PFS NAME ENTRY START/EXIT TIME STATUS FLAGS
TCPIP EZBPFINI 2024/08/29 13.01.05 ACT SC
TCPIP2 EZBPFINI INACT
TCPIP3 EZBPFINI INACT
TCPIP4 EZBPFINI INACT

Migrating an ADCD z/OS release: ZFS files.

Start here:Migrating an ADCD z/OS release to the next release.

For background see Should I use tar or pax to backup my Unix files?

System files

If you have done any configuration to products which use Unix services, you are likely to have changed files in the file system. For example /etc/syslog.conf.

Configuration files

Many configuration files are configured in the /etc directory.

If you want to find which files have been changed since you have been using the system you could use the ls -ltr command to display the files in each directory, displayed with the latest changed date at the bottom.

This gets very tedious when you have a lot of directories to example. However you can ask Unix to list all files which match a critera, such as changed in the last n days, or newer than an existing file.

Create a file of the comparison data

touch -t 202202211456 /tmp/foo

This creates a file /tmp/foo with the given date year 2022 month 02 date 21 time 1456

find . -type f -newer /tmp/foo |xargs ls -ltr > aa

This is two commands.

  • The find command
    • looks in the current directory (.) and subdirectories
    • for objects with type of files (rather than directories etc)
    • which have been changed more recently than /tmp/foo.
  • The file name is passed to the ls -ltr command to display the date time information.
-rwx------   1 OMVSKERN OMVSGRP       32 Feb 13  2023 ./cssmtp.env 
-rw-r--r-- 1 OMVSKERN OMVSGRP 3453 Feb 13 2023 ./mail/ezatmail.cf
-rwxr-xr-x 1 OMVSKERN OMVSGRP 250 Feb 28 2023 ./hosts
-rw-r--r-- 1 OMVSKERN OMVSGRP 226441 Jun 16 2023 ./pkiserv/pkiserv.tmpl.old
-rw-r--r-- 1 OMVSKERN OMVSGRP 22406 Jun 16 2023 ./pkiserv/pkiserv.conf.old
...

if you use

find . -type f -newer /tmp/foo |tar -cvf ~/etc.tar –

it will create a tar file containing the changed files. You can then transport the etc.tar file to the newer system and untar it.

You can use the pax command to package the files

find . -type f -newer /tmp/foo |pax -W “seqparms=’space=(cyl,(10,10))'” -o saveext -wzvf “//’COLIN.PAX.TEST'” -x os390

to save the files in pax format into the data set COLIN.PAX.TEST. If the high level qualifier has been defined as an alias is the master catalog on both systems, the data set will be visible on both systems.

Note: If you specify

find . -type d -newer /tmp/foo

It displays all directory entries which have been changed, and displays all the files within those directories.

For example

total 1344 
-rw-r--r-- 1 OMVSKERN OMVSGRP 3252 May 7 2019 ssh_config
-rw-r--r-- 1 OMVSKERN OMVSGRP 553761 May 7 2019 moduli
-rwx------ 1 OMVSKERN OMVSGRP 65 Oct 29 2019 sshd.sh

For example the sshd directory was changed in September this year, so all the files below it are listed. 

Application output files

These are usually in the /var sub-directory. You may not need to move these files across.

User data

You will have your own data in the Unix file systems. If you put the data under the /u file system it should be easy to find! 

You may have configured userids so their home directory is on a “user” ZFS file system, or your home directory could be mixed in with the systems files. For example the file system for IBMUSER is on an ADCD file system (D5USS2).

IBMUSER:/S0W1/etc: >df -P ~                                                         
Filesystem 512-blocks Used Available Capacity Mounted on
ZFS.USERS 2880000 1277970 1602030 45% /u

The newer system also has a ZFS.USERS. You cannot have both old and new ZFS.USERS mounted at the same time, as the mount takes cataloged data set.

For my application data

IBMUSER:/S0W1/etc: >df -P /u/tmp
Filesystem 512-blocks Used Available Capacity Mounted on
COLIN.ZFS2 2817120 788338 2028782 28% /u/tmp

I can take this ZFS system and mount it on the newer system.

You can tar up the files under a directory and move the tar file to the new system, or you can use pax which I think is better, as it creates a dataset out of the ZFS files.

Using tar

Note: if you use an absolute path in the tar command, when you untar the data it will use the same directory- – which may overrwrite data you wanted to keep.

If you use are relative directory, the data is untarred relative to the current directory.

cd /u/colin
tar -cvf ~/relative.tar *

is better than

tar -cvf ~/absolute.tar /u/colin

On the new system if I use

mk dir oldcolin
cd oldcolin
tar -xtvf relative.tar

it will restore the files in oldcolin.

If I use

mk dir oldcolin
cd oldcolin
tar -xtvf absolute.tar *

it will restore the files to /u/colin – and overwrite any files which were there.

What directories were created?

You can use the command

find /u -type d -newer /tmp/foo |xargs ls -ltrd> aa

to display the directories created/modified since the time of the /tmp/foo file.

This gives output like

drwxrwxrwx  10 OMVSKERN SYS1        8192 Dec  8 13:04 ./adcd 
drwxr-xr-x 2 OMVSKERN 1000 8192 Mar 15 2023 ./tmp/oemput
drwxrwxrwx 2 OMVSKERN WEBGRP 8192 Apr 25 2023 ./mqweb3/logs
drwxr-xr-x 2 OMVSKERN SYS1 8192 Jun 16 2023 ./mqweb2/oldconf

You can use the pax -E option to display the contents and extended attributes.

pax -E -f "//'COLIN.PAX.HTTP2'"

Notes the double / and both sets of quotes.

To unpax the files on the new system, cd into the directory and use

pax -k -rvf  "//'COLIN.PAX.TEST'" .

The

  • -k means do not overwrite
  • -r read
  • -v display the details
  • -f from the following file
  • into . (the current directory)

To mount a ZFS on the system

You can have an entry in an BPXPRMxx parmlib member, so a ZFS is mounted at IPL time.

You can also use a TSO command, or a batch job to mount a ZFS

//IBMMFAMO JOB 1,MSGCLASS=H
//MOUNT EXEC PGM=IKJEFT1A
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
MOUNT FILESYSTEM('AZF220.ZFS') TYPE(ZFS) +
MOUNTPOINT('/u/mfa') +
MODE(RDWR) PARM('AGGRGROW') AUTOMOVE

Sharing File systems

You can display the mounted file systems using the D OMVS,F command

This gives output like

ZFS            16 ACTIVE                      RDWR  01/15/2024  L=30  
NAME=ZFS.USERS 14.38.54 Q=0
PATH=/u
OWNER=S0W1 AUTOMOVE=N CLIENT=N
ZFS 37 ACTIVE RDWR 01/15/2024 L=48
NAME=COLIN.ZFS2 14.38.56 Q=0
PATH=/u/tmp
OWNER=S0W1 AUTOMOVE=Y CLIENT=N

This shows there are two ZFS file systems, both mounted read/write. The first has

  • data set name ZFS.USERS. On the z24C system – this is the z24C file system. You cannot mount both the z24C, and the z25D file systems at the same time, because the mount command uses the cataloged data set.
  • mounted as path /u

The second has

  • data set name COLIN.ZFS2
  • mounted as path /u/tmp

You can choose to mount your data under an existing path, or create a new tree such as “/my”.

Migrating an ADCD z/OS release to the next release: Parmlib members

Start here:Migrating an ADCD z/OS release to the next release.

The ADCD supplied parmlib members may change from release to release, for example the volser of disks will change from D5SYS1 to A3SYS1.

Some of the parmlib members you create, in USER.*.PARMLIB, may not be compatible with the new version, for example you explicitly refer to Z25D data sets, and the new data sets are Z31A data sets.

  • You need to compare the new ADCD supplied parmlib, with your current ADCD parmlib, and check there are no surprise.
  • You need to review your current user parmlib. You should be able to parameterise your library, for example using &SYSVER. instead of Z31A or Z25D. You can also identity which members you actually use, and only copy those to the new system.

How to see the new ADCD libraries on the old system.

I used ISPF 3.4 with prefix ADCD on volser A3SYS1, then used the local command C to catalog the data sets of interest (including CLIST, PARMLIB, and PROCLIB) . Once cataloged you can use ISPF 3.4 and specify ADCD.*.PARMLIB to list them both

How to find what parmlib members you use

In your old system, look at the joblog. Start from the start of IPL message IEE042I SYSTEM LOG DATA SET INITIALIZED.

After this, you get messages like

IEE252I MEMBER IEASYM00 FOUND IN USER.Z25D.PARMLIB

On my old system, I used SDSF S.;STATUS for JOBNAME SYSLOG. You can use the SE prefix command to edit the syslog file. I used X ALL;F IEE252I ALL;DEL ALL X to show all of the parmlib members used.

I made a backup of the parmlib, and deleted the parmlib members which were not used, so the user….parmlib contained only the definitions I needed.

I IPLed the system to make sure they worked.

I used the ISPF command SRCHFOR on the user parmlib , and user proclib, to search for Z25D (the release I was running), and changed all values to &SYSVER. When you IPL with a different version of z/OS the value of the &SYSRES for the new system, will be used.

As part of the clean up you may want to compare your members with the ADCD provided members for example edit a user….parmlib member and use the ISPF command COMPARE ‘adcd.z25D.parmlib(…)’ exclude to see the difference.

You can compare members in a PDS see How do I compare two PDS on z/OS.

You might want to see if your user… members can be deleted as they are the same as provided by ADCD.

You can look at the dates on the members, and you only need to check members with a “recent” date (since you got the system).

Parmlib changes

Some of of the my parmlib members changed include

  • AUTOR… for automatic replies to z/OS messages
  • BPXPRM to mount my OMVS file systems.
  • CLOCK00 to change the time zone to E.00.00.00 ( GMT)
  • CSFPRM for ICSF
  • IEASYM00 to add symbols used by TCPIP
  • IEASYM00 with my IPL changes
  • IGDSMS00 to add PDSE… and PDSE1… definitions
  • IKJTSO00 to add entries for ICSF panel processing. CSFDPKDS and CSFDPKDS
  • IRRPRM to put the definitions of the RACF database into parmlib
  • PFKTAB00 to change the default PF keys on the console
  • PROGxx members for APF and LNKLIST
  • SCHED

ReIPL the new system and check there are no unexpected messages. You can IPL your old system to fix the problems.

Copy your parmlib members

You can copy your parmlib members from USER.Z25D.PARMLIB to USER.Z31D.PARMLIB.

Update SYS1.IPLPARM

You need to update SYS1.IPLPARM (on A3SYS1) to add and entry for the load parm you use.

I copied LOAD00, and used

SYSPARM CP
IEASYM (00,CP)

This will use USER…PARMLIB(IEASYSCP), and will use the ADCD provided IEASYM00, and my IEASYMCP in USER…PARMLIB

IPL the new system

I used

ipl 0ac8 parm 0acfCP

to use the member LOADCP in SYS1.IPLPARM

Migrating an ADCD z/OS release to the next release: Proclib members

Start here:Migrating an ADCD z/OS release to the next release.

The ADCD supplied proclib members may change from release to release, for example the volser of disks will change from D5SYS1 to A3SYS1, and you may have a copy in user…proclib which overrides the ADCD supplied members.

What is different between your USER.Z25D.PROCLIB and ADCD.Z25D.PROCLIB?

It is good practice to see what you have changed in the USER.*.PROCLIB.

Use ISPF 3.4 to look at ADCD.Z25D.PROCLIB, display the members, and sort on changed. If you were careful you have not changed anything in this library, but made your changes in USER.Z25D.PROCLIB.

Compare USER.Z25D.PROCLIB and ADCD.Z25D.PROCLIB

You can use ISPF 3.13, the SuperCE utility to compare the members.

I specified

  • New DS Name . . . ‘USER.Z25D.PROCLIB’
  • Old DS Name . . . ‘ADCD.Z25D.PROCLIB’
  • Compare Type 2
  • Listing Type 2

There are several sections to the output

  • Changes between members found in both libraries
  • CHNG MEMBERS-COMPARED and which members were common, and how many lines different there were
  • NON-PAIRED NEW FILE MEMBERS (files only in USER.Z25D.PROCLIB) | NON-PAIRED OLD FILE MEMBERS (files only in ADCD.Z25D.PROCLIB)

For example

...
NEW: USER.Z25D.PROCLIB OLD: ADCD.Z25D.PROCLIB

CHNG MEMBERS-COMPARED NEW-PROC OLD-PROC MATCHED NEW-INS OLD-DEL

** CSF 2 5 0 2 5
** FTPD 16 14 12 4 2
** HZSPROC 42 42 41 1 1
** TCPIP 14 71 10 4 61
** VTAM00 7 6 6 1 0

5 TOTAL MEMBER(S) PROCESSED AS A PDS
5 TOTAL MEMBER(S) PROCESSED HAD CHANGES
0 TOTAL MEMBER(S) PROCESSED HAD NO CHANGES
11 TOTAL NEW FILE MEMBER(S) NOT PAIRED
281 TOTAL OLD FILE MEMBER(S) NOT PAIRED
NON-PAIRED NEW FILE MEMBERS | NON-PAIRED OLD FILE MEMBERS
AZF#IN00 | ASMAC
AZF#IN01 | ASMACG
BACKUP | ASMACL
... | ...

Once you understand the changes between the USER.Z25D.PROCLIB and ADCD.Z25D.PROCLIB, you can do a similar exercise between USER.Z25D.PROCLIB and ADCD.Z31A.PROCLIB

The changes I had made to USER.*.PROCLIB include

Specifying a PRM to ICSF in member CSF

//CSF  PROC PRM=CP                                                       
//CSF EXEC PGM=CSFINIT,PARM=&PRM,REGION=0M,TIME=1440,MEMLIMIT=NOLIMIT

This uses the CSFPRMCP in the Parmlib concatentation.

This had

CKDSN(COLIN.SCSFCKDS) 
PKDSN(COLIN.SCSFPKDS)
TKDSN(COLIN.SCSFTKDS)
DOMAIN(0)

COMPAT(NO)
SSM(NO)
CHECKAUTH(NO)
CTRACE(CTICSF00)
USERPARM(USERPARM)
REASONCODES(ICSF)

Health Checker HZSPROC

This had //HZSPROC PROC HZSPRM=‘(AD,US)’ instead of //HZSPROC PROC HZSPRM=’AD

Where USER.Z25D.PARMLIB(HZSPRMUS) has

ADDREPLACE POLICY STATEMENT(COLINS) 
UPDATE CHECK(IBMRACF,RACF_SYSPLEX_COMMUNICATION)
DATE(20240120)
INACTIVE
REASON('COLIN - Test/Development env')

ADDREPLACE POLICY
UPDATE CHECK(IBMRACF,RACF_PROTECTALL_FAIL)
DATE(20240120)
INACTIVE
REASON('COLIN2- do not want in one person system')

ADDREPLACE POLICY
UPDATE CHECK(IBMXCF,XCF_TCLASS_CLASSLEN)
DATE(20240120)
INACTIVE
REASON('COLIN - NON sysplex no xcf message buffers ')

to prevent unnecessary health check messages from being produced.

TCPIP

  • Remove the TSO step with RACFCRT CRTHOST_.
  • Remove the comments
  • Change the PROFILE
  • Change the SYSTCPD statement.

FTPD

VTAM00

This procedure issues commands as part of the z/OS start up. It executes commands in parmlib member VTAM00

Add DSN=USER.&SYSVER..PARMLIB(&M),DISP=SHR to the parmlib definition

My USER.Z31A.PARMLIB(VTAM00) has

* Make the operator console nice
K A,NONE,L=L700
* FOR HEALTH CHECK MESSAGE
$T CKPTDEF,OPVERIFY=NO

How do I diff on Z/OS with Unix files and directories

I wanted to compare the contents of two directories in Unix System Services on z/OS before I merged them. This took me some time to do because the documented is lacking.

With ISPF you can use SUPERC (3.13), give it two PDSs and it shows you the differences.

On Unix there is the diff command. This can compare individual files, or directories. It can display just the changes, or the changes in context.

File a

AOnly 
line1
Aline2
line3

File b

line1 
Bline2
line3
BOnly
BOnly2

Using ispf edit compare to show differences

You can use diff to show the differences in two files, but it is not easy to understand. ISPF EDIT has the compare facility. If you know two files are different you can use

  • oedit /etc/zexpl/rseapi.env
  • use the primary command compare
    • enter the fully qualified name /u/ibmuser/zexpl/rseapi.env,, in the “Name . . . . .” field. if you specify +/filename the + means the same directory.
    • press pf3 and it will show the differences

Because I tend to remove comments to make it easier to see the content, I tend to use

  • oview /etc/ssh/sshd_config you get into ISPF edit, but no changes are saved.
  • Comments start with a #. x all;f ‘#’ all 1 1; f ‘ ‘ 1 1 all;del all nx removes comment lines and blank lines
  • reset to show the hidden lines
  • compare I then specify my version of the file, and see the changes.

  • Lines like ====== TrustedUserCAKeys /etc/ssh/user_ca_key.pub are from my copy.
  • Lines in green with a line number are in both files 000006 Subsystem sftp /usr/lib/ssh/sftp-server
  • Lines like .OAAAA UseDNS yes are from the base file

Update your version, make a copy of the original, then replace the original with your version.

diff -c1 a b – show the files and the changes in context

The line prefix for input file going to output file

  • – to be removed
  • ! to be changed
  • + to be added

The command diff -c1 a b gives

*** a Tue Aug 27 02:48:56 2024              
--- b Tue Aug 27 02:50:41 2024
***************
*** 1,4 ****
- AOnly
line1
! Aline2
line3
--- 1,5 ----
line1
! Bline2
line3
+ BOnly
+ BOnly2
  • *** a Tue Aug 27 02:48:56 2024 the first file name, and last changed date
  • — b Tue Aug 27 02:50:41 2024 the second file name, and last changed date
  • *** 1,4 **** the*** show it is file 1, lines 1 to 4
  • – AOnly this line is in file a is not in file b, so would need to be removed(-) from file a
  • ! Aline2 this line is in file b – but different
  • — 1,5 —- this is file b, lines 1 to 5
  • ! Bline2 this line is also in file a – but different
  • + BOnly this line is in file b and and was additional(+) to file a

When one file exists but is empty you get output like

*** /etc/resolv.conf Wed Mar  6 11:54:50 2024                         
--- /u/ibmuser/temp/resolv.conf Thu Dec 7 05:40:24 2023
***************
*** 0 ****
--- 1,2 ----
+ nameserver 127.0.0.1
+ TCPIPJOBNAME TCPIP

which follows the rules I explained above. *** 0 **** shows the content after line 0 is empty, because the next line is — 1,2 —- from the other file.

diff a b – show just the changes

gives

1d0             
< AOnly

3c2
< Aline2
---
> Bline2

4a4,5
> BOnly
> BOnly2

The output can be split into sections. The first line of each section is like

  • 1d0 the first line of a needs to be deleted from b, line 0
  • 3c2 line 3 of a is changed from line 2 of b
  • 4a4,5 lines 4,5 of b need to be added to a

The < and > tell you which file the data came from

When data is changed it gives the lines

  • < content of file a
  • output divider
  • > content of file b

When the data is in file a and not file b

  • < contents of file a

When the data is in file b and not file a

  • > contents of file b

diff -s dir1 dir2 compare the directory contents

If you specify -s, or just specify two directories, it compares the directory content.

You can use

diff -c1 dir1 dir2 

the -c1 to display the contents (how I like it).

With the directory entries you get records like

Only in /u/ibmuser/temp: test.tar 
Common subdirectories: /etc/wbem and /u/ibmuser/temp/wbem
Only in /etc: yylex.c
diff -c1 /etc/hosts /u/ibmuser/temp/hosts
*** /etc/hosts Wed Mar 6 11:06:55 2024
--- /u/ibmuser/temp/hosts Tue Feb 28 12:43:07 2023

You can find which files are missing from /etc , by using grep ‘Only in /u/ibmuser/temp’ on the output.

It shows the command used for the individual files, and the output

diff -c1 /etc/hosts /u/ibmuser/temp/hosts
*** /etc/hosts Wed Mar 6 11:06:55 2024
--- /u/ibmuser/temp/hosts Tue Feb 28 12:43:07 2023
...

diff -s -r dir1 dir2 compare the directory contents

The -r option displays the data recursively.