-
Notifications
You must be signed in to change notification settings - Fork 28
How do I create a Data Set or a Data Set member?
This document contains various operation for creation of Data Set or Data Set member
- Create a new member in a Data Set
- Create a Partitioned Data Set
- Create an Extended Partitioned Data Set
- Create a Physical Sequential Large (PS-L) Data Set
- Create a Sequential Data Set
- Create a VSAM Data set
If you leave new member file without modifying it, it won't be saved.
This why you can't just use PGM=IEFBR14
with DSN=USER.LIBRARY(MEMBER),DISP=SHR
. It will not be saved because it wasn't modified in any way.
You need to use IEBGENER. You want to create data set without writing any data into it so you can use empty in-stream DD statement '//SYSUT1 DD *'
. In such case end-of-file mark is written to member but it is enough to create it.
//JCLLIB05 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//COPYMEM EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
//SYSUT2 DD DSN=[Data set name]([Member name]),DISP=SHR
Create PDS with following parameters:
- Record length: 80
- Record format: Fixed Blocked
- Optimal Block Size
- Space: 2 cylinder for both primary and secondary allocation
- Directory blocks: 10
//JCLLIB03 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),
// RECFM=FB,LRECL=80,BLKSIZE=27920,SPACE=(CYL,(2,2,10))
Create PDS/E with following parameters:
- Record length: 80
- Record format: Fixed Blocked
- Optimal Block Size
- Space: 1 cylinder for both primary and secondary allocation
//JCLLIB04 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),DSNTYPE=LIBRARY,
// RECFM=FB,LRECL=80,BLKSIZE=27920,SPACE=(CYL,(1,1,5))
PS-L or Physical Sequential Large Data Set. Standard PS also called Basic PS data set can have maximum 65 535 tracks per volume and can use 59 volumes. In total maximum size of Basic PS is: 59 * 65535 * 55996 = 201.64 GB
PS-L can have 16 777 215 tracks per volume: 59 * 16777215 * 55996 = 51.41 TB
Of course those are approximate calculations, in reality it depends on many data set characteristics for example record format or block size.
Both PS and PS-L can have the same amount of extends. If you need more than 16 extends per volume you must allocate PS-E - Physical Sequential Extended Data Set.
//JCLLIB11 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=STV.ALLOC.TASK11,DISP=(NEW,CATLG),
// SPACE=(TRK,1),RECFM=FB,BLKSIZE=27920,LRECL=80,
// DSNTYPE=LARGE
- Create a Sequential Data Set with Fixed record format
- Create a Sequential Data Set with Variable (V) record format
- Create a Sequential Data Set with Fixed Blocked (FB) record format
- Create a Sequential Data Set with Variable Blocked (VB) record format
- Create a Sequential Data Set with MB space allocation
Create a Sequential Data Set with following parameters:
- Record length: 80 bytes
- Record format: Fixed Blocked
- Block size: 27920
- Space: 1 cylinder for primary extend and no secondary allocation
//JCLLIB02 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),
// RECFM=FB,LRECL=80,BLKSIZE=27920,SPACE=(CYL,(1))
Create a Sequential Data Set with following parameters:
- Record length available to use: 400 bytes
- Record format: Variable
- Space: 1 track for both primary and secondary allocation
//JCLLIB08 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),
// SPACE=(TRK,(1,1)),RECFM=V,BLKSIZE=256,LRECL=512
Create a Sequential Data Set with following parameters:
- Record length: 80 bytes
- Record format: Fixed Blocked
- Block size: 27920
- Space: 1 cylinder for primary extend and no secondary allocation
//JCLLIB02 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),
// RECFM=FB,LRECL=80,BLKSIZE=27920,SPACE=(CYL,(1))
Create a Sequential Data Set with following parameters:
- Record length available to use: 400 bytes
- Record format: Variable Blocked where one block should contain 10 records.
- Space: 1 track for both primary and secondary allocation
//JCLLIB09 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=[Data set name],DISP=(NEW,CATLG),
// SPACE=(TRK,(1,1)),RECFM=VB,BLKSIZE=5124,LRECL=512
Create a Sequential Data Set with following parameters:
- Record length: 80 bytes
- Record format: Fixed Blocked.
- Space: 2MB of primary allocation and 1MB of secondary allocation
//JCLLIB10 JOB NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEFBR14
//ALLOC DD DSN=STV.ALLOC.TASK10,DISP=(NEW,CATLG),
// RECFM=FB,LRECL=80,BLKSIZE=27920,
// AVGREC=M,SPACE=(1,(2,1))
Specify #ds_name
and #volume
; change parameters if needed
//DEFVSAM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEF CLUSTER(NAME(#ds_name) -
VOL(#volume) TRK(1,1) SHR(1 3)) -
DATA(NAME(#ds_name.DATA) -
CISZ(4096) KEYS(10 0) RECORDSIZE(80 80)) -
INDEX(NAME(#ds_name.INDEX) -
CISZ(2048))
/*
Specify #ds_name
and #volume
; change parameters if needed
//DEFVSAM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEF CLUSTER(NAME(#ds_name) -
VOLUMES(#volume) CYLINDERS(1 1) -
NONINDEXED) -
DATA(NAME(#ds_name.DATA) -
CISZ(4096) RECORDSIZE(354 354))
/*
Specify #ds_name
and #volume
; change parameters if needed
//DEFVSAM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEF CLUSTER(NAME(#ds_name) -
VOLUMES(#volume) CYLINDERS(1 1) -
RECORDSIZE(354 354) -
NUMBERED)
/*
SMP/E
- How do I check if the APAR or the PTF installation?
- JCL job to create SMP/e zones environment and user datasets
- JCL job to customize SMP/e distribution zone environment
- JCL job to customize SMP/e global zone environment
- JCL job to customize SMP/e target zone environment
- JCL job to load PTF information into global zone and SMP/e datasets
- JCL job to install PTF in the SMP/e target libraries
- JCL job to install PTF in the SMP/e distribution libraries
- JCL job for rejecting PTF to clean up the global zone
- JCL job for restoring PTF to clean up the target zone
- Automated build PTF via JCL + REXX template (IN PROGRESS)
- What should I do if RECEIVE ends with RC=12?
Mainframe automation solutions and best practices
- Mainframe DevOps tutorial – How We Bring DevOps and Automation to Mainframe
- Jenkins MF pipeline code example
- Mainframe integration with Jenkins using USS agent
- Jenkins plug in solution for running JCL jobs
- Mainframe troubleshooting platform - APPULSE
- Azure DevOps with MF (IN PROGRESS)
- Zigi
z/OS DevOps scripts
- Shell script for datasets to transfer from UNIX to the mainframe via ftp
- Shell script to run JCL jobs on the mainframe via ftp
- Shell script to transfer changed sources in git to the mainframe via ftp
RACF
REXX scripts
- REXX script to change parameters values in a config file
- REXX script to replace substring in some members of dataset
ISPF
HSM
- HSM dataset level commands
- HSM system commands
- How do I restore datasets anywhere where HSM is working?
Useful tricks
- How to include a library in the current LOGON session
- How to make IBM Java work for TEP file tep.jnlp
- How to migrate one or more data sets to migration volumes
- How to transfer file from Windows to zOS with command line ftp?
- How do I find out which data sets have used the most amount of space?
- How do I convert a hexadecimal date to a readable date on z/OS?
- How do I compare two data sets interactively?
- How do I use 3270 emulators with a larger screen size?
- How do I make some changes in each member of PDS?
- How do I copy data sets to other LPAR?
Batch jobs (JCLs)
- How to automate checking for normal completion of a job (counting the number of lines)?
- How do I create a Data Set or a Data Set member?
- How do I copy a Data Set or a Data Set member?
- How do I fill VSAM with records?
- How do I rename a Data Set in batch?
- How do I delete a Data Set or a Data Set member?
- How do I compress a Partitioned Data Set?
- How do I convert Partitioned Data Set PDS to Partitioned Data Set Extended PDSE and vice versa?
- How do I split a Sequential Data Set or PDS member?
- How do I copy first n records of Sequential Data Set or PDS member?
- How do I work with a Catalog?
- Replacing archaic JCL constructs
- Sample solution to transfer datasets from one system to another using XMIT and ADRDSSU
- JCL job template for evenly dividing the dataset into parts
- How to work with a Catalog?
z/OS System operating
- z/OS network commands
- JES commands
- SDSF commands
- XMIT
- WLM (COMING SOON, STAY TUNED)
- IPL and its maintenance
- Omegamon for Storage
- Omegamon for DB2
z/OS Subsystem operating