Skip to main contentIBM ZLPN Documentation

Working with z/OS

This guide covers common z/OS tasks and workflows for ISV developers using HDISV. Learn how to manage datasets, submit jobs, and perform everyday development activities.

Quick Reference


CPU Serial Number

In HDISV, zADE is configured to connect to a UIM server which provides a unique CPU serial number to each instance. The serial number is static for the lifetime of that deployment mode. If the deployment mode is changed between managed service mode and Linux access mode, or in managed service mode the instance is recreated, the CPU is subject to change.

One way to determine the CPU serial number of the instance is to run the following operator command from inside z/OS:

D M=CPU

The resulting output will contain the CPU serial number:

CONTROL:    IEE174I 13.54.38 DISPLAY M 378 
LABEL:    PROCESSOR STATUS 
LABEL:    ID  CPU                  SERIAL 
   00  +                     0000003931 
   01  +                     0000003931 
   02  +I                    0000003931 
   03  +I                    0000003931 
     
   CPC ND = 003931.A01.IBM.02.000000000000 
   CPC SI = 3931.774.IBM.02.0000000000000000 
            Model: A01 
   CPC ID = 00 
   CPC NAME = CPC_UNKNOWN_NAME 
     
   + ONLINE    - OFFLINE    . DOES NOT EXIST    W WLM-MANAGED 
   N NOT AVAILABLE 
     
   I        INTEGRATED INFORMATION PROCESSOR (zIIP) 
   CPC ND  CENTRAL PROCESSING COMPLEX NODE DESCRIPTOR 
   CPC SI  SYSTEM INFORMATION FROM STSI INSTRUCTION 
   CPC ID  CENTRAL PROCESSING COMPLEX IDENTIFIER 
   CPC NAME CENTRAL PROCESSING COMPLEX NAME 

Understanding z/OS Datasets

What is a Dataset?

A dataset is z/OS's equivalent of a file. Datasets are organized collections of data stored on disk volumes.

Dataset Naming Conventions

Dataset names follow specific rules:

Format: HIGH.LEVEL.QUALIFIER.NAME

Rules:

Examples:

ZOSADMN.SOURCE.COBOL      Valid
ZOSADMN.TEST.DATA         Valid
ZOSADMN.MY.APP.V1         Valid
zosadmn.source.cobol      Invalid (lowercase)
ZOSADMN.VERYLONGNAME123   Invalid (qualifier > 8 chars)

Dataset Types

TypeDescriptionUse Case
Sequential (PS)Records stored sequentiallySource code, text files, logs
Partitioned (PDS)Library with multiple membersSource libraries, JCL libraries
PDSEEnhanced PDSModern source libraries
VSAMVirtual Storage Access MethodDatabase files, indexed data

Your User Datasets

When you log in as ZOSADMN, you have access to:

USER01 Volume:

USMS01 Volume (if SMS configured):

↑ Return to Quick reference


Creating and Managing Datasets

Using ISPF (Option 3.2)

Step 1: Access Dataset Utilities

ISPF Primary Menu → 3 (Utilities) → 2 (Data Set)

Step 2: Allocate New Dataset

OPTION ===> A (Allocate)

DATA SET NAME ===> ZOSADMN.MY.SOURCE

VOLUME SERIAL ===> USER01
GENERIC UNIT  ===> 3390
SPACE UNITS   ===> TRACKS
PRIMARY QTY   ===> 10
SECONDARY QTY ===> 5
DIRECTORY BLKS===> 10        (for PDS/PDSE only)
RECORD FORMAT ===> FB
RECORD LENGTH ===> 80
BLOCK SIZE    ===> 27920
DATA SET TYPE ===> PDS       (or LIBRARY for PDSE)

Common Configurations:

Source Code Library (COBOL, JCL, etc.):

RECORD FORMAT: FB
RECORD LENGTH: 80
BLOCK SIZE: 27920
DATA SET TYPE: LIBRARY (PDSE)
DIRECTORY BLKS: 10

Data File:

RECORD FORMAT: FB
RECORD LENGTH: 80 (or your record size)
BLOCK SIZE: 27920
DATA SET TYPE: PS (Sequential)

Using TSO Commands

Allocate a Sequential Dataset:

ALLOCATE DATASET('ZOSADMN.MY.DATA') -
  NEW CATALOG -
  SPACE(10,5) TRACKS -
  RECFM(F B) LRECL(80) BLKSIZE(27920)

Allocate a PDS:

ALLOCATE DATASET('ZOSADMN.MY.SOURCE') -
  NEW CATALOG -
  SPACE(10,5) TRACKS -
  DIR(10) -
  RECFM(F B) LRECL(80) BLKSIZE(27920) -
  DSORG(PO)

Delete a Dataset:

DELETE 'ZOSADMN.MY.OLD.DATA'

Rename a Dataset:

RENAME 'ZOSADMN.OLD.NAME' 'ZOSADMN.NEW.NAME'

Using ISPF Dataset List (3.4)

Quick Access to Your Datasets:

ISPF Primary Menu → 3 (Utilities) → 4 (Dslist)

DSLIST - DATA SETS MATCHING ZOSADMN.*

Enter "/" to select action:
  B - Browse    E - Edit      D - Delete
  R - Rename    C - Catalog   U - Uncatalog
  I - Info      P - Print     V - View

/ ZOSADMN.SOURCE.COBOL
  ZOSADMN.SOURCE.JCL
  ZOSADMN.TEST.DATA

Common Actions:


↑ Return to Quick reference

Editing Datasets

Using ISPF Edit (Option 2)

Edit a Sequential Dataset:

ISPF Primary Menu → 2 (Edit)

DATA SET NAME ===> ZOSADMN.MY.DATA

Edit a PDS Member:

DATA SET NAME ===> ZOSADMN.SOURCE.COBOL(MYPROG)

ISPF Edit Commands

Line Commands (type in line number area):

CommandAction
IInsert line after
I5Insert 5 lines after
DDelete line
DDDelete block (mark start and end)
RRepeat line
RRRepeat block
CCopy line
CCCopy block
MMove line
MMMove block
AAfter (target for copy/move)
BBefore (target for copy/move)

Primary Commands (type on command line):

CommandAction
SAVESave changes
CANCELExit without saving
FIND stringFind text
CHANGE old newChange text
CHANGE old new ALLChange all occurrences
TOPGo to top
BOTTOMGo to bottom
UNDOUndo last change
REDORedo undone change

Example Edit Session:

EDIT       ZOSADMN.SOURCE.COBOL(MYPROG) - 01.00        Columns 00001 00072
Command ===> FIND "PROCEDURE"                          Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. MYPROG.
000003 AUTHOR. YOUR NAME.
000004
i5     ENVIRONMENT DIVISION.
000005 CONFIGURATION SECTION.

Using Zowe Explorer (VS Code)

  1. Open Zowe Explorer in VS Code
  2. Expand Data Sets
  3. Search for your datasets: ZOSADMN.*
  4. Click on a dataset to edit
  5. Save to upload changes back to z/OS

Advantages:


↑ Return to Quick reference

Submitting and Monitoring Jobs

What is JCL?

Job Control Language (JCL) tells z/OS how to run batch jobs. A JCL job consists of:

Sample JCL

//MYJOB    JOB (ACCT),'MY JOB',CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
//*
//* This job compiles a COBOL program
//*
//COMPILE  EXEC PGM=IGYCRCTL
//STEPLIB  DD DSN=IGY.V6R3M0.SIGYCOMP,DISP=SHR
//SYSIN    DD DSN=ZOSADMN.SOURCE.COBOL(MYPROG),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN   DD DSN=&&LOADSET,DISP=(MOD,PASS),
//            SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT1   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT2   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT3   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT4   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT5   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT6   DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT7   DD SPACE=(CYL,(1,1)),UNIT=SYSDA

Submitting Jobs via ISPF

Method 1: From Edit

1. Edit your JCL: ISPF → 2 (Edit)
2. Type: SUB on command line
3. Press Enter
4. Job submitted message appears

Method 2: From Dataset List

1. ISPF → 3.4 (Dataset List)
2. Find your JCL dataset
3. Type: S next to the dataset
4. Job submitted

Method 3: Using SDSF

1. ISPF → S (SDSF)
2. Type: SUB 'ZOSADMN.JCL(MYJOB)'
3. Press Enter

Monitoring Jobs with SDSF

Access SDSF:

ISPF Primary Menu → S (SDSF) or ST (Status)

View Active Jobs:

SDSF PRIMARY OPTION MENU

OPTION ===> ST (Status)

Shows running jobs

View Output:

SDSF STATUS DISPLAY

Enter "/" to select:
  ? - Job information
  S - Select (view output)

/ MYJOB    ZOSADMN  OUTPUT   RC=0000

Navigate Output:

View Specific DD:

SDSF OUTPUT DISPLAY

Enter "/" to view:
/ JESMSGLG  - JES messages
/ JESJCL    - JCL used
/ JESYSMSG  - System messages
/ SYSPRINT  - Program output

Checking Return Codes

Return Code Meanings:

Submitting Jobs via USS

# Submit JCL from USS file
submit /u/zosadmn/myjob.jcl

# Submit from dataset
submit "'ZOSADMN.JCL(MYJOB)'"

↑ Return to Quick reference

Working with USS Files

USS (Unix System Services)

USS provides a Unix-like environment on z/OS with hierarchical file system.

Your USS Home Directory

# Your home directory
/u/zosadmn

# Common directories
/u/zosadmn/bin      # Your scripts
/u/zosadmn/src      # Source code
/u/zosadmn/data     # Data files

Common USS Commands

File Operations:

# List files
ls -la

# Create directory
mkdir myproject

# Change directory
cd myproject

# Copy file
cp file1.txt file2.txt

# Move/rename file
mv oldname.txt newname.txt

# Delete file
rm file.txt

# Delete directory
rm -r mydir

# View file
cat file.txt
more file.txt
less file.txt

# Edit file
vi file.txt

File Permissions:

# View permissions
ls -l file.txt

# Change permissions
chmod 755 script.sh    # rwxr-xr-x
chmod 644 data.txt     # rw-r--r--

# Change owner
chown zosadmn file.txt

Accessing Datasets from USS

Mount datasets as files:

# Access sequential dataset
cat "//'ZOSADMN.MY.DATA'"

# Access PDS member
cat "//'ZOSADMN.SOURCE.COBOL(MYPROG)'"

# Copy dataset to USS
cp "//'ZOSADMN.MY.DATA'" ./mydata.txt

# Copy USS file to dataset
cp mydata.txt "//'ZOSADMN.MY.DATA'"

Note: Use double quotes and two single quotes around dataset names!


↑ Return to Quick reference

Common Development Workflows

Workflow 1: COBOL Development

1. Create Source Library:

ISPF → 3.2 → A (Allocate)
Dataset: ZOSADMN.SOURCE.COBOL
Type: LIBRARY (PDSE)

2. Create COBOL Program:

ISPF → 2 (Edit)
Dataset: ZOSADMN.SOURCE.COBOL(HELLO)

Type your COBOL code
SAVE

3. Create Compile JCL:

ISPF → 2 (Edit)
Dataset: ZOSADMN.JCL(COMPCOB)

Create JCL to compile COBOL
SAVE

4. Submit Compile Job:

SUB (from edit screen)
or
ISPF → 3.4 → S next to JCL dataset

5. Check Results:

ISPF → S (SDSF) → ST
View job output
Check RC=0000

Workflow 2: Data Processing

1. Create Input Data:

ISPF → 2 (Edit)
Dataset: ZOSADMN.INPUT.DATA

Enter data records
SAVE

2. Create Processing JCL:

//PROCESS  JOB ...
//STEP1    EXEC PGM=SORT
//SORTIN   DD DSN=ZOSADMN.INPUT.DATA,DISP=SHR
//SORTOUT  DD DSN=ZOSADMN.OUTPUT.DATA,DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(10,5)),UNIT=SYSDA
//SYSIN    DD *
  SORT FIELDS=(1,10,CH,A)
/*

3. Submit and Monitor:

Submit job
Check output in SDSF
Verify output dataset created

Workflow 3: Using Db2

1. Connect to Db2:

TSO → DSN SYSTEM(DB2P)

2. Run SQL:

DSN → SPUFI

Input Dataset: ZOSADMN.SQL(QUERY)
Output Dataset: ZOSADMN.SQL.OUT

Create SQL in input dataset:
SELECT * FROM MYTABLE WHERE ID > 100;

Execute

3. View Results:

Browse output dataset

↑ Return to Quick reference

Best Practices

Dataset Management

  1. Use Meaningful Names

    Good: ZOSADMN.PAYROLL.SOURCE.COBOL
    Bad:  ZOSADMN.TEMP.DATA1
    
  2. Organize by Project

    ZOSADMN.PROJECT1.SOURCE
    ZOSADMN.PROJECT1.JCL
    ZOSADMN.PROJECT1.DATA
    
  3. Regular Cleanup

    • Delete unused datasets
    • Archive old versions
    • Monitor space usage
  4. Backup Important Data

    • Copy critical datasets
    • Export to USS or workstation
    • Document dataset purposes

JCL Best Practices

  1. Use Comments

    //*
    //* This job processes daily transactions
    //* Author: Your Name
    //* Date: 2026-04-01
    //*
    
  2. Meaningful Job Names

    //PAYPROC  JOB ...  Good
    //JOB1     JOB ...  Bad
    
  3. Include NOTIFY

    //MYJOB JOB (ACCT),'Description',NOTIFY=&SYSUID
    
  4. Check Return Codes

    //STEP1    EXEC PGM=MYPROG
    //STEP2    EXEC PGM=NEXTPROG,COND=(0,NE,STEP1)
    

Development Tips

  1. Use ISPF Shortcuts

    • Create command table entries
    • Use PF keys effectively
    • Learn primary commands
  2. Leverage USS

    • Store scripts in USS
    • Use USS for file manipulation
    • Integrate with Git (via USS)
  3. Modern Tools

    • Use Zowe Explorer for editing
    • Integrate with VS Code
    • Automate with Zowe CLI
  4. Documentation

    • Comment your code
    • Document JCL procedures
    • Keep a project README

Quick Reference Cards

ISPF Navigation

0   - Settings
1   - View
2   - Edit
3   - Utilities
3.2 - Dataset utilities
3.4 - Dataset list
4   - Foreground
5   - Batch
6   - Command
S   - SDSF
X   - Exit

Common TSO Commands

LISTDS 'dataset.name'        - List dataset info
LISTCAT ENTRIES('dataset')   - Catalog info
ALLOCATE ...                 - Create dataset
DELETE 'dataset.name'        - Delete dataset
RENAME 'old' 'new'          - Rename dataset
SUBMIT 'jcl.dataset'        - Submit job

USS Commands

ls -la          - List files
cd dir          - Change directory
pwd             - Print working directory
mkdir dir       - Create directory
rm file         - Delete file
cp src dst      - Copy file
mv src dst      - Move/rename file
cat file        - Display file
vi file         - Edit file
chmod 755 file  - Change permissions

↑ Return to Quick reference