Chapter 2. Introducing File Manager 33
You specify the output data set name, the disposition, the number of logical records, and the
fill character.
To fill each byte of each record with data, specify one of the following:
char To write a character, such as 0, in each byte
X’cc’ To write a binary character, such as X’04’, in each byte
AN To write alphanumeric characters (A to Z and 0 to 9)
BIN To write binary characters (X'00' to X'FF')
RAND To write random binary characters (X'00' to X'FF')
The default is a blank.
Modify the JCL for generic use
To reuse the code from this example, convert the JCL into a procedure. It can then be used to
initialize all of your VSAM files. Example 2-7 shows the modifications we made.
We added the PROC statement and changed the DSG parameter DSNOUT to OUTPUT. This lets
you use an override statement in the JCL to point to your file.
Example 2-7 DSG batch step converted to a proc
//DSGPROC PROC
//FILEMAN EXEC PGM=FMNMAIN
//STEPLIB DD DSN=FMN.V4R1M0.SFMNMOD1,DISP=SHR
//* DD DSN=IGY.SIGYCOMP,DISP=SHR
//DDOUT DD DSN=DSNOUT=REDBK2.TEST.VSAMPDH,DISP=SHR
//SYSPRINT DD SYSOUT=*
//FMNTSPRT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSIN DD *
$$FILEM DSG OUTPUT=DDOUT,
$$FILEM FILLCHAR=x’00’,
$$FILEM DISP=OLD,
$$FILEM NLRECS=1
2.1.8 How to populate this newly created file
We can now insert records into the newly created file by copying from an existing file, or by
using a template to generate the data.
Copy data from QSAM to VSAM
Fill the Copy Utility panel (option 3.3) with the QSAM source file name, as shown in
Figure 2-12.
Note: We would place the SYSIN statements in a member of a control card library for a
production batch job.
34 Using IBM Application Development Tools for z/OS and OS/390
Figure 2-12 The Copy Utility panel
Press Enter. Fill the next panel, as shown in Figure 2-13, with the name of the target VSAM
file.
Figure 2-13 Target VSAM file
We have used the empty file created in 2.1.4, “Selective copying” on page 21. If you name a
file that does not exist, File Manager displays the VSAM Define panel. After selecting KSDS,
you will see a panel similar to the one in Figure 2-14.
Chapter 2. Introducing File Manager 35
Figure 2-14 VSAM Define panel
In addition to the online capabilities, you can also use the batch functions of File Manager.
After pressing Enter in the previous panel, we get confirmation as shown in Figure 2-15.
Figure 2-15 Copy completed
Note: File Manager, from Version 4 onwards, automatically uses the DFSORT COPY
option for this, and similar, simple data set to data set copy actions, provided that DFSORT
is available, and at the required maintenance level. This is because the input data set is not
partitioned and the record format is not undefined.
36 Using IBM Application Development Tools for z/OS and OS/390
We can now browse this data set to check that the content has correctly been loaded. We use
option 1 on the Main panel. The capability to browse without any template can be used as
shown in Figure 2-16.
Figure 2-16 Browse without template
However, it is nicer to look at it using a template as shown in Figure 2-17.
Figure 2-17 Browse with a template
When you are browsing or editing a file, you can use commands such as SORT to present the
data differently. The default sorting for a VSAM KSDS is the keys in ascending order (SORT
KEY). You can sort the records according to the order of the data in a column range or a field if
you use a template. Figure 2-18 presents the result of the SORT #2 D; D is for descending.
Chapter 2. Introducing File Manager 37
Figure 2-18 SORTed data
Generate data using a template
Instead of using existing data, we can load the new VSAM with computer generated data,
following the rules given in a template such as a copybook.
This time, use the Data Creation utility, option 3.1 on the Main panel, as shown in Figure 2-19.
Figure 2-19 Data Create panel
And you can browse the result using option 1 on the Main panel as shown in Figure 2-20. It
means that there are default values for data generation in the template. Edit the template if
necessary.

Get Using IBM Application Development Tools for z/OS and OS/390 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.