0% found this document useful (0 votes)
499 views1,248 pages

FileManager ZOS

Guia ZOS - manual de técnicas y pasos de implementación cobol

Uploaded by

jose vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
499 views1,248 pages

FileManager ZOS

Guia ZOS - manual de técnicas y pasos de implementación cobol

Uploaded by

jose vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1248

IBM File Manager for z/OS 

User's Guide and Reference


Version 12 Release 1

SC19-3674-00
Note
Before using this document, read the general information under Notices on page 1201.

First Edition (May 2012)


This edition applies to Version 12 Release 1 Modification Level 0 of IBM File Manager for z/OS (program number
5655-W68) and to all subsequent releases and modifications until otherwise indicated in new editions.
IBM welcomes your comments. For information on how to send comments, see How to send your comments to
IBM on page xvi.
This publication is available on the Web at:
www.ibm.com/software/awdtools/filemanager/
Copyright IBM Corporation 2000, 2012.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this document . . . . . . . . . xi Output Data Set Allocations (option 0.9) . . . . 50
Who should use this document. . . . . . . . xii Trace options (option 0.10) . . . . . . . . 50
Prerequisite and related information . . . . . . xii Displaying or editing DBCS characters . . . . 50
Using LookAt to look up message explanations . . xiii National characters . . . . . . . . . . . 51
How to read syntax diagrams . . . . . . . . xiii SAF-rule controlled auditing. . . . . . . . . 52
How to send your comments to IBM . . . . . xvi SAF rules for auditing . . . . . . . . . . 52
If you have a technical problem . . . . . . xvii SAF-rule controlled auditing not in effect . . . 52
SAF-rule controlled auditing in effect, auditing
Summary of changes . . . . . . . . xix possible . . . . . . . . . . . . . . 52

Chapter 3. Viewing and changing data


Part 1. Working with File Manager . . 1 sets . . . . . . . . . . . . . . . . 53
Starting and ending editor sessions . . . . . . 55
Chapter 1. File Manager overview. . . . 7 Starting an editor session without using
File Manager actions. . . . . . . . . . . . 7 templates . . . . . . . . . . . . . . 55
Data sets and records . . . . . . . . . . . 8 Starting an editor session with a template . . . 57
Templates . . . . . . . . . . . . . . . 9 Viewing and changing packed data . . . . . 60
Why use a template? . . . . . . . . . . 9 Listing statistics for the current editor session . . 62
What can you do with a template? . . . . . 11 Displaying your current editor options . . . . 63
Where can you use templates? . . . . . . . 11 Ending an editor session . . . . . . . . . 64
Displaying the RBA and record length information 65
Chapter 2. Getting started with File Managing the prefix area . . . . . . . . . . 66
Manager . . . . . . . . . . . . . . 13 Manipulating your view of the data . . . . . . 68
Starting and exiting File Manager . . . . . . . 13 Using primary commands in an editor session. . 69
Starting File Manager . . . . . . . . . . 13 Selecting a display format . . . . . . . . 69
Checking your File Manager version . . . . . 15 Displaying a column identification line . . . . 73
Checking which COBOL compiler you're using 17 Zooming in to see all of a record . . . . . . 75
Exiting from File Manager . . . . . . . . 17 Displaying the record length. . . . . . . . 77
Invoking File Manager panels from outside File Scrolling to see data . . . . . . . . . . 80
Manager . . . . . . . . . . . . . . 17 Scrollable input and display fields for long
Using the File Manager interface . . . . . . . 18 names . . . . . . . . . . . . . . . 83
Navigating in File Manager . . . . . . . . 18 Sorting the data . . . . . . . . . . . . 85
Issuing commands . . . . . . . . . . . 19 Finding specific data . . . . . . . . . . 87
Specifying quoted strings . . . . . . . . . 20 Excluding records from display. . . . . . . 90
Specifying a data set and a member name . . . 20 Working with File Manager and shared files . . . 92
Specifying an MQ manager or queue . . . . . 25 Overview of shared file features . . . . . . 92
Specifying a CICS resource . . . . . . . . 26 What File Manager considers a shared file . . . 92
Accessing CICS resources. . . . . . . . . 27 Record integrity checking. . . . . . . . . 92
Manipulating your view of selection lists . . . 33 Refreshing the contents of a record . . . . . 97
Selecting a range of PDS(E) members . . . . . 39 Editing techniques. . . . . . . . . . . . 100
Using hexadecimal values in File Manager . . . 41 In-place-in-memory edit . . . . . . . . . 101
Getting help . . . . . . . . . . . . . . 42 In-place edit . . . . . . . . . . . . . 101
Displaying field help information . . . . . . 42 In-memory edit. . . . . . . . . . . . 102
Accessing Tutorial Help . . . . . . . . . 43 Auxiliary edit . . . . . . . . . . . . 102
Viewing error messages . . . . . . . . . 45 KSDS edit . . . . . . . . . . . . . 103
Setting your default processing options . . . . . 45 Editing large files . . . . . . . . . . . 103
Set print processing options (option 0.1) . . . . 47 Editing load modules. . . . . . . . . . 104
Setting your System Processing Options (option Changing data . . . . . . . . . . . . . 104
0.2) . . . . . . . . . . . . . . . . 47 Changing data in individual records. . . . . 104
Set tape processing options (option 0.3) . . . . 49 Change data in multiple records . . . . . . 105
Set batch job card information (option 0.4) . . . 49 Locating labeled records . . . . . . . . . 106
Language and compiler specifications (option 0.5) 49 Changing the case of data . . . . . . . . 106
Editor options (option 0.6) . . . . . . . . 49 Finding and replacing strings . . . . . . . 107
VSAM edit sharing options (option 0.7) . . . . 50 Changing invalid numeric fields in your data 111
Temporary Data Set Allocations (option 0.8) . . 50 Limiting the effect of editing changes . . . . . 111

Copyright IBM Corp. 2000, 2012 iii


Setting bounds . . . . . . . . . . . . 112 Mapping fields between templates . . . . . . 186
Setting column ranges . . . . . . . . . 113 Default field mapping . . . . . . . . . 186
Limiting the search to specified fields . . . . 114 Editing the field mapping . . . . . . . . 189
Excluding records . . . . . . . . . . . 115 Field mapping rules . . . . . . . . . . 194
Labelling record ranges . . . . . . . . . 116 Copybook View and Print Utility (option 3.13 or
Editing records within data sets . . . . . . . 118 7.2) . . . . . . . . . . . . . . . . . 195
Inserting records . . . . . . . . . . . 119
Deleting records . . . . . . . . . . . 119 Chapter 5. Filtering records with
Recovering deleted records . . . . . . . . 120 templates . . . . . . . . . . . . . 197
Moving records. . . . . . . . . . . . 120
Selecting records with templates . . . . . . . 197
Copying and repeating records . . . . . . 121
Selecting records by record type . . . . . . 197
Overlaying data in existing records . . . . . 122
Specifying record identification criteria . . . . 198
Copying data to and from a clipboard . . . . 124
Specifying record selection criteria . . . . . 200
Copying data from another data set . . . . . 125
Specifying offset values . . . . . . . . . 200
Splitting and joining lines . . . . . . . . 126
Defining criteria expressions . . . . . . . . 201
Changing the length of a record . . . . . . 128
Entering criteria as a freeform expression . . . 202
Entering criteria by field. . . . . . . . . 203
Chapter 4. Creating and editing About expression processing . . . . . . . 207
templates . . . . . . . . . . . . . 129 Examples of REXX comparison expressions . . 217
Template types and structure . . . . . . . . 129 Filtering record display using templates . . . . 218
Information stored in a template . . . . . . 129 Displaying suppressed records . . . . . . 218
About copybook templates . . . . . . . . 131 Changing display of the record type. . . . . 219
Segmented data templates . . . . . . . . 133 Displaying not-selected records . . . . . 220
About dynamic templates . . . . . . . . 136 Hiding or showing records in SNGL display
Data description support . . . . . . . . 136 format . . . . . . . . . . . . . . . 222
Using HLASM copybooks with File Manager 140 Using the SHOW command in an editor session 222
Managing templates . . . . . . . . . . . 142 Viewing segmented data . . . . . . . . 223
Setting your template processing options . . . 142 Adjusting your view to allow for header
Specifying or updating the source definition for information . . . . . . . . . . . . . 225
a copybook template . . . . . . . . . . 148
Advanced copybook selection . . . . . . . 149 Chapter 6. Managing data sets . . . . 229
Creating a copybook template with the Working with data set lists . . . . . . . . . 229
Template Workbench . . . . . . . . . . 152 Accessing data set lists . . . . . . . . . 230
Setting up a template to be used with Managing personal data set lists . . . . . . 231
segmented data . . . . . . . . . . . 153 Retrieving details from a data set list . . . . 234
Creating a template from a model template . . 153 Allocating program function keys . . . . . 235
Creating dynamic templates . . . . . . . 154 Creating data sets and records. . . . . . . . 236
Creating corresponding templates from selected Creating data without using a template . . . 236
copybooks . . . . . . . . . . . . . 157 Creating data sets using a template . . . . . 238
Editing a template . . . . . . . . . . . 158 Allocating a new data set . . . . . . . . 240
Updating one or more templates . . . . . . 162 Setting the Data Create Attributes in your
Manipulating the display of fields in records . . . 164 template . . . . . . . . . . . . . . 240
Selecting and deselecting fields . . . . . . 164 Creating, replacing, and adding data using existing
Changing the field display order . . . . . . 165 data . . . . . . . . . . . . . . . . 240
Changing field headings. . . . . . . . . 166 Creating a new member or data set using data
Changing field attributes . . . . . . . . 166 from an edit session . . . . . . . . . . 241
Displaying alphanumeric fields in long Replacing a member or data set using data from
hexadecimal . . . . . . . . . . . . . 168 an edit session . . . . . . . . . . . . 243
Managing templates with the Template Workbench 169 Adding data to a data set using data from an
Editing a template (E) . . . . . . . . . 169 edit session . . . . . . . . . . . . . 244
Editing related ID criteria . . . . . . . . 169 Using all the data from an edit session to create
Updating a template from a copybook (U). . . 179 a new member or data set . . . . . . . . 245
Running a function using a copybook or Copying data sets . . . . . . . . . . . . 247
template (RC or RT) . . . . . . . . . . 180 Copying without using a template . . . . . 248
Mapping fields (MC or MT) . . . . . . . 181 Renaming members as you copy . . . . . . 252
Generating and editing field mapping (GM, GE Copying using a copybook or template . . . . 253
and EM) . . . . . . . . . . . . . . 182 Scrambling data . . . . . . . . . . . 256
Mapping contiguous fields . . . . . . . . 182 Copying records with segmented data templates 256
Specifying scrambling options . . . . . . . . 182 Generating data in external format - XML
Selecting a field for specifying scrambling representation . . . . . . . . . . . . 257
options . . . . . . . . . . . . . . 183

iv File Manager for z/OS V12R1 User's Guide


Copying files or members containing JCL . . . 261 Requirements for Exported Stacked Volumes 337
Using a DFSORT or REXX procedure . . . . 261 ESV options . . . . . . . . . . . . . 337
REXX member selection . . . . . . . . . 262 Using primary commands with Tape Specific
Finding and changing data in multiple PDS Functions. . . . . . . . . . . . . . . 338
members . . . . . . . . . . . . . . . 264 BID. . . . . . . . . . . . . . . . 339
Building your member list for processing . . . 265 BSF. . . . . . . . . . . . . . . . 339
Refining the list of selected members . . . . 266 BSR . . . . . . . . . . . . . . . 339
Specifying where your results are stored . . . 268 COPY . . . . . . . . . . . . . . . 339
Specifying your processing options . . . . . 268 FIND . . . . . . . . . . . . . . . 340
Specifying multiple arguments for FIND . . . 270 FSF . . . . . . . . . . . . . . . . 340
Using the CHANGE command in the FSR. . . . . . . . . . . . . . . . 341
Find/Change Utility . . . . . . . . . . 270 LOCATE . . . . . . . . . . . . . . 341
Specifying context in the output listing . . . . 272 RD . . . . . . . . . . . . . . . . 341
Changing data with a REXX procedure . . . . 272 REW . . . . . . . . . . . . . . . 341
Working with files or members containing JCL . . 273 RFIND . . . . . . . . . . . . . . 341
Comparing data sets . . . . . . . . . . . 275 RP . . . . . . . . . . . . . . . . 341
Comparing data sets without using a template 276 RUN . . . . . . . . . . . . . . . 341
Comparing data sets using templates . . . . 278 TOF . . . . . . . . . . . . . . . 342
Record synchronization . . . . . . . . . 282 ZOOM . . . . . . . . . . . . . . 342
Creating key sequencing for use in a Tape Browse (option 4.1) . . . . . . . . . 342
multi-segment key. . . . . . . . . . . 284 Tape Data Copy Function (option 4.2) . . . . . 343
Comparison output . . . . . . . . . . 285 Tape to Tape (option 4.2.1) . . . . . . . . 344
Formatted comparison of unlike fields . . . . 290 Tape to Tape Reblocked (option 4.2.2) . . . . 344
Comparing load modules . . . . . . . . 291 Tape to Labeled Tape (option 4.2.3) . . . . . 344
Printing from File Manager. . . . . . . . . 293 Tape to VSAM (option 4.2.4) . . . . . . . 345
Setting your Print Processing Options . . . . 293 Tape to Sequential Data (option 4.2.5) . . . . 345
Printing data sets . . . . . . . . . . . 294 VSAM to Tape (option 4.2.6) . . . . . . . 346
Using a DFSORT or REXX procedure . . . . 297 Sequential Data to Tape (option 4.2.7) . . . . 346
REXX member selection . . . . . . . . . 297 Exported Stacked Volume Copy (option 4.2.8) 346
Printing DBCS data . . . . . . . . . . 299 Copying tape data across a network . . . . . 348
Printing a single record . . . . . . . . . 300 Tape Update (option 4.3) . . . . . . . . . 348
Printing your Audit Trail Report . . . . . . 302 Special considerations . . . . . . . . . 349
Tape Record Load (option 4.4) . . . . . . . . 350
Chapter 7. Using File Manager utilities 305 Tape Print (option 4.5) . . . . . . . . . . 351
Managing catalog entries . . . . . . . . . 305 Controlling print output . . . . . . . . . 352
Available catalog services . . . . . . . . 305 Tape Map (option 4.6) . . . . . . . . . . 353
Selecting your service . . . . . . . . . 306 Create Tape Data (option 4.7) . . . . . . . . 354
Working with a list of catalog entries . . . . 308 Tape Label Display (option 4.8) . . . . . . . 355
Viewing your Catalog Entry Details . . . . . 310 Tape to Tape Compare (option 4.9) . . . . . . 356
Defining a new Catalog Entry . . . . . . . 313 Tape Record Scan (option 4.10) . . . . . . . 357
Altering an existing Catalog Entry . . . . . 316 Write Tape Mark (option 4.11) . . . . . . . . 359
Deleting a catalog entry . . . . . . . . . 317 Initialize Tape (option 4.12) . . . . . . . . . 359
Recalling catalog entries . . . . . . . . . 318 Erase Tape (option 4.13) . . . . . . . . . . 360
Displaying a Volume Table of Contents (VTOC) 319 Exported Stacked Volume List (option 4.14) . . . 361
Using line commands with Work with VTOC 322 Tape Positioning Functions (option 4.15) . . . . 362
Browsing AFP Print documents . . . . . . . 323
AFP Print Browse primary commands . . . . 323 Chapter 9. Disk/VSAM Data Functions 365
Browsing your user storage . . . . . . . . 323 Processing disk records . . . . . . . . . . 365
Memory Browse primary commands . . . . 324 Specifying disk input and output . . . . . . 365
Viewing load module information . . . . . . 324 Specifying disk extents . . . . . . . . . 365
Working with WebSphere MQ . . . . . . . . 325 Disk Browse (option 5.1) . . . . . . . . . 365
Disk Browse primary commands . . . . . . 365
Chapter 8. Tape Specific Functions 331 Disk Track Edit (option 5.2) . . . . . . . . 366
Specifying tape input or output . . . . . . . 331 Disk Track Edit primary commands . . . . . 367
Tape density and mode values . . . . . . 334 Disk Print (option 5.3) . . . . . . . . . . 372
Tape block size considerations . . . . . . . 335 Specifying what you want to print . . . . . 372
Specifying the number of tape files to process . . 335 Controlling print output . . . . . . . . . 372
Processing tapes with data-check errors . . . . 336 Disk Record Scan (option 5.4) . . . . . . . . 373
ASCII translation . . . . . . . . . . . . 336 Write EOF Record (option 5.5) . . . . . . . . 374
Exported Stacked Volumes (ESVs) . . . . . . 337 Data Set Extents (option 5.6) . . . . . . . . 374
VSAM Update (option 5.7) . . . . . . . . . 374

Contents v
Data in Virtual (option 5.8) . . . . . . . . . 375 Choosing the right function to enhance. . . . 400
Creating and supplying a procedure. . . . . . 401
Chapter 10. OAM Functions . . . . . 377 Procedure statement types . . . . . . . . 401
Introducing the Object Access Method . . . . . 377 Choosing between FASTREXX, REXX, and
Object Directory List (option 6.1) . . . . . . . 377 DFSORT for your procedure . . . . . . . 402
Object Browse (option 6.2) . . . . . . . . . 379 Coding DFSORT procedure statements . . . . 403
Object Print (option 6.3) . . . . . . . . . . 379 Coding REXX procedure statements . . . . . 405
Controlling print output . . . . . . . . . 379 Coding end of file procedure . . . . . . . 409
Object Update (option 6.4) . . . . . . . . . 380 Combining DFSORT and REXX statements in a
Object Erase (option 6.5). . . . . . . . . . 380 procedure . . . . . . . . . . . . . 410
Object Copy Functions (option 6.6) . . . . . . 380 Supplying a procedure to enhance File Manager
Backing up OAM objects . . . . . . . . . 380 processing . . . . . . . . . . . . . 411
Object to VSAM (option 6.6.1) . . . . . . . 381 How enhanced processing works . . . . . . . 413
Object to Sequential Data (option 6.6.2) . . . . 381 How REXX-enhanced processing works . . . 413
VSAM to Object (6.6.3) . . . . . . . . . 381 How DFSORT-enhanced processing works . . 414
Sequential Data to Object (option 6.6.4) . . . . 381 Enhanced processing modes . . . . . . . 414
Object to Object (option 6.6.5) . . . . . . . 381 Using templates with enhanced processing . . 417
Backing up a single OAM object . . . . . . 381 Working with an entire data set (DSEB only) or
Backing up multiple OAM objects . . . . . 381 per record . . . . . . . . . . . . . 417
Restoring OAM objects . . . . . . . . . . 382 Dropping a record from further processing . . 417
Restoring an object that was backed up Performance tips . . . . . . . . . . . 417
individually . . . . . . . . . . . . . 382 REXX and DFSORT Examples . . . . . . . . 418
Restoring one or more objects from a Printing data . . . . . . . . . . . . 418
multiple-object backup . . . . . . . . . 382 Copying data . . . . . . . . . . . . 419
Updating records in a data set. . . . . . . 420
Editing a data set . . . . . . . . . . . 420
Chapter 11. Using UNIX System
Examples of tasks that can be performed easily
Services and the Hierarchical File using FASTREXX . . . . . . . . . . . . 420
System . . . . . . . . . . . . . . 385 Record Editing . . . . . . . . . . . . 421
Specifying an HFS file . . . . . . . . . . 385 Writing one or more optionally edited records to
Using directories . . . . . . . . . . . . 386 one or more output files, depending on data in
Selecting files for processing . . . . . . . . 386 the input record . . . . . . . . . . . 421
Logical record length . . . . . . . . . . . 387 Determining whether to copy or print a member
Processing an HFS file . . . . . . . . . . 387 based on some condition inside the member . . 422
Viewing and editing HFS files . . . . . . . . 387 Relative positioning support . . . . . . . 422
Creating HFS files . . . . . . . . . . . . 388
Copying HFS files . . . . . . . . . . . . 388
Comparing HFS files . . . . . . . . . . . 389
Part 2. File Manager Reference 425
Printing HFS files . . . . . . . . . . . . 389
Finding a string in HFS files . . . . . . . . 390 Chapter 14. Panels and fields . . . . 429
Summary of File Manager panels. . . . . . . 429
Chapter 12. Introduction to Access Hierarchical File System panel . . . . . 433
Advanced Member Selection panel . . . . . . 433
programming with File Manager
AFP Print Browse panel . . . . . . . . . . 436
functions . . . . . . . . . . . . . 391 AFP Print Browse output . . . . . . . . . 438
Summary of File Manager functions . . . . . . 391 AIX Association Information panel . . . . . . 440
Using File Manager functions in REXX procedures AIX Entry Detail panel . . . . . . . . . . 441
or TSO clists. . . . . . . . . . . . . . 393 Allocate panel . . . . . . . . . . . . . 442
Invoking File Manager panels from REXX Allocate (Two) panel . . . . . . . . . . . 445
procedures or TSO clists. . . . . . . . . 394 Allocate (Three) panel . . . . . . . . . . 447
Invoking File Manager functions from a REXX Append panel . . . . . . . . . . . . . 449
procedure or CLIST in /BATCH mode . . . . 395 Browse panel . . . . . . . . . . . . . 450
Using File Manager functions in batch jobs . . . 395 Browse Entry panel . . . . . . . . . . . 454
Setting processing options in batch . . . . . 396 Catalog Services panel . . . . . . . . . . 459
Destination of File Manager print output . . . . 396 Catalog Services Data Set List panel . . . . . . 461
Handling errors . . . . . . . . . . . . 397 Clipboard Manager panel . . . . . . . . . 464
Compiler Language Selection panel . . . . . . 465
Chapter 13. Enhancing File Manager Compare Utility: Old and New panels . . . 466
processing . . . . . . . . . . . . 399 Compare Utility: Load module options panel . . . 470
Why enhance File Manager processing? . . . . 399 Compare Utility: Options panel . . . . . . . 474
The tasks you can enhance . . . . . . . . . 399 Compare Utility: Output Data Sets . . . . . . 484

vi File Manager for z/OS V12R1 User's Guide


Copy From panel . . . . . . . . . . . . 486 Record Type Mapping panel . . . . . . . . 630
Copy To panel . . . . . . . . . . . . . 492 Record Type Selection panel . . . . . . . . 632
Copybook Selection panel . . . . . . . . . 500 Redefines / Range Specifications panel . . . . . 634
Copybook View and Print: Entry panel . . . . . 502 Related ID expression panel . . . . . . . . 636
Copybook View and Print: View panel . . . . . 504 RID Selection panel . . . . . . . . . . . 639
Create panel. . . . . . . . . . . . . . 507 Replace panel . . . . . . . . . . . . . 641
Create Tape Data panel . . . . . . . . . . 508 Saveas panel . . . . . . . . . . . . . 642
Data Create Utility panel . . . . . . . . . 510 Scramble Exit Specification panel . . . . . . . 642
Data Set Selection panel . . . . . . . . . . 514 Sequential Data to Tape panel . . . . . . . . 644
Delete Entry panel. . . . . . . . . . . . 515 Set Batch Job Card Information panel (option 0.4) 645
Disk Volume Details panel . . . . . . . . . 517 Set COBOL Processing Options panel (option 0.5.2) 646
Disk/VSAM Data Functions panel . . . . . . 518 Set DBCS Format panel . . . . . . . . . . 647
Display VTOC panel . . . . . . . . . . . 518 Set HLASM Processing Options panel (option 0.5.3) 649
Display VTOC Batch Sort Options panel . . . . 520 Set Language and Compiler Specifications (option
Display VTOC Data Set List panel . . . . . . 522 0.5) . . . . . . . . . . . . . . . . . 650
Dynamic Template panel . . . . . . . . . 524 Set Output Data Set Allocation Options panel . . 651
Editor panel . . . . . . . . . . . . . . 529 Set PL/I Processing Options panel (option 0.5.4) 652
Edit Entry panel . . . . . . . . . . . . 536 Set Print Processing Options panel (option 0.1) . . 654
Edit Personal Data Set List panel . . . . . . . 538 Set Processing Options panel . . . . . . . . 657
Edit/View - Copy panel . . . . . . . . . . 540 Set System Processing Options panel (option 0.2) 659
Editor Options panel . . . . . . . . . . . 541 Set Tape Processing Options panel (option 0.3) . . 661
Erase Tape panel . . . . . . . . . . . . 546 Set Temporary Data Set Allocation Options panel 663
Exported Stacked Volume Copy panel . . . . . 547 Set Trace options panel . . . . . . . . . . 665
Exported Stacked Volume List panel. . . . . . 548 Tape Browse panel . . . . . . . . . . . 666
Field Attributes panel - alphanumeric fields . . . 548 Tape Data Copy Functions panel . . . . . . . 667
Field Attributes panel - numeric field . . . . . 554 Tape Label Display panel . . . . . . . . . 668
Field Mapping panel . . . . . . . . . . . 559 Tape Map panel . . . . . . . . . . . . 669
Field Selection/Edit panel . . . . . . . . . 561 Tape Positioning Functions panel . . . . . . . 670
File Selection panel . . . . . . . . . . . 566 Tape Print panel . . . . . . . . . . . . 671
Find/Change Utility panel . . . . . . . . . 569 Tape Record Load panel . . . . . . . . . . 672
From (or Old) Field Mapping panel . . . . . . 573 Tape Record Scan panel . . . . . . . . . . 673
GDG Entry Detail panel . . . . . . . . . . 576 Tape Specific Functions panel . . . . . . . . 673
IAM KSDS Define panel. . . . . . . . . . 576 Tape to Labeled Tape panel. . . . . . . . . 676
IAM Entry Details panel. . . . . . . . . . 578 Tape to Tape panel . . . . . . . . . . . 677
Initialize Tape panel . . . . . . . . . . . 581 Tape to Tape Compare panel . . . . . . . . 678
Key positioning panel . . . . . . . . . . 582 Tape to Tape Reblocked panel . . . . . . . . 679
01 Layout Selection List panel . . . . . . . . 583 Tape to QSAM panel . . . . . . . . . . . 680
Library List panel . . . . . . . . . . . . 583 Tape to VSAM panel . . . . . . . . . . . 681
Load Module Compare - Entry panel . . . . . 585 Tape Update panel . . . . . . . . . . . 682
Load Module Information panel . . . . . . . 587 Template and Copybook Utility functions panel 683
Load Module Information - Selection panel . . . 589 Template Build Utility panel . . . . . . . . 684
Load module utility functions panel . . . . . . 590 Template Update Utility panel. . . . . . . . 685
Map To panel . . . . . . . . . . . . . 591 Template Save pop-up panel . . . . . . . . 689
Member Selection panel . . . . . . . . . . 596 Template Workbench panel . . . . . . . . . 690
Memory Browse panel . . . . . . . . . . 600 Utility Functions menu panel . . . . . . . . 695
Non-VSAM Allocate panel . . . . . . . . . 602 Value List Edit panel . . . . . . . . . . . 697
Non-VSAM Association Information panel . . . 603 View panel . . . . . . . . . . . . . . 699
Non-VSAM Define panel . . . . . . . . . 603 View Entry panel . . . . . . . . . . . . 705
Non-VSAM Entry Detail panel . . . . . . . 605 Volume Summary/Selection panel . . . . . . 710
Non-VSAM Extent Information panel . . . . . 606 VSAM Association Information panel . . . . . 711
OAM Functions panel . . . . . . . . . . 607 VSAM Define panel . . . . . . . . . . . 711
Path Entry Detail panel . . . . . . . . . . 608 VSAM Edit Sharing Options panel . . . . . . 712
Personal Data Set List panel . . . . . . . . 608 VSAM Entry Detail panel . . . . . . . . . 714
Personal Data Set Lists panel . . . . . . . . 610 VSAM Entry Rename panel . . . . . . . . 718
Primary Option Menu panel . . . . . . . . 611 VSAM Statistics and Extent Detail panel . . . . 718
Print Audit Trail panel . . . . . . . . . . 614 VSAM to Tape panel . . . . . . . . . . . 720
Print Options panel . . . . . . . . . . . 615 WebSphere MQ Functions panel . . . . . . . 720
Print Utility panel . . . . . . . . . . . . 616 WebSphere MQ Managers panel . . . . . . . 721
Record Identification Criteria panel . . . . . . 621 WebSphere MQ Managers Information panel . . . 722
Record Sampling panel . . . . . . . . . . 624 WebSphere MQ Queue Editor Entry panel. . . . 724
Record Selection Criteria panel . . . . . . . 627 WebSphere MQ Queue Information panel . . . . 726

Contents vii
WebSphere MQ Queue List panel . . . . . . 728 RBALEN primary command . . . . . . . . 797
Write Tape Mark panel . . . . . . . . . . 729 RCHANGE primary command . . . . . . . 798
RD primary command . . . . . . . . . . 798
Chapter 15. Primary commands . . . 731 RDF primary command . . . . . . . . . . 800
ABOUT primary command . . . . . . . . . 731 RECLEN primary command . . . . . . . . 800
AMSMSG primary command . . . . . . . . 731 RECOVER primary command . . . . . . . . 801
APPEND, APPENDX primary commands . . . . 732 RECSTATS primary command . . . . . . . . 801
ASSOCS primary command . . . . . . . . 733 REFRESH primary command . . . . . . . . 802
AUTORTRY primary command . . . . . . . 733 REFS primary command . . . . . . . . . 803
AUTOSAVE primary command . . . . . . . 734 REPLACE, REPLACEX primary commands . . . 803
BOTTOM primary command . . . . . . . . 735 RESET primary command . . . . . . . . . 804
BOUNDS primary command . . . . . . . . 735 RF primary command . . . . . . . . . . 806
CANCEL primary command . . . . . . . . 736 RFIND primary command . . . . . . . . . 807
CAPS primary command . . . . . . . . . 737 RIGHT primary command . . . . . . . . . 808
CASE primary command . . . . . . . . . 738 RP primary command . . . . . . . . . . 809
CE (Change Error) primary command . . . . . 738 RUNTEMP primary command . . . . . . . 810
CEDIT primary command . . . . . . . . . 740 SAVE primary command . . . . . . . . . 811
CHANGE/CX primary command . . . . . . 741 SAVEAS primary command (templates) . . . . 811
CHGASAVE primary command . . . . . . . 747 SAVEAS, SAVEASX primary commands (data) . . 812
COPY primary command . . . . . . . . . 748 SELECT primary command. . . . . . . . . 813
CUT primary command . . . . . . . . . . 750 SHADOW primary command . . . . . . . . 814
CREATE, CREATEX primary commands . . . . 751 SHOW primary command . . . . . . . . . 815
DEDIT primary command . . . . . . . . . 752 SHOWCOB primary command . . . . . . . 816
DELETE primary command . . . . . . . . 752 SLOC primary command . . . . . . . . . 817
DESCRIBE primary command . . . . . . . . 754 SORT primary command . . . . . . . . . 817
DOWN primary command . . . . . . . . . 754 SPLT primary command. . . . . . . . . . 820
DX primary command . . . . . . . . . . 755 SPLTJOIN primary command . . . . . . . . 820
EDIT primary command. . . . . . . . . . 755 STR primary command . . . . . . . . . . 821
END primary command . . . . . . . . . . 756 STATS primary command . . . . . . . . . 821
EXCLUDE/XX primary command . . . . . . 756 SV primary command . . . . . . . . . . 822
EXIT primary command . . . . . . . . . . 760 TAILOR primary command . . . . . . . . 822
EXPAND primary command . . . . . . . . 760 TEDIT primary command . . . . . . . . . 823
EXTENT primary command . . . . . . . . 761 TOP primary command . . . . . . . . . . 824
FE (Find Error) primary command . . . . . . 761 TPRINT primary command. . . . . . . . . 825
FKEY primary command . . . . . . . . . 763 TVIEW primary command . . . . . . . . . 825
FILE primary command . . . . . . . . . . 763 TYPE primary command . . . . . . . . . 826
FIND/FX primary command . . . . . . . . 764 UP primary command . . . . . . . . . . 826
FINDNOT primary command . . . . . . . . 773 UPDATE primary command . . . . . . . . 827
FORMAT primary command . . . . . . . . 775 VCONTEXT primary command . . . . . . . 827
HEX primary command . . . . . . . . . . 776 VER primary command . . . . . . . . . . 828
INFO primary command . . . . . . . . . 777 VIEW primary command . . . . . . . . . 829
JOIN primary command. . . . . . . . . . 777 VOLUME primary command . . . . . . . . 829
JUST primary command . . . . . . . . . . 778 XD primary command . . . . . . . . . . 829
KEY primary command . . . . . . . . . . 779 ZOOM primary command . . . . . . . . . 830
LEFT primary command . . . . . . . . . 779
LIBLIST primary command. . . . . . . . . 781 Chapter 16. Functions. . . . . . . . 831
LIST primary command . . . . . . . . . . 781 How to use this reference chapter . . . . . . 831
LISTVIEW primary command . . . . . . . . 782 How to read the syntax diagrams . . . . . . 831
LOCATE primary command . . . . . . . . 782 General tips about performance when you use File
NEXT primary command . . . . . . . . . 789 Manager functions . . . . . . . . . . . 833
NEXTREC primary command . . . . . . . . 790 File Manager functions . . . . . . . . . . 834
NRETRIEV primary command . . . . . . . 791 AUD (Print Audit Trail Report) . . . . . . 834
OFFSET primary command. . . . . . . . . 791 BSF (Backward Space File) . . . . . . . . 837
PACK primary command . . . . . . . . . 793 BSR (Backward Space Record) . . . . . . . 838
PASTE primary command . . . . . . . . . 793 BT (Create Tape File) . . . . . . . . . . 839
PIC primary command . . . . . . . . . . 794 BTB (Batch Template Build) . . . . . . . 841
PREFIX primary command . . . . . . . . . 795 BTU (Batch Template Update) . . . . . . . 849
PREVIOUS primary command . . . . . . . 795 CLM (Compare Load Module) . . . . . . 858
PREVREC primary command . . . . . . . . 796 DP (Disk Print) . . . . . . . . . . . . 866
PROFILE primary command . . . . . . . . 797 DRS (Disk Record Scan) . . . . . . . . . 868
QUIT primary command . . . . . . . . . 797 DSB (Data Set Browse) . . . . . . . . . 871

viii File Manager for z/OS V12R1 User's Guide


DSC (Data Set Copy) . . . . . . . . . . 879 Using FASTREXX variables . . . . . . . 1111
DSE (Data Set Edit) . . . . . . . . . . 903 Tally register for external REXX functions . . 1112
DSEB (Data Set Edit Batch) batch only . . . 911 BOT (DSEB only) . . . . . . . . . . . 1113
DSFA (Altering a data set) . . . . . . . . 924 CHANGE . . . . . . . . . . . . . 1114
DSFC (Allocate a data set) . . . . . . . . 926 CHG_OUT . . . . . . . . . . . . . 1115
DSFC (Delete a data set). . . . . . . . . 926 CHG_VAR . . . . . . . . . . . . . 1118
DSFR (Rename a data set) . . . . . . . . 926 CONTAINS . . . . . . . . . . . . 1121
DSG (Data Set Generate) . . . . . . . . 927 DOWN (DSEB only). . . . . . . . . . 1122
DSI (Data Set Information) . . . . . . . . 938 FINDNEXT, FINDPREV (DSEB only) . . . . 1122
DSM (Data Set Compare) . . . . . . . . 939 FLD . . . . . . . . . . . . . . . 1123
DSP (Data Set Print) . . . . . . . . . . 975 FLD_CO. . . . . . . . . . . . . . 1125
DSU (Data Set Update) batch only . . . . 992 FLD_OUT . . . . . . . . . . . . . 1127
DSV (Data Set View) . . . . . . . . . 1005 FLD_TM . . . . . . . . . . . . . 1129
DSX (Data Set Extents) . . . . . . . . . 1014 FLD_TYPE . . . . . . . . . . . . . 1130
DVT (Display VTOC) . . . . . . . . . 1015 FLDI . . . . . . . . . . . . . . . 1132
EOJ (End of Job) . . . . . . . . . . . 1019 FLDO . . . . . . . . . . . . . . 1134
ERT (Erase Tape) . . . . . . . . . . . 1019 I_LENGTH . . . . . . . . . . . . . 1135
EVC (Exported Stacked Volume Copy) . . . 1020 MOD_DATE . . . . . . . . . . . . 1135
EVL (Exported Stacked Volume List) . . . . 1022 NCONTAIN . . . . . . . . . . . . 1140
FCH (Find/Change) . . . . . . . . . . 1025 O_LENGTH . . . . . . . . . . . . 1140
FMT (Set DBCS Format) . . . . . . . . 1035 OFLD_CO . . . . . . . . . . . . . 1141
FSF (Forward Space File) . . . . . . . . 1037 OVLY_OUT . . . . . . . . . . . . 1143
FSR (Forward Space Record) . . . . . . . 1038 OVLY_VAR. . . . . . . . . . . . . 1145
INT (Initialize Tape) . . . . . . . . . . 1038 PRINT . . . . . . . . . . . . . . 1147
NOSORT (Disable the use of DFSORT) . . . 1040 PRTCOUNT . . . . . . . . . . . . 1149
ODL (Object Directory List) . . . . . . . 1040 PRT_IN . . . . . . . . . . . . . . 1149
OE (Object Erase) . . . . . . . . . . 1042 PRT_OUT . . . . . . . . . . . . . 1150
OO (Object to Object) . . . . . . . . . 1043 PRT_VAR . . . . . . . . . . . . . 1151
OP (Object Print) . . . . . . . . . . . 1045 RECCUR (DSEB only) . . . . . . . . . 1152
OS (Object to Sequential Data) . . . . . . 1046 RECSIN . . . . . . . . . . . . . . 1152
OV (Object to VSAM) . . . . . . . . . 1049 RECSOUT . . . . . . . . . . . . . 1153
PBK (Print Copybook) . . . . . . . . . 1051 RSTR_OUT . . . . . . . . . . . . . 1154
REW (Tape Rewind). . . . . . . . . . 1058 SAVE_OUT . . . . . . . . . . . . . 1154
RUN (Tape Rewind-Unload) . . . . . . . 1058 SEGCNT . . . . . . . . . . . . . 1155
SCS (Catalog Services) . . . . . . . . . 1059 SEGNO . . . . . . . . . . . . . . 1155
SET (Set Processing Options) . . . . . . . 1061 SET_OLEN . . . . . . . . . . . . . 1156
SO (Sequential Data to Object) . . . . . . 1068 SETC . . . . . . . . . . . . . . . 1157
ST (Sequential Data to Tape) . . . . . . . 1071 SETN. . . . . . . . . . . . . . . 1158
TLB (Tape Label Display) . . . . . . . . 1073 TALLY . . . . . . . . . . . . . . 1159
TLT (Tape to Labeled Tape) . . . . . . . 1074 TESTC . . . . . . . . . . . . . . 1160
TMP (Tape Map) . . . . . . . . . . . 1076 TESTN . . . . . . . . . . . . . . 1163
TP (Tape Print) . . . . . . . . . . . 1078 TFLD. . . . . . . . . . . . . . . 1164
TRS (Tape Record Scan) . . . . . . . . 1080 TM . . . . . . . . . . . . . . . 1166
TS (Tape to Sequential Data) . . . . . . . 1082 TOP (DSEB only) . . . . . . . . . . . 1167
TT (Tape to Tape) . . . . . . . . . . 1085 UP (DSEB only) . . . . . . . . . . . 1167
TTC (Tape to Tape Compare) . . . . . . . 1087 UPDATE (DSEB only) . . . . . . . . . 1167
TTR (Tape to Tape Reblocked) . . . . . . 1088 VAR_OUT . . . . . . . . . . . . . 1168
TV (Tape to VSAM) . . . . . . . . . . 1090 VAR_TM . . . . . . . . . . . . . 1169
TX (Tape to REXX Variable) REXX only 1092 WRITE . . . . . . . . . . . . . . 1171
VER (Display Service Level) . . . . . . . 1094 RETURN return values . . . . . . . . . . 1173
VLM (View Load Module) . . . . . . . 1094 DROP . . . . . . . . . . . . . . 1173
VO (VSAM to Object) . . . . . . . . . 1096 DROP MEMBER . . . . . . . . . . . 1173
VT (VSAM to Tape) . . . . . . . . . . 1098 PROCESS MEMBER . . . . . . . . . . 1173
VX (VSAM to REXX Variable) REXX only 1101 STOP . . . . . . . . . . . . . . . 1174
WTM (Write Tape Mark) . . . . . . . . 1102 STOP IMMEDIATE . . . . . . . . . . 1174
XT (REXX Variable to Tape) REXX only . . 1103
XV (REXX Variable to VSAM) REXX only 1104 Appendix. File Manager messages 1175
External REXX functions . . . . . . . . . 1105 Messages . . . . . . . . . . . . . . 1175
Absolute and relative positioning in external
REXX functions . . . . . . . . . . . 1108
Specifying relative positions . . . . . . . 1110

Contents ix
Support resources and problem Programming interface information . . . . . 1203
solving information . . . . . . . . 1195 Trademarks . . . . . . . . . . . . . 1203
Searching IBM support Web sites for a solution 1195
Searching the information center . . . . . 1195 Bibliography . . . . . . . . . . . 1205
Searching product support documents. . . . 1195 File Manager publications . . . . . . . . . 1205
IBM Support Assistant . . . . . . . . . 1196 Related publications for Problem Determination
Obtaining fixes . . . . . . . . . . . . 1196 Tools . . . . . . . . . . . . . . . . 1205
Receiving support updates through e-mail Related publications for COBOL. . . . . . . 1205
notification . . . . . . . . . . . . . . 1197 Related publications for PL/I. . . . . . . . 1205
Receiving support updates through RSS feeds 1198 Related publications for z/OS . . . . . . . 1205
If you need to contact IBM Software Support . . 1198 Softcopy publications . . . . . . . . . . 1205
Determining the business impact . . . . . 1199
Describing problems and gathering information 1199 Glossary . . . . . . . . . . . . . 1207
Submitting problems . . . . . . . . . 1200
Index . . . . . . . . . . . . . . 1211
Notices . . . . . . . . . . . . . 1201

x File Manager for z/OS V12R1 User's Guide


About this document
This document provides guidance and reference information for users of IBM File
Manager for z/OS working with QSAM data sets, VSAM data sets, IAM data sets,
PDS members, Websphere MQ queues, or HFS1 files.
Notes:
1. Throughout this document, the z/OS UNIX file systems, HFS and zFS, are
referred to as "HFS".

File Manager for z/OS contains four flavors of File Manager, for working in
different environments or with different data formats:
v File Manager base component (described in this document), for working with
QSAM data sets, VSAM data sets, IAM data sets, PDS members, Websphere MQ
queues, CICS resource, or HFS files as an ISPF application or by means of the
File Manager Plug-in for Eclipse.
v File Manager DB2 component, for working with DB2 data sets
v File Manager IMS component, for working with IMSdata sets
v FM/CICS for working with CICS resources.

This document describes the File Manager Base component. For information about
the DB2, IMS, and CICS components, see these documents:
v File Manager Users Guide and Reference for DB2 Data, SC19-3675
v File Manager Users Guide and Reference for IMS Data, SC19-3676
v File Manager Users Guide and Reference for CICS, SC19-3677

In the rest of this document, the term "File Manager" refers only to the File
Manager Base component, not to the DB2, IMS, or CICS components.

This document is divided into three parts:


Part 1. Working with File Manager
Describes the concepts inherent within File Manager, provides step-by-step
instructions on how to perform tasks using the File Manager panels under
ISPF, and describes how to use the File Manager functions in batch jobs,
REXX procedures or TSO CLISTs. The information is presented in a
task-based format, with panel, field, command, and function definitions
provided only when they are relevant to the current task. For a complete
description of a particular panel, field, command or function, you should
use the appropriate chapter in Part 2 File Manager References.
Users who are new to File Manager should find that Part 1 presents the
tasks in logical groupings, helping you to use the guide as a learning tool,
as well as enabling you to quickly find the specific task instructions you
need.
Part 2. File Manager References
Provides a lookup reference for File Manager panels, commands, and
functions. The information is presented in three main chapters:
1. File Manager Panel and Field Reference: Lists all of the File Manager
panels, provides a definition for each field in the panel and, where
applicable, lists the value ranges that are valid for each field.

Copyright IBM Corp. 2000, 2012 xi


2. File Manager Command Reference: Lists all of the Primary and Prefix
commands and gives a brief description of its syntax, usage and
equivalent function.
3. File Manager Function Reference: Lists all of the File Manager functions
and gives a description of its syntax, usage and available parameters.
Both new and experienced users of File Manager can use Part 2 to quickly
look up such things as the exact syntax of a command or function, or the
acceptable values for a field in a panel.
Part 3. Appendixes
The Appendix is made up of the File Manager ("base") messages, and
provides the full text explanation of all FM "base" batch error messages.
The support information tells you about IBM Web sites that can help you
answer questions and solve problems, followed by notices, bibliography,
glossary and index.

Who should use this document


This document is for three kinds of File Manager users:
v Application programmers who need to test and debug programs
v Service support personnel who need to analyze and fix problems
v System administrators and system operators who need to do routine tasks such
as moving large amounts of data

This document assumes that you are familiar with using ISPF.

To use File Manager functions in batch jobs, you must already be familiar with
JCL.

To use File Manager functions in REXX procedures, you must already be familiar
with the REXX programming language.

Prerequisite and related information


File Manager documentation supports the following tasks:
Evaluating File Manager
File Manager Fact Sheet provides an overview of the product to help the
business professional decide if File Manager has the functions needed.
Planning for, installing, customizing, and maintaining File Manager
Refer first to the File Manager Customization Guide which may then refer
you to the File Manager Program Directory (shipped with the product tape)
for some information.
Using File Manager
This document, the File Manager Users Guide and Reference, is a guide to
using File Manager. When using File Manager under ISPF, you can also
refer to the online help.

For information about related products, see the Bibliography on page 1205.

xii File Manager for z/OS V12R1 User's Guide


Using LookAt to look up message explanations
LookAt is an online facility that lets you look up explanations for most messages
you encounter, as well as for some system abends and codes. Using LookAt to find
information is faster than a conventional search because in most cases LookAt goes
directly to the message explanation.

You can access LookAt from the Internet at: http://www.ibm.com/eserver/


zseries/zos/bkserv/lookat/ or from anywhere in z/OS or z/OS.e where you can
access a TSO/E command line (for example, TSO/E prompt, ISPF, z/OS UNIX
System Services running OMVS).

The LookAt Web site also features a mobile edition of LookAt for devices such as
Pocket PCs, Palm OS, or Linux-based handhelds. So, if you have a handheld
device with wireless access and an Internet browser, you can now access LookAt
message information from almost anywhere.

To use LookAt as a TSO/E command, you must have LookAt installed on your
host system. You can obtain the LookAt code for TSO/E from a disk on your z/OS
Collection (SK3T-4269) or from the LookAt Web site's Download link.

How to read syntax diagrams


The syntactical structure of commands described in this document is shown by
means of syntax diagrams.

Figure 1 on page xiv shows a sample syntax diagram that includes the various
notations used to indicate such things as whether:
v An item is a keyword or a variable.
v An item is required or optional.
v A choice is available.
v A default applies if you do not specify a value.
v You can repeat an item.

About this document xiii


Syntax

KEYWORD=default_choice
 COMMAND_NAME required_variable 
OPTIONAL_KEYWORD=variable KEYWORD= choice2
choice3

  repeatable_item1 required_choice1 
fragment_name optional_choice1 required_choice2
optional_choice2 required_choice3

,
DEFAULT_KEYWORD
  repeatable_item2 
KEYword

fragment_name:

DEFAULT_KEYWORD KEYWORD3 KEYWORD4


(  variable1 )
KEYWORD1 variable2 variable3
KEYWORD2 ,

(  variable4 - variable5 )
OPTIONAL_KEYWORD1
OPTIONAL_KEYWORD2
OPTIONAL_KEYWORD3

Figure 1. Sample syntax diagram

Here are some tips for reading and understanding syntax diagrams:
Order of
reading Read the syntax diagrams from left to right, from top to bottom,
following the path of the line.
The  symbol indicates the beginning of a statement.
The  symbol indicates that a statement is continued on the
next line.
The  symbol indicates that a statement is continued from the
previous line.
The  symbol indicates the end of a statement.
Keywords Keywords appear in uppercase letters.

 COMMAND_NAME 

xiv File Manager for z/OS V12R1 User's Guide


Sometimes you only need to type the first few letters of a keyword,
The required part of the keyword appears in uppercase letters.

DEFAULT_KEYWORD
 
KEYword

In this example, you could type "KEY", "KEYW", "KEYWO",


"KEYWOR" or "KEYWORD".
The abbreviated or whole keyword you enter must be spelled
exactly as shown.
Variables Variables appear in lowercase letters. They represent user-supplied
names or values.

 required_variable 

Required
items Required items appear on the horizontal line (the main path).

 COMMAND_NAME required_variable 

Optional
items Optional items appear below the main path.

 
OPTIONAL_KEYWORD=variable

Choice of
items If you can choose from two or more items, they appear vertically,
in a stack.
If you must choose one of the items, one item of the stack appears
on the main path.

 required_choice1 
required_choice2
required_choice3

If choosing one of the items is optional, the entire stack appears


below the main path.

 
optional_choice1
optional_choice2

If a default value applies when you do not choose any of the


items, the default value appears above the main path.

DEFAULT_KEYWORD
 
KEYWORD1
KEYWORD2

About this document xv


Repeatable
items An arrow returning to the left above the main line indicates an
item that can be repeated.

  repeatable_item1 

If you need to specify a separator character (such as a comma)


between repeatable items, the line with the arrow returning to the
left shows the separator character you must specify.

  repeatable_item2 

Fragments Where it makes the syntax diagram easier to read, a section or


fragment of the syntax is sometimes shown separately.

 
fragment_name

.
.
.

fragment_name:

DEFAULT_KEYWORD
...
KEYWORD1
KEYWORD2

How to send your comments to IBM


We appreciate your input on this publication. Feel free to comment on the clarity,
accuracy, and completeness of the information or give us any other feedback that
you might have.

Use one of the following methods to send us your comments:


1. Send an email to [email protected]
2. Use the form on the Web at:
www.ibm.com/software/ad/rcf/
3. Mail the comments to the following address:
IBM Corporation
H150/090
555 Bailey Avenue
San Jose, CA
95141-1003
U.S.A.

Include the following information:


v Your name and address
v Your email address
v Your telephone or fax number
xvi File Manager for z/OS V12R1 User's Guide
v The publication title and order number:
FM V12R1 Users Guide and Reference
SC19-3674-00
v The topic and page number related to your comment
v The text of your comment.
When you send comments to IBM, you grant IBM a nonexclusive right to use or
distribute your comments in any way it believes appropriate without incurring any
obligation to you.

IBM or any other organizations will only use the personal information that you
supply to contact you about the issues that you submit.

If you have a technical problem


Do not use the feedback methods listed above. Instead, do one of the following:
v Contact your IBM service representative
v Call IBM technical support
v Visit the IBM support portal at http://www.ibm.com/systems/z/support/

About this document xvii


xviii File Manager for z/OS V12R1 User's Guide
Summary of changes
This edition of the document provides information applicable to File Manager
Version 12 Release 1.

Changes in this edition include:


1. Formatted key positioning for edit, view, and browse sessions of a KSDS file.
For more details see:
v "Browse Entry panel" - Figure 129 on page 455
v "Edit Entry panel" - Figure 164 on page 537
v "Key Positioning panel" - Figure 187 on page 582
v Record Sampling panel on page 624
v View Entry panel on page 705
v FKEY primary command on page 763
2. Picture support for the change, exclude, and find commands. For more details
see:
v Change command on pages 743, and 744
v Exclude command on page 758
v Find command on page 769
3. Change not (CNot) and Find not (FNot) commands are now supported. For
more details see:
v CHANGE/CX primary command on page 741
v FIND/FX primary command on page 764
4. Ability to access CICS resources from File Manager running under ISPF or
batch. For more details see:
v Specifying a CICS resource on page 26
v Accessing CICS resources on page 27
5. End of file procedure support. For more details see:
v Coding end of file procedure on page 409
6. Copying of segmented data is now fully supported. For more details see:
v Copying records with segmented data templates on page 256

Copyright IBM Corp. 2000, 2012 xix


xx File Manager for z/OS V12R1 User's Guide
Part 1. Working with File Manager
Chapter 1. File Manager overview . . . . . . 7 Output Data Set Allocations (option 0.9) . . . . 50
File Manager actions. . . . . . . . . . . . 7 Trace options (option 0.10) . . . . . . . . 50
Data sets and records . . . . . . . . . . . 8 Displaying or editing DBCS characters . . . . 50
Templates . . . . . . . . . . . . . . . 9 National characters . . . . . . . . . . . 51
Why use a template? . . . . . . . . . . 9 SAF-rule controlled auditing. . . . . . . . . 52
What can you do with a template? . . . . . 11 SAF rules for auditing . . . . . . . . . . 52
Where can you use templates? . . . . . . . 11 SAF-rule controlled auditing not in effect . . . 52
SAF-rule controlled auditing in effect, auditing
Chapter 2. Getting started with File Manager . . 13 possible . . . . . . . . . . . . . . 52
Starting and exiting File Manager . . . . . . . 13
Starting File Manager . . . . . . . . . . 13 Chapter 3. Viewing and changing data sets . . . 53
Checking your File Manager version . . . . . 15 Starting and ending editor sessions . . . . . . 55
Checking which COBOL compiler you're using 17 Starting an editor session without using
Exiting from File Manager . . . . . . . . 17 templates . . . . . . . . . . . . . . 55
Invoking File Manager panels from outside File Example of displaying data without a
Manager . . . . . . . . . . . . . . 17 template . . . . . . . . . . . . . 57
Using the File Manager interface . . . . . . . 18 Starting an editor session with a template . . . 57
Navigating in File Manager . . . . . . . . 18 Example of displaying data with a template 58
Issuing commands . . . . . . . . . . . 19 Removing or changing the template . . . . 60
Specifying quoted strings . . . . . . . . . 20 Viewing and changing packed data . . . . . 60
Specifying a data set and a member name . . . 20 Working with packed data in Edit . . . . . 61
Examples of data set name patterns . . . . 22 Working with packed data in View . . . . 61
Examples of specifying a member name or Listing statistics for the current editor session . . 62
pattern . . . . . . . . . . . . . . 23 Displaying your current editor options . . . . 63
Specifying an MQ manager or queue . . . . . 25 Ending an editor session . . . . . . . . . 64
Specifying a CICS resource . . . . . . . . 26 Saving changes without ending the Edit
Accessing CICS resources. . . . . . . . . 27 session . . . . . . . . . . . . . . 64
Examples of accessing CICS resources . . . 27 Displaying the RBA and record length information 65
Running File Manager batch functions with a Managing the prefix area . . . . . . . . . . 66
CICS resource . . . . . . . . . . . 32 Manipulating your view of the data . . . . . . 68
Manipulating your view of selection lists . . . 33 Using primary commands in an editor session. . 69
Using primary commands with selection lists 33 Selecting a display format . . . . . . . . 69
Scrolling to see data . . . . . . . . . 34 Setting the initial display format . . . . . 70
Sorting the data . . . . . . . . . . . 35 Changing the display format . . . . . . 70
Finding specific data . . . . . . . . . 36 Display formats . . . . . . . . . . . 70
Changing the display width of columns . . . 37 Displaying a column identification line . . . . 73
Filtering your selection list . . . . . . . 37 Zooming in to see all of a record . . . . . . 75
Changing where (and if) columns are Displaying the record length. . . . . . . . 77
displayed . . . . . . . . . . . . . 38 Scrolling to see data . . . . . . . . . . 80
Displaying data in hexadecimal. . . . . . 38 Controlling how far you scroll . . . . . . 81
Selecting a range of PDS(E) members . . . . . 39 Scrolling to the first or last record or column 82
Using hexadecimal values in File Manager . . . 41 Holding fields when scrolling left or right . . 83
Getting help . . . . . . . . . . . . . . 42 Locating a field, column or record number . . 83
Displaying field help information . . . . . . 42 Scrollable input and display fields for long
Accessing Tutorial Help . . . . . . . . . 43 names . . . . . . . . . . . . . . . 83
Viewing error messages . . . . . . . . . 45 Working with scrollable input fields . . . . 84
Setting your default processing options . . . . . 45 Working with scrollable display fields . . . 84
Set print processing options (option 0.1) . . . . 47 Sorting the data . . . . . . . . . . . . 85
Setting your System Processing Options (option Finding specific data . . . . . . . . . . 87
0.2) . . . . . . . . . . . . . . . . 47 Searching numeric fields . . . . . . . . 87
Set tape processing options (option 0.3) . . . . 49 Handling long strings in FIND . . . . . . 88
Set batch job card information (option 0.4) . . . 49 Finding and correcting errors in your data . . 89
Language and compiler specifications (option 0.5) 49 Excluding records from display. . . . . . . 90
Editor options (option 0.6) . . . . . . . . 49 Handling long strings in EXCLUDE . . . . 91
VSAM edit sharing options (option 0.7) . . . . 50 Working with File Manager and shared files . . . 92
Temporary Data Set Allocations (option 0.8) . . 50 Overview of shared file features . . . . . . 92

Copyright IBM Corp. 2000, 2012 1


What File Manager considers a shared file . . . 92 Editing rules for PL/I varying length string
Record integrity checking. . . . . . . . . 92 types . . . . . . . . . . . . . . 139
Marking of records that had an integrity check 95 Editing rules for PL/I varying length zero
==MSG> and =PROF> indicators . . . 96 terminated string types . . . . . . . . 139
Refreshing the contents of a record . . . . . 97 Using HLASM copybooks with File Manager 140
Refresh of a record in SNGL display format 98 Interpreting HLASM source . . . . . . 140
Saving individual records. . . . . . . . 98 Managing templates . . . . . . . . . . . 142
Saving a file after a given number of updates Setting your template processing options . . . 142
(Autosave frequency option). . . . . . . 99 Selecting your compiler language. . . . . 143
CHANGE ALL, automatic saving and retry 100 Setting your COBOL processing options . . 144
Editing techniques. . . . . . . . . . . . 100 Setting your HLASM processing options . . 145
In-place-in-memory edit . . . . . . . . . 101 Setting your PL/I processing options . . . 146
In-place edit . . . . . . . . . . . . . 101 Overriding Compiler Options . . . . . . 147
In-memory edit. . . . . . . . . . . . 102 Determining the search order for your
Auxiliary edit . . . . . . . . . . . . 102 copybooks . . . . . . . . . . . . 148
KSDS edit . . . . . . . . . . . . . 103 Specifying or updating the source definition for
Editing large files . . . . . . . . . . . 103 a copybook template . . . . . . . . . . 148
Editing load modules. . . . . . . . . . 104 Single copybook source definitions . . . . 148
Changing data . . . . . . . . . . . . . 104 Advanced copybook source definitions . . . 148
Changing data in individual records. . . . . 104 Advanced copybook selection . . . . . . . 149
Change data in multiple records . . . . . . 105 Creating a copybook template with the
Differences between primary commands Template Workbench . . . . . . . . . . 152
when editing and viewing . . . . . . . 105 Setting up a template to be used with
Locating labeled records . . . . . . . . . 106 segmented data . . . . . . . . . . . 153
Changing the case of data . . . . . . . . 106 Creating a template from a model template . . 153
Finding and replacing strings . . . . . . . 107 Creating dynamic templates . . . . . . . 154
Handling long strings in CHANGE . . . . 110 Creating dynamic templates on the fly . . . 154
Changing invalid numeric fields in your data 111 Creating dynamic templates from copybook
Limiting the effect of editing changes . . . . . 111 templates . . . . . . . . . . . . . 156
Setting bounds . . . . . . . . . . . . 112 Creating corresponding templates from selected
Setting column ranges . . . . . . . . . 113 copybooks . . . . . . . . . . . . . 157
Limiting the search to specified fields . . . . 114 Editing a template . . . . . . . . . . . 158
Specifying a list of fields. . . . . . . . 114 Updating one or more templates . . . . . . 162
Specifying ranges of fields . . . . . . . 115 Manipulating the display of fields in records . . . 164
Excluding records . . . . . . . . . . . 115 Selecting and deselecting fields . . . . . . 164
Labelling record ranges . . . . . . . . . 116 Changing the field display order . . . . . . 165
Editor-assigned labels . . . . . . . . 117 Holding columns when scrolling left or right 165
Editing records within data sets . . . . . . . 118 Toggling the hold status of more than one
Inserting records . . . . . . . . . . . 119 field at a time . . . . . . . . . . . 165
Deleting records . . . . . . . . . . . 119 Changing field headings. . . . . . . . . 166
Recovering deleted records . . . . . . . . 120 Changing field attributes . . . . . . . . 166
Moving records. . . . . . . . . . . . 120 Selecting a field for attribute change. . . . 167
Copying and repeating records . . . . . . 121 Changing the attributes for an alphanumeric
Overlaying data in existing records . . . . . 122 field . . . . . . . . . . . . . . 167
Copying data to and from a clipboard . . . . 124 Changing the attributes for a numeric field 167
Copying data to a clipboard (CUT) . . . . 124 Displaying alphanumeric fields in long
Copying data from a clipboard (PASTE) . . 125 hexadecimal . . . . . . . . . . . . . 168
Copying data from another data set . . . . . 125 Managing templates with the Template Workbench 169
Splitting and joining lines . . . . . . . . 126 Editing a template (E) . . . . . . . . . 169
Changing the length of a record . . . . . . 128 Editing related ID criteria . . . . . . . . 169
How File Manager handles segmented data
Chapter 4. Creating and editing templates . . . 129 with related ID criteria . . . . . . . . 178
Template types and structure . . . . . . . . 129 Updating a template from a copybook (U). . . 179
Information stored in a template . . . . . . 129 Running a function using a copybook or
About copybook templates . . . . . . . . 131 template (RC or RT) . . . . . . . . . . 180
Segmented data templates . . . . . . . . 133 Mapping fields (MC or MT) . . . . . . . 181
About dynamic templates . . . . . . . . 136 Generating and editing field mapping (GM, GE
Data description support . . . . . . . . 136 and EM) . . . . . . . . . . . . . . 182
Support for COBOL data description entries 136 Mapping contiguous fields . . . . . . . . 182
Support for PL/I data description entries . . 137 Specifying scrambling options . . . . . . . . 182
Support for variable-length arrays . . . . 137

2 File Manager for z/OS V12R1 User's Guide


Selecting a field for specifying scrambling Chapter 6. Managing data sets . . . . . . . 229
options . . . . . . . . . . . . . . 183 Working with data set lists . . . . . . . . . 229
Specifying the scramble type . . . . . . 183 Accessing data set lists . . . . . . . . . 230
Specifying the value option. . . . . . . 184 Process pull-down menu . . . . . . . 230
Specifying value input and out columns . . 185 Fastpath commands . . . . . . . . . 231
Specifying range values . . . . . . . . 185 Managing personal data set lists . . . . . . 231
Specifying a value data set name . . . . . 185 Making a list the current data set list . . . 231
Specifying and editing a value list . . . . 186 Creating a new personal data set list . . . 231
Mapping fields between templates . . . . . . 186 Editing an existing data set list . . . . . 232
Default field mapping . . . . . . . . . 186 Deleting a data set list . . . . . . . . 234
Copying with the default field mapping . . 187 Retrieving details from a data set list . . . . 234
Comparing with the default field mapping 188 Progressive retrieval (NRETRIEV primary
Editing the field mapping . . . . . . . . 189 command) . . . . . . . . . . . . 235
Setting up a mapping for a field . . . . . 190 Point-and-shoot retrieval . . . . . . . 235
Deleting a field mapping . . . . . . . 192 Allocating program function keys . . . . . 235
Pairing with a different record type . . . . 193 Creating data sets and records. . . . . . . . 236
Mapping group items . . . . . . . . 193 Creating data without using a template . . . 236
Mapping contiguous fields . . . . . . . 193 Creating data sets using a template . . . . . 238
Creating data for a field . . . . . . . . 193 Allocating a new data set . . . . . . . . 240
Mapping using different templates . . . . 193 Setting the Data Create Attributes in your
Field mapping rules . . . . . . . . . . 194 template . . . . . . . . . . . . . . 240
Copybook View and Print Utility (option 3.13 or Creating, replacing, and adding data using existing
7.2) . . . . . . . . . . . . . . . . . 195 data . . . . . . . . . . . . . . . . 240
Creating a new member or data set using data
Chapter 5. Filtering records with templates . . 197 from an edit session . . . . . . . . . . 241
Selecting records with templates . . . . . . . 197 Replacing a member or data set using data from
Selecting records by record type . . . . . . 197 an edit session . . . . . . . . . . . . 243
Specifying record identification criteria . . . . 198 Adding data to a data set using data from an
Specifying record selection criteria . . . . . 200 edit session . . . . . . . . . . . . . 244
Specifying offset values . . . . . . . . . 200 Using all the data from an edit session to create
Defining criteria expressions . . . . . . . . 201 a new member or data set . . . . . . . . 245
Entering criteria as a freeform expression . . . 202 Copying data sets . . . . . . . . . . . . 247
Entering criteria by field. . . . . . . . . 203 Copying without using a template . . . . . 248
Entering criteria expressions for an array Renaming members as you copy . . . . . . 252
element . . . . . . . . . . . . . 204 Copying using a copybook or template . . . . 253
About expression processing . . . . . . . 207 Scrambling data . . . . . . . . . . . 256
Improving performance using internal When can you scramble data? . . . . . . 256
expression processing . . . . . . . . 207 Scrambling rules . . . . . . . . . . 256
Overview of REXX expressions . . . . . 209 Copying records with segmented data templates 256
Handling floating point numbers . . . . . 211 Generating data in external format - XML
Comparison operators . . . . . . . . 212 representation . . . . . . . . . . . . 257
Arithmetic operators . . . . . . . . . 213 Copying files or members containing JCL . . . 261
Logical (boolean) operators . . . . . . . 214 Using a DFSORT or REXX procedure . . . . 261
Useful functions . . . . . . . . . . 215 Example 1 . . . . . . . . . . . . 262
Examples of REXX comparison expressions . . 217 Example 2 . . . . . . . . . . . . 262
Filtering record display using templates . . . . 218 Example 3 . . . . . . . . . . . . 262
Displaying suppressed records . . . . . . 218 Example 4 . . . . . . . . . . . . 262
Changing display of the record type. . . . . 219 REXX member selection . . . . . . . . . 262
Displaying not-selected records . . . . . 220 Example 1 . . . . . . . . . . . . 263
Seeing why a record is not-selected . . . . 221 Example 2 . . . . . . . . . . . . 263
Hiding or showing records in SNGL display Finding and changing data in multiple PDS
format . . . . . . . . . . . . . . . 222 members . . . . . . . . . . . . . . . 264
Using the SHOW command in an editor session 222 Building your member list for processing . . . 265
Viewing segmented data . . . . . . . . 223 Refining the list of selected members . . . . 266
Viewing segmented data in SNGL display Specifying where your results are stored . . . 268
mode . . . . . . . . . . . . . . 224 Specifying your processing options . . . . . 268
Adjusting your view to allow for header Specifying multiple arguments for FIND . . . 270
information . . . . . . . . . . . . . 225 Using the CHANGE command in the
Example of a positive offset . . . . . . 225 Find/Change Utility . . . . . . . . . . 270
Example of a negative offset . . . . . . 226 Specifying context in the output listing . . . . 272
Specifying an offset value . . . . . . . 227 Changing data with a REXX procedure . . . . 272

Part 1. Working with File Manager 3


Working with files or members containing JCL . . 273 Requirements for Exported Stacked Volumes 337
Comparing data sets . . . . . . . . . . . 275 ESV options . . . . . . . . . . . . . 337
Comparing data sets without using a template 276 Using primary commands with Tape Specific
Comparing data sets using templates . . . . 278 Functions. . . . . . . . . . . . . . . 338
Record synchronization . . . . . . . . . 282 BID. . . . . . . . . . . . . . . . 339
Creating key sequencing for use in a BSF. . . . . . . . . . . . . . . . 339
multi-segment key. . . . . . . . . . . 284 BSR . . . . . . . . . . . . . . . 339
Comparison output . . . . . . . . . . 285 COPY . . . . . . . . . . . . . . . 339
Report sections . . . . . . . . . . . 286 FIND . . . . . . . . . . . . . . . 340
Body section record formats . . . . . . 287 FSF . . . . . . . . . . . . . . . . 340
Body section flags . . . . . . . . . . 288 FSR. . . . . . . . . . . . . . . . 341
Template details section . . . . . . . . 289 LOCATE . . . . . . . . . . . . . . 341
Formatted comparison of unlike fields . . . . 290 RD . . . . . . . . . . . . . . . . 341
Comparing load modules . . . . . . . . 291 REW . . . . . . . . . . . . . . . 341
Printing from File Manager. . . . . . . . . 293 RFIND . . . . . . . . . . . . . . 341
Setting your Print Processing Options . . . . 293 RP . . . . . . . . . . . . . . . . 341
Printing data sets . . . . . . . . . . . 294 RUN . . . . . . . . . . . . . . . 341
Using a DFSORT or REXX procedure . . . . 297 TOF . . . . . . . . . . . . . . . 342
Example 1 . . . . . . . . . . . . 297 ZOOM . . . . . . . . . . . . . . 342
Example 2 . . . . . . . . . . . . 297 Tape Browse (option 4.1) . . . . . . . . . 342
REXX member selection . . . . . . . . . 297 Tape Data Copy Function (option 4.2) . . . . . 343
Example 1 . . . . . . . . . . . . 298 Tape to Tape (option 4.2.1) . . . . . . . . 344
Example 2 . . . . . . . . . . . . 299 Tape to Tape Reblocked (option 4.2.2) . . . . 344
Printing DBCS data . . . . . . . . . . 299 Tape to Labeled Tape (option 4.2.3) . . . . . 344
Printing a single record . . . . . . . . . 300 Tape to VSAM (option 4.2.4) . . . . . . . 345
Printing your Audit Trail Report . . . . . . 302 Tape to Sequential Data (option 4.2.5) . . . . 345
Audit trail report . . . . . . . . . . 303 VSAM to Tape (option 4.2.6) . . . . . . . 346
Sequential Data to Tape (option 4.2.7) . . . . 346
Chapter 7. Using File Manager utilities . . . . 305 Exported Stacked Volume Copy (option 4.2.8) 346
Managing catalog entries . . . . . . . . . 305 Copying tape data across a network . . . . . 348
Available catalog services . . . . . . . . 305 Tape Update (option 4.3) . . . . . . . . . 348
Selecting your service . . . . . . . . . 306 Special considerations . . . . . . . . . 349
Working with a list of catalog entries . . . . 308 Tape Record Load (option 4.4) . . . . . . . . 350
Viewing your Catalog Entry Details . . . . . 310 Tape Print (option 4.5) . . . . . . . . . . 351
Viewing association information . . . . . 310 Controlling print output . . . . . . . . . 352
Statistics for VSAM data sets . . . . . . 311 Tape Map (option 4.6) . . . . . . . . . . 353
Displaying volume information . . . . . 311 Create Tape Data (option 4.7) . . . . . . . . 354
Displaying extent details for non-VSAM data Tape Label Display (option 4.8) . . . . . . . 355
sets. . . . . . . . . . . . . . . 312 Tape to Tape Compare (option 4.9) . . . . . . 356
IAM Entry Detail display . . . . . . . 312 Tape Record Scan (option 4.10) . . . . . . . 357
Defining a new Catalog Entry . . . . . . . 313 Write Tape Mark (option 4.11) . . . . . . . . 359
Altering an existing Catalog Entry . . . . . 316 Initialize Tape (option 4.12) . . . . . . . . . 359
Deleting a catalog entry . . . . . . . . . 317 Erase Tape (option 4.13) . . . . . . . . . . 360
Recalling catalog entries . . . . . . . . . 318 Exported Stacked Volume List (option 4.14) . . . 361
Displaying a Volume Table of Contents (VTOC) 319 Tape Positioning Functions (option 4.15) . . . . 362
Using line commands with Work with VTOC 322
Browsing AFP Print documents . . . . . . . 323 Chapter 9. Disk/VSAM Data Functions . . . . 365
AFP Print Browse primary commands . . . . 323 Processing disk records . . . . . . . . . . 365
Browsing your user storage . . . . . . . . 323 Specifying disk input and output . . . . . . 365
Memory Browse primary commands . . . . 324 Specifying disk extents . . . . . . . . . 365
Viewing load module information . . . . . . 324 Disk Browse (option 5.1) . . . . . . . . . 365
Working with WebSphere MQ . . . . . . . . 325 Disk Browse primary commands . . . . . . 365
FIND . . . . . . . . . . . . . . 366
Chapter 8. Tape Specific Functions . . . . . 331 Disk Track Edit (option 5.2) . . . . . . . . 366
Specifying tape input or output . . . . . . . 331 Disk Track Edit primary commands . . . . . 367
Tape density and mode values . . . . . . 334 ADDKEY. . . . . . . . . . . . . 367
Tape block size considerations . . . . . . . 335 FIND . . . . . . . . . . . . . . 367
Specifying the number of tape files to process . . 335 CHANGE . . . . . . . . . . . . 369
Processing tapes with data-check errors . . . . 336 EXCLUDE . . . . . . . . . . . . 371
ASCII translation . . . . . . . . . . . . 336 Disk Print (option 5.3) . . . . . . . . . . 372
Exported Stacked Volumes (ESVs) . . . . . . 337 Specifying what you want to print . . . . . 372

4 File Manager for z/OS V12R1 User's Guide


Controlling print output . . . . . . . . . 372 Choosing the right function to enhance. . . . 400
Disk Record Scan (option 5.4) . . . . . . . . 373 Creating and supplying a procedure. . . . . . 401
Write EOF Record (option 5.5) . . . . . . . . 374 Procedure statement types . . . . . . . . 401
Data Set Extents (option 5.6) . . . . . . . . 374 Choosing between FASTREXX, REXX, and
VSAM Update (option 5.7) . . . . . . . . . 374 DFSORT for your procedure . . . . . . . 402
Data in Virtual (option 5.8) . . . . . . . . . 375 Coding DFSORT procedure statements . . . . 403
Coding REXX procedure statements . . . . . 405
Chapter 10. OAM Functions . . . . . . . . 377 Using internal (FASTREXX) processing . . . 406
Introducing the Object Access Method . . . . . 377 REXX coding hints and tips . . . . . . 408
Object Directory List (option 6.1) . . . . . . . 377 Coding end of file procedure . . . . . . . 409
Object Browse (option 6.2) . . . . . . . . . 379 Combining DFSORT and REXX statements in a
Object Print (option 6.3) . . . . . . . . . . 379 procedure . . . . . . . . . . . . . 410
Controlling print output . . . . . . . . . 379 Supplying a procedure to enhance File Manager
Object Update (option 6.4) . . . . . . . . . 380 processing . . . . . . . . . . . . . 411
Object Erase (option 6.5). . . . . . . . . . 380 Supplying a procedure when using a File
Object Copy Functions (option 6.6) . . . . . . 380 Manager panel . . . . . . . . . . . 411
Backing up OAM objects . . . . . . . . . 380 Supplying a procedure when running File
Object to VSAM (option 6.6.1) . . . . . . . 381 Manager in batch . . . . . . . . . . 411
Object to Sequential Data (option 6.6.2) . . . . 381 Supplying a procedure when invoking File
VSAM to Object (6.6.3) . . . . . . . . . 381 Manager from a REXX program . . . . . 412
Sequential Data to Object (option 6.6.4) . . . . 381 How enhanced processing works . . . . . . . 413
Object to Object (option 6.6.5) . . . . . . . 381 How REXX-enhanced processing works . . . 413
Backing up a single OAM object . . . . . . 381 How DFSORT-enhanced processing works . . 414
Backing up multiple OAM objects . . . . . 381 Enhanced processing modes . . . . . . . 414
Restoring OAM objects . . . . . . . . . . 382 Enhanced record processing . . . . . . 415
Restoring an object that was backed up Enhanced member processing . . . . . . 416
individually . . . . . . . . . . . . . 382 Using templates with enhanced processing . . 417
Restoring one or more objects from a Working with an entire data set (DSEB only) or
multiple-object backup . . . . . . . . . 382 per record . . . . . . . . . . . . . 417
Dropping a record from further processing . . 417
Chapter 11. Using UNIX System Services and Performance tips . . . . . . . . . . . 417
the Hierarchical File System . . . . . . . 385 REXX and DFSORT Examples . . . . . . . . 418
Specifying an HFS file . . . . . . . . . . 385 Printing data . . . . . . . . . . . . 418
Using directories . . . . . . . . . . . . 386 Copying data . . . . . . . . . . . . 419
Selecting files for processing . . . . . . . . 386 Updating records in a data set. . . . . . . 420
Logical record length . . . . . . . . . . . 387 Editing a data set . . . . . . . . . . . 420
Processing an HFS file . . . . . . . . . . 387 Examples of tasks that can be performed easily
Viewing and editing HFS files . . . . . . . . 387 using FASTREXX . . . . . . . . . . . . 420
Creating HFS files . . . . . . . . . . . . 388 Record Editing . . . . . . . . . . . . 421
Copying HFS files . . . . . . . . . . . . 388 Writing one or more optionally edited records to
Comparing HFS files . . . . . . . . . . . 389 one or more output files, depending on data in
Printing HFS files . . . . . . . . . . . . 389 the input record . . . . . . . . . . . 421
Finding a string in HFS files . . . . . . . . 390 Determining whether to copy or print a member
based on some condition inside the member . . 422
Chapter 12. Introduction to programming with Relative positioning support . . . . . . . 422
File Manager functions . . . . . . . . . 391 Input record relative positioning . . . . . 423
Summary of File Manager functions . . . . . . 391 Output record relative positioning . . . . 423
Using File Manager functions in REXX procedures
or TSO clists. . . . . . . . . . . . . . 393
Invoking File Manager panels from REXX
procedures or TSO clists. . . . . . . . . 394
Invoking File Manager functions from a REXX
procedure or CLIST in /BATCH mode . . . . 395
Using File Manager functions in batch jobs . . . 395
Setting processing options in batch . . . . . 396
Destination of File Manager print output . . . . 396
Handling errors . . . . . . . . . . . . 397

Chapter 13. Enhancing File Manager processing 399


Why enhance File Manager processing? . . . . 399
The tasks you can enhance . . . . . . . . . 399

Part 1. Working with File Manager 5


6 File Manager for z/OS V12R1 User's Guide
Chapter 1. File Manager overview
IBM File Manager for z/OS (base component) provides comprehensive,
user-friendly tools for working with Websphere MQ data, HFS files and QSAM,
VSAM and IAM data sets. These tools include the familiar view, edit, copy and
print utilities found in ISPF, enhanced to meet the needs of application developers.

This chapter provides an overview of the types of actions you can perform with
File Manager, a list of the types of data sets upon which you can perform these
actions and some concept information about templates, one of the main tools used
to view and edit data sets in File Manager.

File Manager actions


You can use File Manager to display, edit, update, create, copy, compare, print and
erase data. You can manipulate this data as logical units, accessed by the data set
name; or as physical units, accessed at each physical disk or tape location. Adding
to this capability is an interactive interface that allows you to view data in both
TABLE and SINGLE RECORD formats.

When working with data sets, you can:


v View, change, sort, copy and print data as unformatted or formatted with
copybook or dynamic templates
v Perform sophisticated data set comparisons
v Find and change data strings in a single data set or in multiple data sets
v Create new HFS files or QSAM, VSAM or IAM data sets and data set records
v Create REXX procedures for advanced record processing
v Use selected DFSORT control statements to control the Data Set Copy and Data
Set Print functions
v Create batch jobs, REXX procedures or CLISTs to automate tasks

For many of these tasks, you can use File Manager templates. A template provides a
logical view of a data set, based upon field definitions in a copybook, or else
created dynamically. If you use a template, you can:
v Format data according to record structures defined in the copybooks, or
dynamically define your own record structure
v Select the fields and records that you want to work with, adjust how fields are
displayed, select fields for copying, and set the contents of fields for created data
v Code record identification and selection criteria within File Manager panels, or
use File Manager's REXX interface to code complex criteria
v Copy data between fields of different data type and length; and
v Work with files containing multiple record structures

File Manager also provides utilities that allow you to manipulate data in other
ways:
v With the Tape Utility you can:
Copy tape files, optionally changing the block size and record format
Copy a logical volume from an Exported Stacked Volume to a physical tape
volume

Copyright IBM Corp. 2000, 2012 7


Overview

Update tape records on-screen, while copying the records from one tape to
another
Compare two tapes byte-by-byte
Bypass tape blocks with data-check errors
Summarize the contents of a tape
v With the Disk Utility, you can look at and edit a file, based on the contents of
the data at each physical disk location. There is support for character and
hexadecimal format. Because the access is done at the level of the physical track,
all file types are supported, including BDAM. With the disk utilities, you can:
List data sets on a disk
Edit data on a specific track
Identify the disk extents of a data set
Search for data within a disk extent
v You can use the Object Access Method (OAM) Utility to list, view, print, update,
erase, copy, back up and restore OAM objects.
v The IDCAMS front end (Catalog Services) allows you to control the OS/390
IDCAMS utility from user-friendly File Manager panels.

Data sets and records


File Manager provides production and development logical file manipulation for
HFS files, sequential (PS and PDS(E)) and VSAM (including IAM) data sets.

You can view and edit or otherwise process these types of data:
v Sequential (PS) and partitioned (PDS or PDSE) data sets: A member of a
partitioned data set or a sequential data set, or like or unlike concatenations
thereof (when used as input), with any of these data set attributes:
PS data set type
- Basic
- Library
- Extended
- Large
- Compressed
Record format
- Fixed, variable, or undefined
- Blocked or unblocked
- Spanned
- ISPF packed format data
Record length
- For fixed-length data: 132760, 10-65535 (for tape using LBI)
- For variable-length data: 132752, 14-65531 (for tape using LBI)
- For spanned variable-length data: 116MB
v VSAM data sets:
ESDS, including spanned format
KSDS, including spanned format
RRDS (fixed-length or variable-length)
PATH (PATHs related to a non-unique alternate index are restricted to browse
only)
AIX
v HFS files: A file contained in the z/OS UNIX File System, including z/FS and
HFS:
Record format

8 File Manager for z/OS V12R1 User's Guide


Overview

- Text (delimited by CR,LF or NL)


- Binary
Record length
- Text mode files are variable length: 1-32752
- Binary mode files are fixed length: 1-32760
v Websphere MQ messages on a queue. Where allowed, an MQ queue can be
specified in a data set name.
v CICS files, TS, or TD queues:
When used in conjunction with FM/CICS. See File Manager Users Guide and
Reference for CICS.
In a non-CICS File Manager environment, by specifying the CICS resource
type, CICS applid, and CICS resource name as the data set name.

Note: Throughout this publication, where the term data set is used, it generally
refers to any of the above resource types, rather than referring specifically to
traditional z/OS data sets, unless otherwise mentioned.

File Manager Version 12 is able to use copybooks that are stored in a PDS, a PDSE,
a CA-Panvalet library, or a library accessed using the Library Management System
Exit.

Templates
A File Manager template is a file that provides a particular interpretation of a data
set. The template defines a logical view that you can use to view and manipulate
the data in records as discrete fields. With a template, you can select and format
records and fields when editing, viewing, copying, printing and creating data sets.
Templates can be based upon a COBOL, HLASM, OR PL/Icopybook or can be
created dynamically. You can apply different templates to the same data, to achieve
different purposes. For example, you might create a number of templates with
different selection criteria in place, and then apply the template that defines the
subset of records that you need for a particular purpose. Also, you can apply the
same template to different data sets, provided that they have similar record and
field structures.

The File Manager Base, DB2 and IMS components all use templates. However,
these templates are not interchangeable between the components. You cannot, for
example, use a base template in the File Manager DB2 component. Dynamic
templates are only available within the Base component.

Why use a template?


Typically, data sets containing application data have a well-defined structure,
where each record in the data set consists of several fields. Each field contains a
discrete item of data, such as a person's name, a product code or a currency
amount (depending on the application). This data can be of various types: some
fields contain character data, others contain numeric data (perhaps encoded in
binary format to conserve storage space).

To work efficiently with these data sets, you need tools that recognize record
structure, allowing you to selectively process individual fields.

For example, if you use a text editor (such as the ISPF editor) to display an
application data set, then each record appears as a string of characters, with no
indication that the records consist of individual fields. Fields containing numeric

Chapter 1. File Manager overview 9


Overview

data encoded in binary or packed decimal format are represented by their


(typically non-displayable) character values, rather than their numeric values.

Even if you know the column boundaries of each field, editing an application data
set in a text editor can be difficult and tedious:
v If you want to find and replace data in a specific field, then you have to be
careful not to change the field length; otherwise, you could move the boundaries
of subsequent fields, and corrupt the record structure.
v If you want to find and replace data in numeric fields where the data has been
encoded in binary or packed decimal format, then you have to specify the find
and replace values in that format (typically, as hexadecimal values), rather than
as numeric values.
v If the file you are editing contains several record types (each with its own
structure), and you only want to find and replace data in one record type, then
you have to exclude other record types from editing.

To illustrate, here are some records containing a mixture of alphanumeric and numeric fields
displayed in the ISPF editor:
EDIT USERID.FMDATA(DATA2) - 00.02 Columns 00001 00072
000013 01Grant Smith
000014 01Andrew Apple 5 &
000015 01Graham Prestcott

The Grant Smith record contains the numeric value 94, stored in a binary
numeric field. To change this from 94 to 48, without using a template, you would
need to:
1. Display the hexadecimal values of the record data.
2. Determine the column positions occupied by the field.
3. Convert the numeric value 48 into its hexadecimal equivalent (X'30').
4. Overtype the old hexadecimal value of the numeric field (X'5E') with the new
value, or use a CHANGE command with the old and new hexadecimal values.

Here is the same record displayed in the File Manager editor using a template:
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1) MONTH(2)
#2 #3 #4 #5 #6 #7 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4 BI 35:4
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+---> <---+--->
01 Grant Smith 7712 94 75000 6 15

To change the value of the AGE binary numeric field from 94 to 48, you can
simply overtype 94 with 48, or enter the following command (where #5 is the
field reference for the AGE field):
CHANGE 94 48 #5

Another situation in which you might want to use a template is when you are
copying data. When you use a copy utility that does not recognize record
structure, you are often limited to copying an entire data set, or a number of
records. If you want to copy only records with particular field values, or only
particular fields, then you must write a custom program.

When using templates with File Manager, you can specify criteria to select only the
records you want to copy, and to select the fields you want from the list of fields
in the record.

10 File Manager for z/OS V12R1 User's Guide


Overview

What can you do with a template?


Using a template, you can:
v Format records
You can display, print and compare fields taking into account their data types.
For example, binary numeric fields are displayed as their true numeric values,
not as the character representation of their binary value.
When editing, you can overtype or use CHANGE commands to replace these
formatted numeric field values with different numeric values; File Manager
adjusts the underlying binary value in the data set.
You can select which fields are displayed (when in an editor session) or printed.
In an editor session, you can limit the scope of commands (such as FIND and
CHANGE) to particular fields.
You can change the order in which fields are displayed (when in an editor
session) or printed.
For numeric fields, you can display or suppress leading zeros (so that, for
example, 00057 is displayed and printed as 57); the default is to suppress
leading zeros.
v Reformat records
When copying data, you can map which fields in the input data set you want
copied to the output data set. You can insert or delete fields, and copy data
between fields of different data types or lengths.
v Identify record types and select records within those types
You can select records using two levels of criteria:
Record identification criteria
Identify the unique characteristics of a record type, enabling File Manager to
distinguish it from other types of record in the same data set. You can then
select which record types in a data set you want to use.
Before you can specify record identification criteria, you need to examine
your data, and determine what field values uniquely identify a record as
belonging to a particular type.
Record selection criteria
After a record has been identified as belonging to a particular type, you can
specify record selection criteria to narrow down which records of that type
you want to use.
v Create data
When creating a new data set, or adding a new field when copying a data set,
you can specify field create attributes (patterns that File Manager uses to
initialize field values).

Where can you use templates?


The following table lists the tasks, panels and functions that support the use of
templates:

Task Panel Function


View data View (option 1)
Edit data Edit (option 2) DSEB (batch only)1
Compare data Compare data (option 3.11) DSM
Copy data Copy Utility (option 3.3) DSC

Chapter 1. File Manager overview 11


Overview

Task Panel Function


Create data Data Create Utility (option DSG
3.1)
Print data Print Utility (option 3.2) DSP
Update data DSU (batch only)1

Notes:
1. For the DSEB and DSU functions, the template is not used during editing or updating; it
is only used during enhanced batch processing, when you call the File Manager REXX
external function PRINT with SNGL or TABL format.
The difference between using DSU to update data compared to using DSEB to edit data is:
v DSU operates on a per record basis. That is, each record in a data set is treated
separately, in sequence.
v DSEB allows you to move between the records in a data set as you choose, similar to
the way you can scroll around a data set in an edit panel.
For details on using the DSEB and DSU functions, see Chapter 13, Enhancing File
Manager processing, on page 399.

With any of these panels or functions, you can supply an existing template (created
dynamically or from a copybook), supply a copybook, or create a new dynamic
template. If you supply a copybook, then File Manager compiles it into a template
before use.

12 File Manager for z/OS V12R1 User's Guide


Chapter 2. Getting started with File Manager
This chapter is designed to help the new user to familiarize themselves with the
user interface and general methods for working within File Manager panels.

The major tasks described in this chapter are:


Starting and exiting File Manager;
Using the File Manager interface on page 18;
Getting help on page 42; and
Setting your default processing options on page 45

Starting and exiting File Manager


File Manager is an ISPF-developed application and is usually run from within an
ISPF session. Exiting from File Manager returns you to your ISPF session. File
Manager panels can also be invoked from outside of the File Manager application.

A subset of File Manager functions is available in non-ISPF mode (batch


processing). See Chapter 16, Functions, on page 831.

The tasks described in this section are:


v Starting File Manager;
v Checking your File Manager version on page 15;
v Exiting from File Manager on page 17; and
v Invoking File Manager panels from outside File Manager on page 17.

Starting File Manager


For information about running File Manager in non-ISPF mode (batch processing),
see Chapter 16, Functions, on page 831.

How you start File Manager in ISPF depends on how it has been installed on your
system. Typically, File Manager is installed as an option on your z/OS Primary
Option Menu:

Copyright IBM Corp. 2000, 2012 13


Getting started with File Manager

Menu Utilities Compilers Options Status Help



z/OS Primary Option Menu

0 Settings Terminal and user parameters


1 View View data
2 Edit Create or change source data
3 Utilities Perform utility functions
4 Foreground Interactive language processing
5 Batch Submit job for language processing
6 Command Enter TSO or Workstation commands
7 Dialog Test Perform dialog testing
8 LM Facility Library administrator functions
9 IBM Products IBM program development products
10 SCLM SW Configuration Library Manager
11 Workplace ISPF Object/Action Workplace
12 OS/390 System OS/390 system programmer applications
13 OS/390 User OS/390 user applications
14 IBMGSA IBMGSA Development and Service Apps
S SDSF Spool Display and Search Facility
F File Manager File Manager for z/OS

Enter X to Terminate using log/list defaults

Option ===> F________________________________________________________________

Figure 2. z/OS Primary Option Menu panel showing File Manager option

To start File Manager:


1. Select the File Manager option from the z/OS Primary Option Menu.

Note: If File Manager is not an option on your menu, ask your system
administrator to explain the startup process used at your site.
When you start File Manager, the File Manager Primary Option Menu is
shown, with the current version information displayed in a pop-up message
box.

14 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Process Options Help



File Manager Primary Option Menu

0 Settings Set processing options User ID . : USERID


1 View View data System ID : FMD2
2 Edit Edit data Appl ID . : FMN
3 Utilities Perform utility functions Version . : 9.1.0
4 Tapes Tape specific functions Terminal. : 3278
5 Disk/VSAM Disk track and VSAM CI functions Screen. . : 1
6 OAM Work with OAM objects Date. . . : 2008/07/03
7 Templates Create, edit, or update templates Time. . . : 12:12
8 HFS Access Hierarchical File System
X Exit Terminate File Manager


IBM* File Manager for z/OS Version 11 Release 1
Licensed Materials - Property of IBM
5655-W47
(C) Copyright IBM Corporation 1986, 2010 - All Rights Reserved.
* Trademark of International Business Machines

Command ===>
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 3. File Manager Primary Option Menu panel with version information

2. Press Enter to close the version window.

RELATED TOPICS
Primary Option Menu panel on page 611

Checking your File Manager version


To display the full version information for File Manager, enter VER on the
Command line of any panel. The current File Manager version number and the
PTF number for each File Manager component is displayed in a window.

As File Manager is an ISPF application and ISPF applications are typically not
capable of running in an authorized state, File Manager will not (unless specific
ISPF customization has occurred) be authorized under ISPF. However, File
Manager may run in an authorized state when used in a batch job.

Chapter 2. Getting started with File Manager 15


Getting started with File Manager

Process Options Help



File Manager Primary Option Menu



IBM File Manager for z/OS Version x Release x

(not APF authorized)

Service Levels of installed components

Base IMS DB2 CICS
English xxxxxxx xxxxxxx xxxxxxx xxxxxxx
Japanese xxxxxxx xxxxxxx xxxxxxx xxxxxxx
Korean xxxxxxx xxxxxxx xxxxxxx xxxxxxx






F1=Help F2=Split F3=Exit F9=Swap F12=Cancel

Figure 4. File Manager Primary Option Menu panel with example PTF information

An alternative way to display version information is to select Help > 6. About


from the Action Bar on any panel. The current File Manager version number and
the PTF number of the File Manager base component is displayed. The window
also shows the copyright information and any notes from IBM that are shipped
with the product.
Process Options Help

File Manager Primary Option Menu

0 Settings Set processing options User ID . : USERID


1 View View data System ID : MVS8
2
3
4 IBM File Manager for z/OS Version x Release x
5 PTF level: xxxxxxx
6
7 xxxx-xxx (C) Copyright IBM Corporation xxxx, xxxx - All rights reserved
X Note to US Government Users -- Documentation related to restricted
rights -- Use, duplication or disclosure is subject to restrictions
set forth in GSA ADP Schedule Contract with IBM Corp.


F1=Help F2=Split F3=Exit F9=Swap F12=Cancel

Command ===> ABOUT


F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

RELATED TOPICS
VER primary command on page 828
ABOUT primary command on page 731
VER (Display Service Level) on page 1094

16 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Checking which COBOL compiler you're using


File Manager uses the currently loaded COBOL compiler to create a template from
a COBOL copybook.

To display details about the current COBOL compiler, enter SHOWCOB on the
Command line of any panel. File Manager displays details about the current
COBOL compiler in a window.

RELATED TOPICS
SHOWCOB primary command on page 816

Exiting from File Manager


You can exit from File Manager from the Primary Option Menu panel in any of the
following ways:
v Press the Exit function key (F3).
v Enter X (or EXIT or END) on the Command line.
v Select Process> Exit from File Manager from the Action Bar.

To exit the application from any panel within File Manager:


v Enter =X on the Command line.

RELATED TOPICS
END primary command on page 756
EXIT primary command on page 760

Invoking File Manager panels from outside File Manager


File Manager panels can also be invoked directly from any REXX procedure, TSO
clist or ISPF Command line. To do this, enter the function name for the required
File Manager panel (as listed in the Equivalent function column in Summary of
File Manager panels on page 429). This method of invoking File Manager causes
ISPF to display a panel for the specific function allowing you to enter the values
required for function processing.

Syntax

 FILEMGR function_name 
(1)
data_set_name

Notes:
1 The data_set_name parameter is only allowed for:
v The DSV function, to invoke View (option 1)
v The DSE function, to invoke Edit (option 2)

For example, from any ISPF Command line, you can enter the following command
to display the File Manager Print Utility (option 3.2) panel:
FILEMGR DSP

If you specify a valid data set name after DSV (Data Set View) or DSE (Data Set
Edit), File Manager:

Chapter 2. Getting started with File Manager 17


Getting started with File Manager

v Bypasses the entry panel (where you would normally specify the data set name
and other options, such as the name of a stored template you might wish to use
when displaying the data set).
v Goes directly to viewing or editing the specified data set.

RELATED TOPICS
Using File Manager functions in batch jobs on page 395
Summary of File Manager panels on page 429
Chapter 16, Functions, on page 831
DSB (Data Set Browse) on page 871
DSE (Data Set Edit) on page 903

Using the File Manager interface


The File Manager interface is based upon the ISPF model. Tasks are performed by
processing a function, together with its applicable parameters. Panels provide a
user-friendly way of selecting a function and supplying the parameter information.
Most functions can be processed in your choice of "foreground" or "batch" mode.
In foreground mode, the selected function is processed immediately and any
results are returned to you on screen or directed to print outputs, as dictated by
your default settings. In batch mode, JCL is generated from the panel information,
and then presented to you for editing. You can modify this code and submit it to a
processing queue.

The tasks described in this section are:


Navigating in File Manager;
Issuing commands on page 19;
Specifying a data set and a member name on page 20; and
Using hexadecimal values in File Manager on page 41.

Navigating in File Manager


You navigate around File Manager panels in the same way as any other panels
under ISPF. That is, you launch processing panels from menu panels, by entering
the appropriate menu option number on the Command line. File Manager uses a
Primary Options Menu panel to provide access to processing panels that are
related to a particular function or group of functions. In some cases, an option on
the Primary Options menu leads to another menu panel, from which you can
select the required processing panel.

When you know the menu structure well, you can quickly jump to the required
panel by entering the full pathway through the menu options. For example,
entering 4.2.8 would take you directly to the Exported Stacked Volume Copy
panel.

You can also jump to any File Manager panel from any other panel, without
having to navigate the menu structure, by using an equals sign (=) to prefix the
option number. The equals sign instructs File Manager to start the menu
navigation from the Primary Options menu and not from your current location.
For example, if you were positioned on the Set Processing Options Menu panel,
entering 2 on the Command line would display the Set System Processing Options
panel (option 2 on the current menu), while entering =2 would display the Edit
Entry panel (option 2 on the Primary Options Menu panel).

To access a panel, choose one of the following methods:

18 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

v Type the menu option number on the Command line and press Enter. Repeat for
each nested menu until the required processing panel is displayed.
v Type an equals sign followed by the complete menu path to the required panel,
separating each menu level with a period, then press Enter.

Many File Manager panels have more information than can be seen in a single
screen, particularly when you are running in 80x24 display. When this happens, a
message is displayed in the top right corner of the panel.

Process Options Help



File Manager Data Create Utility
More: +
Output Partitioned, Sequential or VSAM Data Set, or HFS file:

Figure 5. Example panel showing "More" message

To scroll down the panel, choose one of these methods:


v Press the Forward function key (F8) (this scrolls down by your default scroll
amount, usually one screen at a time)
v Enter FORWARD or DOWN on the Command line (these commands scroll
down by your default scroll amount, usually one screen at a time)
v Enter BOTTOM on the Command line (this takes you to the bottom of the panel)

To scroll back to the top of the panel, choose one of these methods:
v Press the Backward function key (F7) (this scrolls up by your default scroll
amount, usually one screen at a time)
v Enter BACKWARD or UP on the Command line (these commands scroll up by
your default scroll amount, usually one screen at a time)
v Enter TOP on the Command line (this takes you to the beginning of the panel)

To exit from any panel, choose one of the following:


v Press the Exit function key (F3).
v Type X on the Command line and press Enter.
v Type END on the on the Command line and press Enter.

RELATED TOPICS
Primary Option Menu panel on page 611
Scrolling to see data on page 80
UP primary command on page 826
DOWN primary command on page 754
TOP primary command on page 824
BOTTOM primary command on page 735

Issuing commands
Within the File Manager panels, you can use "primary" or "prefix" commands to
instruct File Manager to perform an action.

You enter primary commands on the Command line of File Manager panels. On
many of these panels, the most commonly used primary commands have been
assigned to function keys, also known as Programmable Function keys or PF keys.

Chapter 2. Getting started with File Manager 19


Getting started with File Manager

Some primary commands are exclusive to a particular panel, although most are
available on several panels. Where a command is available on more than one
panel, its behavior might differ depending upon the context in which it is used.

You enter prefix commands in a special prefix field in most panels, and in the
prefix area within the editor panel. Prefix commands are generally exclusive to a
panel and details of their operation are provided within each panel description.

RELATED TOPICS
Chapter 15, Primary commands, on page 731
Chapter 14, Panels and fields, on page 429

Specifying quoted strings


Throughout the File Manager interface, you might encounter places where you
need to specify a quoted string, for example, fully qualified data set names, criteria
expressions and so on. In these situations, you can use either the double quotation
symbol ("), also called simply a quotation mark, or the single quotation symbol ('),
also called an apostrophe. However, you must use matching symbols to open and
close the quoted string. For example:
"fmndata.test1" and fmndata.test1

are both legitimate ways to specify a data set.

The simplest way to include an apostrophe or quotation symbol as a character in


your string, is to use the opposite character as the string delimiters. For example:
"its"
OR
he said, "hello"

When your string contains a mix of apostrophes and quotation marks, use two
consecutive quotation marks ("") to represent a " character within a string delimited
by quotation marks, or two consecutive apostrophes ('') to represent a ' character
within a string delimited by single quotation marks. For example, to find the
string, "he said, "Take it it's yours.", you would type:
FIND he said, "Take it its yours."

Note: This document uses the words quotation marks, or quotes to mean either " or
'.

Specifying a data set and a member name


Many File Manager panels require you to specify the data set that you wish to use
for the current process. When the data set is a PDS or a CA-Panvalet or other
external library, you must also specify the member name. These panels are
collectively referred to as Entry panels, for example, the View Entry panel.

All Entry panels contain the following fields:

20 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

.
.
.
Input Partitioned, Sequential or VSAM Data Set, or HFS file:
Data set/path name . . . . . ______________________________________________+
Member . . . . . . . . . . ________ Blank or pattern for member list
. Volume serial . . . . . . . ______ If not cataloged
.
.

Figure 6. Data set/path name specification fields

To specify your data set on any Entry panel:


1. In the Data set/path name field, enter a path name ,fully-qualified data set
name, or a name pattern. The name may include a member name or name
pattern in parenthesis. If the member is specified here, the associated Member
field must be empty.
For details about rules for specifying a path name, see Specifying an HFS file
on page 385.
In the case of a copybook, this can be the name of a CA-Panvalet library or
external library accessed using the Library Management System Exit.
If you do not enclose the data set/path name in quotes, then the default High
Level Qualifier (HLQ) is used. Typically, the default is the TSO PREFIX for
your user ID.
If you enter a pattern, when the Entry panel is processed, File Manager
displays a list of the data sets that match the pattern.
Patterns can contain a percent sign (%) to represent a single character, and an
asterisk (*) to represent any number of characters within one qualifier. Two
asterisks (**) represent any number of characters within any number of
qualifiers.
For performance reasons, you should qualify the data set/path name as much
as you can.
2. If you specified the name of a partitioned data set (PDS) or a CA-Panvalet or
other external library in the Data set/path name field (without including a
member name or name pattern in parenthesis), then perform either of these
actions:
v Enter a name or name pattern in the Member field.
A member name pattern can consist of any characters that are valid in a
member name and the following two special pattern characters:
asterisk (*)
Represents any number of characters. As many asterisks as required
can appear anywhere in a member name. For example, if you enter
*d*, a list of all members in the data set whose name contains d is
displayed.
percent sign (%)
A place-holding character representing a single character. As many
percent symbols as necessary may appear anywhere in a member
name. For example, if you enter %%%%, a list of all members in the
data set/path whose name is four characters in length is displayed.
If you perform either of these actions
Do not include a member name or name pattern in parenthesis in the
Data set/path name field, and leave the Member field blank or you
specify a pattern in the Member field,
Include a member name pattern in parenthesis in the Data set/path name
field and leave the Member field blank,

Chapter 2. Getting started with File Manager 21


Getting started with File Manager

File Manager displays a member name list when the Entry panel is processed
and the data set has been specified or selected.
v If the entry panel you are using includes the option, Advanced member
selection, and you want to select a range of PDS(E) members based on one
or more criteria,select that option to display the Advanced Member Selection
panel.
For details about selecting a range of PDS(E) members, see Selecting a range
of PDS(E) members on page 39.
3. For data sets which have not been cataloged, enter the serial number of the
volume which contains the data set in the Volume serial field.
4. Complete the remaining panel-specific fields, and then press Enter to process
the panel function.
If both the data set/path name and the member name have been fully
specified, the panel action proceeds to its next stage.
If you entered a pattern for the data set/path name or member name, the Data
Set Selection panel is displayed, followed by the Member Selection panel, as
needed. When you have made your selections from these panels, the Entry
panel action proceeds to its next stage.
5. When the Data Set Selection panel is displayed, select your data set by entering
an S in the Sel field adjacent to the required data set. You can only select one
name from this list.
6. When the Member Selection panel is displayed, select your members by typing
an S in the Sel field next to each member or with the SELECT primary
command, and then pressing Enter.
You can select as many names as required from this list. When the panel is
processed, the first member on the list is used in the relevant function. When
the function is completed, the next member on the list is used. For example, if
you are selecting several members to be edited, the first member is displayed in
the Edit Session panel. When you exit this panel, the next member is displayed,
and so on, until all selected members have been processed.
Notes:
a. To reset values entered in the prefix area that have not yet been processed,
use the RESET primary command.
b. To re-read the directory and display the current member list, use the
REFRESH primary command.
7. When you are selecting members, you might find it useful to sort the list of
displayed members. To do this, perform either of these actions
v Use the SORT primary command to sort the member list by up to two of the
displayed columns. The field names are the column headings. For example,
SORT SIZE CREATED sorts the list of members first by size and then by the
date created.
v Place the cursor on the column header of the column you want to sort and
press Enter.

Note: When you sort members, the sequence (ascending or descending) for a
given column is predetermined and consistent with ISPF.

Examples of data set name patterns


The examples below assume that the following data sets exist under the USERID
high-level qualifier:

22 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

USERID.FMN.DATA
USERID.FMN.TEMPLATES
USERID.COBOL.COPY
USERID.COBOL.SOURCE
USERID.PLI.COPY
USERID.PLI.SOURCE
USERID.MISC.DATA.BACKUP
USERID.WORK

Example 1

Entering the following pattern (with a single asterisk):


USERID.*

displays the only item with exactly one level of qualifier after USERID:
USERID.WORK

Example 2

Entering the following pattern (with two asterisks):


USERID.**

displays the complete list of data sets with the USERID high-level qualifier.

Example 3

Entering the following pattern:


USERID.*.%%%%

displays the following list (containing those data sets with exactly three qualifiers,
whose third-level qualifier contains exactly four characters):
USERID.FMN.DATA
USERID.COBOL.COPY
USERID.PLI.COPY

Examples of specifying a member name or pattern


The examples below assume that the following members exist within the data set
name, FMNUSER.DATA:
DATA1
FMNCDATA
FMNCTAM
FMNCTEM
FMNCTMP
NEWDATA
NEWSTUFF
TEMPA
TEMPB

Example 1

Entering the following details on an Entry panel:

Chapter 2. Getting started with File Manager 23


Getting started with File Manager

.
.
.
Data set name . . . . . FMNUSER.DATA
. Member . . . . . . . . ________
.
.

displays the entire member name list:


DATA1
FMNCDATA
FMNCTAM
FMNCTEM
FMNCTMP
NEWDATA
NEWSTUFF
TEMPA
TEMPB

Example 2

Entering the following details on an Entry panel:

.
.
.
Data set name . . . . . FMNUSER.DATA
. Member . . . . . . . . FMNCT*
.
.

displays the member name list:


FMNCTAM
FMNCTEM
FMNCTMP

Example 3

Entering the following details on an Entry panel:

.
.
.
Data set name . . . . . FMNUSER.DATA(NEWDATA)
. Member . . . . . . . .
.
.

displays details for the member NEWDATA in data set FMNUSER.DATA.

Example 4

Entering the following details on an Entry panel:

.
.
.
Data set name . . . . . FMNUSER.DATA(TEM*)
. Member . . . . . . . .
.
.

displays the member name list:

24 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

TEMPA
TEMPB

Example 5

Entering the following details on an Entry panel:

.
.
.
Data set name . . . . . FMNUSER.DATA(*)
. Member . . . . . . . .
.
.

displays the entire member name list:


DATA1
FMNCDATA
FMNCTAM
FMNCTEM
FMNCTMP
NEWDATA
NEWSTUFF
TEMPA
TEMPB

RELATED TOPICS
Selecting a range of PDS(E) members on page 39
Browse Entry panel on page 454
Edit Entry panel on page 536
Data Create Utility panel on page 510
Print Utility panel on page 616
Copy From panel on page 486
Copy To panel on page 492
Find/Change Utility panel on page 569
AFP Print Browse panel on page 436
Load Module Information panel on page 587
Compare Utility: Old and New panels on page 466
Template Workbench panel on page 690
Data Set Selection panel on page 514
Member Selection panel on page 596
SORT primary command on page 817
RESET primary command on page 804
REFRESH primary command on page 802
Selecting a range of PDS(E) members on page 39

Specifying an MQ manager or queue


Many File Manager panels allow you to specify the name of an MQ manager or
queue that you wish to use for the current process.

Where allowed, you specify the name of the MQ manager or queue in the data set
name field in the form:
MQ:managerid:queuename

Where:
managerid
The ID of the MQ manager (the 4-character subsystem ID).

Chapter 2. Getting started with File Manager 25


Getting started with File Manager

queuename
The name of a queue managed by that manager.

If you enter a pattern, when the Entry panel is processed, File Manager displays a
selection list allowing you to select a manager or a queue.

Patterns can contain a percent sign (%) to represent a single character, and an
asterisk (*) to represent any number of characters within one qualifier. Two
asterisks (**) represent any number of characters within any number of qualifiers.

RELATED TOPICS
Browse Entry panel on page 454
Compare Utility: Old and New panels on page 466
Copy From panel on page 486
Copy To panel on page 492
Create panel on page 507
Edit Entry panel on page 536
Find/Change Utility panel on page 569
Print Utility panel on page 616
View Entry panel on page 705

Specifying a CICS resource


Many File Manager panels and batch functions allow you to specify the name of a
CICS resource that you wish to use for the current process.

To specify a CICS resource in a non-CICS File Manager environment for base File
Manager and Eclipse, use the notation shown here. The same notation applies to
both panel and keyword fields. You can only specify generic values on panels.
rt:applid:rname

Where:
rt Resource type. Valid values are:
FI For a CICS file.
TD For a Transient Data Queue.
TS For a Temporary Storage Queue.
applid1 The VTAM applid of the CICS system. You can specify a generic name to
display a list of CICS systems if an FMNCICS DD describing CICS applids
has been allocated to the ISPF session. See the File Manager Customization
Guide for details.
rname The name of the resource. You can specify a generic name to select from a
list.
Notes:
1. To specify a CICS resource from File Manager when running under FM/CICS,
omit the applid parameter from the resource name:
rt:rname

Patterns (only usable on panels) can contain a percent sign (%) to represent a
single character, and an asterisk (*) to represent any number of characters within
one qualifier. Two asterisks (**) represent any number of characters within any
number of qualifiers.

For a list of functions that allow you to access CICS resources from ISPF using the
File Manager editor or browser, see Table 1 on page 27.

26 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

RELATED TOPICS
Accessing CICS resources
Browse Entry panel on page 454
Compare Utility: Old and New panels on page 466
Copy From panel on page 486
Copy To panel on page 492
Create panel on page 507
Edit Entry panel on page 536
Find/Change Utility panel on page 569
Print Utility panel on page 616
View Entry panel on page 705

Accessing CICS resources


You can access CICS resources from File Manager base. Table 1 shows the functions
that allow you to specify a CICS resource.
Table 1. Functions allowing access to CICS resources
Option Description Function
Browse DSB
1
1 View DSV
1
2 Edit DSE
3.1 Create DSG
3.2 Print DSP
3.3 Copy DSC
3.6 Find/Change FCH
3.11 Compare DSM
2
10 FM/CICS functions
Data Set Edit Batch DSEB
Data Set Update DSU

Notes:
1. Plus commands: APPEND, COPY, CREATE, REPLACE, SAVEAS.
2. See File Manager Users Guide and Reference for CICS.

Examples of accessing CICS resources


Shown here are two examples of accessing CICS resources.

Example 1: Searching and editing a CICS Temporary Storage Queue

To search and edit a CICS Temporary Storage Queue, follow these steps:
1. From the Primary Option Menu panel, select option 2 (Edit) to display the Edit
Entry panel.
2. In the Data set/path name field, type "TS:" as shown in Figure 7 on page 28.
The "TS:" indicates to File Manager that you want to edit one or more
Temporary Storage Queues from a CICS application.

Note: To edit CICS Transient Data Queues, type "TD:"; to edit CICS files, type
"FI:".)

Chapter 2. Getting started with File Manager 27


Getting started with File Manager

Process Options Help



File Manager Edit Entry Panel

Input Partitioned, Sequential or VSAM Data Set, or HFS file:


Data set/path name TS: +
Member . . . . . Blank or pattern for member list
Volume serial . If not cataloged
Start position . +
Record limit . . Record Sampling
Inplace edit . . (Prevent inserts and deletes)
Copybook or Template:
Data set name . . . . .
Member . . . . . . . . Blank or pattern for member list

Processing Options:
Copybook/template Start position type Enter "/" to select option
3 1. Above 1. Key Edit template Type (1,2,S)
2. Previous 2. RBA Include only selected records
3. None 3. Record number Binary mode, reclen
4. Create dynamic 4. Formatted key Create audit trail
Use I/O exit
Command ===>
F1=Help F2=Split F3=Exit F4=Expand F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 7. Specifying CICS temporary storage queues

3. Press Enter.
When you specify the type of CICS resource ("TS:", "TD:", or "FI:") on an entry
panel, but without any further qualification, File Manager next displays the
CICS Applid Selection List panel which lists the available CICS applications as
shown in Figure 8.

Process Options Help



File Manager CICS Applid Selection list Row 00001 of 00023

Applid Status Description


* * *
CICSDEV1 Active Development system 1
CICSDEV2 Active Development system 2
CICSTST1 Inactive Testing system 1
CICSTST2 Inactive Testing system 2
CICSTST3 Inactive Testing system 3
CICSTST4 Active Testing system 4
CICSPRD1 Inactive Production system 1
..
.

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F7=Backward
F8=Forward F9=Swap F10=Left F11=Right F12=Cancel

Figure 8. List of CICS applications

4. Select the CICS application you want by typing "S" in the entry field next to the
relevant applid (in this case, applid CICSTST1) as shown in Figure 9 on page
29.

28 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Process Options Help



File Manager CICS Applid Selection list Row 00001 of 00023

Applid Status Description


* * *
CICSDEV1 Active Development system 1
CICSDEV2 Active Development system 2
S CICSTST1 Inactive Testing system 1
CICSTST2 Inactive Testing system 2
CICSTST3 Inactive Testing system 3
CICSTST4 Inactive Testing system 4
CICSPRD1 Inactive Production system 1
..
.

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F7=Backward
F8=Forward F9=Swap F10=Left F11=Right F12=Cancel

Figure 9. Selecting a CICS application

5. Press Enter.
File Manager then displays a list of Temporary Storage Queues (because you
specified "TS:" on the Edit Entry Panel) for the selected CICS application as
shown in Figure 10.

Process Options Help



File Manager CICS Temporary Storage Selection List Row 00001 of 00005

Queue Loc Items Size Max Min Tran Last SYS Po


* * * * *
lowercase AUX 20 6400 320 320 FM 97210
KSDSXX AUX 20 2560 128 128 FM 98913
KSDS10 AUX 10 1280 128 128 FM 14654
TDTD"TDTD TD AUX 100 32000 320 320 FM 97194
TDTEST10 AUX 10 3200 320 320 FM 97423
**** End of data ****

..
.

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F7=Backward
F8=Forward F9=Swap F10=Left F11=Right F12=Cancel

Figure 10. List of CICS temporary storage queues

6. Select the Temporary Storage Queue you want by typing "S" in the entry field
next to the relevant queue (in this case, KSDS10) as shown in Figure 11 on page
30.

Chapter 2. Getting started with File Manager 29


Getting started with File Manager

Process Options Help



File Manager CICS Temporary Storage Selection List Row 00001 of 00005

Queue Loc Items Size Max Min Tran Last SYS Po


* * * * *
lowercase AUX 20 6400 320 320 FM 97210
KSDSXX AUX 20 2560 128 128 FM 98913
S KSDS10 AUX 10 1280 128 128 FM 14654
TDTD"TDTD TD AUX 100 32000 320 320 FM 97194
TDTEST10 AUX 10 3200 320 320 FM 97423
**** End of data ****

..
.

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F7=Backward
F8=Forward F9=Swap F10=Left F11=Right F12=Cancel

Figure 11. Selecting a CICS temporary storage queue

7. Press Enter.
File Manager then displays the data in the selected Temporary Storage Queue
as shown in Figure 12.

Process Options Help



Edit TS:CICSTST1:KSDS10 Top of 10
Col 1 Insert Length 80 Record AT TOP Format CHAR
----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 ....1 aaaaaaaaaaaaaaa 6324West aindy Wa
000002 ....2 aaaaaaaaaaaaaaa 6324West aindy Wa
000003 ....3 74 Redcliffe St 6324West aindy Wa
000004 ....4 74 Redcliffe St 6324West aindy Wa
000005 ....5 74 Redcliffe St 6324West aindy Wa
000006 ....6 74 Redcliffe St 6324West aindy Wa
000007 ....7 74 Redcliffe St 6324West aindy Wa
000008 ....8 74 Redcliffe St 6324West aindy Wa
000009 ....9 74 Redcliffe St 6324West aindy Wa
000010 ....10 74 Redcliffe St 6324West aindy Wa
****** **** End of data ****
..
.

Figure 12. Data in CICS temporary storage queue

Example 2: Searching and modifying a CICS file

To search and modify a CICS file, follow these steps:


1. From the Primary Option Menu panel, select option 2 (Edit) to display the Edit
Entry panel.
2. In the Data set/path name field, type "FI:CICSTST1" as shown in Figure 13 on
page 31.
The "FI:" indicates to File Manager that you want to edit one or more CICS
files, and the "CICSTST1" indicates that you want to edit the files from the CICS
application, CICSTST1.

30 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Process Options Help



File Manager Edit Entry Panel

Input Partitioned, Sequential or VSAM Data Set, or HFS file:


Data set/path name FI:CICSTST1 +
Member . . . . . Blank or pattern for member list
Volume serial . If not cataloged
Start position . +
Record limit . . Record Sampling
Inplace edit . . (Prevent inserts and deletes)
Copybook or Template:
Data set name . . . . .
Member . . . . . . . . Blank or pattern for member list

Processing Options:
Copybook/template Start position type Enter "/" to select option
3 1. Above 1. Key Edit template Type (1,2,S)
2. Previous 2. RBA Include only selected records
3. None 3. Record number Binary mode, reclen
4. Create dynamic 4. Formatted key Create audit trail
Use I/O exit
Command ===>
F1=Help F2=Split F3=Exit F4=Expand F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 13. Specifying CICS files from a CICS application

3. Press Enter.
When you specify the type of CICS resource ("TD:", "TS:", or "FI:") and the CICS
application on an entry panel, but without specifying the name of the CICS
resource, File Manager next displays a selection list of the Transient Data
Queues, Temporary Storage Queues, or files for the specified CICS application.
In this case, File Manager displays a list of CICS files for the specified CICS
application (CICSTST1) as shown in Figure 14.

Process Options Help



File Manager CICS File Selection List Row 00001 of 00020
File Data Set Name Type O E R U A B D SY
* * * P N E P D R E *
E A A D D O L

DFHCSD CICS.FILE.DFHCSD KSDS O E R U A B D


DFHDBFK VSAM C E R U A B D
DFHLRQ CICS.FILE.DFHLRQ KSDS O E R U A B D
ESDS10 CICS.FILE.ESDS KSDS O E R U B
EZACACHE EZACACHE TABL C U R U A B D
EZACONFG CICS.FILE.EZACONFG KSDS C D R B
FMDATA CICS.FILE.FMDATA KSDS C E R
PMRRDS1 CICS.FILE.PMRRDS1 KSDS C E R
RRDS10 CICS.FILE.RRDS10 KSDS O E R U B
..
.

**** End of data ****

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F7=Backward
F8=Forward F9=Swap F10=Left F11=Right F12=Cancel

Figure 14. Selection list of CICS files

4. You can now proceed to work with any of the CICS resources listed.

Chapter 2. Getting started with File Manager 31


Getting started with File Manager

For more information about working with CICS resources in File Manager, see
File Manager Users Guide and Reference for CICS.

Running File Manager batch functions with a CICS resource


When you run a File Manager batch function with a CICS resource, you must
specify the resource type, VTAM applid of the CICS system, and the name of the
CICS resource. You cannot specify generic values. See Specifying a CICS resource
on page 26.

Table 1 on page 27 shows you the File Manager batch functions you can use with
CICS resources.

When you run File Manager batch functions with a CICS resource, be aware that:
v If you are specifying a batch keyword for a CICS TS queue that contains special
or lowercase characters, or a CICS TD queue that contains lowercase characters,
you must enclose the name of the resource in quotes like this:
crt:applid:rname
Any single quote in the resource name must be repeated. For example, to specify
the TS queue name 'quoted name', enter:
DSNIN=cTS:MYCICS:quoted name
v For DSG and DSC functions:
The DISP=MOD parameter appends to the TD (transient data) and TS
(temporary storage) queues. Records are always appended for CICS files.
The DISP=OLD parameter replaces the TD (transient data) and TS (temporary
storage) queues. This is ignored for CICS files where the data is always
appended

Shown here are some examples of running File Manager batch functions with a
CICS resource.
Example 1: Data set Generate: Creating a TS queue using a template
$$FILEM DSG DSNOUT=TS:PRODCICS:MYTSQ
$$FILEM RECSIZE=2000,
$$FILEM DISP=OLD,
$$FILEM TCOUT=MY.TEMPLATE.DSN(MYTP),
$$FILEM NLRECS=100
Example 2: Data Set Copy: Copying a flat file to a CICS intrapartition TD queue
$$FILEM DSC DSNIN=MYHLQ.QUEUE.DATA,
$$FILEM DSNOUT=TD:PRODCICS:MYIQ
Example 3: Data Set Print: Printing a CICS file using a template
$$FILEM DSP FORMAT=TABL,
$$FILEM TCIN=MY.TEMPLATE.DSN(MYTP),
$$FILEM DSNIN=FI:PRODCICS:MYKSDS
Example 4: Find/Change: Making changes to a CICS file
$$FILEM FCH ,
$$FILEM DSNIN=FI:PRODCICS:MYKSDS
CAPS ON
C ABC DEF 12 14
/+
Example 5: Data Set Edit Batch: Navigating a CICS file backwards and changing
a name
$$FILEM DSEB DSNIN=FI:PRODCICS:MYKSDS,PROC=*
BOT()
DO UNTIL(UP(1) = TOF)
IF FLDI(3,=,JOHN) THEN DO
OVLY_OUT(BILL,3)

32 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

UPDATE()
LEAVE
END
END
/+
Example 6: Data Set Copy: Copying a flat file into a temporary storage queue
$$FILEM DSC DSNIN=myhlq.flatfile,
$$FILEM DSNOUT=TS:TESTCICS:MYTSQ
Example 7: Data Set Compare: Comparing two files on different CICS systems
$$FILEM DSCMP TYPE=RECORD,
$$FILEM SYNCH=ONETOONE,
$$FILEM LIST=DELTA,
$$FILEM WIDE=YES,HILIGHT=YES,
$$FILEM DSNOLD=FI:PRODCICS:MYKSDS,
$$FILEM DSNNEW=FI:TESTCICS:MYKSDS

Manipulating your view of selection lists


When you are working with selection lists, you can manipulate your view of the
information available to focus on the items of interest to you.

To return to the original view of the selection list, enter the RESET primary
command.

To rebuild the information required to display the selection list, enter the REFRESH
primary command.

The tasks described in this section are:


v Using primary commands with selection lists
v Scrolling to see data on page 34
v Sorting the data on page 35
v Finding specific data on page 36
v Changing the display width of columns on page 37
v Filtering your selection list on page 37
v Changing where (and if) columns are displayed on page 38
v Displaying data in hexadecimal on page 38

RELATED TOPICS
REFRESH primary command on page 802
RESET primary command on page 804

Using primary commands with selection lists


When you are viewing selection lists, you can enter primary commands on the
Command line of the panel to perform these functions:

To do this... Use... See page


Scroll the data BOTTOM 735
DOWN 754
LEFT 779
RIGHT 808
TOP 824
UP 826
Scroll to a particular item in the list LOCATE 782
Find a particular item in the list FIND 764
RFIND 807

Chapter 2. Getting started with File Manager 33


Getting started with File Manager

To do this... Use... See page


Tailor the displayed data RESET 804
REFRESH 802
TAILOR 822
Display data in hexadecimal format HEX 776

RELATED TOPICS
Chapter 15, Primary commands, on page 731

Scrolling to see data


To scroll through your data, use the following function keys:
Use this function key To do this...
Scroll backward (up) Up function key (F7)
Scroll forward (down) Down function key (F8)
Scroll right Right function key (F11)
Scroll left Left function key (F10)

You can also scroll using the primary commands UP, DOWN, LEFT, RIGHT, TOP,
and BOTTOM.

Examples
LEFT 8 Scrolls 8 columns to the left.
LEFT Scrolls left the number of columns indicated by the Scroll field.
LEFT CSR If the cursor is positioned on a record, scrolls left to the cursor
position; otherwise scrolls left one page.
UP 15 Scrolls up 15 lines.
UP Scrolls up the number of lines indicated by the Scroll field.
UP DATA Scrolls up one line less than a page of data.

RELATED TOPICS
UP primary command on page 826
DOWN primary command on page 754
LEFT primary command on page 779
RIGHT primary command on page 808
TOP primary command on page 824
BOTTOM primary command on page 735

Controlling how far you scroll: To control how far you scroll when you press one
of the scrolling function keys, enter a scroll amount in the Scroll field:
Scroll amount Scrolls...
PAGE One screen at a time
HALF Half a screen at a time
DATA One line or column less than a screen at a time
CSR To the cursor position (if the cursor is not
positioned on a record when the scroll is
performed, then the scroll amount defaults to
PAGE)

34 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

MAX To the end of the data in the direction indicated by


the scrolling function key.
nnnn A number of columns (when scrolling left or right)
or a number of records or lines (when scrolling up
or down) at a time

You can temporarily override the amount in the Scroll field by typing a scroll
amount on the Command line, then pressing a scroll function key. For example, if
you enter 8 on the Command line, then press the Right function key (F11), File
Manager scrolls right 8 columns.

Scrolling to the first or last line or column: To scroll to the first or last line or
first or last column in the selection list, type MAX (or M) on the Command line, then
press one of the scroll function keys. For example, typing M then pressing the Right
function key (F11) scrolls right to the last column.

You can also scroll to the first or last line by entering TOP or BOTTOM on the
Command line.

RELATED TOPICS
TOP primary command on page 824
BOTTOM primary command on page 735

Holding a column when scrolling left or right: You can set a "hold" option to
hold specific columns. Held columns are displayed at the left of the screen and are
always displayed regardless of your scrolling position or direction.

You can specify a column to be held in either of these ways:


v Set the column attributes for a single column:
1. Scroll (if necessary) so that the column is displayed.
2. Position the cursor within the column heading and press Enter to display a
Column Details panel.
3. Set the Hold value to Y.
4. Press the Exit function key (F3) to return to the selection list.
v Set the column attributes for one or more columns:
1. Enter the TAILOR primary command to display a list of columns together
with their column attributes.
2. Set the Hold value to Y for each column you want to hold.
3. Press the Exit function key (F3) to return to the selection list.

RELATED TOPICS
TAILOR primary command on page 822

Sorting the data


You can change the order of the lines in a selection list by specifying the columns
to be used in determining the sort order. For each column, you can specify a sort
order of:
Ascending (A) The contents of the column are sorted in ascending
order. A down arrow () is shown in the rightmost
position of the column heading.
Descending (D) The contents of the column are sorted in

Chapter 2. Getting started with File Manager 35


Getting started with File Manager

descending order. An up arrow () is shown in the


rightmost position of the column heading.
None (N) The column is not used in determing the order of
the lines.

Note: For any selection list, there is a default "held" column for which the sort
order is, again by default, ascending (A).

You can specify a column to be used in determining the sort order in any of these
ways:
v Setting the column attributes for a single column:
1. Scroll (if necessary) so that the column is displayed.
2. Perform any of these actions:
a. Position the cursor within the column filter and press Enter to display a
Column Settings panel.
b. Set the Sort value to A, D, or N according to how you want the column
sorted.
c. Press the Exit function key (F3) to return to the selection list.
or
a. Position the cursor within the column heading and press Enter. The
column sort order is changed to the default. The default sort order for the
column can be found in the Column Settings panel.
or
a. Tab past the column heading (to the rightmost position of the column
heading area) and press Enter.
b. Each time you tab to this position and press Enter, the sort order rotates
through ascending (), descending (), and none (no arrow displayed).
v Setting the column attributes for one or more columns:
Perform either of these actions:
1. Enter the TAILOR primary command to display a list of columns together
with their column attributes.
2. Set the Sort value to A, D, or N according to how you want the column sorted.
3. Press the Exit function key (F3) to return to the selection list.
or
1. Use the SORT command.

Note: When you change the sort order for a column, the sort order for all other
columns is set to none.

RELATED TOPICS
TAILOR primary command on page 822

Finding specific data


To find one or more occurrences of a character string in a selection list, you can
use the FIND primary command, which you can abbreviate as F or /.

For example, to search for the next occurrence of the string Apple in any mix of
uppercase and lowercase, enter this command on the Command line:
F APPLE

36 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

To find the next occurrence of the same string, use the RFIND command, or enter
the FIND command with no argument. A message is displayed if the string cannot
be found.

You can control the starting point, direction, and extent of the search with one of
these optional parameters before or after the search string: NEXT, PREV, FIRST,
LAST, ALL.

For example, to search for the last occurrence of the string Orange, enter either
of these commands on the Command line:
F ORANGE LAST
F LAST ORANGE

RELATED TOPICS
FIND/FX primary command on page 764

Changing the display width of columns


You can change the display width of columns in a selection list

You can specify the display width of a columns in either of these ways:
v Set the column attributes for a single column:
1. Scroll (if necessary) so that the column is displayed.
2. Position the cursor within the column heading and press Enter to display a
Column Details panel.
3. Set the Width value to the number of characters you want to use to display
the column.
4. Press the Exit function key (F3) to return to the selection list.
v Set the column attributes for one or more columns:
1. Enter the TAILOR primary command to display a list of columns together
with their column attributes.
2. Set the Width value to the number of characters you want to use to display
each column
3. Press the Exit function key (F3) to return to the selection list.

RELATED TOPICS
TAILOR primary command on page 822

Filtering your selection list


You can restrict the data displayed in a selection list by specifying filters for any of
the column data.

Points to consider when you specify a filter:


v Filtering is performed using a generic trailing match. That is, if the start of the
data in the column being filtered matches the filter string, it is considered a
match.
For example, a filter of PEA matches PEA and PEAR, but not APPEAR.
v Matching of data to filters is not case-sensitive.
For example, a filter of PEA matches PEA, PEAR, Pea and pear.
v You can specify any of these operators as the first character of the filter:
> Greater than.
< Less than.
= Equal to.
! Not equal to.

Chapter 2. Getting started with File Manager 37


Getting started with File Manager

You can specify a filter in any of these ways:


v Set the column attributes for a single column:
You can either:
Overtype the heading of the column you want to filter with a string.
Use the Column Details panel:
1. Scroll (if necessary) so that the column is displayed.
2. Position the cursor within the column heading and press Enter to display
a Column Details panel.
3. Type the filter in the Filter field.
4. Press the Exit function key (F3) to return to the selection list.
v Set the column attributes for one or more columns:
1. Enter the TAILOR primary command to display a list of columns together
with their column attributes.
2. Type the filter in the Filter field for each column you want to filter.
3. Press the Exit function key (F3) to return to the selection list.

RELATED TOPICS
TAILOR primary command on page 822

Changing where (and if) columns are displayed


You can change the order that data columns are displayed in a selection list. You
can also suppress columns from being displayed.

To change the order in which data columns in a selection list are displayed:
1. Enter the TAILOR primary command to display a list of columns together with
their column attributes.
2. Set the Order value for each column according to the order (left to right) that
you want the columns displayed. The values you specify must be unique to
ensure that the columns are re-ordered as intended.
3. Press the Exit function key (F3) to return to the selection list.

To suppress a data column from being displayed in a selection list are displayed:
1. Enter the TAILOR primary command to display a list of columns together with
their column attributes.
2. For any column that you want to suppress from being displayed in the
selection list, set the Order value to 0 (zero). Note that columns whose Order
value is set to 0, are displayed after the other (ordered) columns.
3. Press the Exit function key (F3) to return to the selection list.

RELATED TOPICS
TAILOR primary command on page 822

Displaying data in hexadecimal


To display the data in a selection list in hexadecimal format, use the HEX primary
command.

RELATED TOPICS
HEX primary command on page 776

38 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Selecting a range of PDS(E) members


The following File Manager entry panels include the option, Advanced member
selection:
v Print Utility panel on page 616
v Find/Change Utility panel on page 569
v Copy From panel on page 486
v Template Build Utility panel on page 684
v Load Module Compare - Entry panel on page 585
v Load Module Information panel on page 587
v Compare Utility: Old and New panels on page 466

The Advanced member selection option lets you select a range of PDS(E)
members based on one or more of the following criteria:
v Similar names
v The user ID by which they were last updated
v The date they were created
v The date they were last modified

To select a range of PDS(E) members in this way, select the Advanced member
selection option on the relevant entry panel and press Enter.

File Manager displays the Advanced Member Selection panel:


Member name
To select a range of PDS(E) members based on their name, perform either
of these actions
v Specify the required member name (or a mask) in the Member name
field.
v To select a range of members with similar names, enter the from and
to values in the from and to member name fields respectively.
If you omit the from member name value, all members from the
beginning of the data set to the member name to value are included. File
Manager pads the field with blanks to 8 characters.
If you omit the to member name value, all members from the member
name from value to the end of the data set are included. File Manager
pads the field with blanks to 8 characters. If you enter an asterisk as the
last character in the member name to field, File Manager pads the field
with high values to 8 characters.
For example, the following Member name range selects all members
with a name beginning with D, E, or F:
or range from: D
to: F*
User ID
To select a range of PDS(E) members based on the user ID by which they
were last updated, perform either of these actions
v Specify the required user ID (or a mask) in the Updated by field.
v To select a range of user IDs, enter the from and to values in the
from and to user ID fields respectively.
If you omit the from user ID value, all members from the beginning of
the data set to the user ID to value are included. File Manager pads the
field with blanks to 7 characters
If you omit the to user ID value, all members from the user ID from
value to the end of the data set are included. File Manager pads the field

Chapter 2. Getting started with File Manager 39


Getting started with File Manager

with blanks to 7 characters. If you enter an asterisk as the last character


in the user ID to field, File Manager pads the field with high values to 7
characters.
For example, the following user ID range selects all members with a
user ID (by which they were last updated) in the alphabetic range
GEOFF to GEORGE:
from: GEOFF
to: GEORGE
Date created
To select a range of PDS(E) members based on the date they were created,
perform either of these actions
v Specify the required creation date in YYYY/MM/DD format (or a mask)
in the Date created field. You can specify an asterisk (*) as the last
character to indicate a range of dates, or a percent sign (%) in place of a
single character to indicate a selection of dates.
v To select a range of creation dates:
Enter the from value (in YYYY/MM/DD format) in the from
creation date field. If you omit the from creation date, or you specify
an asterisk as the last character, the unspecified portions of the date
default as follows:
DD = 01
MM = 01
YYYY = 0000

No other wildcarding is allowed.


Enter the to value (in YYYY/MM/DD format) in the to creation
date field. If you omit the to creation date, or you specify an asterisk
as the last character, the unspecified portions of the date default as
follows:
DD = 31
MM = 12
YYYY = 9999

No other wildcarding is allowed.


For example, the following creation date range selects all members
created between 2004/07/05 and 2004/12/31:
from: 2004/07/05
to: 2004*
Date modified
To select a range of PDS(E) members based on the date they were last
modified, perform either of these actions
v Specify the required modification date in YYYY/MM/DD format (or a
mask) in the Date modified field. You can specify an asterisk (*) as the
last character to indicate a range of dates, or a percent sign (%) in place
of a single character to indicate a selection of dates.
v To select a range of modification dates:
Enter the from value (in YYYY/MM/DD format) in the from
modification date field. If you omit the from modification date, or
you specify an asterisk as the last character, the unspecified portions
of the date default as follows:
DD = 01
MM = 01
YYYY = 0000

40 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

No other wildcarding is allowed.


Enter the to value (in YYYY/MM/DD format) in the to
modification date field. If you omit the to modification date, or you
specify an asterisk as the last character, the unspecified portions of the
date default as follows:
DD = 31
MM = 12
YYYY = 9999

No other wildcarding is allowed.


For example, the following modification date range selects all members
that were last updated between 2003/11/01 and 2003/12/31:
from: 2003/11*
to: 2003

RELATED TOPICS
Advanced Member Selection panel on page 433
Printing from File Manager on page 293
Finding and changing data in multiple PDS members on page 264
Copying data sets on page 247
Print Utility panel on page 616
Find/Change Utility panel on page 569
Copy From panel on page 486
Template Build Utility panel on page 684
SELECT primary command on page 813
Member Selection panel on page 596

Using hexadecimal values in File Manager


In many File Manager panels, you can view and enter decimal values as text
characters or as hexadecimal values. To help you quickly convert decimal values to
hexadecimal or hexadecimal values to decimal values, File Manager provides a
simple converter tool, in the form of two primary commands.

To convert a decimal value to its equivalent hexadecimal value:


1. On the Command line of any panel, enter DX followed by the decimal value.
File Manager displays the results in a message at the bottom of your screen.

For example, if you enter the following on a File Manager Command line:
DX 10

then File Manager displays this message box:



Dec 10 = hex 0000000A

To convert a hexadecimal value to its equivalent decimal value:


1. On the Command line of any panel, enter XD followed by the hexadecimal
value.
File Manager displays the results in a message at the bottom of your screen.

For example, if you enter the following on a File Manager Command line:
XD 10

then File Manager displays this message box:

Chapter 2. Getting started with File Manager 41


Getting started with File Manager


Hex 00000010 = dec 16

RELATED TOPICS
DX primary command on page 755
XD primary command on page 829
Selecting a display format on page 69

Getting help
File Manager offers two levels of help information: context-sensitive field
information and Tutorial Help. The field help information provides a description of
your current field, lists the valid values or range of values that can be entered, and
gives the default field value where applicable. Tutorial Help is a context-sensitive
help system that provides detailed explanations of the File Manager panels and the
processes in which they are used. In addition, all error messages have an
associated full text explanation, which can help you to determine the cause of a
problem.

The tasks described in this section are:


Displaying field help information
Accessing Tutorial Help on page 43
Viewing error messages on page 45

Displaying field help information


To display the field help information:
1. Place your cursor on the field entry line.
2. Press the Help function key (F1). The field help information is displayed in a
pop-up window.
If further information is needed, press the Extended Help function key (F5), to
access the Tutorial Help page for the current panel.
Pressing Help while the field information window is displayed takes you to the
Help Tutorial page within the Tutorial Help system (that is, the page that
describes how to use Tutorial Help).
3. When you have finished reading the message or the relevant Tutorial Help
page, press the Exit function key (F3) to return to your starting panel.

For example, Figure 15 on page 43 shows the message seen when F1 is pressed
from the RECLIMIT field in the Set Print Processing Options panel.

42 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

Process Options Help


Set Record Limit
File Mana ons
Range: 1-end of record
Set proce Default: (1,*), unless changed in F3) to save your changes.
Enter RES your File Manager
installation.
Print Opt
PRINTO Bytes to be listed from each , TERMINAL or REXX
PRINTD record. The first parameter
PRINTL specifies the start column, the
PAGESI second the last column. An asterisk a printed page
PRTTRA * indicates the end of the record.
HEADER
PAGESK F1=Help F2=Split F3=Exit
DUMP . F4=Resize F5=Ex-help
DATAHD
RECLIMIT (1,*) (n,m) n=begin column, m=end column

Command ===>
F1=Help F2=Split F3=Exit F4=CRetriev F6=Reset F7=Backward
F8=Forward F9=Swap F10=Actions F12=Cancel

Figure 15. Field help information for the RECLIMIT field

Accessing Tutorial Help


The Tutorial Help system is both context-sensitive and structurally organized. You
can get directly to the information you need, using the context-sensitive access
method or you can enter the Help system at a specific location and navigate to any
topic information within the structure.

To access a context-sensitive Tutorial Help page:


1. Place your cursor on the Command Line or anywhere in the panel that is
outside of a field entry line.
2. Press F1. The Tutorial Help page associated with the current panel is displayed.
When you access the Tutorial Help in this way, the first page that is displayed
may be a main topic page, with a menu listing the associated sub-topics, or it
may be a sub-topic page, depending upon the context from which you started.
3. Navigate through the Tutorial Help pages, to find the information you require
(see below for a list of navigation commands).
4. When you have finished, press F3 (Exit) to return to your starting panel.

The Tutorial Help system is organized with a Table of Contents structure that is
based upon the File Manager Primary Options menu. Each entry within the Table
of Contents leads to a main topic with a number of associated sub-topics. In
addition, there is an index that lists selected topics from the Tutorial Help,
alphabetically by subject.

To choose your starting point in Tutorial Help:


1. Select the Help pull-down menu from any panel Action Bar.
2. Enter the option number for the Tutorial Help entry point that you require.
These are:

Chapter 2. Getting started with File Manager 43


Getting started with File Manager

1. Help for help


Displays the Help panel for the Tutorial Help system.
2. Extended help
Displays the Tutorial Help panel associated with the current File
Manager panel (equivalent to pressing F1 from the File Manager panel).
When on the Primary Options menu, this is the Tutorial Help Table of
Contents panel.
3. Keys help
Displays a panel that provides help for the Function Keys that are
active on the current File Manager panel.
4. Help index
Displays the Help Index.
5. Tutorial
Displays the Tutorial Help Table of Contents panel.
6. About
Displays the File Manager version and release information in a pop-up
window.
7. News about File Manager
Displays a panels providing general information about the current File
Manager version/release.

To navigate Tutorial Help, enter one of the following commands in the Command
line on any Tutorial page:
BACK or B
To back up to the previously viewed page.
SKIP or S
To skip the current topic and go on to the next topic.
UP or U
To display a higher level list of topics.
TOC or T
To display the Table of Contents.
INDEX or I
To display the Tutorial Index. Once the Index has been displayed, use the
RIGHT (F11) and LEFT (F10) keys to scroll through the list, then position
your cursor on a subject and press ENTER (Ctrl) to display the topic.

Alternatively, you may use the following keys whenever you are in the tutorial:
ENTER (Ctrl)
To display the next sequential page within a topic.
HELP (F1)
To display the Help Tutorial page within the Tutorial Help system (that is,
the page that describes how to use Tutorial Help).
END (F3)
To terminate the tutorial.
UP (F7)
To display a higher level list of topics (instead of typing UP ).
DOWN (F8)
To skip to the next topic (instead of typing SKIP ).

44 File Manager for z/OS V12R1 User's Guide


Getting started with File Manager

RIGHT (F11)
To display the next sequential page within a topic (instead of pressing
ENTER ).
LEFT (F10)
To display the previous sequential page within a topic (instead of typing
BACK ).

Note: The listed keys are the default key mappings. As you can customize key
mappings, they may be different on your system.

Viewing error messages


If an error occurs when File Manager attempts to process a panel, a short text
message displays in the upper right corner of the screen. While this message is
displayed, pressing F1 displays the expanded text of the error message in either a
box at the bottom of the screen, or underneath the command line, dependant upon
your setting of the ISPF option "Long message in pop-up". The following example
is shown with that ISPF option set on.

Process Options Help



File Manager View Entry Panel Enter required field

Input Partitioned, Sequential or VSAM Data Set, or HFS file:


Data set/path name +
Member . . . . . . Blank or pattern for member list
Volume serial . . If not cataloged
Start position . . +
Record limit . . . Record Sampling

Copybook or Template:
Data set name . . FMN.V11R1M0.SFMNSAM1
Member . . . . . . FMNCCPY Blank or pattern for member list
Processing Options:
Copybook/template Start position type Enter "/" to select option
1 1. Above 1. Key Edit template Type (1,2,S)
2. Previous 2. RBA Include only selected records
3. None 3. Record number Binary mode, reclen
4. Create dynamic 4. Formatted key

The field where the cursor is positioned is mandatory for this function

Command ===> ________________________________________________________________
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 16. View Entry panel showing expanded message

RELATED TOPICS
Messages on page 1175

Setting your default processing options


Many of the processing operations performed by File Manager utilize default
values that can be set from within the File Manager application. By adjusting these
values, you can customize File Manager so that its behavior is best suited to your
needs. Your settings for these options are stored in your ISPF profile, and are
invoked when you log in, regardless of which workstation you use.

Chapter 2. Getting started with File Manager 45


Setting your default processing options

You can update these default values by accessing the relevant processing option
panel.

To access a processing option panel, use any one of the following methods:
v From the File Manager Primary Options Menu:
1. Select Option 0 (Settings). The Set Processing Options Menu panel is
displayed.
2. Select the required processing options type from the menu.

Process Options Help



File Manager Set Processing Options

1 Print Print settings


2 System System settings
3 Tape Tape processing options
4 Batch Job card specifications
5 Compiler Language and compiler specifications
6 EDIT Editor options
7 Sharing VSAM Edit sharing options
8 Temporary Temporary Data Set Allocations
9 Output Output Data Set Allocations
10 Trace Trace options

Command ===> _________________________________________________________________


F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 17. Set Processing Options menu

v From any File Manager panel, use the Options pull-down menu to select the
required processing options type:

Process Options Help



File Man 1. Print settings
2. System settings
1 Print 3. Tape processing options
2 Syste 4. Job card specifications
3 Tape 5. Compiler language selection
4 Batch 6. COBOL compiler specifications
5 Compi 7. HLASM compiler specifications
6 EDIT 8. PL/I compiler specifications
7 Shari 9. Editor options
8 Tempo 10. VSAM Edit sharing options
9 Outpu 11. Temporary Data Set Allocations
10 Trace 12. Output Data Set Allocations
13. Trace options
14. ISPF settings

Command ===>
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 18. Options pull-down menu

46 File Manager for z/OS V12R1 User's Guide


Setting your default processing options

v On the Command/Options line of any File Manager panel, enter an equals sign
(=), followed by the option number for the required processing type. For
example, to display the Set Tape Processing Options panel, enter =0.3.

When you select an option processing type, File Manager displays a panel listing
those options and their current values. The following notes apply to all of these
option panels:
v To change the value of an option, overtype its current value.
v To save the options you have changed and exit the panel, press the Exit function
key (F3).
Changes are saved in your ISPF user profile for future File Manager sessions.
They remain in effect until you change the option again.
v To exit a panel without saving changes, press the Cancel function key (F12).
v To reset all options on the panel to their installation defaults, enter RESET on the
Command line.
v The options on these panels only affect the behavior of File Manager panels. To
set options when programming with File Manager functions, use the equivalent
function keywords. You can set most options using the SET function (see page
1061). For Compiler Language Selection, COBOL, PL/I or HLASM options (for
compiling copybooks into templates), use the keywords on the same function
where you specify the copybook (the DSEB, DSC, DSG, DSM, DSP or DSU
functions).

The use of most of these processing options is discussed in the section that the
option affects. For example, the use of Set Print Processing Options panel is
described in the Printing from File Manager section of the Managing data sets
chapter. Only those processing options that affect more than one area of File
Manager's functionality are described in this section.

RELATED TOPICS
Set Processing Options panel on page 657

Set print processing options (option 0.1)


The print processing options control the print output that the File Manager
functions produce.

RELATED TOPICS
Setting your Print Processing Options on page 293
Set Print Processing Options panel (option 0.1) on page 654

Setting your System Processing Options (option 0.2)


The System Processing Options control such things as data presentation and
conversion values, and whether or not user-written I/O exits are allowed when
processing various utility functions.

In the Data presentation and conversion section:


v The PAD option defines both the padding and truncation of fields within records
when performing actions such as copying or creating data sets.
v The NOTRUNC option specifies that, if the PAD option has been selected, no
truncation is performed when copying or writing records to a variable length
data set.

Chapter 2. Getting started with File Manager 47


Setting your default processing options

The CYLHD option defines how File Manager interprets cylinder-head and
track-number values in disk functions. ABSOLUTE means the actual physical
addresses. RELATIVE means relative to the start of the data set.

The EOD option sets the end-of-data delimiter for tape input.

The User I/O Exit Specification section contains two fields that, together, control
whether or not you are able to use custom user I/O exits in tasks such as viewing,
editing, printing, copying or comparing data sets. User I/O exits are
custom-written programs that handle files that require pre- or post-processing not
offered directly by File Manager. This may include handling data compression or
encryption, or other non-standard activities performed on the data set records.
There are no restrictions on the programming language that you can use to write
an exit, however, the exit must be provided to File Manager in the
STEPLIB/ISPLLIB concatenation or their extensions (LINKLIST, LPA, and so on).

To allow the use of user I/O exits, several things must occur:
1. When File Manager is installed, the person doing the initial customization (the
FM Administrator) must have chosen to allow user I/O exits on a site-wide
basis.
If the FM Administrator chose not to allow user I/O exits, the Exit enabled
field is set to NO Disabled by installation options. You cannot change this
from within the File Manager panel and you cannot use I/O exits in online or
batch processing.
If the FM Administrator chose to allow user I/O exits, you can then set the Exit
enabled field to YES. Choosing YES means that when performing the following
tasks (via a panel or function), you have the option to use or not use a user
I/O exit:
v Viewing data sets (View panel only)
v Editing data sets (Edit panel, DSEB and DSU functions)
v Finding and changing data (Find/Change panel, FCH function)
v Copying data sets (Copy From and Copy To panels, DSC function)
v Creating data (Data Create panel, DSG function)
v Comparing data sets (Old and New panels, DSM function)
v Printing data sets (Print Utility panel, DSP function)
Choosing NO means that you are not able to select an exit in any of the File
Manager panels. However, you are still able to specify a user I/O exit in batch
processing.
2. Either you or someone in your organization must have developed your own
custom exit to be used. Sample programs and control block templates have
been provided for HLASM (High Level Assembler), COBOL, and PL/I but
these need to be tailored to your site needs.
If the FM Administrator has allowed user I/O exits, he or she may have
provided a default exit for you to use. If they have done so, the name is
displayed in the Default exit field.
You can override this system default with your own default exit, by changing
the name in this field. In each applicable panel or function, you can then
choose to accept or override the current default.
3. When you want to use a user I/O exit, regardless of whether you are using the
system default, your own default or specifying a unique exit at the individual

48 File Manager for z/OS V12R1 User's Guide


Setting your default processing options

panel or function level, the name of the exit must be the name of a PDS(E)
member of a data set that is included in the current STEPLIB/ISPLLIB
concatenation for File Manager.

RELATED TOPICS
Set System Processing Options panel (option 0.2) on page 659

Set tape processing options (option 0.3)


The tape processing options control such things as the type of labels to be created
and the type of data translation to be used when manipulating data on a tape.

See Set Tape Processing Options panel (option 0.3) on page 661 for panel details.

Set batch job card information (option 0.4)


On the Batch Job Card Information panel, you can specify batch job card
information to be used for generating batch job submission JCL. The Batch Job
Card Information panel provides a number of blank lines (Batch Submission Job
Statement Information) where you can enter this information.

File Manager assumes any non-blank lines define a JCL job card and copies the
information from these lines into generated JCL. If all the lines are blank, the JCL
generation process generates a basic job card using information from system
variables.

RELATED TOPICS
Setting processing options in batch on page 396
Set Batch Job Card Information panel (option 0.4) on page 645

Language and compiler specifications (option 0.5)


The language and compiler specifications allow you to specify the compiler that
File Manager uses to build templates, and also to set options for that compiler.

RELATED TOPICS
Setting your template processing options on page 142
Compiler Language Selection panel on page 465
Set COBOL Processing Options panel (option 0.5.2) on page 646
Set PL/I Processing Options panel (option 0.5.4) on page 652
Set HLASM Processing Options panel (option 0.5.3) on page 649
Set Language and Compiler Specifications (option 0.5) on page 650

Editor options (option 0.6)


The editor options control various options used to format the display or print of
data when viewing, editing, or printing.

In an editor session, use the PROFILE primary command to display the current
settings.

Note: If you are viewing, editing, or printing data, the Options pull-down menu
choice to change these options is not available. The options may only be
changed before starting your View, Edit, or Print session. To change the
behavior for the current View, Edit, or Print session, use an equivalent
primary command (where available).

RELATED TOPICS

Chapter 2. Getting started with File Manager 49


Setting your default processing options

Editor Options panel on page 541


Displaying your current editor options on page 63
PROFILE primary command on page 797

VSAM edit sharing options (option 0.7)


The VSAM edit sharing options control the behaviour when a file is being shared
by other users.

See VSAM Edit Sharing Options panel on page 712 for panel details.

Temporary Data Set Allocations (option 0.8)


The Temporary Data Set Allocations options control the allocation defaults for
temporary and auxiliary data sets.

See Set Temporary Data Set Allocation Options panel on page 663 for panel
details.

Output Data Set Allocations (option 0.9)


The Output Data Set Allocations options control the allocations defaults for output
data sets.

See Set Output Data Set Allocation Options panel on page 651 for panel details.

Trace options (option 0.10)


The trace options control the Trace output produced by File Manager when it is
run in debug mode.

See Set Trace options panel on page 665 for panel details.

Displaying or editing DBCS characters


If you want to display or edit DBCS characters in File Manager and you have a
DBCS capable terminal, you must ensure that your ISPF settings specify a terminal
type that supports these characters.

To specify the Terminal Type in ISPF:


1. Exit from File Manager and return to the z/OS Primary Option Menu panel.
Although you can change the ISPF Terminal Type setting while File Manager is
running, the change is not reflected until the next time that File Manager is
invoked.
2. Select option 0. Settings. The ISPF Settings panel is displayed.

50 File Manager for z/OS V12R1 User's Guide


Setting your default processing options

Log/List Function keys Colors Environ Workstation Identifier Help



ISPF Settings
More: -
_ Session Manager mode Command delimiter . ;
/ Jump from leader dots
_ Edit PRINTDS Command
/ Always show split line
_ Enable EURO sign

Terminal Characteristics
Screen format 1 1. Data 2. Std 3. Max 4. Part

Terminal Type 3 1. 3277 2. 3277A 3. 3278 4. 3278A


5. 3290A 6. 3278T 7. 3278CF 8. 3277KN
9. 3278KN 10. 3278AR 11. 3278CY 12. 3278HN
13. 3278HO 14. 3278IS 15. 3278L2 16. BE163
17. BE190 18. 3278TH 19. 3278CU 20. DEU78
21. DEU78A 22. DEU90A 23. SW116 24. SW131
25. SW500

Command ===> _________________________________________________________________


F1=Help F2=Split F3=Exit F7=Backward F8=Forward F9=Swap
F10=Actions F12=Cancel

Figure 19. ISPF Settings panel

3. Select either 3277KN or 3278KN from the list of Terminal Types.

Tip: You may need to scroll down this panel to find the list of Terminal Types.
4. Press Exit (F3) to save your selection and return to the z/OS Primary Option
Menu panel.
5. Restart File Manager.

National characters
File Manager uses the national characters shown in Table 2.
Table 2. National characters
Character Hexadecimal value Displayed as, in code pages 37 and 500
Dollar sign X'5B' $
Pound sign X'7B' #
At sign X'7C' @

Notes:
1. The dollar sign ($) and the pound sign (#) have special syntactical meaning in File
Manager syntax.
2. In countries using code pages other than 37 and 500:
v The above characters as represented on terminal keyboards might generate a different
hexadecimal representation, and this might cause an error or unwanted results. For
example, in some countries the $ character might generate a X'4A'.
v The above hexadecimal values might display as different characters to those shown.

When you enter File Manager commands in batch or online, use the keyboard
characters that correspond to the hexadecimal values shown in Table 2.

Chapter 2. Getting started with File Manager 51


SAF-rule controlled auditing

SAF-rule controlled auditing


The way in which auditing is performed during a File Manager session may be
determined by SAF rules, depending on the auditing requirements of your
installation.

SAF rules for auditing


When auditing is determined by SAF rules:
v Auditing can be specified to either your audit log data set, to SMF, or to both
destinations.
v All File Manager functions which access data sets and MQ data may be subject
to audit.
v It determines if the Create audit trail option is displayed on the Edit Entry
panel and the WebSphere MQ Queue Editor Entry panel.

For the File Manager functions which SAF-rule controlled auditing may be applied
to, the SAF rules can be specified at a resource or function level allowing auditing
at the FUNCTION, UPDATE, or ALL level. Auditing at the ALL level indicates that
record reads and updates are recorded, UPDATE indicates only inserted, deleted,
or changed records are recorded, while FUNCTION records only the event.

SAF-rule controlled auditing not in effect


When SAF-rule controlled auditing is not in effect (that is, auditing is controlled by
the settings in the FMN0POPT macro), the Create audit trail option is displayed
on the Edit Entry panel and the WebSphere MQ Queue Editor Entry panel. If the
Create audit trail option is selected, or the AUDITLOG option DEMAND or YES
has been specified in the FMN0POPT macro, auditing of inserted, deleted, or
changed records are logged.

SAF-rule controlled auditing in effect, auditing possible


When SAF-rule controlled auditing is in effect, and auditing is to occur, the actual
decision on whether or not to create an audit log depends on the SAF rules in
place.

If you have control-level audit access, the Create audit trail option is displayed on
the Edit Entry Panel and the WebSphere MQ Queue Editor Entry panel. If you
select this option, and no other SAF rule is in place for this function and resource,
auditing of inserted, deleted, or changed records is logged. If there is an existing
SAF rule for this function and resource, the level of audit specified in the SAF rule
applies.

52 File Manager for z/OS V12R1 User's Guide


Chapter 3. Viewing and changing data sets
To view data stored in a supported data set, use the View Utility or the Edit
Utility:
View Utility
The View Utility (option 1) allows you to view and temporarily change the
data, but without the ability to save any changes to the data set being
viewed. Changes may be saved to a different data set.
When you initiate the File Manager editor with the View Utility, this is
referred to as being in a "View editor session" (or just "View").
The view function, similar to ISPF view, provides an editor session that
works essentially the same as the Edit Utility, but without the need for
exclusive access to the data set. It presents you with an interface that is
capable of holding your temporary changes to data. This may be useful,
for example, for assessing a change but without any risk of altering live
data.

Note: If you have changed the data in a View editor session, even though
you are not able to save the changes back to the same data set you
are viewing, you can save the changed data to another data set
(either existing or new, however MQ queues are not supported by
these commands) by issuing one of these primary commands:
APPEND
Appends specified records in the current editor session to
another (existing) data set.
CREATE
Creates another (new) member or data set from specified
records in the current editor session.
REPLACE
Replaces another (existing) member or data set with
specified records in the current editor session.
SAVEAS
Saves the currently exposed data in the current editor
session to another (new) member or data set, and switches
to an edit of the nominated member or data set.

RELATED TOPICS
Creating, replacing, and adding data using existing data on
page 240
The first time you make a change to the data in a View editor session, File
Manager displays a warning as shown in Figure 20 on page 54.

Copyright IBM Corp. 2000, 2012 53


Process Options Help

View FMNUSER.TEST.DATA(EMP) Top of 40
Record AT TOP Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+> <---+> <---+--> <---+----1>
****** **** Top of data ****
000001 01 Grant Sutherland 7712 56 75111 6
000002 01 Andrew Estle 6612 21 75000 30
000003 01 Graham Purdie 5512 24 68000 7
000004 01 Bill Soper 4523 28 68000 5
000005 01 Tyrone Dalais 3170 21 60000 14
000006 01 Rod Turner 5006 35 100000 28
000007 01 Clive Nealon 2257 47 100000 44

Save is not possible in a View session. Use Edit if you want to be able to
save changes.

Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 20. Warning pop-up displayed after first change in View editor session

When you exit from a View editor session by pressing the Exit function
key (F3), if you have made a change to the data in the editor session, File
Manager displays a warning as shown in Figure 21.

Process Options Help


View Warning
V Top of 40
You are currently in Data View mode: Format TABL
MONTH(1)
Press Enter to confirm exit from View. No changes will be #7
saved. BI 31:4
<---+----1>
* Enter the END or EXIT command to return to View, where you
0 can use the CREATE or REPLACE commands to save your 6
0 changes. 30
0 Command ===> 7
0 F1=Help F2=Split F3=Exit F7=Backward 5
0 F8=Forward F9=Swap F12=Cancel 14
0 28
000007 01 Clive Nealon 2257 47 100000 44
000008 01 Jim Alexander 1332 63 125000 47
000009 01 Silvano Prez 2895 50 60000 1
000010 01 Don Pharoah 4890 55 63000 38
000011 01 John Levrington 3344 40 67000 14
000012 01 Liz Rushton 3789 40 66000 44
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 21. Warning pop-up displayed when exiting from a View editor session if changes
made to data

Edit Utility
The Edit Utility (option 2) allows you to view and change your data (by
inserting, deleting and otherwise modifying records), and save any changes
you make.

54 File Manager for z/OS V12R1 User's Guide


When you initiate the File Manager editor with the Edit Utility, this is
referred to as being in an "Edit editor session" (or just "Edit").

These instructions are given within the context of the File Manager editor. In most
cases, you can perform these actions in either Edit or View, in which case the term
"editor" is used. Similarly, the term "editor session" can indicate either a View
editor session or an Edit editor session.

Many of the tasks described in this chapter require the use of templates. For
information on how to define and edit templates, see Chapter 4, Creating and
editing templates, on page 129.

The major tasks described in this chapter are:


v Starting and ending editor sessions
v Manipulating your view of the data on page 68
v Starting and ending editor sessions
v Editing techniques on page 100
v Changing data on page 104
v Limiting the effect of editing changes on page 111
v Editing records within data sets on page 118

Starting and ending editor sessions


The File Manager editor allows you to edit your data as logical records, in an
unformatted or formatted state. Records that are structured into fields are
particularly suitable for editing in a formatted state using a template. Data that is
relatively unstructured, such as a text file, copybook definition or REXX procedure,
can be edited in its unformatted state.

If your data has been written using the ISPF PACK option, you can choose to
unPACK the data for easy editing or edit the data in its PACKed format. You can
also choose to write previously unPACKed data to the ISPF PACK format. Packing
only applies to physical sequential data sets or to members of a PDS(E).

The tasks described in this section are:


Starting an editor session without using templates
Ending an editor session on page 64
Viewing and changing packed data on page 60

Starting an editor session without using templates


To display your data in an unformatted state:
1. From the File Manager Primary Options Menu panel, select one of these:
1 View
Displays the View Entry panel.

Note: This option does not allow you to save any changes you make to
the data.
2 Edit Displays the Edit Entry panel.
2. Specify your HFS file or data set name or name pattern, member name or
pattern and/or volume serial.
3. If required, specify a Starting position for the data, then select a Start position
type from the Processing Options.

Chapter 3. Viewing and changing data sets 55


Starting and ending editor sessions

When your data set is a KSDS file, you can specify a key of up to 250
characters, as the starting position. To make it easier to enter a key of this size,
you can expand the field by pressing the EXPAND function key (F4) or you can
scroll within the field by pressing the LEFT or RIGHT function keys (F10/F11).
When using a record number as the start position, you can specify a negative
number to start from the given number of records before the end of the data
set. The initial display is positioned at the specified record. Records prior to
your starting position are not visible.

Note: See also the use of the KEY primary command in step 9.
4. If required, specify a record limit. The count of displayed records commences
from the Starting position (which defaults to the top of the data set).
You can specify a record limit as the word MEMORY so that File Manager
loads only as many records as will fit comfortably into storage.
5. If required, select the Record Sampling field. Selecting this field will cause the
Record Sampling panel to display after the Entry panel has been processed.
You can use record sampling to specify a pattern for reading records from the
data set. In your pattern, you can specify a starting position, read a number of
records, skip a number of records, and then repeat the pattern until an end
point is reached. The end point might be a specified number of physical
records, a specified number of records selected by a template, the end of the
input file, or the maximum number of records that can safely fit within the
available virtual storage (whichever is reached first).
When record sampling is in effect:
v The values (if any) in the Start position and Record limit fields are carried
through into the Record Sampling panel.
v The skipped records are not presented or accessible within the session.
v The session will run in In-place mode and will only contain as many records
as will fit into the available virtual storage.
6. In Edit, if you only want to update records in the data set (without inserting or
deleting records), then select the Inplace edit option.
Note that you cannot insert or delete records when:
v Record Sampling is selected,
v A Record limit of MEMORY is specified,
v The data set is a VSAM file defined as NOREUSE, or
v A template is specified which indicates segmented records
v The data set is a QSAM LRECL=X that is too large to be contained in
memory
7. Type 3 (None) in the Copybook/template usage field.

Note: When this field is set to None, entries in the Copybook or Template
Data set name and Member fields are ignored.
8. In Edit, if required, select the Create audit trail option.

Note: To print an audit report, use Print audit trail report (see Edit Entry
panel on page 536).
9. Press Enter to process the panel.
If you have provided the complete name of your data set and data set member,
the Edit (or View) panel displays your data.
If you used a pattern to specify your data set or member, the Data Set Selection
or Member Selection panel is displayed. Select the required data set or

56 File Manager for z/OS V12R1 User's Guide


Starting and ending editor sessions

members from the list by typing an S in the Prefix field, then pressing Enter.
The Edit (or View) panel displays your data.
If your data set is a KSDS file, you can specify a position to jump to by issuing
the KEY primary command.

RELATED TOPICS
Specifying a data set and a member name on page 20
Scrollable input and display fields for long names on page 83
View Entry panel on page 705
View panel on page 699
Record Sampling panel on page 624
KEY primary command on page 779

Example of displaying data without a template


Follow the steps in this example, to display a data set member that contains a
copybook definition (suitable for viewing without a template).
1. From the File Manager Primary Option Menu panel, select 1 View.
2. In the Data set name field, type FMN.V11R1M0.SFMNSAM1.
3. In the Member field, type FMNCCPY.
4. Type 3 (None) in the Copybook/template usage field.
5. Press Enter to process the panel. Your results should look similar to below:

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCCPY) Top of 34
Col 1 Insert Length 80 Record AT TOP Format CHAR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 *** +++++++++++++++++++++++++++++++++++++++++++++++++++
000002 * IBM File Manager for z/OS Version 11
000003 * Licensed Materials - Property of IBM
000004 *
000005 * 5655-W47
000006 *
000007 * (c) Copyright IBM Corp. 1986, 2010. All Rights Reserved.
000008 *
000009 * US Government Users Restricted Rights - Use,
000010 * duplication or disclosure restricted by GSA ADP
000011 * Schedule Contract with IBM Corp.
000012 *
000013 * Sample COBOL copybook to demonstrate the File Manager
000014 * field level processing.
000015 * The associated template is FMNCTMPL and the sample
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 22. Viewing without a template

6. Press F8 to scroll down and view the copybook contents.


7. Press F3 to exit and return to the Edit (or View) Entry panel.

Starting an editor session with a template


To display your data with a template:

Chapter 3. Viewing and changing data sets 57


Starting and ending editor sessions

Note: This process assumes that you have an existing template that you can use to
format your data. For details on creating new templates or editing an
existing template before use, see Chapter 4, Creating and editing
templates, on page 129.
1. Follow steps 1 to 6 in Starting an editor session without using templates on
page 55.
2. If required, select the Include only selected records option. This option is only
effective when using a template and you are using either:
v Record sampling, or
v A record limit of MEMORY

Note: If you have selected the Include only selected records option, the editor
session operates in an in-storage way.
3. In the Copybook or Template section of the panel, specify the data set in
which your copybook template or dynamic template is stored, or use a
wildcard character to select from a list.

Note: The Use I/O exit option only affects the data set that you are choosing to
view. It cannot be used to process the template or copybook that you are
using to format the data.
4. In the same section, specify the Member name or leave the Member name field
blank to choose from the list of Members in a partitioned data set.
5. In the Copybook/template usage field, type 1 to select the Above option.
Alternatively, if you have previously used a template with the input data set,
you can select option 2. Previous. The Previous option instructs File Manager
to ignore the contents of the Copybook or Template fields, and instead use the
template that you have most recently associated with the input data set.
If you want to edit the template before using it, select the Edit template field.
6. Press Enter to process the panel.
If you have provided the complete name of your input data set and data set
member and your template data set and data set member, the Edit (or View)
panel displays your data.
If you used a pattern to specify your data sets or members, the Data Set
Selection or Member Selection panels are displayed in the following order:
v Data Set Selection panel
v Template Data Set Selection panel
v Template Member Selection panel
v Member Selection panel
Select the required data sets or members from the lists by typing an S in the
Prefix field, then pressing Enter. The Edit (or View) panel displays your data.

RELATED TOPICS
Chapter 4, Creating and editing templates, on page 129
View Entry panel on page 705
View panel on page 699
Specifying a data set and a member name on page 20

Example of displaying data with a template


The first task in this tutorial is to view data that has been structured into fields,
without using a template. This demonstrates some of the display issues that can
occur when unformatted data is viewed. In the next task, you view the same data,
with a template.

58 File Manager for z/OS V12R1 User's Guide


Starting and ending editor sessions

1. From the File Manager Primary Option menu, select option 1. View.
2. In the Data set name field for the input data set, type
FMN.V11R1M0.SFMNSAM1.
3. In the Member field for the input data set, type FMNCDATA.
4. In the Copybook/template usage field, select option 3. None.
5. Press Enter.
Figure 23 shows what this data looks like without a template.

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Top of 40
Col 1 Insert Length 80 Record AT TOP Format CHAR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 01Grant Smith ..................................................
000002 01Andrew Apple .5....&...........................................
000003 01Graham Prestcott ..................................................
000004 01Bill Somers ..................................................
000005 01Ted Dexter .....-............................................
000006 01Roddy Armstrong ..................................................
000007 01Cliff Roberts .R................................................
000008 01James Browne .)................................................
000009 01Silvia Carrot ...../ ...........................................
000010 01Dan Peters ."................................................
000011 01John Laws .;................................................
000012 01Liz Childs .?................................................
000013 01Bill McCork .N................................................
000014 01Keith Sampson ..................................................
000015 01John Neptune ..................................................
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 23. Viewing structured data without a template

The first twenty records in this member contain non-displayable characters


represented by periods and other characters. Without a template, these records
cannot be easily viewed or edited.
6. When you have finished examining the data, press the Exit function key (F3)
to return to the Edit (or View) Entry panel.
Now let's view the same data using a template generated from the COBOL
copybook supplied in FMN.SFMNSAM1(FMNCCPY).
7. In the Data set name field for the Copybook or Template, type
FMN.V11R1M0.SFMNSAM1.
8. In the Member field for the Copybook or Template, type FMNCCPY.
9. In the Copybook/template usage field, select option 1. Above.
10. Press Enter.
For this example, we want to display the data in tabular format. If the Format
field (at the top right of the panel) does not contain TABL, then overtype the
first letter of its current value with T and then press Enter.
The sample data is now shown in TABL display format, arranged in columns.

Chapter 3. Viewing and changing data sets 59


Starting and ending editor sessions

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Top of 40
Record AT TOP Format TABL
REC-TYPE REC-ID NAME EMPLOYEE-NO AGE SALARY
#2 #3 R # #4 #5 #6 #7
AN 1:2 AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4
<> <> <---+----1----+----> <---+> <---+> <---+-->
****** **** Top of data ****
000001 01 01 Grant Smith 7712 35 75000
000002 01 01 Andrew Apple 6645 53 78500
000003 01 01 Graham Prestcott 5583 28 48000
000004 01 01 Bill Somers 4418 33 68000
000005 01 01 Ted Dexter 3327 52 60250
000006 01 01 Roddy Armstrong 5683 34 77000
000007 01 01 Cliff Roberts 2265 57 100000
000008 01 01 James Browne 1117 46 125000
000009 01 01 Silvia Carrot 2308 29 61400
000010 01 01 Dan Peters 4479 54 63000
000011 01 01 John Laws 3422 21 46750
000012 01 01 Liz Childs 3439 55 66000
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 24. Viewing data using a template (TABL display format)

File Manager has used the first record type defined in the copybook to display
the data and the first set of records (REC-TYPE = 01) are now readable. Any
fields defined in the second record type (REC-TYPE = 02) that match fields
defined in the first type are also displayed.

Removing or changing the template


To stop using a template, and remove the logical view of the data, enter TVIEW OFF
on the Command line.

To edit a template, and change the logical view of the data, enter TEDIT on the
Command line.

To select or create a template for the data, enter TVIEW on the Command line.

Note: There are restrictions on removing or changing templates. When using


record sampling, or when a segmented template has been used, File
Manager cannot perform the changes in reformatting required. In these
cases, it is necessary to exit and re-enter the editor session to perform such a
change.

RELATED TOPICS
Chapter 4, Creating and editing templates, on page 129
TEDIT primary command on page 823
TVIEW primary command on page 825

Viewing and changing packed data


When you want to view PDS or PDSE data set members that have been stored in
ISPF PACK format, you can tell File Manager to unpack the data before displaying
it. Once your data has been unpacked for display, you can view it as normal data.
The records are automatically packed again when you save the data set.

60 File Manager for z/OS V12R1 User's Guide


Starting and ending editor sessions

Working with packed data in Edit


In Edit, you can convert packed data to an unpacked format and non-packed data
to packed format, by issuing the PACK ON or PACK OFF command before you
save your data.

To convert data to ISPF PACK format:


1. Open a data set member that is not in ISPF PACK format.
2. Perform any editing changes you want to make.
3. Enter the PACK ON command on the Command line.
4. Enter the SAVE, FILE or EXIT command.

Note: You do not need to have the Recognize and interpret ISPF packed data
option selected in order to convert data to packed format. However, you
need to have the option on, to be able to edit this data after it has been
packed.

To unpack data that has been stored in ISPF PACK format:


1. Ensure that the Recognize and interpret ISPF packed data option has been
selected in the relevant Editor Options panel.
2. Open the packed data set member.
3. Enter the PACK OFF command on the Command line.
4. Enter the SAVE, FILE or EXIT command.

Note: You cannot unpack data unless File Manager is able to recognize and
interpret the packed data format.

You can also pack or unpack data set members as you copy a member to another
data set or data set member.

Working with packed data in View


In View, if your PDS or PDSE data sets have been written using the ISPF PACK
option, you can choose to unpack the data before viewing it, or work with the data
in its packed format. This can be particularly useful when your data appears to be
in ISPF PACK format, but is in fact not so.

To unpack files automatically on viewing:


1. Do one of the following:
a. On the Primary Option Menu panel, select option 0 Settings.
b. On the Set Processing Options panel, select option 6 EDIT.
OR
a. On the View Entry panel, select Options from the Action Bar.
b. Select option 9 from the pull down menu.
2. Select the Recognize and interpret ISPF packed data option.
When this option is selected, File Manager checks the data in the data set or
member being viewed to determine if it has been written with the ISPF PACK
option. If it had, File Manager then unpacks the data to allow it to be viewed
in the normal fashion. If the unpacked data set is too large to be contained in
memory, File Manager issues a message and then opens the data set in its
packed format. If this option is deselected, File Manager does not check the
data format and operates on packed data in its packed state.

Chapter 3. Viewing and changing data sets 61


Starting and ending editor sessions

Note: If you select the Use I/O exit option on the View Entry panel, the Recognize
and interpret ISPF packed data option is ignored. Packed data sets are
displayed in packed format.

RELATED TOPICS
PACK primary command on page 793
Viewing and changing packed data on page 60
Editor Options panel on page 541
Copying data sets on page 247

Listing statistics for the current editor session


To list statistics for the current editor session, use the RECSTATS primary
command.

The RECSTATS primary command shows (in a pop-up panel):


v The number of physical records read while loading
v The number of physical records selected
v The number of record elements in the current editor session
v For an Edit session, the number of pending inserts and changes
v The total data bytes
v The average record element length
v The minimum record element length encountered
v The maximum record element length encountered

When a template has been used, the RECSTATS primary command also shows:
v The number of layouts
v The number of record elements selected
v The number of record elements not selected
v The number of record elements not selected due to the record data not meeting
selection criteria
v The number of record elements not selected due to the record length being
outside any layout length
v A list of layout names and the number of record elements belonging to each
layout

Note: Information on record elements not selected is not available if the Include
only selected records option is selected and this is an in-storage or sampling
editor session.

Similarly, for an editor session using a segmented template with selection


criteria, information for records and their segments that were not selected is
not available.

Figure 25 on page 63 shows an example of statistics listed by the RECSTATS


command for a editor session when a template has been used.

62 File Manager for z/OS V12R1 User's Guide


Starting and ending editor sessions

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 0 of 40
Record 0 Col 1 Format CHAR
File Manager Messages


File Manager View (in-storage)
Dataset: FMN.HOGN.KSDS.TEST
Template: FMN.RFM0569.PDSE(HOGAN)
Physical records read while loading: 100
Physical records selected : 2

Number of record elements : 50
inserts pending : 0
changes pending : 0
deletes pending : 0
Total data bytes : 4014
Average record element length: 80
Minimum record element length: 12
Maximum record element length: 298

Template related information
Number of layouts : 28
Record elements selected : 50
Record elements not selected : 0
due to record element data not meeting selection criteria: 0
due to record element length outside any layout length : 0
List of layout names and count of record elements per layout
M-KEY-GROUP 2
M-ACCOUNT-CODING-STRUCTURE 2
M-ORIGINAL-ACT-INFO 2
M-CLOSED-ACT-INFO 0
Command ===> Scroll PAGE
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward
F8=Forward F9=Swap F10=Actions F12=Cancel

Figure 25. Example of statistics listed with the RECSTATS command

RELATED TOPICS
RECSTATS primary command on page 801

Displaying your current editor options


To display your current editor options while in an editor session (from the Edit
panel or View panel), enter the PROFILE primary command.

Figure 26 on page 64 shows an example of editor options displayed during an


editor session.

Chapter 3. Viewing and changing data sets 63


Starting and ending editor sessions

Process Options Help



View FMNUSER.DATA(DATA1) Rec 0 of 40
Record 0 Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+> <---+> <---+--> <---+----1>
**** Top of data ****
....BOUNDS 1-*...CAPS OFF...CASE OFF...PACK OFF...PREFIX OFF...................
....SHADOW LINES....EXCLUDED ON..NOTSEL ON..SUPPRESSED ON......................
....SHOW(UNGROUP)....NOTSEL OFF...SUPPRESSED OFF...............................
....TEMPLATE FMNUSER.DATA......................................................
....JUST OFF...OFFSET 0...PIC OFF...RDF ON...REFS ON...........................
....SLOC OFF...STR OFF...TYPE ON...............................................
01 Grant Smith 7712 35 70000 6
01 Andrew Apple 6645 53 78500 30
01 Graham Prestcott 5583 28 48000 7
01 Bill Somers 4418 33 68000 5
01 Ted Dexter 3327 52 60250 14
01 Roddy Armstrong 5683 34 77000 28
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 26. Editor options displayed during an editor session

RELATED TOPICS
PROFILE primary command on page 797

Ending an editor session


In View, to end your editor session, press the Exit function key (F3).

Note: If you have selected more than one data set member to be viewed, the next
selected member on the list is now displayed.

In Edit, to end your editor session without saving your changes (that is, since the
previous SAVE command), enter CANCEL (or CAN) on the Command line, or press
the Cancel function key (F12). If you have made any changes to the data, File
Manager displays a message box asking you to confirm that you want to discard
the changes.

To end your Edit session and save any changes you have made, enter END on the
Command line, or press the Exit function key (F3).

RELATED TOPICS
END primary command on page 756
FILE primary command on page 763
CANCEL primary command on page 736

Saving changes without ending the Edit session


To save changes you have made to the current data set or member, without ending
the Edit session, use the SAVE command.

File Manager keeps only changed records in memory, unless using a MEMORY
record limit, or using record sampling, or using a segmented template with
selection criteria. If you run out of memory, the SAVE command may free some
memory, which would let you continue the Edit session.

64 File Manager for z/OS V12R1 User's Guide


Starting and ending editor sessions

Note: This command is not supported when editing a large file using an auxiliary
data set. In this case, you must end the Edit session to save the changes and
then re-edit the data set if you want to make further changes.

RELATED TOPICS
SAVE primary command on page 811

Displaying the RBA and record length information


When you are viewing a VSAM file in a Browse editor session, you can select to
display the RBA and record length information.

The display of this information is initially controlled by the Display RBA and
Length when browsing VSAM option in the relevant Editor Options panel.
However, in a Browse session you can use the RBALEN primary command to
change whether this information is displayed or not for that editor session.

In a Browse session, to display the RBA and record length when viewing a VSAM
file, do one of these:
v Ensure that the Display RBA and Length when browsing VSAM option in the
relevant Editor Options panel is selected, or
v Issue the command RBALEN ON

Figure 27 shows part of a VSAM file displayed in a Browse session with the RBA
and record length displayed on the leftmost side.

Process Options Help



Browse FMN.RFM0201.KSDS.REUSE.SHR1 Rec 0
Type KSDS Key RBA Format CHAR
Col 1
RBA Len -<==+===>=----+----2----+----3----+----4----+----5----+----6
**** Top of data ****
0 80 00000001AAA*** updateok & reversed ***AAAAAAAAAAAAAAAAAAAAAA
80 80 00000002AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
160 80 00000003AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
240 80 00000004AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
320 80 00000005AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
400 80 00000006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
480 80 00000007AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
560 80 00000008AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
640 80 00000009AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
720 80 00000010AAA*** updateok & reversed ***AAAAAAAAAAAAAAAAAAAAAA
800 80 00000011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
880 80 00000012AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
960 80 00000013AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1040 80 00000014AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=Expand F5=RFind F7=Up F8=Down
F9=Swap F10=Left F11=Right F12=Cancel

Figure 27. VSAM file displayed in Browse session with RBA and record length details
displayed

To display the VSAM file without the RBA and record length details, perform
either of these actions:
v Ensure that the Display RBA and Length when browsing VSAM option in the
relevant Editor Options panel is not selected,

Chapter 3. Viewing and changing data sets 65


Starting and ending editor sessions

v Issue the command RBALEN OFF

Figure 28 shows the same VSAM file displayed in a Browse session with the RBA
and record length not shown.

Process Options Help



Browse FMN.RFM0201.KSDS.REUSE.SHR1 At top
Type KSDS Key RBA Format CHAR
Col 1
-<==+===>=----+----2----+----3----+----4----+----5----+----6----+----7----+-
**** Top of data ****
00000001AAA*** updateok & reversed ***AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000002AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000003AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000004AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000005AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000007AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000008AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000009AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000010AAA*** updateok & reversed ***AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000012AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000013AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00000014AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=Expand F5=RFind F7=Up F8=Down
F9=Swap F10=Left F11=Right F12=Cancel

Figure 28. VSAM file displayed in editor session with RBA and record length details not
displayed

RELATED TOPICS
RBALEN primary command on page 797
Editor Options panel on page 541

Managing the prefix area


The prefix area displays line numbers that represent the record number of each
line in the data set being edited.

The prefix area also doubles as the prefix command entry area. You enter prefix
commands by overtyping the line number for the appropriate record.

You can use prefix commands to:


v Insert or delete lines
v Repeat (duplicate) lines
v Move lines
v Shift data
v Limit the data being edited

The prefix area also serves to:


v Highlight unidentified segments when you are working with segmented records
with related ID criteria.
v Identify records not selected because of invalid length when you are working
with variable-length arrays.
v Indicate why a record is not selected in an editor session.

66 File Manager for z/OS V12R1 User's Guide


Managing the prefix area

RELATED TOPICS
How File Manager handles segmented data with related ID criteria on page
178
Support for variable-length arrays on page 137
Seeing why a record is not-selected on page 221

In an editor session, to see which prefix commands are valid for the current
environment, enter an "?" in the prefix area (against any listed line). File Manager
displays a list of the line commands you can enter, like those shown in Figure 29.

Process Options Utilities Help


File Manager Available Edit Prefix Commands
More: +

You can enter the following commands in the prefix area of the data display:

A identifies the record after which data is to be moved or copied.

B identifies the record before which data is to be moved or copied.

BND place a bounds record here to show current editor bounds.

C copy one record.


Cn copy n records.
CC copy block of records. Mark start and end of block.

COLS Use COLS to display the columns line. For example:

000300
cols ----+----10---+----2----+----3----+----4----+----5--- etc.
000500

Command ===>
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 29. Using the ? prefix command to display a list of valid prefix commands

In an editor session, you can choose whether a prefix area is displayed next to the
data or not.

To specify the default position and display state of the prefix area for all editor
sessions, set these editor options on the relevant Editor Options panel:
v Display prefix area
v Display prefix area on the right
v Prefix area width (A,6,7,8,9)

To specify the default position and display state of the prefix area for the current
editor session, use the PREFIX primary command. For example:
v To display the prefix area on the right, enter PREFIX RIGHT.
v To display the prefix area as an 8-digit field, enter PREFIX 8.
v To display the prefix area with a width that automatically adjusts (from 6 to 9
digits wide) in order to display the record number, enter PREFIX A.
v To remove the display of the prefix area, enter PREFIX OFF.

You can use most prefix commands on either a single line or a block of consecutive
lines:
v To perform an operation on a single line, you enter the appropriate prefix
command.

Chapter 3. Viewing and changing data sets 67


Managing the prefix area

v To perform an operation on a block of consecutive lines, either enter the prefix


command preceded or followed by the number of lines, or enter the appropriate
block prefix command at the start and end lines of the block.

Generally, you need to type over only the first 1 or 2 characters of the line number
to enter a prefix command. Sometimes, however, typing a single character can be
ambiguous. In the following example, it is unclear whether the intended prefix
command is R to repeat line 31700, or R3 to repeat the line three times:
031600
R31700
031800

In such cases, the editor assumes that you have not typed a number following the
prefix command. If you want to repeat the line three times, you can use any of the
following methods:
v Type one or more blanks following the R3:
R3 700
v Type R3 and press the Erase EOF key to clear the rest of the Line Command
field, or press the Erase EOF key and then type R3.
v Type one or more blanks after the R but before the number such that the
number when entered is different than the characters being overtyped.:
R 3700
v Type the number before the R, ensuring that the number when entered is
different than the characters being overtyped:
3R1700

To clear any outstanding commands in the prefix area, use the RESET PREFIX
command. See RESET primary command on page 804.

Prefix commands do not affect not-selected or suppressed records that are hidden
from display or represented by shadow lines. For example, if you use the MM
prefix command to mark a block of records for moving, then not-selected or
suppressed records that are hidden from display or represented by shadow lines
are not affected by the move, and are left behind at their original position. Prefix
commands do affect excluded records, even when they are hidden from display
(by SHOW EX OFF and SHADOW EX OFF).

RELATED TOPICS
PREFIX primary command on page 795

Manipulating your view of the data


Once your data has been displayed in the editor panel, you can manipulate your
view of the data to focus on the records of interest to you.

The tasks described in this section are:


v Selecting a display format on page 69;
v Zooming in to see all of a record on page 75
v Scrolling to see data on page 80;
v Sorting the data on page 85; and
v Finding specific data on page 87.

68 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Using primary commands in an editor session


When you are viewing or editing data, you can enter primary commands on the
Command line of the editor panel to perform the following functions:

To do this... Use... See page


Scroll the data BOTTOM 735
DOWN 754
LEFT 779
NEXT 789
PREVIOUS 795
RIGHT 808
TOP 824
UP 826
Scroll to a particular record number or text LOCATE 782
Find a string FIND 764
RFIND 807
Change a string CHANGE 741
RCHANGE 798
Switch between display formats FC 775
FH 775
FL 775
FS 775
FT 775
Turn off highlighting of found strings RESET 804
Find fields in error FE 761
Change data in error CE 738
Print a record RD 798
RP 809
Obtain record and selection statistics RECSTATS 801
Hide or show shadow lines SHADOW 814
Group or ungroup record sets SHOW 815
Zoom in to see all of one record ZOOM 830
View suppressed records VIEW 829
Display data in hexadecimal format HEX 776
Show or hide the Field Reference and Redefines columns REFS 803
when in SNGL display
Show or hide the Field Type and Length columns when in TYPE 826
SNGL display
Remove or change the logical view TEDIT 823
TVIEW 825
Adjust the order of lines SORT 817
Display the RBA and record length information RBALEN 797

RELATED TOPICS
Chapter 15, Primary commands, on page 731

Selecting a display format


A display format is a way of arranging your data within the data area of the editor
panel, to suit your viewing or editing needs. Display formats can be applied to
data that has or has not been given a logical format via a template. Data that has
not been formatted with a template can be shown in CHAR, HEX or LHEX display
format. Data that has been formatted with a template, can be shown in these
formats, as well as in SNGL or TABL display format.

Chapter 3. Viewing and changing data sets 69


Manipulating your view of the data

Setting the initial display format


To specify how the editor panel appears at the start of an editor session, set the
Initial Display option on the relevant Editor Options panel to the required display
format.

Changing the display format


To change the display format:
1. Position your cursor in the Format field (upper right corner).
2. Overtype the current setting with the first letter of the required format and
press Enter. The panel redisplays in the selected format.
OR
3. Enter the FC (FORMAT CHAR), FH (FORMAT HEX), FL (FORMAT LHEX), FS
(FORMAT SNGL) or FT (FORMAT TABL) primary commands.

Note: The abbreviated form of these commands can also be entered in any prefix
command field.

Display formats
To determine which display format is best for your needs, review the display
format descriptions below.
CHAR
Character display format. This format is suitable for viewing or editing
unstructured text that is composed of characters that can be entered via the
keyboard.

Record 0 Col 1 Format CHAR


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
**** Top of data ****
01 REC-TYPE01. 0008000
03 REC-TYPE PIC XX. 0009000
03 NAME PIC X(20). 0010000

HEX Hexadecimal updown format, followed by a scale. This format uses


separate lines; one for the characters, one for the zone digit and one for the
numeric digit of each byte. Hexadecimal updown format is suitable for
editing data that is composed of characters or values that cannot be
entered via a keyboard or cannot be displayed. For example, you may
want to use the HEX display format when editing DBCS characters or
packed decimal numbers.

Record 0 Col 1 Format HEX

**** Top of data ****


01 REC-TYPE01. 0008000
4444444FF4DCC6EEDCFF4444444444444444444444444444444444444444444444444444FFFFFFF
00000000109530387501B0000000000000000000000000000000000000000000000000000008000
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----

03 REC-TYPE PIC XX. 0009000


4444444444FF4DCC6EEDC44444444444444DCC4EE4444444444444444444444444444444FFFFFFF
00000000000309530387500000000000000793077B0000000000000000000000000000000009000

LHEX Unformatted hexadecimal. This format has been superceded by the HEX
format. However, it has been retained within the product so that long-term
users of File Manager can continue working with Hexadecimal characters
in a familiar layout.

70 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Record 0 Col 1 Format LHEX


- - - - + - - - - 1 - - - - + - - - - 2 - - - - + - - - - 3 - - - - + - - - -
**** Top of data ****
40404040404040F0F140D9C5C360E3E8D7C5F0F14B404040404040404040404040404040404040
40404040404040404040F0F340D9C5C360E3E8D7C54040404040404040404040404040D7C9C340
40404040404040404040F0F340D5C1D4C5404040404040404040404040404040404040D7C9C340
40404040404040404040F0F340C5D4D7D3D6E8C5C560D5D64040404040404040404040D7C9C340

When in Zoom mode, the selected record displays as formatted


hexadecimal and characters (system dump format). For example:

Col 1 Format LHEX


Record Length Byte ---------------- Hex ----------------- ------ Char ------
1 80 0000 40404040 404040F0 F140D9C5 C360E3E8 * 01 REC-TY*
0010 D7C5F0F1 4B404040 40404040 40404040 *PE01. *
0020 40404040 40404040 40404040 40404040 * *
0030 40404040 40404040 40404040 40404040 * *
0040 40404040 40404040 F0F0F0F8 F0F0F0F0 * 00080000*

SNGL Single-record format (only available when using a template). Limits the
display to a single record. Each field might take up one or more lines,
depending upon the field information selected for display and the length
of the field name. SNGL display format is suitable for viewing information
that has been structured into fields and records, when you need to focus
on a single record.

View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 1 of 40


Format SNGL
Top Line is 1 of 11 in Record 17
Ref Field Picture Typ Start Len Data
1 1 REC-TYPE02
AN 1 80
2 2 REC-TYPE
XX AN 1 2 02
3 2 NAME X(20) AN 3 20 Bob McDonald
4 2 JOB-TITLE
X(14) AN 23 14 Programmer
5 2 ADDR1 X(20) AN 37 20 67 Hampshire Road
6 2 ADDR2 X(20) AN 57 20 Parkwood
7 2 POSTCODE
X(4) AN 77 4 4507
**** End of record ****

This example shows the Ref (Field Reference), Field, Picture, Typ (Type),
Start and Len (Length) columns, and the Field column contains structure
information (copybook element level). The display of many of these
columns is optional (the default is for them to be displayed).
To change the information displayed in SNGL mode, enter one of the
following commands:
JUST Left justifies the numeric fields
PIC Displays or hides the Picture column
RDF Displays or hides the Redefines information (within the Field
column) and the redefined fields. This command also affects the
display of the redefined fields in TABL display.
REFS Displays or hides the Field References column
SLOC Displays or hides the Start column
STR Displays or hides the structure information in the Field column
TYP Displays or hides the Type and Length columns
These are toggle commands that change the display from on to off or off to
on, depending on the current status of the panel. The commands only
affect the current editor session, they do not change the default settings.
To change the default settings for editor panel:

Chapter 3. Viewing and changing data sets 71


Manipulating your view of the data

1. Ensure that you are not currently in an editor session.


2. Choose Options> Editor options from the Primary Options menu.
3. Select or clear the following record formatting options for SNGL
display or print in the relevant Editor Options panel:
v Field reference number
v Field type and length values
v Picture clause
v Start location
v Structure
v Left justify numeric fields
v Redefined fields

Note: These options cannot be changed when you are in an editor session.
TABL Tabular format (only available when using a template). Arranges fields in
columns. This format is suitable for viewing information that has been
structured into fields and records and you need to review multiple records.
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+---->
01 Grant Smith 7712 35 75000 6
01
. Andrew Apple 6645 53 78500 30
.
.

In TABL display format, only one record type in the data set is displayed
at any time. The column headings at the top of the screen reflect the fields
in the current record type. There are three lines in the headings:
field_heading
#n [R #n]
type start_column:length
<- ... ->
where:
field_heading
Defaults to the field name defined in the copybook. You can
change this by editing the template. For details, see Chapter 4,
Creating and editing templates, on page 129.
#n [R #n]
The field reference. You use this to refer to the field in File
Manager. For example, to limit the FIND primary command to
searching only certain fields, you specify the field references for
those fields.
If the field redefines another field, then this is shown by the R
notation, followed by the field it redefines. For example, #5 [R #4]
shows that this is field 5, which redefines field 4.
type The field data type.
start_column
The field start column.
length The field length.
<- ... ->
Ruler, indicating the size of the field.

72 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Records of other types are suppressed from display: they are either hidden or
represented by shadow lines.

In CHAR, HEX and LHEX formats, and for alphanumeric fields in SNGL or TABL
formats, characters that cannot be displayed (non-displayable characters) are
represented as periods.
v You can display hexadecimal values under your formatted field data by entering
HEX ON on the Command line. For example, if you are viewing data in TABL
display format and your display looks something like this:
Order# # Items Date Time Seller Buyer (1) (1)
#6 #7 #9 #13 #18 #19 #31 #32
A00001 1 900227 010101 1144 20 25 9999
A00004 1 900310 100530 1144 10 15 0099

then issuing the command HEX ON causes the hexadecimal representation to be


displayed:
Order# # Items Date Time Seller Buyer (1) (1)
#6 #7 #9 #13 #18 #19 #31 #32
A00001 1 900227 010101 1144 20 25 9999
CFFFFF 00001 FFFFFF FFFFFF 0014 0000 0001 0020
100001 0000F 900227 010101 014F 002F 0009 007F

A00004 1 900310 100530 1144 10 15 0099


CFFFFF 00001 FFFFFF FFFFFF 0014 0000 0000 0006
100004 0000F 900310 100530 014F 001F 000F 0003
v If a numeric field contains data that cannot be correctly interpreted as a numeric
value (for example, a packed decimal field contains invalid packed values), then
the field is displayed as highlighted asterisks.
v If a numeric field contains a valid numeric value, but the value is too large to fit
in the width allocated to the field on the screen (as defined in the picture
specification of the original copybook), then the value is truncated. The field is
highlighted to indicate that truncation has occurred.
To show the entire field without truncation, you need to edit the template, and
specify an output width for the field.
v If a field is a array element, then its field heading is followed by a subscript in
parentheses; for example, ELEMENT(1).

RELATED TOPICS
FORMAT primary command on page 775
HEX primary command on page 776
Zooming in to see all of a record on page 75
REFS primary command on page 803
TYPE primary command on page 826
Editor options (option 0.6) on page 49
Editor Options panel on page 541
Filtering record display using templates on page 218

Displaying a column identification line


In an editor session, when you are in CHAR, HEX, or LHEX display format, you
can enter the COLS prefix command to display a column identification line. The
column identification line is identical to the line already shown at the top of the
data but can be useful in checking the position of data in a record.

To display the column identification (=COLS>) line:


1. Type COLS in the prefix area of any line.

Chapter 3. Viewing and changing data sets 73


Manipulating your view of the data

2. Press Enter.
The column identification line is inserted in the data set or member after the
line in which you entered COLS. The column identification line moves with the
rest of the data when you scroll through the data set or member.

Note: You can use the COLS prefix command with the BOUNDS prefix command
to help check and reposition the bounds settings.

To remove the column identification line from the panel, either type D in the prefix
area that contains the =COLS> flag, or type RESET on the command line:

Figure 30 shows the boundary definition line with the COLS command typed in
the prefix area of the following record.

Process Options Help



Edit JOHNLEV.TEST.DATA(EMP) Top of 40
Col 1 Insert Length 80 Record AT TOP Format LHEX
- - - - + - - - - 10 - - - + - - - - 2 - - - - + - - - - 3 - - - - + -
****** **** Top of data ****
000001 F0F1C7998195A340E2A4A388859993819584404040401E2000380075111F000000060000
000002 F0F1C195849985A640C1A2A39385404040404040404019D400150075000F0000001E0000
000003 F0F1C7998188819440D7A49984898540404040404040158800180068000F000000070000
000004 F0F1C289939340E2969785994040404040404040404011AB001C0068000F000000050000
000005 F0F1E3A89996958540C481938189A2404040404040400C6200150060000F0000000E0000
BND < >
cols06 F0F1D9968440E3A49995859940404040404040404040138E00230100000F0000001C0000
000007 F0F1C39389A58540D58581939695404040404040404008D1002F0100000F0000002C0000
000008 F0F1D1899440C19385A78195848599404040404040400534003F0125000F0000002F0000
000009 F0F1E28993A581959640D79985A940404040404040400B4F00320060000F000000010000
000010 F0F1C4969540D7888199968188404040404040404040131A00370063000F000000260000
000011 F0F1D196889540D385A599899587A3969540404040400D1000280067000F0000000E0000
000012 F0F1D389A940D9A4A288A396954040404040404040400ECD00280066000F0000002C0000
000013 F0F1C2968240D483C39699948183924040404040404012FD00280076000F0000000A0000
000014 F0F1D28589A38840E2A385A68199A340404040404040084100280070000F0000001A0000
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 30. Before the COLS prefix command

When you press Enter, File Manager inserts the COLS line, as shown in Figure 31
on page 75.

74 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Process Options Help



Edit JOHNLEV.TEST.DATA(EMP) Top of 40
Col 1 Insert Length 80 Record AT TOP Format LHEX
- - - - + - - - - 10 - - - + - - - - 2 - - - - + - - - - 3 - - - - + -
****** **** Top of data ****
000001 F0F1C7998195A340E2A4A388859993819584404040401E2000380075111F000000060000
000002 F0F1C195849985A640C1A2A39385404040404040404019D400150075000F0000001E0000
000003 F0F1C7998188819440D7A49984898540404040404040158800180068000F000000070000
000004 F0F1C289939340E2969785994040404040404040404011AB001C0068000F000000050000
000005 F0F1E3A89996958540C481938189A2404040404040400C6200150060000F0000000E0000
BND < >
=COLS> - - - - + - - - - 10 - - - + - - - - 2 - - - - + - - - - 3 - - - - + -
000006 F0F1D9968440E3A49995859940404040404040404040138E00230100000F0000001C0000
000007 F0F1C39389A58540D58581939695404040404040404008D1002F0100000F0000002C0000
000008 F0F1D1899440C19385A78195848599404040404040400534003F0125000F0000002F0000
000009 F0F1E28993A581959640D79985A940404040404040400B4F00320060000F000000010000
000010 F0F1C4969540D7888199968188404040404040404040131A00370063000F000000260000
000011 F0F1D196889540D385A599899587A3969540404040400D1000280067000F0000000E0000
000012 F0F1D389A940D9A4A288A396954040404040404040400ECD00280066000F0000002C0000
000013 F0F1C2968240D483C39699948183924040404040404012FD00280076000F0000000A0000
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 31. After the COLS prefix command

Zooming in to see all of a record


In CHAR, HEX, or LHEX display format, if you want to show all of the data in a
particular record without having to scroll left or right, you can zoom in by
moving the cursor to the record, then pressing the Zoom function key (F2). File
Manager limits the display to just that record, as shown in Figure 32.

The zoomed display automatically scrolls to the column that was shown in the Col
field prior to zooming.

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 1 of 40
Col 1_________ Format CHAR
Record Length Byte ----+----1----+----2----+----3----+----4----+----5----+----6
40 80 1 02Grant Smith Developer 22 Montrose St Thor
61 nlie 6145

Command ===> _____________________________________________________ Scroll PAGE


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 32. Zooming in on one record (CHAR display format)

Chapter 3. Viewing and changing data sets 75


Manipulating your view of the data

Note: This example shows data from the second record type in the sample data
set, as that record type holds more character information.

To zoom out, press the Zoom function key (F2) again. Zooming toggles between
zooming in on one record and zooming out to show multiple records. When you
zoom out, the display format returns to its setting prior to zooming in. For
example, if you zoom in when the display format is CHAR, then change to SNGL,
zooming out returns the display to CHAR format.

In SNGL or TABL display formats, when you zoom in on a record, just that record
is displayed in zoomed SNGL display format, as shown in Figure 33. This format
differs from normal SNGL display format, in that:
v In this display format, you cannot navigate between records.
In un-zoomed SNGL display format, you can navigate between records using
the PREVIOUS and NEXT primary commands or Previous function key (F10)
and Next function key (F11).
v When you view a record in zoomed SNGL display format, File Manager
displays all fields, regardless of whether or not they were selected for display in
the template.

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 1 of 40
Current type is REC-TYPE02 Zoom Format SNGL
Top Line is 1 of 11 in Record 21
Ref Field Picture Typ Start Len Data
1 1 REC-TYPE02
AN 1 80
2 2 REC-TYPE
XX AN 1 2 02
3 2 NAME X(20) AN 3 20 Grant Smith
4 2 JOB-TITLE
X(14) AN 23 14 Developer
5 2 ADDR1 X(20) AN 37 20 22 Montrose St
6 2 ADDR2 X(20) AN 57 20 Thornlie
7 2 POSTCODE
X(4) AN 77 4 6145
**** End of record ****

Command ===> Scroll PAGE


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F7=Up
F8=Down F9=Swap F12=Cancel

Figure 33. Zooming in on one record (zoomed SNGL display format)

Note: SNGL view with the STR command active provides a view of your record
structure that is identical to the ZOOM SNGL view and allows you to
scroll between the records.
In TABL or normal (un-zoomed) SNGL display format, File Manager only
shows the fields selected for display in the template. For instance, in the
example shown in Figure 33, if you edit the template to deselect the field
JOB-TITLE, in un-zoomed SNGL display format the record looks like this:

76 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 21 of 40
Current type is REC-TYPE02 Format SNGL
Top Line is 1 of 7 in Record 21
Ref Field Picture Typ Start Len Data
2 REC-TYPE
XX AN 1 2 02
3 NAME X(20) AN 3 20 Grant Smith
5 ADDR1 X(20) AN 37 20 22 Montrose St
6 ADDR2 X(20) AN 57 20 Thornlie
7 POSTCODE
X(4) AN 77 4 6145
**** End of record ****

Command ===> Scroll PAGE


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F7=Up
F8=Down F9=Swap F10=Previous F11=Next F12=Cancel

Figure 34. SNGL format with unselected fields

In TABL display format, zooming in automatically scrolls to the field that was at
the left of the screen when the display format was TABL.

RELATED TOPICS
ZOOM primary command on page 830
STR primary command on page 821
Selecting a display format on page 69
View panel on page 699
Editor panel on page 529
Changing the length of a record on page 128

Displaying the record length


When you are viewing a file in a multi-line display format (TABL, CHAR, HEX, or
LHEX), you can select to display the record length of each record.

Note: In SNGL and zoomed display formats, the record length is always displayed.

The display of this information is initially controlled by options in the Editor


Options panels (which apply to each new editor session):
Display record length
Turns on the display of record lengths. By default, File Manager displays
the record length on the left of the data.
Display record length on the right
Displays the record length on the right of the data (only when the Display
record length option is selected or if you issue the RECLEN ON command
during an editor session).
Record length width (A,3,4,5,6)
Controls the width of the record length display area.

Chapter 3. Viewing and changing data sets 77


Manipulating your view of the data

However, when viewing data in an editor session you can use the RECLEN
primary command to temporarily change the record length display options for the
current editor session:
RECLEN ON
Turn on the display of record lengths. (Record lengths are displayed on the
left of the data, unless the Display record length on the right editor
option is selected.)
RECLEN OFF
Turn off the display of record lengths.
RECLEN RIGHT
Turn on the display of record lengths and display record lengths on the
right of the data.
RECLEN n
Set the width of the record length display area to n characters, where n can
be 3, 4, 5, or 6.
RECLEN A
Set the width of the record length display area according to the value of
the record lengths.

Figure 27 on page 65 shows part of a file displayed in an editor session with no


record length information displayed.

Process Options Help



View SOPERW.JCL(FMNCDATA) Top of 40
Record AT TOP Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+> <---+> <---+--> <---+----1>
****** **** Top of data ****
000001 01 Grant Sutherland 7712 96 75111 6
000002 01 Bndrew Bstle 6612 21 75000 30
000003 01 Graham Purdie 5512 94 68000 7
000004 01 Bill Soper 4412 28 68000 5
000005 01 Tyrone Dalais 3312 21 60000 14
000006 01 Rod Turner 5612 100 100000 28
000007 01 Clive Nealon 2212 100 100000 44
000008 01 Jim Blexander 1112 110 125000 47
000009 01 Silvano Prez 2312 50 60000 1
000010 01 Don Pharoah 4412 55 63000 38
000011 01 John Levrington 3412 40 67000 14
000012 01 Liz Rushton 3412 40 66000 44
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 35. Data displayed in an editor session with no record length details shown

To display the record length information on the left of the data, enter:
RECLEN LEFT

Alternatively, if the Display record length on the right option on the relevant
Editor Options panel is not selected, you can enter:
RECLEN ON

78 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Figure 36 shows the same data displayed with the record length displayed on the
left of the data.

Process Options Help



View SOPERW.JCL(FMNCDATA) Top of 40
Record AT TOP Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY
#2 #3 #4 #5 #6
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4
<> <---+----1----+----> <---+> <---+> <---+-->
****** **** Top of data ****
000001 80 01 Grant Sutherland 7712 96 75111
000002 80 01 Bndrew Bstle 6612 21 75000
000003 80 01 Graham Purdie 5512 94 68000
000004 80 01 Bill Soper 4412 28 68000
000005 80 01 Tyrone Dalais 3312 21 60000
000006 80 01 Rod Turner 5612 100 100000
000007 80 01 Clive Nealon 2212 100 100000
000008 80 01 Jim Blexander 1112 110 125000
000009 80 01 Silvano Prez 2312 50 60000
000010 80 01 Don Pharoah 4412 55 63000
000011 80 01 John Levrington 3412 40 67000
000012 80 01 Liz Rushton 3412 40 66000
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 36. Record length details displayed in editor session on left of data

To display the record length information on the right of the data, enter:
RECLEN RIGHT

Alternatively, if the Display record length on the right option on the relevant
Editor Options panel is selected, you can enter:
RECLEN ON

Figure 37 on page 80 shows the same data displayed with the record length
displayed on the right of the data.

Chapter 3. Viewing and changing data sets 79


Manipulating your view of the data

Process Options Help



View SOPERW.JCL(FMNCDATA) Top of 40
Record AT TOP Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY
#2 #3 #4 #5 #6
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4
<> <---+----1----+----> <---+> <---+> <---+-->
****** **** Top of data ****
000001 01 Grant Sutherland 7712 96 75111 80
000002 01 Bndrew Bstle 6612 21 75000 80
000003 01 Graham Purdie 5512 94 68000 80
000004 01 Bill Soper 4412 28 68000 80
000005 01 Tyrone Dalais 3312 21 60000 80
000006 01 Rod Turner 5612 100 100000 80
000007 01 Clive Nealon 2212 100 100000 80
000008 01 Jim Blexander 1112 110 125000 80
000009 01 Silvano Prez 2312 50 60000 80
000010 01 Don Pharoah 4412 55 63000 80
000011 01 John Levrington 3412 40 67000 80
000012 01 Liz Rushton 3412 40 66000 80
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 37. Record length details displayed in editor session on right of data

To set the width of the field length display area for all editor sessions, set the
Record length width option on the relevant Editor Options panel to A, 3, 4, 5, or
6. Setting this option to "A" causes the width of the record length area to be
automatically adjusted as required.

To change the width of the field length display area for the current editor session,
issue the RECLEN command. For example, to change the width of the field length
display area to 4, enter:
RECLEN 4

RELATED TOPICS
RECLEN primary command on page 800
Editor Options panel on page 541
Changing the length of a record on page 128

Scrolling to see data


To scroll through your data, use the following function keys:
Use this function key To do this...
Scroll backward (up) Up function key (F7)
Scroll forward (down) Down function key (F8)
Next function key (F11) Go to the next record
Previous function key (F10) Go to the previous record
Scroll right Right function key (F11)
Scroll left Left function key (F10)

You can also scroll using the primary commands UP, DOWN, LEFT, RIGHT, TOP,
BOTTOM, NEXT and PREVIOUS. For details, see Chapter 15, Primary
commands, on page 731.

In SNGL display format, to move forward n records, perform either of these


actions:

80 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

v Enter NEXT n on the Command line


v Enter n on the Command line and press Next function key (F11)

Note: If you specify a number of records greater than the number of subsequent
records, File Manager displays the **** End of data **** indicator. You can
then press the Previous function key (F10) to view the last selected record.

In SNGL display format, to move back n records, perform either of these actions:
v Enter PREVIOUS n on the Command line
v Enter n on the Command line and press Previous function key (F10)

Note: If you specify the MAX parameter, the first selected record is displayed. If
you specify a number of records greater than the number of prior records,
File Manager displays the **** Top of data **** indicator. You can then
press the Next function key (F11) to view the first selected record.

Examples
LEFT 8 Scrolls 8 columns to the left.
LEFT Scrolls left the number of columns indicated by the Scroll field.
LEFT CSR
If the cursor is positioned on a record, scrolls left to the cursor position;
otherwise scrolls left one page.
UP 15 Scrolls up 15 lines.
UP Scrolls up the number of lines indicated by the Scroll field.
UP DATA
Scrolls up one line less than a page of data.

RELATED TOPICS
UP primary command on page 826
DOWN primary command on page 754
LEFT primary command on page 779
RIGHT primary command on page 808
PREVIOUS primary command on page 795
NEXT primary command on page 789
TOP primary command on page 824
BOTTOM primary command on page 735

Controlling how far you scroll


To control how far you scroll when you press one of the scrolling function keys,
enter a scroll amount in the Scroll field:
Scroll amount Scrolls...
PAGE One screen at a time
HALF Half a screen at a time
DATA One line or column less than a screen at a time
CSR To the cursor position (if the cursor is not
positioned on a record when the scroll is
performed, then the scroll amount defaults to
PAGE)

Chapter 3. Viewing and changing data sets 81


Manipulating your view of the data

MAX To the end of the data in the direction indicated by


the scrolling function key.
nnnn A number of columns (when scrolling left or right)
or a number of records or lines (when scrolling up
or down) at a time
Notes:
1. When you use the Next function key (F11) or Previous function key (F10) to
scroll through records, the only indication that a hidden record has been
skipped is that the record number (shown in the upper right corner of the
screen) skips accordingly. For details, see Hiding or showing records in SNGL
display format on page 222.
2. In TABL display format, scrolling left or right moves to the start of the field
that is closest to the specified scroll amount. For example, if the Scroll field
contains CSR, then moving your cursor into a field and pressing the Right
function key (F11) scrolls the display right so that the first column of the field
is at the left of the screen. If you enter a numeric (nnnn) scroll amount, it is
treated as an absolute column number (rather than a relative number), and the
display scrolls to the start of the field that occupies that column.

You can temporarily override the amount in the Scroll field by typing a scroll
amount on the Command line, then pressing a scroll function key. For example, if
you enter 8 on the Command line, then press the Right function key (F11), File
Manager scrolls right 8 columns.

Scrolling to the first or last record or column


To scroll to the first or last record or first or last column in the data set, type MAX
(or M) on the Command line, then press one of the scroll function keys. For
example, typing M then pressing the Right function key (F11) scrolls right to the last
column.

You can also scroll to the first or last record by entering TOP or BOTTOM on the
Command line.

When you perform one of these actions:


v View or edit KSDS or ESDS data sets that do not fit into available memory.
v Use in-place editing for KSDS or ESDS data sets (regardless of the file size).
and you use the BOTTOM, DOWN MAX or NEXT MAX commands (to scroll to
the end of the data), File Manager uses the best-performing technique to navigate
directly to the last record. Similarly, while viewing a ESDS or KSDS, you may
navigate directly to a record by entering a RBA or KEY value. In these situations,
as File Manager does not know the relative record number, it displays "Record
number unknown" in place of the record number and displays '======' in the
prefix area. (This message does not signify an error condition.) To make File
Manager aware of the number of records in the data set, issue the RECSTATS
primary command.

To reset your display after this has occurred, scroll to the top of the data set.

To avoid this situation, scroll down in increments, for example, DOWN 9999, until the
end of the data set is reached. Alternatively, if you know the last record number,
use the LOCATE command to go to that record. Once File Manager has recognized
the record number, you can scroll in any direction, using any of the various
scrolling methods, and this display situation does not reoccur.

82 File Manager for z/OS V12R1 User's Guide


Manipulating your view of the data

Holding fields when scrolling left or right


In TABL display format, when you scroll either right or left, you can edit the
template and use the H prefix command to hold specific fields, then return to
your data view. Held fields are displayed at the left of the screen and are always
displayed (regardless of how far you scroll).

RELATED TOPICS
Holding columns when scrolling left or right on page 165

Locating a field, column or record number


To scroll to a particular record number, use the LOCATE primary command:
LOCATE record_number

In all display formats, you can scroll to a particular record number by typing the
record number in the Record field, then pressing Enter.

In all display formats except SNGL and TABL, you can scroll to a particular
column by typing the column number in the Col field, then pressing Enter.

In SNGL and TABL display format, you can use the LOCATE primary command to
scroll to a particular field, using either the field reference number or the Field
Name. For example:
LOCATE #5

or
LOCATE Age

When the field is an item in an array, you must specify a subscript in parentheses
to identify the occurrence that you want to locate. If your field is part of a
multi-dimensional array, you must specify a subscript for each dimension in the
array. For example:
L #7(5)
L #9(2,3)

In TABL display format, the LOCATE command scrolls your view so that the
specified field becomes the leftmost visible field. Once positioned on a field, you
can use the Down (F8) or Up (F7) commands (function keys) to scroll through the
records and maintain the same relative field view.

In SNGL display format, the LOCATE command scrolls your view so that the
specified field becomes the topmost visible field. Once positioned on a field, you
can use the Next (F11) or Prev (F10) commands (function keys) to scroll through
the records and maintain the same relative field view.

RELATED TOPICS
LOCATE primary command on page 782

Scrollable input and display fields for long names


Some File Manager panels have scrollable fields that allow you to input or view
longer values than can be displayed at the one time.

There are two types of scrollable fields on File Manager panels:


Input fields The fields on File Manager panels where you can enter information,
such as a data set name.

Chapter 3. Viewing and changing data sets 83


Scrollable input and display fields for long names

Display fields The fields on File Manager panels that display information as a
result of some action you have taken. For example, when you
display data on the Browse, Edit, or View panel in a File Manager
editor session, the data set name displayed at the top of the panel
is a scrollable display field.

The following two sections describe how to work with both types of scrollable
field when entering or viewing longer fields.

Working with scrollable input fields


On several panels, File Manager provides scrollable input fields that allow you to
enter values longer than length of the displayed entry field.

You can recognise a scrollable field by the presence of one of the following
adjacent to the end of the entry field:
+ Plus sign. Indicates the field is scrollable to the right
- Minus sign. Indicates the field is scrollable to the left
+- Plus sign and minus sign. Indicates the field is scrollable to the right or left

If the length of the input field displayed on the panel is insufficient for the value
you want to enter, you can either:
v Progressively scroll to the right as you enter the value with the Right function
key (F11) or by entering the RIGHT primary command (with the cursor
positioned within the entry field), or
v Press the Expand function key (F4) if available, or enter the EXPAND primary
command, to display a window that allows you to enter the full length of the
value.
In the expand pop-up window, you can toggle the view of the data between
character and hex by issuing the commands HEX OFF and HEX ON.

Deleting data in scrollable input fields: If you want to delete all the data in a
field that is displayed as a scrollable input field, take care to ensure that you do, in
fact, delete all the data (and not just the displayed data).

If you use the field delete key combination to delete data, File Manager deletes
only the data that is currently displayed. If the field contains more data than is
displayed, the undisplayed data is left undeleted.

It is recommended that, before deleting data in a field that is displayed as a


scrollable field, you first display the entire contents of the field by pressing the
Expand function key (F4) or entering the EXPAND primary command. You can
then use the field delete key combination to delete all data in the field at once.

Working with scrollable display fields


Some File Manager panels show data displayed in scrollable fields. File Manager
uses such fields where the length of the field containing the data to be displayed is
longer than the field displayed on the panel.

You can recognise a scrollable field (and where more data exists than can be shown
at one time on the panel) by the presence of one of the following adjacent to the
end of the display field:
+ Plus sign. Indicates the field is scrollable to the right
- Minus sign. Indicates the field is scrollable to the left

84 File Manager for z/OS V12R1 User's Guide


Scrollable input and display fields for long names

+- Plus sign and minus sign. Indicates the field is scrollable to the right or left

Note: The "+", "-", and "+-" signs are only shown adjacent to the end of a scrollable
display field when the data to be displayed is longer than the length of the
display field on the panel.

If the data to be displayed is longer than the length of the display field on the
panel, you can view the rest of the data by either:
v Progressively scrolling to the right by pressing the Right function key (F11) or by
entering the RIGHT primary command (with the cursor positioned within the
display field), or
v Pressing the Expand function key (F4) or entering the EXPAND primary
command to display a window that allows you to view the entire contents of the
field.

RELATED TOPICS
EXPAND primary command on page 760

Sorting the data


You can sort your data by using the SORT primary command. With this command,
you can sort the data in any of the following ways:
v On up to 5 specified column ranges (CHAR, HEX, or LHEX display formats
only).
v On up to 5 fields by specifying the field reference numbers (TABL display
format only).
v Into the KEY or SLOT NUMBER sequence for the data set (KSDS, VRDS, and
RRDS VSAM data sets).

Note: SORT requires that all data set records be memory-resident. If the entire
data set can not fit into your region storage, an error is reported and the
SORT execution aborted. If necessary, increase the region size to contain the
entire data set.

You can specify whether you want the data sorted in ascending (the default) or
descending sequence and, in Edit, you can restrict the sorting to excluded records
or not-excluded records only.

To sort by a column range:


1. Display your data in CHAR, HEX or LHEX format.
2. Enter the SORT primary command, followed by up to five pairs of column
range values. For example:
SORT 56 70 3 22

sorts a data set into ascending order, using the range 56-70 as the first key and
range 3-22 as the second key.

To sort by field references:


1. Display your data in TABL format (requires that you have specified a
template).
2. Enter the SORT primary command, followed by up to five field references. For
example:
SORT #6 D #3 D

Chapter 3. Viewing and changing data sets 85


Scrollable input and display fields for long names

sorts a data set into descending order, using field #6 as the first key and field
#3 as the second key.

To restore a list to the KEY or SLOT NUMBER order (KSDS, VRDS, and RRDS
VSAM data sets):
1. Display your KSDS, VRDS, or RRDS VSAM data set in any display format.
2. Sort the data away from the KEY or SLOT NUMBER order by issuing a SORT
command, by moving or adding records or by editing the key field (KSDS
only). If you have edited your records, issue the SAVE command.
3. Restore your data to its KEY or SLOT NUMBER order by issuing the SORT
command followed by the KEY parameter, for example:
SORT KEY.

sorts a data set into descending order, using field #6 as the first key and field
#3 as the second key.

Examples
v If you are not using a template:
SORT 23 36
Sorts all records on columns 23 to 36 in ascending order.
SORT 77 80 D NX
(Edit only.) Sorts not-excluded records on columns 77 to 80 in
descending order (as if excluded records did not exist).
SORT 77 80 D 23 36 3 21
Sorts all records on columns 77 to 80 (primary sort key) in descending
order, then on columns 23 to 36 (secondary sort key) in ascending order,
then on columns 3 to 21 (minor sort key) in ascending order.
SORT KEY
Restores the records in a KSDS, VRDS, or RRDS VSAM data set into
their original keyed sequence.
SORT KEY behaves differently for RRDS and KSDS files. For RRDS files
the VSAM slot value is used as the sort key while KSDS files use the
key field. If new records are added to an RRDS file they are allocated a
slot value such that they sort to the end of the file when SORT KEY is
performed. New records added to the KSDS are sorted on the new key
value and the new records sorted to the appropriate position within the
file.
v If you are using a template (TABL display format):
SORT #7 D #6 #3
Sorts all records on the field with field reference number 7 (primary sort
key) in descending order, then on the field with field reference number 6
(secondary sort key) in ascending order, then on the field with field
reference number 3 (minor sort key) in ascending order,
SORT #6 X
(Edit only.) Sorts all excluded records on the field with field reference
number 6 in ascending order (as if non-excluded records did not exist).

RELATED TOPICS
SORT primary command on page 817

86 File Manager for z/OS V12R1 User's Guide


Scrollable input and display fields for long names

Finding specific data


To find one or more occurrences of a character string in a data set or data set
member, you can use the FIND primary command, which you can abbreviate as F
or /.

For example, to search for the next occurrence of the string James in any mix of
uppercase and lowercase, enter the following on the Command line:
F JAMES

To find the same string as you specified on the previous FIND primary command,
specify an asterisk (*) as the search string.

To limit the search for a string to only where it appears as a prefix in the data,
specify the PREFIX parameter.

To limit the search for a string to only where it appears as a suffix in the data,
specify the SUFFIX parameter.

To limit the search for a string to only where it appears as a "word" in the data,
specify the WORD parameter.

Searching numeric fields


The display format, and whether or not you specify field column numbers (either
as a list or a range) affects how the CHANGE, FIND, and EXCLUDE commands
search numeric columns:
v When searching data in SNGL or TABL display formats, for a field with numeric
field attributes, File Manager by default interprets the search string as a number
and performs a numeric comparison with the formatted numeric value of the
field being searched.
The numeric value of the search string must equal the formatted numeric value
of the field. The lengths (number of digits) of the search string and of the
numeric field are not significant. Similarly, the data type of the numeric field is
not significant. For example, a search string of 123 matches a packed-decimal
field containing 00123 or a floating-point field containing 1.230E+02. A search
string of 123 does not match a packed-decimal field containing 12300 (because
the numeric values are different). An unsigned value in the string is considered
to be positive.
v In CHAR, HEX, and LHEX display formats, or if you specify a column range,
File Manager performs a string comparison between the search string and the
character representation of the numeric field. If the search string happens to
match the character representations of some of the bytes in a binary or packed
decimal numeric field, then the numeric field is considered to be a match for the
search string (and, for a FIND command, the entire field is highlighted).
Similarly, a search string of 123 matches any zoned (or display) numeric
field whose value contains that sequence of digits (for example, 12300 or 41235).

For example, the following command finds instances of an alphanumeric field (#3)
containing the character 0 (such as 1060 HAY ST), and instances of a numeric
field (#5) whose formatted numeric value is zero:
FIND 0 ALL #3,#5
Notes:
1. To find long strings that do not fit on the Command line, use the FX command.

Chapter 3. Viewing and changing data sets 87


Scrollable input and display fields for long names

2. To find and replace strings in multiple data sets or data set members, use the
Find/Change Utility.
3. To find and change a string or numeric value, open your data set in an Edit
session, then use the CHANGE or CX primary command.
4. By default, in SNGL or TABL display formats, if you enter the CHANGE,
FIND, or EXCLUDE command without specifying any field references, File
Manager searches all the visible fields based on the template attributes for each
field. That is:
v For a field with alphanumeric field attributes, the command performs a
string comparison between the search string and the field being searched.
v For a field with numeric field attributes, the command interprets the search
string as a number, and performs a numeric comparison with the numeric
value of the field being searched.
5. If you want to prevent numeric comparisons from occurring, you can explicitly
mark the argument as character by using the C'string' format. For example, this
command finds only instances of alphanumeric fields containing the character
"0":
FIND c0 ALL #3,#5

RELATED TOPICS
Handling long strings in CHANGE on page 110
Finding and changing data in multiple PDS members on page 264
Finding and replacing strings on page 107
Setting column ranges on page 113
FIND/FX primary command on page 764
CHANGE/CX primary command on page 741

Handling long strings in FIND


You can use the FIND command to specify a string that is up to 100 characters
long. However, when you are dealing with long strings, you might find that you
cannot fit the whole FIND command (including other parameters) on the
Command line. To overcome this problem, do one of the following to display an
Extended Command Entry pop-up panel (see Figure 38 on page 89):
v Enter FX (for Find Extended)
v Enter the FIND primary command (or one of its abbreviations, such as F) with
no parameters.

The Extended Command Entry pop-up panel contains five lines (each 50 characters
long) that you use to enter all the FIND command parameters (but not the actual
keyword FIND or any of its abbreviations). File Manager treats the five lines on
the pop-up panel as contiguous, allowing you to specify a long search string and
any other parameters, using up to 250 characters in total.

Note: You can continue a string (or any other parameter) from the last position on
one line of the pop-up panel to the first position of the next line. However,
this does not mean that you need to completely fill a line before using the
next line. For example, you can specify the search string on the first of the
five lines and the other parameters on the next line. If you are not
specifying a quoted string and you do not use all of a line, File Manager
treats the unused part of the line as a single space. When you specify a
string with quotes, any trailing blanks and any leading blanks in the next
line are retained.

88 File Manager for z/OS V12R1 User's Guide


Scrollable input and display fields for long names

Figure 38 shows the Extended Command Entry pop-up panel for the FIND
command. This example searches for all occurrences of the string
dichlorodiphenyltrichloroethane in field #3 for non-excluded records only.

Process Options Help



Edit USERID.FMDATA(NEWDATA1) Rec 0 of 40
Format TABL
Extended Command Entry

Complete typing the FIND command and press Enter.
->
0 FIND ===> dichlorodiphenyltrichloroethane
0 ===> all #3 nx
0 ===>
0 ===>
0 ===>
0
0
0 F1=Help F2=Split F3=Exit F9=Swap F12=Cancel
0
000009 000140 ammonium hydroxide solution
000010 000150 dichlorodiphenyltrichloroethane
000011 **** End of data ****

Command ===> fx Scroll 0001


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 38. Extended Command Entry pop-up panel for the FIND command

RELATED TOPICS
Handling long strings in CHANGE on page 110
Handling long strings in EXCLUDE on page 91
FIND/FX primary command on page 764

Finding and correcting errors in your data


To find errors in your data (without correcting them), you can enter the FE (Find
Error) primary command. This finds the following types of errors:
v Numeric fields whose contents cannot be formatted as a valid numeric value
v Fields that run over the record length

When you enter the FE command, File Manager positions the cursor at the
beginning of the field in error and, if necessary, automatically scrolls the data to
bring the field into view.

To move the cursor to the next field in error, either enter the FE command again,
or press the RFind function key (F5).

To find and change numeric fields flagged as being in error (all asterisks in the field
display) to a specific numeric value, use the CE primary command.

RELATED TOPICS
FE (Find Error) primary command on page 761
CE (Change Error) primary command on page 738
Limiting the effect of editing changes on page 111
Changing invalid numeric fields in your data on page 111
View panel on page 699
Editor panel on page 529

Chapter 3. Viewing and changing data sets 89


Scrollable input and display fields for long names

Excluding records from display


You can hide records from your view, by excluding records that have some common
factor.

To exclude multiple records based on a common factor:


v Enter EXCLUDE with the relevant parameters on the Command line.
For example, the following command excludes all records with an h or H in
column 3:
EXCLUDE ALL H 3
You can control whether the excluded records are completely hidden or are
represented by shadow lines.
To hide the shadow line for excluded records, enter SHADOW X OFF on the
Command line The shadow lines disappear, and SHAD appears at the top left
of the screen, indicating that there are records that are hidden because
shadow lines have been turned off.
You can also hide the shadow line for excluded records by deselecting the See
shadow lines option, Excluded, on the relevant Editor Options panel.
To turn on shadow lines for excluded records, enter SHADOW X ON on the
Command line.
You can also turn on shadow lines for excluded records by selecting the See
shadow lines option, Excluded, on the relevant Editor Options panel.

EXCLUDE commands are cumulative; each successive EXCLUDE command


increases the number of records already excluded.

To unexclude (redisplay) excluded records:


v Enter RESET EXCLUDED on the Command line.

After you have excluded records, you can limit the effects of the FIND, FE,
SHADOW and SORT commands to only those records that are excluded or only
those that are not-excluded. You do this by including one of the following option
parameters with the primary command:
X or EX
Affects only excluded records
NX Affects only not-excluded records

For example, the following command finds all occurrences of the string no,
No, NO, or nO in all not-excluded records:
FIND NO ALL NX
Notes:
1. If neither parameter is used with the primary command, both excluded and
not-excluded records are affected.
2. If an excluded record is affected by a primary command, either by using the EX
parameter or by not specifying an EXCLUDE parameter, the record becomes
not-excluded.

RELATED TOPICS
EXCLUDE/XX primary command on page 756
RESET primary command on page 804

90 File Manager for z/OS V12R1 User's Guide


Scrollable input and display fields for long names

Handling long strings in EXCLUDE


You can use the EXCLUDE command to specify a string that is up to 100
characters long. However, when you are dealing with long strings, you might find
that you cannot fit the whole EXCLUDE command (including other parameters) on
the Command line. To overcome this problem, do one of the following to display
an Extended Command Entry pop-up panel (see Figure 39):
v Enter XX (for Exclude Extended)
v Enter the EXCLUDE primary command (or one of its abbreviations, such as X)
with no parameters.

The Extended Command Entry pop-up panel contains five lines (each 50 characters
long) that you use to enter all the EXCLUDE command parameters (but not the
actual keyword EXCLUDE or any of its abbreviations). File Manager treats the five
lines on the pop-up panel as contiguous, allowing you to specify a long search
string and any other parameters, using up to 250 characters in total.

Note: You can continue a string (or any other parameter) from the last position on
one line of the pop-up panel to the first position of the next line. However,
this does not mean that you need to completely fill a line before using the
next line. For example, you can specify the search string on the first of the
five lines and the other parameters on the next line. If you are not
specifying a quoted string and you do not use all of a line, File Manager
treats the unused part of the line as a single space. When you specify a
string with quotes, any trailing blanks and any leading blanks in the next
line are retained.

Figure 39 shows the Extended Command Entry pop-up panel for the EXCLUDE
command. This example searches for all occurrences of the string
dichlorodiphenyltrichloroethane in field #3.

Process Options Help



Edit USERID.FMDATA(NEWDATA1) Rec 0 of 40
Format TABL
Extended Command Entry

Complete typing the EXCLUDE command and press Enter.
->
0 EXCLUDE ===> dichlorodiphenyltrichloroethane
0 ===> all #3
0 ===>
0 ===>
0 ===>
0
0
0 F1=Help F2=Split F3=Exit F9=Swap F12=Cancel
0
000009 000140 ammonium hydroxide solution
000010 000150 dichlorodiphenyltrichloroethane
000011 **** End of data ****

Command ===> fx Scroll 0001


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 39. Extended Command Entry pop-up panel for the EXCLUDE command

RELATED TOPICS
Handling long strings in CHANGE on page 110
Handling long strings in FIND on page 88
EXCLUDE/XX primary command on page 756

Chapter 3. Viewing and changing data sets 91


Working with File Manager and shared files

Working with File Manager and shared files


This section describes how to work with VSAM files in a shared environment. This
may be as a result of using:
v The File Manager for CICS feature, or
v The base File Manager product and accessing a VSAM SHAREOPTIONS 3 or
SHAREOPTIONS 4 KSDS file, or another type of VSAM SHAREOPTIONS 3 or
SHAREOPTIONS 4 file that could not be allocated exclusively to the user or
region accessing it.

Note: The use of VSAM SHAREOPTIONS 3 files for multiple users where the
file may be updated is not recommended as VSAM offers no methods for
data integrity for SHAREOPTION 3 files. For this reason, results with
such files may be considered unpredictable.

Overview of shared file features


File Manager allows you to work with files that are used in a shared environment.

Features include:
v Ensuring that an update you are about to commit to does not overwrite another
user's update (Edit only). This is referred to as record integrity checking.
v Ability to refresh the contents of an individual record at any time.
v Refreshing a record before displaying it in SNGL display format.
v Saving an individual record, or range of records, while remaining in the current
Edit session.
v Performing periodic SAVEs of a file after a specified number of changes (Edit
only).
v While processing a CHANGE command with the ALL operand, performing
periodic SAVEs of a file.
v Retrying the CHANGE process for a record that, when being SAVEd, has been
updated by another user.

Each of the above features is described later in this section.

What File Manager considers a shared file


For most of the commands discussed in this section, record integrity checking is
only active when File Manager considers itself to be operating on a file in a shared
environment.

A shared environment exists when File Manager is operating on:


v A CICS VSAM file (when you are using the FM/CICS feature), or
v A KSDS VSAM file that is defined with SHAREOPTIONS 3 or 4, or
v A non-KSDS VSAM file that could not be allocated to the region with a DISP of
OLD (meaning that exclusive access to the file is not currently available) and the
VSAM file is defined with SHAREOPTIONS 3 or 4.

Record integrity checking


When File Manager is operating in a shared environment, it enables record
integrity checking. This means that, before rewriting the contents of a record to a
file, File Manager first checks if the record has been updated (by another user)

92 File Manager for z/OS V12R1 User's Guide


Record integrity checking

since the record was retrieved. File Manager performs this check by comparing the
contents of the record at the time that it retrieved it with the contents of the
current record as it exists on the file.

With a heavily shared file it is possible that, between the time the record was first
fetched from the file and the time that you issued a SAVE command (or a save was
automatically issued due to the value of the Autosave frequency option, see
Saving a file after a given number of updates (Autosave frequency option) on
page 99), another user updated the same record that you are trying to update.

Saving of records for a file occurs when:


v You issue a SAVE primary command (applies to all records in the file).
v You issue an SV or SVV prefix command (applies to specific records in the file).
v You issue an SV primary command while in SNGL display format (applies to
the specific record being viewed).
v The value of the AUTOSAVE frequency option triggers a file-wide SAVE.
v The value of the CHANGE ALL autosave frequency option triggers a file-wide
SAVE during the CHANGE command process.

When File Manager detects that a record has been changed by another user, it is
called an integrity check.

File Manager recognizes three variations of integrity check:


v You are attempting to update a record but, in the meantime, the record content
has been deleted by another user.
v You are attempting to delete a record but, in the meantime, another user has
updated it.
v You are attempting to update a record but, in the meantime, the record content
has been updated by another user.

In each of the saving scenarios mentioned previously, when an integrity check


occurs, File Manager displays one of the integrity check panels shown on the
following pages (according to the three variations listed above).

Note: In the case of the saving scenario where the value of the CHANGE ALL
autosave frequency option (see CHANGE ALL, automatic saving and
retry on page 100) has triggered a file-wide SAVE during the CHANGE
command process, File Manager only displays an integrity check panel if the
Auto retry for CHANGE ALL option (see page 100) is set to OFF.

Chapter 3. Viewing and changing data sets 93


Record integrity checking


File Manager Record Updated by other user
Command ===> Scroll CSR
Format CHAR
Between the time the record was retrieved and the time a save was issued,
another user has updated the record that you are attempting to update. The
records are shown below and changes highlighted.

Enter SAVE to save this record anyway.
Enter CONTINUE Save anyway and dont ask again for other records.
Enter CANCEL to skip this update.
Enter ABORT to skip this update and halt performing other updates.

Col 1
Offset Pending record contents: Record contents as on file:
<----+----1----+----2----+----3--> <----+----1----+----2----+----3-->
000000 00000001A This is my change AAAAAA | 00000001AAAAAAAA meanwhile, user 2
000034 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | updated this record AAAAAAAAAAAAA
000068 AAAAAAAAAAAA | AAAAAAAAAAAA

Figure 40. Integrity check variation 1: (Update attempted but record updated by another user)


File Manager Record Deleted by other user
Command ===> Scroll CSR
Format CHAR
Between the time the record was retrieved and the time a save was issued,
another user has deleted the record that you are attempting to update. The
record you are updating is shown below.

Enter SAVE to save this record anyway.
Enter CONTINUE Save anyway and dont ask again for other records.
Enter CANCEL to skip this update.
Enter ABORT to skip this update and halt performing other updates.

Col 1
Offset Pending record contents: Record deleted
<----+----1----+----2----+----3-->
000000 00000001AAMaking a change to a rec |
000034 ord that someone else deleted AAAA |
000068 AAAAAAAAAAAA |

Figure 41. Integrity check variation 2: (Update attempted but record deleted by another user)


File Manager Record Updated by other user
Command ===> Scroll CSR
Format CHAR
Between the time the record was retrieved and the time a save was issued,
another user has updated the record that you are attempting to delete. The
records are shown below and changes highlighted.

Enter SAVE to save this record anyway.
Enter CONTINUE Save anyway and dont ask again for other records.
Enter CANCEL to skip this update.
Enter ABORT to skip this update and halt performing other updates.

Col 1
Offset Record deleted Record contents as on file:
<----+----1----+----2----+----3--> <----+----1----+----2----+----3-->
000000 00000001AAAAAAAAAAAAAAAAAAAAAAAAAA | 00000001AAA Another user happily u
000034 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | pdates the record AAAAAAAAAAAAAAAA
000068 AAAAAAAAAAAA | AAAAAAAAAAAA

Figure 42. Integrity check variation 3: (Delete attempted but record updated by another user)

94 File Manager for z/OS V12R1 User's Guide


Record integrity checking

In each integrity check panel, you have four options that are selectable by tabbing
to the keyword and pressing Enter. The options are:
SAVE Ignores the other update and applies your update. Use this option when
you are sure that the record should be set the way you have indicated (or
deleted).
CONTINUE
Ignores the other update and applies your update. Use this when you are
sure that the record should be set the way you have indicated (or deleted).
By using CONTINUE, you are instructing File Manager to also
automatically SAVE any further records which encounter an integrity
check.
Cancel this individual update (PF12 or CANCEL command)
Ignores your update to an individual record element. If you are changing a
record, this leaves your changes in your session and marks the record
element as having an integrity check.
Abort this and any following updates (ABORT command)
Operates like the Cancel option, but halts the process of the current
command so that you can correct or inspect an individual condition. For
instance, if integrity checks occur during the End process of an Edit
session, and an integrity check panel is displayed, entering ABORT stops
the saving process and re-enters the Edit to allow you to inspect records
before ending your session again.

RELATED TOPICS
SAVE primary command on page 811
SV primary command on page 822

Marking of records that had an integrity check


When an integrity check occurs, such as when you are updating a record but in the
meantime another user has updated the same record (the third integrity check
variation described in the previous section) then, assuming you CANCELed or
ABORTed your change, File Manager marks the record element that caused this
situation as having an integrity check.

In multi-line display formats (CHAR, HEX, LHEX, TABL), File Manager places an
indicator (=ICHK>) in the prefix area as shown in Figure 43 on page 96.

Chapter 3. Viewing and changing data sets 95


Record integrity checking

Process Options Help



Edit FI:FMNKSB1 DS:FMN.RFM0201.KSDS Rec 0
Command ===> Scroll CSR
Refresh on save N Type KSDS Format TABL
FIRSTPART LASTTWO TEXTFIELDMAIN TEXTMINOR1
#4 #5 #6 #7 +
ZD 1:6 ZD 7:2 AN 9:42 AN 51:15
<---+-> <-> <---+----1----+----2----+----3----+----4-> <---+----1
****** **** Top of data ****
=ICHK> 0 1 A updated record AAAAAAAAAA
000002 0 2 AAAaaaaaaaaaxAAAAAAAAbAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000003 0 3 AAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000004 0 4 AaaaaaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAA AAAAAAAAAA
000005 0 5 AAAAAAAAAAAAAAAAAAAAAeAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000006 0 6 AAAAAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000007 0 7 AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000008 0 8 AAAAAAAAAAAAAAAAAAAAAhAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
000009 0 9 AAAAAxAAAAAAAAAAAAAAAiAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA
- - - - - - - - - - - - - - - - - - - - - - - - - 1 Line(s) not selected
- - - - - - - - - REC-TYPE2 - - - - - - - - - - - 89 Line(s) suppressed
000100 1 0 AAA*** updateok & reversed ***AAAAAAAAAAAA AAAAAAAAAA
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F10=Left F11=Right F12=Cancel

Figure 43. Example: display of integrity check in TABL display format

In the SNGL display format, File Manager displays a message line as shown in
Figure 44.

Process Options Help



Edit FI:FMNKSB1 DS:FMN.RFM0201.KSDS Rec 1
Command ===> Scroll CSR
Type KSDS Format SNGL
The record had been updated by another user. Enter R Top Line is 1 of 5
Current 01: REC-TYPE1
Field Data
FIRSTPART 0
LASTTWO 1
TEXTFIELDMAIN A updated record
TEXTMINOR1 AAAAAAAAAAAAAAA
TEXTMINOR2 AAAAAxxAAAAAAAA
*** End of record ***

F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange


F7=Up F8=Down F10=Previous F11=Next F12=Cancel

Figure 44. Example: display of integrity check in SNGL display format

==MSG> and =PROF> indicators


In order to more effectively describe what has occurred in certain scenarios, File
Manager displays an informational message line. If a prefix is being displayed, an
indicator ("==MSG>" or, if you have used the PROFILE primary command,
"=PROF>") is shown in the prefix area. The line is not displayed in SNGL or
ZOOM display format.

File Manager displays an informational message line when:

96 File Manager for z/OS V12R1 User's Guide


Record integrity checking

v When you enter an edit session (expecting to be able to insert and delete) but
the dataset is shared, File Manager displays an informational message advising
you that the file is shared and that the edit is in inplace mode.
v When ENDing an edit session and an integrity check occurs, you decide not to
save, File Manager displays an informational message advising you that the edit
session was re-entered.

RELATED TOPICS
PROFILE primary command on page 797

Refreshing the contents of a record


In a highly active environment, records may be updated frequently. On occasions,
you may need to reread the contents of a record from the file that you are working
on. For example, you may have encountered an integrity check (as previously
described), or be waiting for a particular change to occur to a record before
continuing on with some other action. In such situations, you can refresh specific
records by using either the RF line command or the RF primary command.

For example, assume you are editing a file in SNGL display format as shown in
Figure 45.

Process Options Help



Edit FI:FMNKSB1 DS:FMN.RFM0201.KSDS Rec 1
Command ===> Scroll CSR
Type KSDS Format SNGL
Top Line is 1 of 5
Current 01: REC-TYPE1
Field Data
FIRSTPART 0
LASTTWO 1
TEXTFIELDMAIN AAAAAAxxzzzzzzzzzzzzxxxxxxxxxxxxxxxxxAAAAA
TEXTMINOR1 AAAAAAAAAAAAAAA
TEXTMINOR2 AAAAAAAAAAAAAAA
*** End of record ***

F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange


F7=Up F8=Down F10=Previous F11=Next F12=Cancel

Figure 45.

When you enter the RF line command or the RF primary command and press
Enter, File Manager displays the refreshed record (assuming, for this example, that
another user has updated the record) as shown in Figure 46 on page 98.

Chapter 3. Viewing and changing data sets 97


Refreshing the contents of a record

Process Options Help



Edit FI:FMNKSB1 DS:FMN.RFM0201.KSDS Re RF done
Command ===> Scroll CSR
Type KSDS Format SNGL
Top Line is 1 of 5
Current 01: REC-TYPE1
Field Data
FIRSTPART 0
LASTTWO 1
TEXTFIELDMAIN A updated record
TEXTMINOR1 AAAAAAAAAAAAAAA
TEXTMINOR2 AAAAAAAAAAAAAAA
*** End of record ***

F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange


F7=Up F8=Down F10=Previous F11=Next F12=Cancel

Figure 46.

When you are using multi-line display formats (CHAR, HEX, LHEX, TABL), you
can refresh the contents of a record with either the RF or RFF primary command,
or the RF prefix command.

Note: If you do have any pending changes for a record, when you refresh the
record those changes are discarded without further warning. This can be
useful however if, for example, you want to undo your changes to a specific
record, or refresh its contents when an integrity check has occurred when
attempting to save your change.

RELATED TOPICS
RF primary command on page 806

Refresh of a record in SNGL display format


In SNGL display format, the record is refreshed whenever you navigate to it. That
means that the record is read just before being displayed so that you are seeing the
most recent version of the record (that it is possible for File Manager to display).

For example, if you use the NEXT command (PF11) followed by the PREVIOUS
command (PF10), then you will see any updates made by another user to the
original record you were viewing. (This is only true if you do not have any
pending changes for the record.)

RELATED TOPICS
NEXT primary command on page 789
PREVIOUS primary command on page 795

Saving individual records


File Manager provides commands to save individual records. In multi-line display
formats (CHAR, HEX, LHEX, TABL), use the SV or SVV primary command, or the
SV prefix command. In SNGL display format, use the SV primary command to
save the contents of the record currently being displayed.

RELATED TOPICS
SV primary command on page 822

98 File Manager for z/OS V12R1 User's Guide


Refreshing the contents of a record

Saving a file after a given number of updates (Autosave


frequency option)
File Manager can perform periodic file-wide SAVEs for shared files. The period or
frequency of the SAVE is controlled by the value of the Autosave frequency option
in the VSAM Edit Sharing Options panel as shown in Figure 47.

Process Options Help



File Manager VSAM Edit Sharing Options

These options apply only when editing VSAM files that are being shared.

Autosave frequency

Options for the CHANGE ALL command


SAVE before starting Enter ON or OFF.
Change all autosave frequency
Auto retry for change all Enter ON or OFF.

Command ===>
F1=Help F2=Split F3=Exit F4=CRetriev F7=Backward F8=Forward
F9=Swap F10=Actions F12=Cancel

Figure 47. VSAM Edit Sharing Options panel

You can access the VSAM Edit Sharing Options panel by the Options pull-down
menu, or by means of the menu options.

You can also disable or enable the Autosave frequency option, or specify a
frequency value, by using the AUTOSAVE primary command.

What counts as an update?: For the purposes of the Autosave frequency option,
the following are counted as one update:
Overtyping the contents of a record
Changing the contents of a record by overtyping, regardless of the number
of characters changed, is counted as a single change. If you press Enter
and then overtype your changed record again, this is counted as a second
change.
Using a prefix command that alters record data
A prefix command that alters data, such as ">" (the command for shift
right), is counted as a single change. Use of a prefix command is counted
as only one change, even if the command is used to alter multiple records.
The CHANGE or RCHANGE primary command
When you issue the CHANGE or RCHANGE primary command without
the ALL operand, the command counts as one change for each record it
actually changes.

RELATED TOPICS
CHANGE/CX primary command on page 741
RCHANGE primary command on page 798

Chapter 3. Viewing and changing data sets 99


Refreshing the contents of a record

CHANGE ALL, automatic saving and retry


On the VSAM Edit Sharing Options panel, there are three options that relate
specifically to the CHANGE command when used with the ALL operand:
v SAVE before starting
v Change all autosave frequency
v Auto retry for CHANGE ALL

In a similar way to the Autosave frequency option, these options allow the change
process to count the number of changes made and perform a periodic SAVE of the
file being changed. In addition, the Auto retry for CHANGE ALL option is useful
for retrying changes to records which encountered an integrity check at the time of
the automatic save during the CHANGE command process.

When you select the CHANGE ALL autosave frequency option, it is highly
recommended that you specify a frequency and also select the Auto retry for
CHANGE ALL option in order to gain the most benefit from these two features.

For the CHANGE ALL autosave frequency option, changes are counted for each
record that is changed.

You can also change the setting of the CHANGE ALL autosave frequency option
and the Auto retry for CHANGE ALL option with the CHGASAVE and
AUTORTRY primary commands respectively.

When you use these options, be aware that:


v Other changes (such as overtyped records), made before the start of the
CHANGE ALL command, are saved either before the CHANGE command
commences processing if the SAVE before starting option is ON, or at the time
of the first automatic save at the CHANGE ALL autosave frequency if the SAVE
before starting option is OFF.
v Any changes outstanding at the completion of the CHANGE ALL command are
saved, regardless of the current change count.
v All records are refreshed at the completion of the CHANGE ALL command.

RELATED TOPICS
CHANGE/CX primary command on page 741
CHGASAVE primary command on page 747
AUTORTRY primary command on page 733

Editing techniques
When you attempt to edit a data set, File Manager examines your editing options,
data set type and size, and uses one of three main variations of editing technique.
Although these techniques should be virtually transparent to you, they are
explained here.

The type of edit taking place is visible during the editor session by a denotation in
the top left of the editor panel title line:
Edit Denotes a full edit (that is, including the ability to insert and delete
records, and the ability to copy and move records).
See:
v In-memory edit on page 102
v KSDS edit on page 103

100 File Manager for z/OS V12R1 User's Guide


Editing techniques

Aux Edit
Denotes a full edit (that is, including the ability to insert and delete
records, and the ability to copy and move records) where File Manager is
making use of a secondary file to enable the edit.
See:
v Auxiliary edit on page 102
Inplace Edit
Denotes that records may only be updated in place, and that the ability to
insert or delete records is not available.
See:
v In-place-in-memory edit
v In-place edit

If you do not need to insert or delete records, you can improve the performance of
the Edit session (especially when working with large files) by selecting the Inplace
edit option. This avoids the associated delays of copying to and from an auxiliary
file.

Note: Unless the text in other sections of this chapter explicitly refers to one of
these editing techniques, the information in this chapter applies to all
editing techniques. Differences between In-memory, Auxiliary, and In-place
editing are highlighted where applicable.

The following sections describe the different editing techniques.

In-place-in-memory edit
This type of In-place edit keeps as many of the records of the data set in virtual
storage as will comfortably fit (or as many as specified by a record limit). The data
set is updated from these records kept in storage when you enter a SAVE, END, or
FILE command.

When File Manager uses this editing technique, it displays "Inplace Edit" in the top
left of the editor panel title line.

File Manager uses this type of edit when:


v You have selected Inplace edit and the data set being edited is small enough to
be loaded entirely into memory, or
v You have specified a record limit of MEMORY, or
v You have selected Record Sampling, or
v You have applied a segmented data template containing selection criteria

In-place edit
This type of In-place edit only keeps records in storage that are currently displayed
or that have been modified. The data records are replaced in the data set from the
modified records kept in storage when you enter a SAVE, END, or FILE command.

When File Manager uses this editing technique, it displays "Inplace Edit" in the top
left of the editor panel title line.

File Manager uses this type of edit when:


v You have selected Inplace edit and the data set being edited is too large to be
loaded entirely into memory, or

Chapter 3. Viewing and changing data sets 101


Editing techniques

v You have applied a segmented data template

The distinctive thing about both In-place edits, as the name is intended to convey,
is that records may only be updated in place. Inserts, deletes, and record length
changes are not possible. Note that for VSAM RRDS in In-place mode, the delete
and insert commands have a slightly different meaning than normal, in that slots
may be marked as empty by the delete command and made active again by the
insert command.

RELATED TOPICS
Editing large files on page 103

In-memory edit
With this type of edit, File Manager first tests the available TSO region size and, if
the region is large enough, reads the entire data set into memory before displaying
the first screen of data. This may cause a noticeable delay whilst loading, but
subsequent operations are quicker. As with any usage of large amounts of TSO
region, a large File Manager editor region can also have a noticeable effect on other
address spaces or cause excessive paging.

When File Manager uses this editing technique, it displays "Edit" in the top left of
the editor panel title line.

The data set is completely rewritten from the records kept in storage when you
enter a SAVE, FILE, or END command.

File Manager uses In-memory edit when:


v You have not selected Inplace edit, and
v The data set is a QSAM data set (this may be a member of a PDS or PDSE) or a
VSAM REUSE data set, and
v You have not specified a starting point or record limit, and
v The entire data set is small enough to fit comfortably within the available TSO
region

Auxiliary edit
Auxiliary edit copies the original data set to a secondary data set. Only records
currently being displayed or that have been modified (by change, delete, insert) are
kept in storage. File Manager recreates the original data set from the secondary
data set and the In-memory changes when you enter a FILE or END command.
The SAVE command is not supported when editing a data set using this method.
You must end the editor session and re-edit the data set.

When File Manager uses this editing technique, it displays "Aux Edit" in the top
left of the Edit panel title line.

File Manager uses Auxiliary edit when you have not selected Inplace edit, or you
selected to edit an HFS file, or you selected to edit an SMS-compressed data set,
and:
v There is insufficient TSO region for In-memory edit, or
v You have specified a starting position or record limit

The auxiliary data set created by File Manager uses your TSO ID as the prefix
High Level Qualifier. Your site may have its own standards and naming

102 File Manager for z/OS V12R1 User's Guide


Editing techniques

conventions for these data sets which result in the assignment of different storage
categories (for example, classes, units, or privileges).

Your FM Administrator can change this default in the customization and


installation process. To override this default:
1. From the Primary Options menu, select option 0.8 to display the Set Temporary
Data Set Allocation Options panel.
2. Enter a name pattern in the High Level Qualifier field. The pattern can be any
multi-level qualifier, up to 24 bytes, and can include the following symbols:
&USER
Represents User ID
&PREFIX
Represents TSO prefix
Multi-level qualifiers that include symbols follow the same rules as used in JCL
procedures for data set names with symbolic parameters. For example,
assuming &USER=XXXX and &PREFIX=YYYY, the following HLQs could be
set:
&USER.1.TEMP.&PREFIX becomes XXXXl.TEMP.YYYY
FMN.&USER..ABCO becomes FMN.XXXX.ABCO
The temporary HLQ serves as a user-created prefix for data sets created by File
Manager. These data sets have fixed names which can vary in length. The
maximum system limit for a fully-resolved data set name (that is, the HLQ and
the fixed name) is 44 bytes. If the combination of the HLQ and the fixed name
resolve to more than 44 bytes, the least important part of the HLQ (the
rightmost level) is ignored.
Each level can only be 8 bytes long. If a construction such as &USER.ABCD
resolves to more than 8 bytes, the rightmost part of the string is ignored.
3. If your site uses the Storage Management System (SMS), enter values in the
Data class, Storage class, and Management class fields.
4. Press F3 to save the settings and exit from the panel.

RELATED TOPICS
Editing large files
Editor Options panel on page 541

KSDS edit
A VSAM KSDS file has, by its nature, the ability to insert and delete records,
without requiring them to be in sequence (as they are sequenced by VSAM in their
key order). Hence applications intending to add, change, or remove records (such
as File Manager) do not need to keep the entire file contents available (in order to
rewrite the entire file) when saving changes. So, for KSDS files, File Manager only
keeps new, changed, or deleted records in storage (as well as those currently being
displayed). So it is possible for File Manager to edit a KSDS file of any size,
without needing to employ the auxiliary edit technique described earlier.

When File Manager uses this editing technique, it displays "Edit" in the top left of
the editor panel title line.

Editing large files


Using Auxiliary edit or In-place edit, you can edit large files, regardless of their
size, without the need to first break them up into smaller subsets.

Chapter 3. Viewing and changing data sets 103


Editing techniques

If you do not select Inplace edit on the editor entry panel and perform either of
these actions:
v You attempt to edit a QSAM data set or a VSAM ESDS or RRDS data set
defined with the REUSE attribute but it is too large to fit into available memory,
v You attempt to edit a QSAM data set or a VSAM ESDS or RRDS data set
defined with the REUSE attribute, and you specify a start position or record
limit
File Manager uses an auxiliary file in order to fulfill your request and issues
progress messages periodically during the pre and post edit copy process.

Editing load modules


You can edit load modules located in a PDS(E) using File Manager. The edit
method defaults to in-place so you cannot delete or insert records.

Note: Special authority may be required for this function, depending on the
installation options. For more information, see the File Manager Customization
Guide.

Changing data
When editing a data set, you can change the data:
v In individual records by overtyping the data within the record or by entering a
prefix command in the prefix area next to each row. This method is useful when
you need to make ad hoc changes to specific records.
v In multiple records by entering primary commands on the Command line. This
method is useful when you need to apply global changes or changes to groups
of records that have a common denominator.
The effects of these changes can be limited by using command parameters or by
applying limiting methods (see Limiting the effect of editing changes on page
111).
The tasks described in this section are:
Changing data in individual records
Change data in multiple records on page 105
Locating labeled records on page 106
Changing the case of data on page 106
Finding and replacing strings on page 107

Changing data in individual records


To change the data in an individual record:
1. Move your cursor to the position where you want to start editing the text.
This can be done with your mouse or arrow keys or by using the LOCATE or
FIND commands.
2. Overtype the existing text with your changes or insert or delete characters.
3. When you change a numeric field by overtyping the existing contents, File
Manager performs the following steps to determine the new value of the field:
a. Scans the contents of the field from left to right.
b. Ignores leading blanks
c. Uses the numeric digits present in the field up to either the end of the field,
or up to the first embedded blank.
d. Ignores any characters to the right of an embedded blank.

104 File Manager for z/OS V12R1 User's Guide


Changing data

For example, File Manager treats the following 8-character numeric field as
having the value, 30,123:
30123

but treats the following 8-character numeric field as having the value, 30:
30 123

4. Press Enter (or any function key except Help (F1) or Cancel (F12)).
Your changes are saved in memory but not written to the file, and the changed
record becomes highlighted. You can change more than one record at a time
before entering the changes. Your accumulated record changes are only written
to file when you issue a SAVE, FILE, END or EXIT command.

Change data in multiple records


When you are editing data, you can change data in multiple records, by entering a
primary command. The following table lists these commands in functional groups:

To do this... Use... See page


Limit the column range affected by the CHANGE, BOUNDS 735
EXCLUDE and FIND commands.
Find and replace a character string (or a numeric value in a CHANGE 741
numeric field)
Change data in error CE 738
Split or join records JOIN 777
SPLT 820
SPLTJOIN 820
Save your edited data or cancel without saving CANCEL 736
SAVE 811
FILE 763
Control the display of the prefix area PREFIX 795
Cancel pending prefix commands, remove record labels, RESET 804
display excluded records, and remove highlighting from
found strings.
Exclude certain records from display EXCLUDE 756
Delete data, and recover deleted data DELETE 752
RECOVER 120
Copy data within the same record COPY 748
Limit the columns to be edited BOUNDS 112
Translate data to uppercase CAPS 106
CASE 106

Differences between primary commands when editing and


viewing
These primary commands, available in both View and Edit, have the following
additional features in Edit:
CANCEL, END and QUIT
In View, CANCEL, END and QUIT are synonymous. In Edit, END
automatically saves changes before ending the editor session, while
CANCEL and QUIT end the editor session without saving changes; if you
have made any changes, File Manager displays a message box asking you
to confirm that you want to discard those changes.

Chapter 3. Viewing and changing data sets 105


Changing data

Locating labeled records


You can use LOCATE to move to a record to which a particular label has been
assigned. For example, to move to the record labeled .HERE, enter the following
command:
LOCATE .HERE

For more information about creating and using labels, see Labelling record
ranges on page 116. For more information about using the LOCATE command,
see Finding specific data on page 87.

Changing the case of data


You can translate data to uppercase on input, or you can change the case of
existing data to upper or lowercase.

The CAPS initially ON - translate changed data to uppercase (CAPS) option on


the relevant Editor Options panel determines the initial setting of the "convert to
uppercase" feature. Select this option if you normally want data entered in input
fields converted into uppercase. Do not select this option if you want to enter
lowercase or mixed-case data. This option also affects the processing of CHANGE
arguments.

The CAPS and CASE primary commands control whether data in the data area is
translated to uppercase on input (CAPS, CAPS ON or CASE UPPER), or left alone
(CASE, CASE MIXED or CAPS OFF. As already mentioned, the initial setting of
the "convert to uppercase" feature at the start of an editor session is determined by
whether the CAPS initially ON - translate changed data to uppercase (CAPS)
option on the Editor Options panel is selected or not.

The CASE UPPER, CAPS or CAPS ON commands are similar to the ISPF editor
CAPS command. If you enter any of these commands, or the CAPS initially ON -
translate changed data to uppercase (CAPS) option is selected (and no CAPS or
CASE commands have been used in the current File Manager session):
v If you overtype any data in a record, then:
In CHAR, HEX or LHEX display format, the entire record is translated to
uppercase.
In SNGL or TABL display format, only the current field is translated to
uppercase.
v The CHANGE command treats the new (replacement) string as if it were
specified in all uppercase except in these case:
The new string is enclosed in quotation marks, prefixed by the letter C (for
example, C'New String')
The new string is specified as a hexadecimal string (for example, X'C1C2C3')
If either of the above is true, then the new string is not translated to uppercase.

The CAPS OFF, CASE, and CASE MIXED commands have the same effect. If you
enter any of these commands, or the CAPS initially ON - translate changed data
to uppercase (CAPS) option is unselected (and no CAPS or CASE commands have
been used in the current editor session):
v Translation to uppercase is turned off.

Any CAPS command overrides any previously entered CASE command, and any
CASE command overrides any previously entered CAPS command.

106 File Manager for z/OS V12R1 User's Guide


Changing data

Note: In the ISPF editor with CAPS ON, a line is considered changed if you type
anything on the line (if you overtype a space with a space, it is considered to
be a change). However, in a File Manager editor session, overtyping a
character with the same character is not considered a change.

You can change the case of existing data to uppercase or to lowercase, without
having to input new data, by using prefix commands.

Caution: These prefix commands (LC, LCn, LCC, UC, UCn, UCC) affect all
characters in a record, not just characters in those fields with an
alphanumeric or character data type. This means that numeric data, such
as binary data or packed decimal data, can be corrupted by using these
commands.

To change existing data to uppercase:


1. Position your cursor in the prefix area of the record that you wish to change.
2. Type the UC or UCn prefix command, where n represents the number of
records to be changed, or type UCC on the first of a block of records to be
changed and UCC in the prefix area of the last record in the block.
3. Press Enter. The records are changed to uppercase.

To change existing data to lowercase:


1. Position your cursor in the prefix area of the record that you wish to change.
2. Type the LC or LCn prefix command, where n represents the number of records
to be changed, or type LCC on the first of a block of records to be changed and
LCC in the prefix area of the last record in the block.
3. Press Enter. The records are changed to lowercase.

Finding and replacing strings


To find and replace one or more occurrences of a character string in a data set or
data set member, you can use the CHANGE primary command. In SNGL or TABL
display format, you can also use the CHANGE command to find and replace a
numeric value in numeric fields.
Notes:
1. To find and replace long strings that do not fit on the Command line, use the
CX command (see Handling long strings in CHANGE on page 110).
2. To find and replace strings in multiple data sets or data set members, use the
Find/Change Utility (see Finding and changing data in multiple PDS
members on page 264).
3. To find a string or numeric value without changing it, use the FIND primary
command. See FIND/FX primary command on page 764.

To change character strings with the CHANGE command:


1. Display your data in the editor panel (see Starting and ending editor sessions
on page 55 for details).
2. If you are using a template and wish to limit the effects of the CHANGE
command, apply suitable record identification or record selection criteria to
select your records for processing (see Selecting records with templates on
page 197).
3. If you want to prevent particular records from being affected by the CHANGE
command, use commands such as BOUNDS or EX to limit the range of the
CHANGE command (see Limiting the effect of editing changes on page 111).

Chapter 3. Viewing and changing data sets 107


Changing data

4. On the Command Line, enter the CHANGE command, together with any
desired parameters, and the search and replace strings. For example:
CHANGE black white
See CHANGE/CX primary command on page 741 for details about the
syntax and parameters of the CHANGE command.
The CHANGE command highlights all occurrences of the search string or
numeric value in the entire data set.
To turn off the highlighting, enter the RESET FIND command.
If the CHANGE command changes data, then File Manager places the cursor at
the start of the changed data; if necessary, automatically scrolling to bring the
data into view.
To change the next occurrence of the string, press the RChange function key
(F6).
To find the next occurrence of the string and optionally change it, use a
combination of the RFind function key (F5) and the RChange function key (F6).
To find the same string as you specified on the previous CHANGE primary
command, specify an asterisk (*) as the search string.
To use the same replacement string as you specified on the previous CHANGE
primary command, specify an asterisk (*) as the replacement string.
To limit the search for a string to only where it appears as a prefix in the data,
specify the PREFIX parameter.
To limit the search for a string to only where it appears as a suffix in the data,
specify the SUFFIX parameter.
To limit the search for a string to only where it appears as a "word" in the data,
specify the WORD parameter.
To change all occurrences of the string (except those in not-selected or
suppressed records), use the ALL parameter with the change command.

The CHANGE command does not affect not-selected or suppressed records that are
hidden or represented by shadow lines. To include these records in a CHANGE
command, you need to show them. For details, see SHOW primary command on
page 815.

The CHANGE command does affect records that have been hidden using the
EXCLUDE command, unless you have used the NX parameter. If a change affects
an excluded record, it becomes not-excluded. For more information on using the
EXCLUDE command or EX and NX parameters, see Excluding records on page
115, CHANGE/CX primary command on page 741 or EXCLUDE/XX primary
command on page 756.

If you have zoomed in on a record, then the CHANGE command affects only that
record. See Zooming in to see all of a record on page 75.

The CHANGE command may affect record length:


v When you use the CHANGE command in CHAR, HEX or LHEX display format:
For variable-length files where the edit type supports record length changes,
if string2 is longer than string1 and there are not enough EBCDIC blank
characters (X'40') at the end of the record to accommodate the difference in
length, File Manager expands the record length as required.
For variable-length files where the edit type supports record length changes,
if string2 is shorter than string1, then File Manager reduces the record length
as required.

108 File Manager for z/OS V12R1 User's Guide


Changing data

Otherwise, for fixed-length files, or where the type of edit prevents record length
changes:
If string2 is longer than string1, then the change only occurs if there are
enough EBCDIC blank characters (X'40') at the end of the record to
accommodate the difference in length. File Manager maintains the same
record length by dropping blanks from the end of the record.
If string2 is shorter than string1, then File Manager maintains the same record
length by padding the end of the record with blanks.
v If you use the CHANGE command in SNGL or TABL display format to change a
non-numeric field, the change is the same as the above fixed-length
considerations except it applies to a field rather than a record. When record
length changes are possible, and the field being affected by the change overlaps
the end of the underlying record, File Manager may expand the record as
required to complete the change request. This only occurs when the underlying
record is shorter than the record structure.
If you use the CHANGE command in SNGL or TABL display format to change a
numeric field, then the length of string1 and string2 are not significant. For
example, if field #2 is a numeric field, then the following CHANGE command is
allowed, because string1 and string2 are interpreted as numeric values:
CHANGE 107 2 #2
For more information on changing values in numeric fields, see Searching
numeric fields on page 87.
v If the argument is a DBCS string, only data between a shift-out and shift-in is
searched for a match. For example, a DBCS blank X0E40400F does not find two
consecutive blanks in non-DBCS data.
The exception to this rule is in TABL or SNGL format where the field is a
graphic field. Unformatted graphic fields are not treated as DBCS.

For details on limiting the columns, fields or records searched by the CHANGE
command, see Limiting the effect of editing changes on page 111.

Examples
v If you are not using a template:
CHANGE CAT DOG
When zoomed in, changes the next occurrence of CAT to DOG in
the current record only. Otherwise, changes the next occurrence of
CAT to DOG.
CHANGE YELLOW ORANGE ALL
When zoomed in, changes all occurrences of YELLOW to ORANGE
in the current record only. Otherwise, changes all occurrences of
YELLOW to ORANGE in all records.
v If you are using a template, and the data is displayed in SNGL or TABL format:
CHANGE BLACK WHITE (#4 #7)
In TABL format, changes the next occurrence of BLACK to WHITE,
where BLACK is completely contained within either of the fields
represented by field references 4 and 7. In SNGL format, changes the
next occurrence of BLACK to WHITE, where BLACK is
completely contained within either of the fields represented by field
references 4 and 7, in the current record only.
CHANGE BLACK WHITE ALL #2,#8
In TABL format, changes all occurrences of BLACK to WHITE,
where BLACK is completely contained within either of the fields
Chapter 3. Viewing and changing data sets 109
Changing data

represented by field references 2 and 8, in all records. In SNGL format,


changes all occurrences of BLACK to WHITE, where BLACK is
completely contained within either of the fields represented by field
references 2 and 8, in the current record only.

Handling long strings in CHANGE


You can use the CHANGE command to specify from and to strings up to 100
characters long. However, when you are dealing with long strings, you might find
that you cannot fit the whole CHANGE command (including other parameters) on
the Command line. To overcome the problem, do one of the following to display
an Extended Command Entry pop-up panel (see Figure 48 on page 111):
v Enter CX (for Change Extended)
v Enter the CHANGE primary command (or one of its abbreviations, such as C)
with no parameters.

The Extended Command Entry pop-up panel contains five lines (each 50 characters
long) that you use to enter all the CHANGE command parameters (but not the
actual keyword CHANGE or any of its abbreviations). File Manager treats the five
lines on the pop-up panel as contiguous, allowing you to specify long from and
to strings and any other parameters, using up to 250 characters in total.

Note: You can continue a string (or any other parameter) from the last position on
one line of the pop-up panel to the first position of the next line. However,
this does not mean that you need to completely fill a line before using the
next line. For example, you can specify the from string on the first of the
five lines, the to string on the next line, and the other parameters on the
next line. If you are not specifying a quoted string and you do not use all of
a line, File Manager treats the unused part of the line as a single space.
When you specify a string with quotes, any trailing blanks and any leading
blanks in the next line are retained.

Figure 48 on page 111 shows the Extended Command Entry pop-up panel for the
CHANGE command. In this example, all occurrences of the string
dichlorodiphenyltrichloroethane in field #3 are to be changed to the string
trinitrophenylmethylnitramine for non-excluded records only.

110 File Manager for z/OS V12R1 User's Guide


Changing data

Process Options Help



Edit FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 1 of 40
Format TABL
Extended Command Entry

Complete typing the CHANGE command and press Enter.
->
0 CHANGE ===> dichlorodiphenyltrichloroethane
0 ===> trinitrophenylmethylnitramine
0 ===> all #3 nx
0 ===>
0 ===>
0
0
0 F1=Help F2=Split F3=Exit F9=Swap F12=Cancel
0
000009 000140 ammonium hydroxide solution
000010 000150 dichlorodiphenyltrichloroethane
000011 **** End of data ****

Command ===> cx Scroll 0001


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 48. Extended Command Entry pop-up panel for the CHANGE command

RELATED TOPICS
Handling long strings in EXCLUDE on page 91
Handling long strings in FIND on page 88
CHANGE/CX primary command on page 741

Changing invalid numeric fields in your data


To change an invalid numeric field in your data (all asterisks shown in the field
display) to a specified numeric value, you can enter the CE (Change Error)
primary command.

The find argument for the CE command is assumed to be a numeric field in error.

When a numeric field in error is found, it changes the field to the string specified
in the CE command. The specified string must, of course, be a valid numeric value.

To change the next field in error (to the same value), either enter the CE command
again, or press the RChange function key (F6).

To just find numeric fields flagged as being in error (without changing them), use
the FE primary command.

RELATED TOPICS
CE (Change Error) primary command on page 738
FE (Find Error) primary command on page 761
Limiting the effect of editing changes
Editor panel on page 529

Limiting the effect of editing changes


When you use prefix commands to edit data, the changes made are applied to the
current record only. When you use primary commands to change data, the changes
may be applied to the entire data set. While many of these commands have
parameters that allow you to limit the effect of the command, there are several

Chapter 3. Viewing and changing data sets 111


Limiting the effect of editing changes

additional methods that you can use to limit the effect of primary commands to
only those records that you want to change.

These methods are:

Limiting method CHANGE DELETE EXCLUDE FIND


Bounds U U U

Set left and right column bounds.


Column ranges U U U

Override the bounds by specifying column


numbers on the command.
Field list1 U U U

Use #n field references to specify the fields


to be searched.
Excluding records U U

Use only excluded records, not-excluded


records, or both.
Record ranges U U U U

Use record labels to specify a record range.

Notes:
1. SNGL and TABL display formats only.

The tasks described in this section are:


v Setting bounds
v Setting column ranges on page 113
v Limiting the search to specified fields on page 114
v Excluding records on page 115
v Labelling record ranges on page 116
v Searching numeric fields on page 87

Setting bounds
In CHAR, HEX and LHEX display formats, you can limit the columns that are
searched by the CHANGE, EXCLUDE and FIND commands by setting left and
right bounds. There are two methods of setting these bounds.

Method 1:
1. On the Command line, enter
BOUNDS col1 col2

(see BOUNDS primary command on page 735 for information about the
parameters of the BOUNDS command).

Note: This method is very quick but does not give you any visual feedback as to
where the boundaries lie.

Method 2:
1. In the prefix area of any record, enter BND.

112 File Manager for z/OS V12R1 User's Guide


Limiting the effect of editing changes

A new row is inserted into the display, showing a left angle bracket (<) and, if
previously set, a right angle bracket (>).
File Manager Edit USERID.FMDATA(DATA1)
Col 1 Insert length 7996 Format CHAR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
000025 02Tyrone Dallas Developer 92 Smith Street Belmont
BND < >
000026 02Rod Turnbull Manager 184 Alexander Dve Swan View
If no bounds have previously been set, the left bracket appears in the first
column of your records. If bounds have already been set, the left and right
brackets appear in their pre-set columns.
2. Change the bracket positions to suit your needs, by overtyping existing
brackets and typing in a left and, optionally, a right bracket.
3. Press Enter or use a function key to scroll through your data. The bounds are
updated.

Note: You can display as many bounds lines as you want, which allows you to
insert them at convenient locations while you are editing. When the Enter
key is pressed, the most recently changed bounds line is processed to reset
the boundaries. If you change more than one bounds line before pressing
Enter, the lowermost of the changed bounds lines is processed.

Regardless of which method you used to set the bounds, you can reset the bounds
to their default by entering the BOUNDS command without any parameters
(equivalent to BOUNDS 1 max_record_length).

To remove a bounds line from the display, enter D in the prefix area of the line. To
remove all bounds lines from the display, enter RESET in the Command line.

Note: Removing the bounds lines from the display does not remove the actual
bounds.

Setting column ranges


By default, in SNGL or TABL display formats, if you enter the CHANGE, FIND, or
EXCLUDE command without specifying any field references, File Manager
searches all the visible fields based on the template attributes for each field.

You can override this method of searching by specifying a pair of column


numbers, indicating the first and last columns to be searched when you enter the
primary command.

Note: When you specify a column range, all fields in the record data are searched
as if they were character fields. For numeric fields, this can cause
unexpected results.

The search string is found if it is completely contained within the specified


columns.

The following command finds the next record, excluded or not-excluded,


containing the string Exact within columns 1 to 20:
FIND CExact 1 20

(For an explanation of excluded and not-excluded records, see Excluding records


on page 115.)

Chapter 3. Viewing and changing data sets 113


Limiting the effect of editing changes

The following command changes all occurrences of the string no, NO or nO


to No in columns 21 to 30 in all not-excluded records:
CHANGE NO CNo ALL 21 30 NX

If the second column that you specify is larger than the record size, then the record
size is used. If you specify a single column, then the character string must start in
the specified column.

Specifying either a single column or a pair of columns overrides the current


bounds. If you do not specify any columns then, when in CHAR, HEX or LHEX
display formats, the columns to be searched default to the current bounds (see
Setting bounds on page 112).

RELATED TOPICS
Finding specific data on page 87

Limiting the search to specified fields


In SNGL or TABL display format, you can optionally limit the effects of primary
commands to a specified field, a list of fields, or one or more ranges of fields.

You specify the fields to be searched using #n field references. These are displayed
above each field in TABL display format, or next to each field in SNGL display
format. The search string is found only if it is completely contained within one of
the specified fields.

Specifying a list of fields


When you specify a list of fields, you must specify them adjacent to each other.
You can optionally enclose the field references (optionally separated by commas) in
parentheses.

These are valid lists of fields:


#17
(#17)
(#17 #22)
(#17, #22)
#17,#22
#17 #22
#17, #22

The search string is found if it is completely contained within one of the specified
fields. For example, the following command excludes all records containing the
characters the (in any mix of uppercase and lowercase) in field #5:
EXCLUDE ALL the #5

The following command finds the next record containing an uppercase letter A in
field #8 or #9:
FIND CA #8,#9

Fields that are items of a multi-dimensional array share the same field reference
number, but are differentiated by the dimension, using a subscript. For example,
given the following field references (shown in TABL display format):
(1,1) (1,2) (1,3) (2,1) (2,2) (3,2)
#9 #9 #9 #9 #9 #9

You could specify the following lists of fields:

114 File Manager for z/OS V12R1 User's Guide


Limiting the effect of editing changes

FIND bike #9(1,2)


FIND bike (#9(1,3) #9(2,2))

To search all items in the array, specify:


FIND bike #9

Specifying ranges of fields


You specify a range of fields by nominating the first and last field reference of the
range, separated by a hyphen, with or without intervening spaces. You can
optionally enclose the range in parentheses.

These are valid ranges of fields:


#17-#19
#17 - #19
(#17-#19)
(#17 - #19)

To specify more than one range of fields:


v Enclose each field range in parentheses (optionally separated by commas), or
v Separate each field range with commas.

These are valid ranges of fields:


(#8-#11) (#17-#19) (#24-#25)
(#8-#11),(#17-#19),(#24-#25)
#8-#11,#17-#19,#24-#25
#8-#11 #17-#19 #24-#25
#8-#11, #17-#19, #24-#25
Notes:
1. When using field ranges, the field reference number can not be subscripted. For
example, #3(2) - #5(4) is not valid syntax.
2. Field ranges can overlap. For example, #2-#7, #5-#9. In this case, the result is a
consolidated single field range equivalent to #2-#9.

Excluding records
You can limit the records affected by the FIND, CHANGE and DELETE
commands, first by excluding some records from display, then by limiting those
commands to affecting only the not-excluded records, or only the excluded records.

To exclude individual records on an ad hoc basis, choose one of the following


methods:
v Enter X in the prefix command area of the record to be excluded.
v Enter Xn in the prefix command area of the first record of n records to be
excluded.
v Enter XX in the prefix command area of the first record of a block of records to
be excluded, then enter XX in the last record to be included in the block.

To exclude multiple records based on a common factor:


v Enter EXCLUDE with the relevant parameters on the Command line (see page
756).
For example, the following command excludes all records with an h or H in
column 3:
EXCLUDE ALL H 3

Chapter 3. Viewing and changing data sets 115


Limiting the effect of editing changes

EXCLUDE commands are cumulative; each successive EXCLUDE command


increases the number of records already excluded.

To unexclude (redisplay) excluded records, choose one of the following methods:


v To unexclude a single excluded record, enter F or L in the prefix command area
of the excluded line.
v To unexclude the first n records in a block of excluded records, enter Fn in the
prefix command area of the excluded line.
v To unexclude the last n records in a block of excluded records, enter Ln in the
prefix command area of the excluded line.
v To unexclude all excluded records, enter RESET EXCLUDED on the Command line
(see 804).

After you have excluded records, you can limit the effects of the FIND, CHANGE
and DELETE commands to only those records that are excluded or only those that
are not-excluded. You do this by including one of the following option parameters
with the primary command:
X or EX
Search only excluded records
NX Search only not-excluded records

For example, the following command changes all occurrences of the string no,
NO or nO to No in all not-excluded records:
CHANGE NO CNo ALL NX
Notes:
1. If neither parameter is used with the primary command, both excluded and
not-excluded records are affected.
2. If an excluded record is affected by a primary command, either by using the EX
parameter or by not specifying an EXCLUDE parameter, the record becomes
not-excluded.

Labelling record ranges


In any display format except SNGL, you can limit the number of records affected
by the CHANGE, DELETE, EXCLUDE and FIND commands by specifying a
record range. A record range consists of a pair of record labels indicating the first
and last records to be searched. The string is found if it is contained in a record
within the specified range.

To limit editing primary commands using your own labels:


1. Enter a label in the prefix area of one data record.
A record label consists of a period (.) followed by one to four alphabetic
characters (no numeric or special characters). Labels starting with .Z are
reserved for the editor (see Editor-assigned labels on page 117).
2. Enter a label in the prefix area of a second data record.
The order in which you specify the labels is not important.
3. Enter your primary command and any parameters, followed by two labels in
any order.
When you specify a record range, you must separate the two labels by a blank
or comma. A single label is invalid. The labels may be any combination of the
editor-assigned labels (.ZCSR, .ZFST, .ZLST) and labels you have assigned
yourself.

116 File Manager for z/OS V12R1 User's Guide


Limiting the effect of editing changes

Regardless of the order in which you specify the two labels, the label
representing the smaller relative line number is used as the start of the range
and the label representing the larger relative line number is used as the end of
the range.
Your cursor is positioned on the first instance that occurs within the range.
Notes:
1. When using FIND or CHANGE, all instances of your search string are
highlighted, however, only those instances within the range are affected by the
command or by the RFIND (F5) and RCHANGE (F6) commands.
2. Once assigned, a label stays with the record, even if the record is moved.
3. A label is removed when the record containing the label is deleted.
4. Overtyping a label with a prefix command does not remove the label. When
the command is complete, the record label reappears.
5. You can move a label to another record by typing the same label on a new
record.
6. If the range you specify includes not-selected or suppressed records that are
hidden from display or represented by shadow lines, then those records are not
affected by the CHANGE, DELETE, EXCLUDE or FIND command.
7. If the range you specify includes excluded records and you either use the EX
parameter or do not specify an EXCLUDE parameter, the records are affected
by the primary command. If an excluded record is affected by a primary
command, the record becomes not-excluded.

In the following example, the label .HERE is assigned to record number 16 and the
label .THRE is assigned to record number 129:
.
.
.
00015 This is a data record.
.HERE This is a data record with a label.
00017
. This is a data record.
.
.
00128 This is a data record.
.THRE This is a data record with a label.
00130
. This is a data record.
.
.

This range can now be used to limit a command:


CHANGE A B .HERE .THRE

The following command excludes all records, excluded or not-excluded, containing


the string where in the range of records from the label .HERE to the label
.THRE:
EXCLUDE Cwhere ALL ABC .HERE .THRE

To remove labels from records, do one of the following:


v For a single label: overtype the label with spaces (or a new label), then press
Enter.
v For all labels: enter the RESET LABEL command.

Editor-assigned labels
Some labels are automatically assigned and maintained by the editor. These special
labels begin with the letter Z. (Your own labels, therefore, must not start with a

Chapter 3. Viewing and changing data sets 117


Limiting the effect of editing changes

Z.) Unlike other labels, these editor-assigned labels do not necessarily stay with
the same record, but instead represent logical positions on the display. You can use
the following editor-assigned labels:
.ZCSR To the record on which the cursor is currently positioned.
To use this label:
1. Type the command and labels on the Command line but do not press
Enter.
2. Position your cursor anywhere in the record that you want to use as
the current position.
3. Press Enter. All records that lie between your cursor position and the
other label are included in the range, regardless of the order in the
labels occur in the data set or in which you specify the labels.
.ZFST To the first record (relative record number 1). This can be abbreviated to
.ZF.
.ZLST To the last record. This can be abbreviated to .ZL.

The following command changes the first occurrence of the string xxx in the range
of records from the current cursor position to the end of data:
CHANGE xxx yyy .ZCSR .ZLST

The following command finds the next record, excluded or not-excluded,


containing the string xxx in the range of records from the current cursor position to
the end of data:
FIND xxx .ZCSR .ZLST

Editing records within data sets


As well as editing the data within records, you can use File Manager to edit the
records within a data set.

The tasks described in this section are:


v Inserting records on page 119
v Deleting records on page 119
v Recovering deleted records on page 120
v Moving records on page 120
v Copying and repeating records on page 121
v Overlaying data in existing records on page 122
v Copying data to and from a clipboard on page 124
v Copying data from another data set on page 125
v Splitting and joining lines on page 126

Note: Many of these actions are performed using prefix commands. Generally, you
need to type over only the first 1 or 2 characters of the line number to enter
a prefix command. Sometimes, however, typing a single character can be
ambiguous. In the following example, it is unclear whether the intended
prefix command is R to repeat line 31700, or R3 to repeat the line three
times, R31 to repeat the line 31 times or R317 to repeat the line 317 times:
031600
R31700
031800

118 File Manager for z/OS V12R1 User's Guide


Editing records within data sets

In such cases, the editor assumes that you have not typed a number
following the prefix command. If you want to repeat the line three times,
you can type one or more blanks following the R3.
R3 700

Inserting records
When the display format is set to CHAR, HEX, LHEX or TABL formats, you can
insert new records into the data set. You cannot insert new records when the
display format is SNGL.

To insert new records in a data set:


1. Position your cursor in the prefix area of the record above which you want to
insert new records.
2. Type the I or In prefix command, where n represents the number of records to
be inserted.
3. Press Enter. The new record or records are inserted above your cursor position.
Each record is initialized as follows:
v If the display format is CHAR, HEX or LHEX, then the entire record is
initialized to blanks.
v If the display format is TABL, then the record is initialized according to the
record structure of the current record type:
Numeric fields are initialized to zero.
Alphanumeric fields are initialized to blanks.
If the record type contains a variable-length array, then the record is
initialized with the minimum number of array elements, and the array
size field (or fields, for multi-dimensional arrays) is initialized accordingly.

Note: The inserted records are not saved to the file until a SAVE, FILE, END or
EXIT command is issued.

Deleting records
You can delete records when in any display format, by using the DELETE primary
command. This allows you to delete all the records in a data set or to delete
multiple records based upon the following common factors:
v All excluded or not-excluded records (see Excluding records on page 115).
v All records that fall within a range specified by labels (see Labelling record
ranges on page 116).
v All excluded or not-excluded records that fall within a labeled range.

To delete records that have a common factor:


1. Establish the common factor for your records, that is, create your labels and/or
exclude the required records.
2. Enter the DELETE primary command, together with your choice of parameters,
on the Command line.

Examples

The following command deletes all excluded records:


DELETE ALL EX

Chapter 3. Viewing and changing data sets 119


Editing records within data sets

The following command deletes the next not-excluded record in the range of
records from the label .LABA to the label .LABB:
DELETE NX .LABA .LABB

In CHAR, HEX, LHEX or TABL display formats, you can also delete records by
using the D prefix command. Using the prefix command allows you to delete
individually selected records or blocks of records that have no other common
factor.

To delete individually selected records:


1. Perform either of these actions:
v Position your cursor in the prefix area of the first record to be deleted and
type the D or Dn prefix command, where n represents the number of records
to be deleted.
v Type DD in the prefix area of the first record of a block of records to be
deleted and DD in the prefix area of the last record in the block.
2. Press Enter. The record or record are deleted from the data set.

Note: The deletion of these records is not saved to file until a SAVE, FILE, END or
EXIT command is issued. You can recover these deleted records, before
ending your editing session, by using the RECOVER primary command.

Recovering deleted records


Records that are deleted during an editor session are stored in a buffer. At any
time before closing the editor panel, you can recover these deleted records.

To recover previously deleted records:


1. Enter RECOVER n on the Command line, where n represents the number of
records to be restored, starting with the last deleted record.

Records are stored in the buffer in the order in which they were removed, so that
the command RECOVER 1 restores the last record to be deleted, RECOVER 2 restores
the last two records to be deleted, and so on. Recovered records are inserted after
the first record visible at the top of the data area. If the first visible line is ******
**** Top of data ****, the records are inserted at the beginning of the data set.
Inserted records appear in the order in which they were deleted.

For example, if records 1, 5 and 7 were deleted from the data set in that order, the
command RECOVER 1 would restore record 7, but RECOVER 3 would restore records
1, 5 and 7 in that order (not as 7, 5, 1).

Recovering a record removes it from the buffer. If you delete the recovered record,
before saving the first recovery, you cannot recover it a second time. This can lead
to loss of data. To prevent data loss, issue the SAVE command after each
RECOVER command.

Note: When using an auxiliary edit, in order to minimize the recovery buffer
usage and allow for many records to be deleted, only the ten latest deleted
records are kept in the recovery buffer.

Moving records
You can rearrange the display of your records by moving them up or down in the
data set. For record types other than KSDS, the new sequence of the records is
stored when you save the data set. In a KSDS, moving records while editing
120 File Manager for z/OS V12R1 User's Guide
Editing records within data sets

changes the displayed position of records, but has no effect on the stored data set.
For this reason, the Move prefix commands as described in the following are not
available for a KSDS. If you want to change the order of records in a KSDS, you
must change the key values.

To move records within a data set:


1. Position your cursor in the prefix area of the first record that you wish to
move.
2. Type the M or Mn prefix command, where n represents the number of records
to be moved, or type MM on the first of a block of records to be moved and
MM in the prefix area of the last record in the block.
3. Press Enter. The prefix command is highlighted and the message "Prefix
command pending" is displayed in the upper right corner of your screen.
4. Move your cursor to the prefix area of the record where you would like to
place the moved records.
5. Type one of the following prefix commands:
A This command inserts the moved records after the current location.
B This command inserts the moved records before the current location.
6. Press Enter. The records are removed from their previous location and inserted
at the new position.

Note: When you move records with the M, Mn, or MM prefix commands, instead
of moving the data after or before other records, you can choose to overlay
the moved records on existing records in the data set you are editing. For
details, see Overlaying data in existing records on page 122.

Copying and repeating records


You can create copies of records in two different ways: by copying or by repeating
records. Copying allows you to place the copied records anywhere in the data set.
Repeating allows you to quickly duplicate a record, immediately after the selected
record.

To copy records within the data set:


1. Position your cursor in the prefix area of the first record that you wish to copy.
2. Type the C or Cn prefix command, where n represents the number of records to
be copied, or type CC on the first of a block of records to be copied and CC in
the prefix area of the last record in the block.
3. Press Enter. The prefix command is highlighted and the message "Prefix
command pending" is displayed in the upper right corner of your screen.
4. Move your cursor to the prefix area of the record where you would like to
place the copied records
5. Type one of the following prefix commands:
A This command inserts the copied records after the current location.
B This command inserts the copied records before the current location.
6. Press Enter. The copied records are inserted at the new position.

Note: When you copy records with the C, Cn, or CC prefix commands, instead of
copying the data after or before other records, you can choose to overlay the
copied records on existing records in the data set you are editing. For
details, see Overlaying data in existing records on page 122.

Chapter 3. Viewing and changing data sets 121


Editing records within data sets

To repeat records:
1. Position your cursor in the prefix area of the first record that you wish to
repeat.
2. Type the R or Rn prefix command, where n represents the number of records to
be repeated, or type RR on the first of a block of records to be repeated and RR
in the prefix area of the last record in the block.
3. Press Enter. The copied records are inserted immediately below the last record
selected for repeating.

Overlaying data in existing records


When data is to be copied or moved by the C (copy) or M (move) prefix
commands and overlaid on one or more existing records, the O (overlay) prefix
command specifies the destination for the data.

The data that is copied or moved overlays blanks in the destination records. This
allows you to rearrange a single-column list of items into multiple column, or
tabular, format.

When data is to be moved or copied and then overlaid on a destination:


v Where the destination is a single record:
The O (overlay) prefix command specifies the destination for the data.
You can type a number after the O prefix command to specify the number of
times that the M or C prefix command is to be performed. For example,
typing the command O3 against a record causes the data to be moved or
copied and then overlaid on that record and also the next two records.
v Where the destination is a block of records:
The OO (overlay, multiple-line target) prefix command specifies the first and
last record of the destination for the data.

To overlay one or more single records:


1. Type either M or C in the prefix area of the record that is to be moved or copied.
2. Type O in the prefix area of the record that the moved or copied record is to
overlay.
3. Press Enter. The data being moved or copied overlays the specified record or
records.

To overlay one or more blocks of records:


1. Type either MM or CC in the prefix area of the first and last records of a block of
records that is to be moved or copied. You can scroll (or use FIND or LOCATE)
between typing the first command and the second command, if necessary.
2. Type OO in the prefix area of the first and last records that the block of records
being moved or copied is to overlay. Again, you can scroll (or use FIND or
LOCATE) between typing the first OO and the second OO, if necessary.
3. Press Enter. The records that contain the two CC or MM commands and all of
the records between them overlay the records that contain the two OO
commands and all of the records between them.

Only blank characters in the records specified with O or OO are overlaid with
characters in the corresponding columns from the source records. Characters that
are not blank are not overlaid. The overlap affects only those characters within the
current column boundaries.

122 File Manager for z/OS V12R1 User's Guide


Editing records within data sets

The number of source and receiving records need not be the same. If there are
more receiving records, the source records are repeated until the receiving records
are gone. If there are more source records than receiving records, the extra source
records are ignored. The overlay operation involves only data records. Special lines
such as BNDS and COLS are ignored as either source or receiving lines.

Figure 49 illustrates the O (overlay) prefix command. Suppose you were editing a
list in a single left-adjusted column and wanted to place portions of the list
side-by-side. First, using the ) (column shift right) command, shift a portion of the
list the appropriate amount to the right to overlay in a multiple column format.
Next, type MM in the prefix area to mark the beginning and end of the block of
records you want to move, then type OO in the prefix area to mark the destination
of the records you want to overlay.

Process Options Help



Edit JOHNLEV.TEST.DATA(OLAY) Top of 16
Col 1 Insert Length 80 Record AT TOP Format CHAR
----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
000002
mm0003 THESE RECORDS TO BE COPIED
000004 THESE RECORDS TO BE COPIED
000005 THESE RECORDS TO BE COPIED
000006 THESE RECORDS TO BE COPIED
mm0007 THESE RECORDS TO BE COPIED
000008
oo0009 THESE RECORDS ARE THE TARGET
000010 THESE RECORDS ARE THE TARGET
000011 THESE RECORDS ARE THE TARGET
000012 THESE RECORDS ARE THE TARGET
000013 THESE RECORDS ARE THE TARGET
oo0014 THESE RECORDS ARE THE TARGET
000015 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Command ===> Scroll CSR
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 49. Before the O (Overlay) prefix command

When you press Enter, the editor overlays the records you marked to move on the
destination block. See Figure 50.

Chapter 3. Viewing and changing data sets 123


Editing records within data sets

Process Options Help



Edit JOHNLEV.TEST.DATA(OLAY) Top of 16
Col 1 Insert Length 80 Record AT TOP Format CHAR
----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
000002
000003
000004 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000005 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000006 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000007 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000008 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000009 THESE RECORDS TO BE COPIED THESE LINES ARE THE TARGET
000010 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
000011
****** **** End of data ****

Command ===> Scroll CSR


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 50. After the O (Overlay) prefix command

RELATED TOPICS
Editor panel on page 529
View panel on page 699

Copying data to and from a clipboard


In edit, the CUT and PASTE primary commands allow you to copy data to and
copy data from a clipboard respectively.

Copying data to a clipboard (CUT)


Use the CUT primary command to move or copy one or more records from the
current edit session into a clipboard for later retrieval by the PASTE command.

To specify the records to be put into the clipboard, use:


v Prefix commands C or CC to copy records.
v Prefix commands M or MM to move (copy, then delete) records.
v A range of line labels to copy records. For example:
CUT .ZF .ZL

If you do not specify a range, all edit session data is copied to the clipboard.

You can use the X or NX operands to copy only excluded or non-excluded data
within the range to the clipboard. The default is both excluded and non-excluded
data.

Suppressed and not-selected sets are not copied to the clipboard. To include the
data referenced by those sets, first expose the sets by issuing the appropriate
SHOW command.

To replace the contents of the clipboard, use the REPLACE operand. This is the
default.

To add to the existing contents of the clipboard, use the APPEND operand.

124 File Manager for z/OS V12R1 User's Guide


Editing records within data sets

To copy only excluded or unexcluded records to the clipboard, use the X or NX


operand.

If you do not specify a clipboard name on the command, File Manager saves the
data to the clipboard, DEFAULT.

When running under ISPF, clipboards created by File Manager can be accessed by
ISPF. Similarly, when running File Manager, clipboards created when running
under ISPF can be accessed by File Manager.

To view or edit an existing clipboard, issue the command CUT DISPLAY to display
the Clipboard Manager panel. This panel lists all the current clipboards.

Copying data from a clipboard (PASTE)


Use the PASTE primary command to copy records from a clipboard into the
current edit or view session.

If records in the clipboard are longer than the record length of the data set being
edited, the records are truncated.

Use the A or B prefix commands, or AFTER or BEFORE with a label, to specify the
destination of the records.

If you specified a name of a clipboard with the CUT command, you must use that
name on the PASTE command to retrieve the contents of that clipboard.

To empty the clipboard after the PASTE completes, use the DELETE keyword.

To copy the records from the clipboard (instead of moving them), use the KEEP
keyword.

RELATED TOPICS
CUT primary command on page 750
PASTE primary command on page 793
Clipboard Manager panel on page 464

Copying data from another data set


The COPY primary command allows you to copy one or more lines of data from a
data set or member of a partitioned data set (PDS) into the member or data set you
are currently editing or viewing.

Use the A (after) or B (before) line commands, or the AFTER or BEFORE keyword
with a label, to specify where the data is to be copied.

If you specify a member name as part of the COPY primary command, and you
have properly specified the "after" or "before" destination, the entire member or a
range of records in the member are copied in immediately.

Examples:
COPY memnam
Copies in entire contents of member memnam.
COPY (memnam) 2 10
Copies in lines 2 to 10 of member memnam.

Chapter 3. Viewing and changing data sets 125


Editing records within data sets

You can specify a partially qualified or fully qualified data set name as part of the
command. This can be a data set or another partitioned data set.

Examples:
COPY seqds
Copies in entire contents of sequential data set seqds.
COPY userid.seqds
Copies in entire contents of sequential data set userid.seqds.
COPY pds(mem)
Copies in entire contents of member mem within partitioned data set pds.
COPY pds(mem) 6 10
Member list is displayed. Copies in lines 6 to 10 of member mem within
partitioned data set pds.

If you enter the COPY command without specifying a member name or a data set
name, after you have specified a destination and pressed Enter, File Manager
displays the Edit/View - Copy panel.

Example:
COPY AFTER .HERE
Displays the Edit/View - Copy panel.

The Edit/View - Copy panel allows you to enter the name of a data set or PDS
(and member) containing the data you want to copy. If you do not want to copy
the entire contents, you can specify the numbers of the first and last records to be
copied.

RELATED TOPICS
COPY primary command on page 748
Edit/View - Copy panel on page 540

Splitting and joining lines


At times, you might want to split a record in two, or join two records together.
This is particularly appropriate when editing data sets that contain unstructured
text (such as a REXX procedure), as in these data sets, a record represents a line of
text.

Note: You cannot split or join a record when in SNGL or TABL display format, or
when zoomed in on a record.

To split a record in two:


1. Type the SPLT primary command on the Command line.
2. Position your cursor on the record that you want to split, at the column
position that you want to push to the next line.
3. Press Enter. A new record is inserted below your current record and the text
from your cursor position to the end of the record is moved to the beginning of
this record.

For example, when the following record is split at the cursor position (underlined
character):

126 File Manager for z/OS V12R1 User's Guide


Editing records within data sets

****** **** Top of data ****


000001 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
000002 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

the result is:


****** **** Top of data ****
000001 abcdefghijklmnopqrstuvwxyz
000002 abcdefghijklmnopqrstuvwxyz
000003 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

When you join two records, the text from the second record is combined with the
first record, overlaying the first record starting at the cursor position.

To join two records together:


1. Type the JOIN primary command on the Command line.
2. Position your cursor on the record that you want to combine with the next
record, at the column position where you want the second record text to begin.
3. Press Enter. The text from the following record is combined with the current
record, overlaying any existing text.
If the text in the second record does not fit into the remaining space in the first
record, it spills over into a new record.

For example, when the following records (length=50) are joined at the cursor
position (underlined character):
----+----1----+----2----+----3----+----4----+----5
000000 **** Top of data ****
000001 aaaaaaaaaaaaaaaaaaaaaaaaa
000002 bbbbbbbbbbbbbbbbbbbbbbbbb
000003 cccccccccccccccccccccccccccccccccccccccccccccccccc
000004 **** End of data ****

the result is:


----+----1----+----2----+----3----+----4----+----5
000000 **** Top of data ****
000001 aaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbb
000002 cccccccccccccccccccccccccccccccccccccccccccccccccc
000003 **** End of data ****

However, if these records were joined at the same position:


----+----1----+----2----+----3----+----4----+----5
000000 **** Top of data ****
000001 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
000002 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
000003 cccccccccccccccccccccccccccccccccccccccccccccccccc
000004 **** End of data ****

the result would be:


----+----1----+----2----+----3----+----4----+----5
000000 **** Top of data ****
000001 aaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbb
000002 bbbbbbbbbbbbbbbbbbbbbbbbb
000003 cccccccccccccccccccccccccccccccccccccccccccccccccc
000004 **** End of data ****

To avoid the danger of unintentionally overlaying data in the first record, you can
use the SPLTJOIN command, which can be abbreviated to SJ. This command splits

Chapter 3. Viewing and changing data sets 127


Editing records within data sets

or joins records depending upon the cursor position within a record. If the cursor
is after the last non-blank character in a record, the command performs a join. If
not, it splits the record.

Note: You may want to assign the SJ command to a function key, using the KEYS
command (see the ISPF User Guide Volume 1 for information on how to
assign commands to function keys).

Changing the length of a record


For those files that support variable-length records, you can change the length of
the record by displaying the record length in an edit session and then overtyping it
with the required value.

Note: You cannot change the length of a record in In-place edit.

You can display the record length by any of these methods:


v Entering the zoom mode from a CHAR, HEX, or LHEX display format.
v Displaying the record in SNGL display format.
v In multi-line formats (TABL, CHAR, HEX, and LHEX), issuing the RECLEN
primary command (RECLEN ON, RECLEN LEFT, or RECLEN RIGHT).
v Ensuring the Display record length option on the relevant Editor Options panel
is selected.

Note: If you increase the record length, the new bytes added to the record are
blanks.

RELATED TOPICS
Displaying the record length on page 77
RECLEN primary command on page 800
Zooming in to see all of a record on page 75
Editor Options panel on page 541
In-place edit on page 101

128 File Manager for z/OS V12R1 User's Guide


Chapter 4. Creating and editing templates
For many tasks performed with File Manager, you can manipulate your view of a
data set by applying a template. Templates can be pre-built for later use or
prepared "on the fly" within File Manager panels. You can also use templates when
programming File Manager functions in batch jobs, REXX procedures and TSO
CLISTS (described in Chapter 12, Introduction to programming with File Manager
functions, on page 391 and Chapter 13, Enhancing File Manager processing, on
page 399).

The major tasks and concepts described in this chapter are:


Template types and structure
Managing templates on page 142
Manipulating the display of fields in records on page 164
Mapping fields between templates on page 186
Managing templates with the Template Workbench on page 169
Copybook View and Print Utility (option 3.13 or 7.2) on page 195

Template types and structure


A File Manager template is a collection of information that you can use to select
and format records and fields in an application data set. The template provides File
Manager with a logical view of the data to be used when editing, viewing,
copying, printing and creating data sets. Templates can be based upon the
definitions in COBOL copybooks, PL/I INCLUDE, and HLASM copy members.
Additionally, record structure descriptions can be extracted from complete COBOL,
PL/I, or HLASM source programs. Alternatively, you can create your own record
structure description in a dynamic template.

The concepts and tasks described in this section are:


v Information stored in a template
v About copybook templates on page 131
v Segmented data templates on page 133
v About dynamic templates on page 136
v Data description support on page 136
v Setting your template processing options on page 142

Information stored in a template


The list below describes the information that a template can contain, and where
and how File Manager uses the information.
Record type selection
Determines which record types are selected or unselected.
Unselected record types are excluded when comparing, copying or
printing.
When creating a data set, the records in the new data set are of the record
type first selected in the template.
Record identification criteria
Determines which records belong to each record type in the template.

Copyright IBM Corp. 2000, 2012 129


Template types and structure

Records that do not belong to a record type in the template are indicated
as not selected when viewing or editing, and are excluded when
comparing, copying1 or printing.
Record selection criteria
Determines which records, having been identified as belonging to a record
type, are to be selected.
Records that do not match the record selection criteria are indicated as not
selected when viewing or editing, and are excluded when comparing,
copying1 or printing.
Records that are not selected may not be included in the editor session,
depending on the setting of the Include only selected records option.
Furthermore, if the template describes segmented data, the record selection
criteria affects the selection of the entire physical record. When this occurs,
none of the segments belonging to the physical record are provided in an
editor session and they are excluded when comparing, copying, or
printing.
Field selection
Determines which fields are displayed (when viewing or editing) or
printed. This information is ignored when comparing, copying or creating
data sets.
When copying, if you want to exclude some fields in the input data set
from being copied to the output data set, then you need to create a To
copybook or dynamic template without those fields.
When comparing, if you want to exclude fields from the comparison, you
need to create an Old and a New copybook or dynamic template and
then remove the default field mapping for the fields to be excluded.
Field sequence
Overrides the default order in which fields are displayed (when viewing or
editing) or printed. By default, fields are displayed or printed in the order
in which they were defined in the copybook. This information is ignored
when comparing, copying or creating data sets.
When copying, if you want to change the order of fields in the input data
set and the output data set, then you need to create a To copybook or
dynamic template with the fields in the desired order.
Key sequence
Determines the sequence of fields to be included in a multi-segment key,
which can be used when performing a file comparison with keyed
synchronization.
Field headings
Overrides the default field headings when viewing, editing, comparing or
printing. (The default field headings are the field names defined in the
copybook.)
Field attributes
The field name, data type, starting column and length, as defined in the
dynamic template or in the copybook on which a template is based. These
attributes are fixed in a copybook template, as they are determined by the
underlying copybooks, but can be edited in a dynamic template.
If you make minor changes to field attributes in a copybook, you can (with
some restrictions) update the template generated from it, while keeping all
of the other existing information in the template.

130 File Manager for z/OS V12R1 User's Guide


Template types and structure

Field use attributes


Consist of two attributes:
Output width
Defines the number of columns allocated to the field when
viewing, editing or printing. By default, this is the width defined
in the copybook by the picture specification.
If a numeric field contains a valid numeric value, but the value is
too large to fit in the output width, then, when viewing or editing
in SNGL or TABL display format, the value is truncated and
highlighted.
Leading zeros (numeric fields only)
Defines whether or not the field value is shown with leading zeros
when viewing, editing, comparing or printing.
Field create attributes
Defines the value to which the field is initialized when copying2 or
creating a data set.
Field mapping
Defines which fields in the From template map to fields in the To
template, when copying2 a data set; or which fields in the Old template
map to fields in the New template, when comparing two data sets.
Scrambling options
Determine how the contents of the field are scrambled (if at all) during a
copy process.
Notes:
1. When copying, File Manager uses this information in the From template. In a
To template, this information is ignored. However, when comparing, the
selection information in both the Old and New templates (if specified) is
used.
2. When copying, File Manager uses this information in the To template. In a
From template, this information is ignored.

RELATED TOPICS
Copying data sets on page 247
Comparing data sets using templates on page 278
Managing templates with the Template Workbench on page 169

About copybook templates


Copybook templates are templates where the field definitions are derived from one
or more copybooks. A copybook is a member containing either COBOL data
descriptions, PL/I DECLARE statements, or HLASM data definitions. Every
copybook template has a source definition.
Source definition
The source definition describes the copybook members, their
corresponding data sets, and how the field definitions are to be arranged
in a template. The simplest form of source definition is a single copybook
that contains all the record layouts required in their correct form. Single
copybook source definitions can be referred to directly and a copybook
template is built automatically from them.
Alternatively, you can provide an advanced copybook source definition that
describes one or more copybook members, inserted level-01 data items, the

Chapter 4. Creating and editing templates 131


Template types and structure

range of statements to be included, and how REDEFINES or UNION


clauses are to be interpreted in terms of record layouts.
A single copybook source definition can be the entire source of a program
or only field definitions.
An advanced copybook source definition must refer to fields definitions for
the same language, and the source must be members of a partitioned data
set.

The copybook template combines the layout information provided by the source
definition with additional information supplied by the user pertaining to
formatting, reformatting, record selection and data creation, to produce a logical
view of the data on which these functions can be performed.

In a copybook template, the field definitions (start position, length and type) are
not editable. However, copybook templates allow you to define a number of
different formats for use with data sets that contain multiple record types. Records
can be identified by type within a data set and each type can be associated with a
different format. This allows you to view data with different types at the same
time, and to view, edit or copy these records simultaneously. Copybook templates
also allow criteria editing by field or by a free format REXX selection expression.

To create a new copybook template, you begin with one or more copybooks
containing field definitions that describe the record structure of your data. When
you specify the copybook (or copybooks) on a panel, File Manager compiles the
descriptions into a template that you can save and reuse with any application data
set that has the same record structure.

In a COBOL copybook, each level-01 group item describes a record type in the
application data set. The elementary items in the group describe fields in the
record type. For example, the following copybook describes the record structure of
an application data set that contains two record types, ORDERS and ITEM:

01 ORDERS.
05 ORDER-ID PIC X(5).
05 CUSTOMER-ID PIC X(5).
05 ORDER-DATE.
10 ORDER-YEAR PIC 9(4).
10 ORDER-MONTH PIC 9(2).
10 ORDER-DAY PIC 9(2).
01 ITEM.
05 PRODUCT-ID PIC X(9).
05 QUANTITY PIC 9(4) BINARY.
05 UNIT-COST PIC 9(8) BINARY.

The ORDERS records contain five fields: ORDER-ID, CUSTOMER-ID,


ORDER-YEAR, ORDER-MONTH and ORDER-DAY. The ITEM records contain
three fields: PRODUCT-ID, QUANTITY and UNIT-COST.

PL/I copybooks are similar to COBOL copybooks, in that the major structures
(level-1 names) describe record types and elementary names describe fields:

132 File Manager for z/OS V12R1 User's Guide


Template types and structure

DECLARE 1 ORDER,
2 ORDERID CHAR(9),
2 CUSTOMERID CHAR(5),
2 ORDERDATE,
3 ORDERYEAR CHAR(4),
3 ORDERMONTH CHAR(2),
3 ORDERDAY CHAR(2);
DECLARE 1 ITEM,
2 PRODUCTID CHAR(9),
2 QUANTITY BIN(15),
2 UNITCOST BIN(31);

HLASM copybooks are similar to COBOL copybooks, in that the major structures
(DSECT names) describe record types and elementary names describe fields:

ORDER DESCT
ORDERID DS CL9
CUSTOMERID DS CL5
ORDERDATE DS 0CL8
ORDERYEAR DS CL4
ORDERMONTH DS CL2
ORDERDAY DS CL2
ITEM DESCT
PRODUCTID DS CL9
QUANTITY DS H
UNITCOST DS F

For information about coding copybooks, see the IBM COBOL Language Reference,
IBM VisualAge PL/I Language Reference, or the HLASM V1R5 Language Reference.

RELATED TOPICS
Specifying or updating the source definition for a copybook template on page
148
Advanced copybook selection on page 149
Set Language and Compiler Specifications (option 0.5) on page 650
Compiler Language Selection panel on page 465

Segmented data templates


File Manager offers template support for segmented records. A segmented record is
a record that contains one or more logical segments, each of which is defined and
identified by a copybook layout. When you apply a "segmented data template" to
these records, each segment is treated as a logical record within the supported
functions.

Figure 51 on page 134 shows a simple example of segmented records, seen without
using a template:

Chapter 4. Creating and editing templates 133


Template types and structure

----+----1----+----2----+----3----+----4----+----5----+
**** Top of data ****
01FINAccountant 020654John Browning 1875
01FINPurchasing Officer 021759Frederick Smith 1893
01FINAccounts Receivable 024163Annette Fielding 1856
01MKTSales Representative026584Jessica Simpson 1862
01MKTPromotions Manager 023579Catherine Jones 1812
01MKTMarket Research 021239Alan Johnson 1814
01ADMChief Executive 020124David Arrowsmith1801
01ADMSecretary/PA 024781Maryanne Davies 1802
01ADMReceptionist 026329Lizette Wilson 1800
01ADMClerical Officer 023571Stephen Hughes 1806
**** End of data ****

Figure 51. Segmented records with no template

Figure 52 shows the copybook definitions needed to define each record segment:

----+----1----+----2----+----3----+----4----+----5
**** Top of data ****
01 DEPT.
03 Rec-Type PIC XX.
03 Dept-ID PIC XXX.
03 Job-Desc PIC X(20).
01 EMPLOYEE.
03 Rec-Type PIC XX.
03 Emp-ID PIC 9999.
03 Given-Name PIC X(10).
03 Family-Name PIC X(10).
03 Extension PIC 9999.
**** End of data ****

Figure 52. Copybook definition for segmented records

Figure 53 on page 135 shows the DEPT. records in TABL format, after a segmented
data template (generated from the copybook) has been applied.

134 File Manager for z/OS V12R1 User's Guide


Template types and structure

REC-TYPE DEPT-ID JOB-DESC


#2 #3 #4
AN 1:2 AN 3:3 AN 6:20
<> <-> <---+----1----+---->
01 FIN Accountant
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 FIN Purchasing Officer
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 FIN Accounts Receivable
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 MKT Sales Representative
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 MKT Promotions Manager
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 MKT Market Research
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 ADM Chief Executive
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 ADM Secretary/PA
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 ADM Receptionist
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
01 ADM Clerical Officer
- - - - - - EMPLOYEE - - - - - - - - - - - 1 Line(s) suppressed
**** End of data ****

Figure 53. TABL view of segmented data with the DEPT Record Type selected.

The following utilities/functions can support the use of a segmented record


template:
View and Edit, DSU and DSEB functions
When a segmented data template is in use, File Manager uses In-place
Editing. Segments cannot be inserted, deleted, copied or moved. The
contents of segments can be edited but the length cannot be changed.
The BOUNDS primary command and BND prefix command cannot be
used. If you really want to do a change across some common portion of all
segments (or across certain columns of a certain segment), you can use the
column range parameters on the FIND or CHANGE commands.
The Audit Report identifies changed segments.
Copy utility and DSC function
When copying a data set, you can only apply a segmented data template
to the input data set. The output data set will contain a separate record for
each segment in the input data set.
Compare utility and DSM function
Segmented data templates can be used for either the Old or New data
sets or both. This allows you to compare segmented and non-segmented
data. For example, after copying segmented data to separate records in a
new data set, you might want to compare the data sets to ensure that no
errors occurred in the copying process.
Print utility and DSP function
Segmented data templates are supported in the Print Utility and DSP
function.

Note: Segmented data templates cannot be used for ISPF Packed data sets.

RELATED TOPICS

Chapter 4. Creating and editing templates 135


Template types and structure

Setting up a template to be used with segmented data on page 153


Viewing segmented data on page 223
Copying records with segmented data templates on page 256

About dynamic templates


Dynamic templates are created by users and contain customized field definitions,
consisting of the starting column, length and type of fields in the data set and,
optionally, a field name to identify the information. These field definitions can be
edited at any time. Dynamic templates are particularly useful when working with
data sets that do not have an appropriate copybook.

A dynamic template can only contain one record layout. All fields defined are
treated as Level 2 elementary items, with File Manager generating the Level 1
group item for the record. The generated Level 1 has a calculated record length,
determined by the rightmost byte referenced by the field definitions. Record
selection must be specified by field - you cannot specify a free format selection
expression for a dynamic template.

RELATED TOPICS
Creating dynamic templates on page 154

Data description support


Support for COBOL data description entries
In the COBOL data description entries specified in a copybook, File Manager
supports:
v ASSIGN clause
v OCCURS clause (including OCCURS DEPENDING ON)
v PICTURE clause
v REDEFINES clause
v RENAMES clause
v USAGE clause
v VALUE clause

File Manager ignores:


v BLANK WHEN ZERO clause
v DATE FORMAT clause
v EXTERNAL clause
v GLOBAL clause
v JUSTIFIED clause

Note: In general, File Manager treats Numeric Edited fields as alphanumeric. A


special code, ZA, is used for unsupported zoned decimals.

File Manager supports all data item level numbers except 88 (condition-names).

The literal value that you specify in a VALUE clause is used in the template to
specify the Start value (for numeric fields) or Pattern (for alphanumeric fields)
create attribute on the Field Attributes panel for that field.

File Manager uses this attribute to initialize the value of the field when creating
data or inserting new fields when copying data.

136 File Manager for z/OS V12R1 User's Guide


Template types and structure

Support for PL/I data description entries


In the PL/I data description entries specified in a copybook, File Manager
supports:
v PL/I data attributes VARYING and VARYINGZ for single and double-byte
character strings.
v PL/I bit variables including the VARYING attribute.
v Binary, decimal, floating point and numeric picture data (excluding symbols).
v REFER variables for array extents. Both upper and lower bound array elements
may be declared for each dimension. The number of extents for each dimension
is always:
upper bound - lower bound + 1

Note: A zero extent is not allowed for a PL/I dimension. If a bound is not
specified PL/I assumes a value of 1.
v REFER variable to declare the length of a string variable, character (AN),
varying-length character (VC) or zero-terminated character string (ZC) in bytes.
v File Manager also supports PL/I double-byte character variables (DB),
varying-length double-byte character (VD) and zero-terminated double-byte
characters (Z2) as byte pairs. File Manager also supports bit strings (BT) and
varying bit string (VB) variables.
v REFER variables can be declared as integer, fixed binary, packed decimal,
floating point, or character string variables.
v UNION declarations at any level which can have varying-length (REFER string
length or REFER array extents).

Note: UNIONS can contain overlays of different data types, which may require
template workbench record selection criteria or SHOW control if data is
not displayable.

File Manager ignores:


v INIT data values
v REFER start expression, for example, VAR(, expr Refer abc, ) or CHAR(expr
Refer abc).
v EXTERNAL attributes
v DEFINED structure overlays
v LIKE structure attributes

Note: In general, File Manager treats Numeric Edited fields as alphanumeric. A


special code, ZA, is used for unsupported zoned decimals.

Support for variable-length arrays


A variable-length array is defined in a COBOL copybook by an OCCURS
DEPENDING ON (ODO) clause, and in a PL/I copybook by a dimension attribute
where the lower or upper bounds (or both) are defined by REFER options, or
when a PL/I string data type has a REFER variable for the declared length, for
example, CHAR(expr REFER name).

The following considerations apply when using a template that contains


variable-length arrays:
v A record structure can contain multiple variable-length arrays; however, the
fields that define the size of the arrays (the ODO or REFER objects) must all

Chapter 4. Creating and editing templates 137


Template types and structure

appear in the record prior to the first variable-length array item, or, in the case
of PL/I REFER length, prior to the first string declared with a REFER length.
v If any of the following are true:
(COBOL copybook only.) The object is out of the range specified by the ODO
clause.
The actual record length does not match the calculated length of a record
with the number of array items specified by the object.
(PL/I copybook only.) The record length does not match the calculated length
of a record based on both string length REFERs and number of dimension
extents calculated from the lower and upper bound REFERS for each
dimension of an array.
When editing the data set, the prefix area contains the description =LGTH,
indicating that the record was not selected because of invalid length. (To
show these records, rather than hiding them with other not selected
records, select the Length error option on the Edit/Browse Options (option
0.8) panel.)
v In SNGL or TABL display format:
You can change the length of a record by changing the value of an object
field. This is an exception to the rule that the length of a record cannot be
altered in an Edit session, without using ZOOM.
When you change the value of an object field, then the number of items in
the array expands or contracts automatically.
New items are inserted at the end of the current array (and before any fields
that follow the array); numeric items are initialized to zero and alphanumeric
items are initialized to blanks.
Similarly, items are deleted from the end of the array, and any fields
subsequent to the end of the array are not affected.
For PL/I, the number of items in an array is determined by subtracting the
lower bound of the dimension attribute from the upper bound and then
adding one. If any REFER variables (fields) are specified as a lower or upper
bound of an array dimension, then changing the value of any REFER object
field inserts or deletes array items accordingly. For the TABL Format, if the
new number of array items exceeds the current number of TABL columns for
the array, File Manager expands the number of columns in the display and
adds new column headings. Similarly, if a PL/I string length REFER is
changed, the column width in TABL for each variable using that REFER is
changed.
(COBOL copybook only.) File Manager does not allow you to change the
object field to a value outside the range specified by the ODO clause (File
Manager supports an ODO lower value of 0.)
(COBOL copybook only.) Inserting a new record results in a record with the
minimum number of array items specified by the ODO definition. For
example, given the following ODO clause:
ODO-ONE OCCURS 0 TO 10 TIMES DEPENDING ON ODO-CNTRL-ONE.
then, when you insert a new record, the ODO-CNTRL-ONE field is initialized
to zero, and there are no ODO-ONE array items in the new record.
Given the following ODO clause:
ODO-ONE OCCURS 5 TO 7 TIMES DEPENDING ON ODO-CNTRL-ONE.
then ODO-CNTRL-ONE is initialized to 5, and there are five ODO-ONE array
items in the new record.

138 File Manager for z/OS V12R1 User's Guide


Template types and structure

(PL/I copybook only.) Inserting a new record using a template that contains
REFER specifications results in one element for each array dimension. Upper
and lower bound REFER values are set to one.
v In CHAR, HEX or LHEX display format, changing the value of an object field
does not change the record length. In these display formats, changing the value
of an object field can result in a mismatch between the object field value and the
calculated length of the record with that many array items.
If you select Expose (do not group) records of types: Length error on the
Edit/Browse Options (option 0.8) panel then, in Edit (option 2), such records
appear with an =LGTH indicator in their prefix area.

Editing rules for PL/I varying length string types


Fields with the PL/I VARYING attribute (VC, VD, and VB) are separated into two
fields for File Manager processing. The first field is the current string length field
(named "len" in File Manager Headings), and is followed by a second field that
contains the string data to be displayed. Each of the string types has the current
string length displayed as a FIXED BIN(15) field.

The separated len fields created by File Manager for varying strings do not need
creation attributes, as the data content determines the len value.

In Edit mode, the data string field maximum display width is divided into
unprotected characters, up to and including the current length, and a protected
area beyond the current length in a non-display mode. VD strings require two
character positions for each double-byte value declared for the string, and two
character positions for each current length value that is unprotected. BIT strings
require one character position in the Edit panel for each bit value in the string.
Character positions beyond the current string length are in protected non-display
mode for VD and VB types.

The maximum string length for these string types can be declared as a constant or
as varying by specifying a REFER variable name that is present in the structure. If
declared with a REFER variable for maximum string length, then each record can
have different starting positions and data string display widths for that field and
any following fields. REFER variables may also be present in the structure to
define the bounds or extents of variables declared as dimensioned arrays.

The Edit processing rules for a VARYING field are:


v The length field of a varying string can be changed to a value in the range 0 to
the maximum declared length for the field in that record.
v If the length is decreased, then the data string is truncated to the new length
and the remaining display positions are protected from entry.
v If the length is increased, appropriate initialization occurs up to the new current
length.
v To change the maximum length of a string variable that uses a REFER value,
that REFER value must be changed first and the ENTER key pressed to reset the
maximum string length. If the new maximum set by the REFER value is less
than the current length of the data string, the data string is truncated and the
current length is highlighted as a field in error.

Editing rules for PL/I varying length zero terminated string types
Character or Graphic data types with the PL/I VARYINGZ attribute (FM types ZC
and Z2) are shown in the Edit panels with one or two display characters added to
the end of the declared length. These screen positions contain X'00' or X'0000' when

Chapter 4. Creating and editing templates 139


Template types and structure

the current length of the string is equal to the maximum declared length. The extra
positions are protected from data entry by File Manager.

The Edit processing rules for a VARYINGZ field are:


v The position of the X'00' or X'0000' terminating characters is automatically
moved within the string if the replacement string length is not equal to the
replaced string length.
v If the updated string length would exceed the string maximum, an error
message is issued.
v If the updated string length is equal to the string maximum the X'00' or X'0000'
is moved to the extra display positions.
v If a VARYINGZ field declaration specifies a maximum length REFER variable,
the displayed REFER value may be updated to increase or decrease the
maximum string length for the VARYINGZ field. If the new maximum length set
by the REFER value is less that the current length of the data string, the data
string is truncated and the terminating characters are placed in the new extra
positions.
v Overtyping of a Graphic VARYINGZ field is not recommended as Graphic
strings usually contain undisplayable characters that can't be overtyped in the
TABL or SNGL Formats.

Using HLASM copybooks with File Manager


To instruct File Manager to process a HLASM (High Level Assembler) copybook,
you must set the language option to HLASM. The Auto detect selection applies to
COBOL and PL/1 copybooks only. Once you have set the option to HLASM, then
every function that supports copybooks can be used with a HLASM copybook. Use
the HLASM compiler specifications to provide extra SYSLIB and change ALIGN
and DBCS processing options.

RELATED TOPICS
Setting your HLASM processing options on page 145

Interpreting HLASM source


To process a HLASM copybook, File Manager invokes the HLASM compiler. It
then produces a record layout (or segment layout) for each DSECT it finds with
corresponding DS or DC fields. File Manager interprets the DS and DC fields as
shown here:
Blank field name
If a DS or DC statement does not have a field name, then it is assigned the
name "*".
Multiple operands
If a DS or DC statement has multiple operands, then the field isdefined as
a group field and a child element is created for each operand with the
suffix of "_On" where n is the relative number of the operand.
For example:
REC_TYPE01 DSECT
FIELD1 DS F,H,CL1

produces:
Ref Field Name Picture Type Start End Length
**** Top of data ****
1 1 REC_TYPE01 AN 1 7 7
2 2 FIELD1 F,H,CL1 AN 1 7 7

140 File Manager for z/OS V12R1 User's Guide


Template types and structure

3 3 FIELD1_O1 BI 1 4 4
4 3 FIELD1_O2 BI 5 6 2
5 3 FIELD1_O3 AN 7 7 1
**** End of data ****
Multiple values
If a DS or DC operand has multiple values associated with it, then a group
field is defined with child elements for each value with the suffix of "_Vn"
where n is the relative number of the value.
For example:
REC_TYPE01 DSECT
FIELD1 DS F1,2,3,H,CL1

produces:
Ref Field Name Picture Type Start End Length
**** Top of data ****
1 1 REC_TYPE01 AN 1 15 15
2 2 FIELD1 F1,2,3,H,CL1 AN 1 15 15
3 3 FIELD1_O1 AN 1 12 12
4 4 FIELD1_O1_V1 BI 1 4 4
5 4 FIELD1_O1_V2 BI 5 8 4
6 4 FIELD1_O1_V3 BI 9 12 4
7 3 FIELD1_O2 BI 13 14 2
8 3 FIELD1_O3 AN 15 15 1
**** End of data ****
Duplication factor
If a DS or DC operand has a duplication factor greater than 1, then the
resultant field is treated as a single dimensioned field that occurs the
number of times specified by the duplication factor.
For example:
REC_TYPE01 DSECT
FIELD1 DS 5F

produces:
Ref Field Name Picture Type Start End Length
**** Top of data ****
1 1 REC_TYPE01 AN 1 20 20
2 2 FIELD1(5) F BI 1 4 4
**** End of data ****

Bit length specification


If a DS or a DC has a bit length specification, it is defined as a bit field
irrespective of the field type.
For example:
REC_TYPE01 DSECT
FIELD1 DS AL.5

produces:
Ref Field Name Picture Type Start End Length
**** Top of data ****
1 1 REC_TYPE01 AN 1 1 1
2 2 FIELD1 AL.5 BT 1 1 1
**** End of data ****

DSECT or layout length


The level-1 field is always set to the maximum end column for any field.
Redefines/Range specifications
If you are using advanced copybook selection to build a template, the X

Chapter 4. Creating and editing templates 141


Template types and structure

prefix command enables you to interpret the ORG fieldname in the same
manner as a COBOL redefines or PL/I union statement.

Managing templates
You can create or edit a copybook template or a dynamic template "on the fly",
from any of the following panels:
v View Entry
v Edit Entry
v Utilities/Data Create
v Utilities/Print
v Utilities/Copy (From and To panels)
v Utilities/Compare (Old and New panels)

You can also create, edit and otherwise manage your templates, independently of
any particular task, within the Template Workbench.

The tasks described in this section are:


Specifying or updating the source definition for a copybook template on page
148
Creating a copybook template with the Template Workbench on page 152
Advanced copybook selection on page 149
Setting up a template to be used with segmented data on page 153
Creating a template from a model template on page 153
Creating dynamic templates on page 154
Editing a template on page 158
Managing templates with the Template Workbench on page 169

Setting your template processing options


File Manager goes through the compilation process whenever you create a
template from a copybook, even if you have already successfully created other
templates from the same copybook, and whether you are creating a temporary
template while viewing data, or creating a permanent template using the Template
Workbench.

You can customize the way that File Manager compiles templates by changing
your template processing options. You are able to choose whether File Manager
detects the programming language that you are using in your copybooks and then
automatically selects the appropriate compiler, or whether you want to force File
Manager to always use one type of compiler. You can also set the processing
options for the COBOL, HLASM, and PL/I compilers.

If you are creating a new template from an existing template model (using the CM
command on the Template Workbench (option 7) panel), File Manager does not
perform a compilation.

When you specify a copybook in a panel, batch job, REXX procedure or other
function, File Manager:
1. Checks whether the copybook is a complete source program , or contains only
field definitions.
If the copybook is not a complete program, then File Manager includes the
copybook in a shell program.
2. Invokes the compiler to check the syntax of the copybook, and to produce an
ADATA file.

142 File Manager for z/OS V12R1 User's Guide


Managing templates

You can use the Compiler Language Selection panel to:


v Specify which compiler File Manager is to invoke, or whether File Manager
is to automatically detect whether the language is COBOL or PL/I, and
invoke the appropriate compiler.
v Override the compiler options stored in the template.
You can specify the acceptable return code level for the compilation in the
language processing options panels.
3. If the compilation completes without errors, then File Manager processes the
information in the ADATA file to create a template.
If the compilation completes with a return code of greater than the specified
maximum:
v If you are using File Manager under ISPF, then a pop-up menu is displayed.
From the pop-up menu you can:
View the compilation listing using Print Browse (option 3.9).
Abort the template creation process.
Retry the compilation. Before you select this option, view the compilation
listing and correct any errors in the copybook. While you are viewing the
compilation listing, you can use the ISPF split screen facility to swap to
another ISPF session and use your editor to correct the errors in the
copybook.
Ignore the errors and proceed with creating the template. This option is
only available if File Manager is able to create a template. Some
compilation errors, such as warnings, might have no effect on the creation
of the template. If you are unsure, you can view the compilation listing. If
the compilation error is too severe, File Manager cannot create a template.
Try the compiler for the other language.
v If you are using a File Manager function in a batch job, REXX procedure or
TSO clist, then File Manager issues the error message Copybook
Compilation Errors Occurred RC=nn. The batch job, REXX procedure or
TSO clist continues as if you had not specified a copybook.

RELATED TOPICS
Compiler Language Selection panel on page 465
Selecting your compiler language
Overriding Compiler Options on page 147

Selecting your compiler language


To select your compiler language:
v From the Primary Option Menu panel, select 0 Settings, then 5 Compiler, and 1
LANG.
v Specify your choice by entering the option number:
1. COBOL
Use the COBOL compiler, regardless of the language used in your
copybook.
2. PL/I Use the PL/I compiler, regardless of the language used in your
copybook.
3. Auto detect
Note: Applies to COBOL and PL/I only. To instruct File Manager to use
the HLASM compiler, yuo must select 4. HLASM.
Allow File Manager to detect whether the language used in you
copybook is COBOL or PL/I and select the appropriate compiler.

Chapter 4. Creating and editing templates 143


Managing templates

If the copybook does not contain any keywords that File Manager can
use to determine the language, then File Manager uses the COBOL
compiler.
If the compiler creates ADATA and produces a return code of less than
or equal to the Maximum Return Code specified in the compiler
processing options, then File Manager creates the template without any
prompting.
If the compiler creates ADATA but produces a return code greater than
the specified maximum, then File Manager displays a pop-up menu
where you can choose from various options, including using the other
compiler.
If no ADATA was created, then File Manager uses the other compiler
without prompting.
If the other compiler creates ADATA but the return code is greater than
the specified, then File Manager displays the pop-up menu.
If the other compiler does not create ADATA, then File Manager retries
the first compiler, and again displays the pop-up menu.
4. HLASM
Use the HLASM compiler.

RELATED TOPICS
Data description support on page 136
Compiler Language Selection panel on page 465

Setting your COBOL processing options


When your COBOL copybooks fit into any of the following scenarios, you must set
your COBOL processing options so that File Manager can process them correctly.
v You have used COPY compiler-directing statements to include other members
that do not belong to the same PDSs as the copybooks.
v Your COBOL copybooks contain characters that you want to remove or replace
with other characters before compiling the copybooks into templates.
v You have used DBCS characters in your copybooks.

Note: File Manager now supports specifying additional SYSLIBs and REPLACE
text in the same copybook.

To set your COBOL processing options:


1. From the Primary Option Menu panel, select 0 Settings, then 5 Compiler, and
2 COBOL.
The COBOL Processing Options panel is displayed.
2. If you have used additional SYSLIBS, enter the names of the data sets in the
Additional SYSLIB data set fields.
Members included by COPY compiler-directing statements must be found in
the SYSLIB concatenation. When you specify a copybook on a File Manager
panel to create a new template (or update an existing template), the SYSLIB
concatenation consists of the PDS of the copybook, plus up to ten additional
PDSs that you can specify on this panel. These PDSs are searched in order (PDS
of the copybook, followed by these additional PDSs, 110.)

144 File Manager for z/OS V12R1 User's Guide


Managing templates

Note: CA-Panvalet libraries cannot be specified as additional SYSLIB sets.


Further, if a CA-Panvalet Library is the main copybook library, then no
additional SYSLIB data sets may be specified.
3. If you want to replace text in your copybooks, enter pseudo text character
strings in the COBOL Replacing Options From string and To string fields.
For example, if your copybooks contain colon characters (:) that you want to
remove before compiling, then specify ==:== as a From string and ===== as
the matching To string.
4. If your copybooks contain DBCS characters, select the DBCS compiler option.
Otherwise, use NODBCS.
5. To set the maximum acceptable return code for a compile, enter a value in the
Maximum Return Code to be accepted from compiler field.
When using the online panels to generate a template from a copybook, if the
compiler returns a warning/error code greater than the specified number, File
Manager displays a pop-up menu in which you can make decisions about
further processing.
When generating a template during the processing of a batch function, if the
compiler returns a warning/error code greater than the specified number, File
Manager halts the running of the function.
6. To use the COBOL SPECIAL-NAMES paragraph "Decimal-point is comma"
when compiling COBOL copybooks, select the option, Decimal-point is
comma.
When you select this option, the COBOL compiler exchanges the functions of
the period and the comma in PICTURE character strings and in numeric
literals.
7. To use the Arith(extend) COBOL compile option when compiling COBOL
copybooks, select the option, Arith(extend).
8. To retain the original case of field names as coded in the COBOL copybooks,
select the option, Mixed case field names. This feature is only available if you
are running with the File Manager COBOL compiler or a minimum compiler
level of Enterprise COBOL V4R1.
If you do not select this option, field names are stored in uppercase.
9. Press the Exit function key (F3) to save the changes you have made and exit
the panel.

RELATED TOPICS
Set COBOL Processing Options panel (option 0.5.2) on page 646
For details on specifying From and To strings for the COBOL REPLACE
directive, see the IBM COBOL Language Reference.
For details on the effect of these compiler options, see the IBM COBOL
Programming Guide for OS/390 & VM.

Setting your HLASM processing options


When your HLASM copybooks fit into any of the following scenarios, you must
set your HLASM processing options so that File Manager can process them
correctly.
v You have used DBCS characters in your copybooks.
v You want the DC, DS and DXB instructions to be aligned on the correct
boundaries only if the duplication factor is 0.

To set your HLASM processing options:

Chapter 4. Creating and editing templates 145


Managing templates

1. From the Primary Option Menu panel, select 0 Settings, then 5 Compiler, and
3 HLASM.
The HLASM Processing Options panel is displayed.
2. If you have used additional SYSLIBS, enter the names of the data sets in the
Additional SYSLIB data set fields.
Members included by COPY directives must be found in the SYSLIB
concatenation. When you specify a copybook on a File Manager panel to create
a new template (or update an existing template), the SYSLIB concatenation
consists of the PDS of the copybook, plus up to ten additional PDSs that you
can specify on this panel. These PDSs are searched in order (PDS of the
copybook, followed by these additional PDSs, 110.)

Note: CA-Panvalet libraries cannot be specified as additional SYSLIB sets.


Further, if a CA-Panvalet Library is the main copybook library, then no
additional SYSLIB data sets may be specified.
3. If your copybook contains DBCS characters, select the DBCS processing option.
4. If your HLASM copybook is compiled with NOALIGN, then select the
NOALIGN processing option.
5. To set the maximum acceptable return code for a compile, enter a value in the
Maximum Return Code to be accepted from compiler field.
When using the online panels to generate a template from a copybook, if the
compiler returns a warning/error code greater than the specified number, File
Manager displays a pop-up menu in which you can make decisions about
further processing.
When generating a template during the processing of a batch function, if the
compiler returns a warning/error code greater than the specified number, File
Manager halts the running of the function.
6. Press the Exit function key (F3) to save the changes you have made and exit
the panel.

RELATED TOPICS
Using HLASM copybooks with File Manager on page 140
For details on the effect of these compiler options, see the HLASM V1R5
Programmer's Guide.

Setting your PL/I processing options


When your PL/I copybooks fit into any of the following scenarios, you must set
your PL/I processing options so that File Manager can process them correctly.
v You have used %INCLUDE directives to include other members that do not
belong to the same PDSs as the copybooks.
v You have used DBCS characters in your copybooks.
v Your PL/I copybook contains declarations of 63-bit binary data.
v Your PL/I copybook declarations are not unaligned.
v Your PL/I copybook contains declarations of 31-digit decimal data.

To set your PL/I processing options:


1. From the Primary Option Menu panel, select 0 Settings, then 5 Compiler, and
4 PL/I.
The PL/I Processing Options panel is displayed.
2. If you have used additional SYSLIBS, enter the names of the data sets in the
Additional SYSLIB data set fields.

146 File Manager for z/OS V12R1 User's Guide


Managing templates

Members included by INCLUDE directives must be found in the SYSLIB


concatenation. When you specify a copybook on a File Manager panel to create
a new template (or update an existing template), the SYSLIB concatenation
consists of the PDS of the copybook, plus up to ten additional PDSs that you
can specify on this panel. These PDSs are searched in order (PDS of the
copybook, followed by these additional PDSs, 110.)

Note: CA-Panvalet libraries cannot be specified as additional SYSLIB sets.


Further, if a CA-Panvalet Library is the main copybook library, then no
additional SYSLIB data sets may be specified.
3. If your copybook contains DBCS characters, select the GRAPHICS processing
option.
4. If your copybook contains signed 64-bit binary data fields, select the 63 bit
binary processing option.
5. If your copybook declarations are not aligned, select the UNALIGNED option.
6. If your copybook contains declarations of 31-digit decimal data, select the 31
digit decimal processing option.
7. To set the maximum acceptable return code for a compile, enter a value in the
Maximum Return Code to be accepted from compiler field.
When using the online panels to generate a template from a copybook, if the
compiler returns a warning/error code greater than the specified number, File
Manager displays a pop-up menu in which you can make decisions about
further processing.
When generating a template during the processing of a batch function, if the
compiler returns a warning/error code greater than the specified number, File
Manager halts the running of the function.
8. Press the Exit function key (F3) to save the changes you have made and exit
the panel.

RELATED TOPICS
Set PL/I Processing Options panel (option 0.5.4) on page 652
For details on the effect of these compiler options, see the IBM VisualAge PL/I
for OS/390 Programming Guide.

Overriding Compiler Options


The current compiler options are stored in a template at the time the template is
created. This allows subsequent updating of templates to be performed using the
original compiler options.

To override the compiler options stored in a template:


1. Select the Compiler Language Selection option from the Options pull-down
menu.
File Manager displays the Compiler Language Selection panel.
2. Select the Override compiler options for template update option.
Using this option causes the template update to override the compiler options
stored in the template with the currently specified compiler options. It also
ensures the generation of the compiler parameters for the Batch JCL generated
when the Batch execution option is selected.

Note: If the template does not contain compiler options, then the compiler options
used are those currently specified for the execution or the relevant defaults.

RELATED TOPICS

Chapter 4. Creating and editing templates 147


Managing templates

Template Update Utility panel on page 685

Determining the search order for your copybooks


The Preserve copybook library option allows you to determine the search order
File Manager uses when looking for a specified copybook.

To determine the search order for your copybooks:


1. Select the Compiler Language Selection option from the Options pull-down
menu.
File Manager displays the Compiler Language Selection pull-down menu.
2. Select the Preserve copybook library option.
Selecting this option causes the template update to attempt to locate the
copybook in the data set in which it was originally found.
Not selecting this option, or if the copybook cannot be located, causes the
template update to search the library data sets in order for the first occurrence
of the copybook.

The option only applies to template update.

You can also access the Preserve copybook library option on the Compiler
Language Selection panel.

RELATED TOPICS
Template Update Utility panel on page 685
Compiler Language Selection panel on page 465

Specifying or updating the source definition for a copybook


template
The following sections describe how to specify or update the source definition for
single and advanced copybook source definitions

Single copybook source definitions


v Function entry panels:
Specify the data set name and member name in the Copybook or Template
section for the copybook you require.

Note: You can enter a generic member name to display a member list.
Select the process option 1. Above to use the copybook with the function. To
edit the copybook template prior to the function, select the Edit template option
and ensure you do not specify S for Type.
v Workbench (Option 7.1):
Specify the data set name and member name in the Copybook section and issue
the command you require without the Advanced copybook selection option
selected.

Note: The CM and MT commands refer to a template only. The E command


only refers to the copybook if the template data set and member name are
blank.

Advanced copybook source definitions


v Function entry panels:
Specify the Copybook or Template data set name and member name with either
an existing template or copybook member and select the Edit template option

148 File Manager for z/OS V12R1 User's Guide


Managing templates

with Type set to S. This takes you to the advanced copybook selection panels
which allow you to change the source definitions and create a new template or
update an existing template.
v Workbench:
Select the option Advanced copybook selection and use the CC command with
a copybook data set name and member name to create a new template, or the U
prefix command with a template data set name and member name to update the
source definition for an existing template.

Note: You can also use the E command with the copybook data set name and
member name, provided the template data set and member names are left
blank.

Note: See Advanced copybook selection for a description of what you can do
when specifying advanced copybook source definitions for templates.

If the Edit template option is used from a function entry panel with a copybook
source definition, you are prompted to provide a template data set name (and, for
partitioned data sets, a member name) to save the template that has just been
created. Templates can be stored in sequential, PDS or PDSE data sets only.

RELATED TOPICS
Field Selection/Edit panel on page 561
Record Type Selection panel on page 632
Template Save pop-up panel on page 689
SAVE primary command on page 811
SAVEAS primary command (templates) on page 811
END primary command on page 756

Advanced copybook selection


This section describes the method for specifying an advanced copybook source
definition. To navigate to the panels mentioned, see Advanced copybook source
definitions on page 148.
1. The Library List panel is displayed as the initial panel when creating a new
template. You can display this panel with the LIBLIST command from the
Copybook Selection panel.
You can specify up to 12 data set libraries. The data sets may be PDSs, PDSEs,
CA-Panvalet libraries, or other library management system libraries. You can
specify multiple PDSs, PDSEs, CA-Panvalet and other library management
system libraries but they must be either all PDSs or PDSEs, or all CA-Panvalet,
or all the same library management system libraries. You cannot mix library
types.
2. Press the Exit function key (F3). The Copybook Selection panel is displayed
initially for new templates where the member has not been supplied (after the
Library List panel), for new templates where a generic member name was
specified on the Copybook section, or when the U prefix command was
specified with a template data set name and member name to update the
source definition for an existing template.
3. Type an S in the Sel field for each member that you want to select.
You can browse (B), edit (E), or view (V) each of the members on this list
before selecting the ones you want.
Notes:
a. All members must contain copybook definitions in the same language.

Chapter 4. Creating and editing templates 149


Managing templates

b. If you specify a member that consists of an entire program, then you should
use the X prefix command to specify a statement range to extract the field
definitions you are interested in, otherwise you may get compile errors
when mixing with other members.
c. You can only edit members in a PDS or PDSE data set.
d. Library members may not be packed by ISPF.
4. When you have selected all of the members you want, press the Exit function
key (F3). The selected members are listed in the Copybook Selection panel.
From the Copybook Selection panel, you can display (and modify if necessary)
the current library list by entering the LIBLIST primary command.
5. Edit the list of members to suit your requirements. You can copy or move
members, insert or delete members and create new 01-level fields for any
member. You can also specify redefines or range values for a member
To add a new member:
a. Enter the I prefix command to insert a new row.
b. Type an asterisk or member name pattern in the Member field, then press
Enter
c. Select the new member name or names from the list. The list is not affected
by any pattern that you have entered on the Template Workbench, it is a
new list of all members in all selected databases, filtered by the pattern
entered on the Copybook Selection panel.
d. Press the Exit function key (F3). The selected members are inserted into
your list on the Copybook Selection panel.
To create a new 01-level field for a member:
a. On the Copybook Selection panel, type a Y in the 01 field adjacent to the
member.
b. In the adjacent Field Name field, type a name for your 01-level element.
This name must follow the naming conventions for the language of the
copybook. If the name is omitted, File Manager generates a random name
when the template is compiled.
To extract a subset of the copybook to be compiled into the template:
a. From the Copybook Selection panel, type an X in the Cmd field next to the
required copybook member to display the Redefines / Range Specifications
pop-up panel.
b. In the From statement field, specify the starting line number for the extract.
c. In the To statement field, specify the ending line number for the extract.
d. In the From string field, specify the string that File Manager is to search the
copybook for. The first statement that contains the string begins the extract.
e. In the To string field, specify the string that File Manager is to search the
copybook for. The first statement that contains the string ends the extract.
See the panel definition for a complete list of the prefix commands available.
6. To generate multiple record layouts for a source that contains more than one
record definition within a single level-01 structure:
a. From the Copybook Selection panel, type an X in the Cmd field next to the
required copybook member to display the Redefines / Range Specifications
pop-up panel.
b. In the Level field, specify the source level value to identify the COBOL
REDEFINES or the PL/I UNION clauses for generating new record layouts.
File Manager creates a separate record layout for each REDEFINES or
UNION clause at the specified level. After the first matching REDEFINES or

150 File Manager for z/OS V12R1 User's Guide


Managing templates

UNION clause is found, File Manager creates new layouts for the latter and
subsequent REDEFINES or UNION clauses for the same level and start
location. Header and trailing data items are included in each record layout.

Note: This field is ignored for HLASM compiles.


c. In the Field name field, specify the target field name of the COBOL
REDEFINES, PL/I UNION, or HLASM ORG clause, that identifies the
COBOL REDEFINES, PL/I UNION, and HLASM ORG statements that are
to be used to direct File Manager to create new layouts.
This is an alternative way of identifying COBOL REDEFINES, PL/I UNION,
and HLASM ORG statements that require new layouts to be generated. You
can specify both Level and Field name values; File Manager checks both
when generating new layouts.
d. To adjust the offset value for each layout so that the starting location is the
REDEFINES, UNION, or ORGfield start location, enter a "/" in the Set
offset field.
Use this option when your record layouts do not include the header data
items in the structure. You can only select this option in conjunction with
the previous fields.
e. COBOL level change: This is a COBOL ONLY option which changes the
way the Level value is processed. If you set this option, every occurrence of
the specified Level value is changed to '01" before the compile step,
irrespective of whether the data item has a REDEFINES clause.
Use this option with care as it may result in incorrect offsets to data items,
or compile errors, due to the structure being changed from its intended
programmable form.
7. To compile the specified copybooks from the Copybook Selection panel, and
either update an existing template or create a new template, use the UPDATE
primary command or the U prefix command.
8. To edit an existing template built from the copybooks specified on the
Copybook Selection panel, use the EDIT primary command or the E prefix
command. If you have made any changes, File Manager compiles the
copybooks and updates the template.
9. When your Copybook Selection list is completed, press the Exit function key
(F3).
The compiler attempts to create the template for you.
If the compilation is unsuccessful, the Template Not Built pop-up panel is
displayed, offering you the following choices:
1. View the compilation listing.
If you select this option, the compilation listing is displayed so that you
can determine the cause of the error. When you have finished viewing
the listing, press the Exit function key (F3) to return to the Copybook
Selection panel, correct the problem, then try to exit the panel again.
2. Abort processing.
Returns you to the Copybook Selection panel, where you can correct
the problem, then try to exit the panel again.
3. Retry (recompile copybook)
Attempts to submit the same details again. If the compilation had failed
because a member was temporarily unavailable, this may resolve the
problem.

Chapter 4. Creating and editing templates 151


Managing templates

4. Retry (with alternate compiler)


Attempts to submit the same details again but with the alternative
compiler. If the compilation had failed because the File Manager default
compiler was set to the wrong compiler for this copybook language,
this may resolve the problem.

Note: This choice does not apply to HLASM.


If the compilation is successful, you are prompted to save it to the template
member specified on the Template Workbench panel. If you had supplied a
member name pattern or left the Template: Member field blank on that panel,
the Template Member Selection panel is displayed. You can select a name from
this list and press Enter to overwrite the existing selected member, or you can
press the Exit function key (F3) and you are prompted to name a new member.

RELATED TOPICS
Template types and structure on page 129
Template Workbench panel on page 690
Library List panel on page 583
Copybook Selection panel on page 500
LIBLIST primary command on page 781
UPDATE primary command on page 827
EDIT primary command on page 755
Redefines / Range Specifications panel on page 634

Creating a copybook template with the Template Workbench


To create a copybook template with the Template Workbench:
1. Open the Template Workbench panel by performing either of these actions
v
a. Selecting option 7. Templates from the Primary Option Menu panel to
display the Copybook and Template Utility functions panel, and then
b. Selecting option 1. Workbench from the Copybook and Template Utility
functions panel to display the Template Workbench panel.
v Issuing the TVIEW primary command on either the View or the Edit panel.
If it is accessed from an editor session, the Template Workbench contains two
additional options (RC - Run using copybook and RT Run using template).
2. In the Data set name field in the Copybook section, type the name of the data
set in which your copybook is stored.
Copybooks can be stored in PDS, PDSE or CA-Panvalet libraries. Library
members may not be packed by ISPF.
3. If you know it, type the Member name of the copybook into the relevant field
or specify blanks or a pattern for the member name to have a member selection
list displayed. You can then select the required member from the list.
4. In the Data set name field in the Template section, type the name of an
existing data set, into which you want the new template to be saved.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
5. In the Member field of the Templates section, type the name for your new
template.
If you want to copy the copybook to an existing template (which overwrites the
existing template), specify an existing member name or specify blanks or a
pattern to display the Member Selection panel. You can then select the required
member from the list.

152 File Manager for z/OS V12R1 User's Guide


Managing templates

6. On the Command Line, type the CC command and press Enter.


File Manager validates the copybook by compiling it with your default
compiler and, if successful, generates and saves the template. A message is
displayed in the upper right corner of the panel, to indicate the success or
failure of the process.

Note: If you do not provide a template data set name, File Manager creates a
temporary template, which you can then edit. Before you close the Template
Workbench, you can save the template by specifying a template name and
entering the SAVE command. Otherwise the template is discarded.

RELATED TOPICS
Template Workbench panel on page 690

Setting up a template to be used with segmented data


Templates that contain more than one record type can be set to be used with
segmented data by entering a / in the Template for segmented data field.

When you are viewing or editing data using a segmented data template, the
following restrictions apply to template editing:
v You cannot update the Template for segmented data field in the Record Type
Selection panel (accessed with the TEDIT command).
v You cannot change the Record Identification Criteria, Related Identification
Criteria, or Selection Criteria set in the Field Selection/Edit panel (accessed with
the TEDIT command and then the E command on the Record Type).
v You cannot use the TVIEW command (which would otherwise display the
Template Workbench, allowing you to select or create a different template).
v The length of a segment is calculated as the length of the matching structure,
unless you provide a length field. Any binary or alphanumeric field less than 4
bytes in length can be set as the length field by editing the field attributes. If a
length field is provided, then File Manager uses the binary value provided as
the segment length and adjusts the structure length accordingly.

Creating a template from a model template


You can use the Template Workbench to create copies of an existing copybook or
dynamic template. The original template serves as a model, providing template
information such as record selection criteria that you can then edit in the new
copy.

To create a template from an existing (model) template:


1. Open the Template Workbench panel by performing either of these actions
v
a. Selecting option 7. Templates from the Primary Option Menu panel to
display the Copybook and Template Utility functions panel, and then
b. Selecting option 1. Workbench from the Copybook and Template Utility
functions panel to display the Template Workbench panel.

1. You can choose to specify record type definitions that do not contain any Record Identification Criteria. If File Manager cannot
match a segment (using Record Identification Criteria) with any of the other record types, it uses the first record type without any
Record Identification Criteria, whose length is less than or equal to the remaining length on the record, as a default segment.

Chapter 4. Creating and editing templates 153


Managing templates

v Issuing the TVIEW primary command on either the View or the Edit panel.
If it is accessed from an editor session, the Template Workbench contains two
additional options (RC - Run using copybook and RT Run using template).
2. In the Data set name field in the Model Template section, type the name of the
data set in which your existing template is stored.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
3. If you know it, type the Member name of the template into the relevant field or
specify blanks or a pattern for the member name to have a member selection
list displayed. You can then select the required member from the list.
4. In the Data set name field in the Template section, type the name of an
existing data set, into which you want the new template to be saved.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
5. In the Member field of the Templates section, type the name for your new
template.
If you want to copy the template model to another existing template (which
overwrites the existing template), specify an existing member name or specify
blanks or a pattern to have a member selection list displayed. You can then
select the required member from the list.
6. On the Command Line, type the CM command and press Enter.
File Manager generates and saves the template. A message is displayed in the
upper right corner of the panel, to indicate the success or failure of the process.

Note: If you do not provide a template data set name, File Manager creates a
temporary template, which you can then edit. Before you close the Template
Workbench, you can save the template by specifying a template name and
entering the SAVE command. Otherwise the template is discarded.

RELATED TOPICS
Template Workbench panel on page 690

Creating dynamic templates


You create dynamic templates by building field definitions for your data set or by
converting an existing copybook template to a new dynamic template.

Creating dynamic templates on the fly


When you create a dynamic template, for each field definition you build, you
specify the field definition details and, optionally, selection criteria that File
Manager uses to filter records. When you specify selection criteria for a field, you
do not necessarily have to supply all the field definition details as File Manager
supplies default values.

When you are building the definitions without selection criteria, you must supply
the starting column, length and type of the data set fields that you wish to operate
upon.

When you are building the definitions with selection criteria, you must supply the
starting column and value for the data set fields that you wish to operate upon. If
you do not supply the length of a field, File Manager calculates it from the value
you specify. Similarly, if you do not supply the data type or operator for a field,
File Manager uses default values.

154 File Manager for z/OS V12R1 User's Guide


Managing templates

In either case, you can, optionally, supply your own field name to identify the
information.

You can edit these field definitions at any time.

Note: If you define a field with a type of VC (varying character), VG (varying


graphic), or VD (varying DBCS), without also defining a 2-byte binary field
immediately preceding it, when generating the template, File Manager
reduces the length of the field you have defined by 2 bytes and inserts a
2-byte binary length field with the field name, LEN, immediately before it.
1. In the Copybook/template usage field of any relevant panel, select option 4.
Create dynamic and press Enter.
The Dynamic Template panel is displayed.
2. For each field in the data set that you want to display without specifying
selection criteria:
v Specify values in the Start, Length, and Type fields.
3. For each field in the data set that you want to display and for which you want
to specify selection criteria:
v Specify a value in the Start field.
v Specify a value in the Value field.
v Optionally, specify a value in the Length field. If you leave this field blank,
File Manager calculates the length from the value you specify in the Value
field.
v Optionally, specify a value in the Type field. (See note above for types VC,
VG, and VD.) If you leave this field blank, it defaults to AN
(alphanumeric).
v Optionally, specify a value in the Op (Operator) field. If you leave this field
blank, it defaults to =.
4. If you wish, specify a Field Name for your field definitions.
If this field is left blank, a name is generated in the form @@DTnn where nn is
the field number. Existing field names taking the form @@DTnn are
regenerated to ensure that nn always reflects the current field number.

Note: If you are running a screen width of 115 or greater, the Field Name field
can be displayed at the same time as the Start, Length and Type fields.
However, at any width less than this, you need to toggle the display
between Field Name and Start, Length and Type. The default is to
display Start, Length and Type. To toggle the display, ensure that your
cursor is not in a Value field and press the Right function key (F10) or
Left function key (F11).
5. Press the Exit function key (F3). The Template Save pop-up panel is displayed.
6. Type the name of an existing data set in the Data set name field.
Templates can be stored in PDS or PDSE data sets, but cannot be stored in
CA-Panvalet libraries.
7. Type a name for your new template in the Member field.
8. Press the Exit function key (F3). The template is saved and the next relevant
panel (depending upon your entry point) is displayed.

RELATED TOPICS
Manipulating the display of fields in records on page 164
Dynamic Template panel on page 524
Template Save pop-up panel on page 689

Chapter 4. Creating and editing templates 155


Managing templates

Creating dynamic templates from copybook templates


Instead of building field definitions manually, you can create a new dynamic
template using the definitions in a copybook template. Once created, you can edit
all aspects of the new dynamic template, including the field definitions.
1. Specify your copybook template on the relevant Entry panel and select the Edit
Template option.
2. On the Field Selection/Edit panel, enter 2 to display the Specify Record
Selection by field panel.
3. Type MD on the Command line and press Enter.
The Dynamic Template panel is displayed, containing the list of field
definitions generated from your copybook template. You can modify any of
these values.

Note: As all field definitions on a dynamic template are treated as Level 2


elementary items, you may need to delete any previous group level
fields.
4. Choose one of the following actions:
v Enter the SAVE command and then exit or cancel from the panel.
If you save the dynamic template, you are prompted for a data set and a
member name in which to store the new dynamic template.
v Press the Cancel function key (F12) to return to using your copybook
template, without saving the dynamic template.
v Press the RunTemp function key (F6) to display your data with the
temporary dynamic template (only valid if you have an active editor
session).

Tip: The RunTemp function key (F6) should not be used with the Template
Workbench nor any function which has selected batch execution.
Currently, this is not enforced and can lead to unpredictable results.
v Exit from the panel and, when prompted by the Template Save panel, choose
to save the template, run with a temporary template or cancel your changes.

You can also create a dynamic template from a copybook template while in an
editor session. To do this:
1. Enter CEDIT on the Command line of the View or Edit panel. The Record
Selection Criteria panel is displayed.
2. Type MD on the Command line and press Enter.
The Dynamic Template panel is displayed, containing the list of field
definitions generated from your copybook template. You can modify any of
these values.
3. Exit from the panel (press F3) and, when prompted by the Template Save
panel, choose to save the template, run with a temporary template or cancel
your changes.

When working from an active editor session, the following applies:


v When you return to the editor panel, the active copybook template is replaced
with the temporary or saved dynamic template.
v If you return to the editor panel using a temporary dynamic template and then
exit from the panel, you are not prompted to save the template and it is
discarded.
v You can re-edit the dynamic template by entering the DEDIT command. This
would give you an opportunity to save a temporary template.
156 File Manager for z/OS V12R1 User's Guide
Managing templates

RELATED TOPICS
CEDIT primary command on page 740
DEDIT primary command on page 752

Creating corresponding templates from selected copybooks


You can create multiple templates from a PDS of copybooks by using the Template
Build Utility. The utility builds one template from each selected copybook. The
template name is derived from the input member name and any output member
mask that you have specified. If you do not supply a template member mask, then
the template name is the same as the copybook name.

You can run the Template Build Utility in batch or foreground.

To create multiple templates from a PDS of copybooks:


1. Navigate to the Template Build Utility panel by:
a. Selecting option 7. Templates from the Primary Option Menu panel to
display the Copybook and Template Utility functions panel, and then
b. Selecting option 3. Build from the Copybook and Template Utility functions
panel to display the Template Build Utility panel.
2. In the Copybook Data set name field, specify the data set name of the
copybook PDS(E). The name you specify must be a PDS(E), except for
vendor-managed library systems such as Panvalet, CA/Librarian, and so on.
3. In the Copybook Member field, specify the name of a partitioned data set
member that contains a copybook.
If you leave the Member field blank, or specify a member name pattern, File
Manager displays a member name list. You can then select the required
member by entering S in the Sel field for the appropriate member.
If you select Advanced member selection, then this name constitutes the first
name on the member range panel.
4. In the Template Data set name field, specify the PDS or PDSE that identifies
where the templates are to be stored.
5. In the Template Member mask field, optionally specify a pattern to rename
members in the output partitioned data set based on the member names in the
input partitioned data set.

Note: The Member mask works in the same way as the mask you can use
when copying data sets. For an explanation of how you can specify a
member name mask in the form of a member name pattern, see
Renaming members as you copy on page 252.
6. To run the Template Build Utility in batch, select the Batch execution
processing option.
Batch processing produces up to two reports: the Data Set List report (only
produced if a concatenated data set is used for input), and the Template Build
Report. Examples of each report are shown below.

Data set name Lib


---------------------------------------------------
FMNUSER.COBOL2 1
FMNUSER.COBOL 2

Figure 54. Data set list report

Chapter 4. Creating and editing templates 157


Managing templates

Template Build Report


Copybook Lib Template Status
---------------------------------------------------------------------------
DITTST1 1 DITTST1 Replaced
DITTST3 1 DITTST3 Replaced
DITTST7 1 DITTST7 Compile error
FMNTST1 2 FMNTST1 Created

4 members read : Template : 1 Created 2 Replaced 1 Errors

Figure 55. Template Build report

Note: The Lib column is only displayed when more than one input data set is
found.
7. To replace templates that exist with the same name, select the Replace existing
templates processing option.
8. To specify a range of members to be selected, rather than a specific or generic
member name, select the Advanced member selection processing option.
9. To run without showing the member selection list, select the Skip member list
processing option. This option is ignored if errors are found (such as duplicate
member names due to the rename mask).

RELATED TOPICS
Template and Copybook Utility functions panel on page 683
Template Build Utility panel on page 684
Member Selection panel on page 596

Editing a template
You can perform template editing:
v From any panel that has the Edit template option
v From the Template workbench
v By using the appropriate template primary commands from an editor session.
Template commands from within an editor session may be restricted in function,
depending on the type of Edit or View being performed.
v By using the E command from the template update utility member list (option
7.4).

To perform a template edit, you can either select the Create dynamic option or, on
panels with the Edit template option, you can select that option and set Type to
one of the following:
Blank Normal record type or field/selection edit for single layout copybooks or
templates.
S To edit the source definition using the advanced copybook selection
process.
1 To perform criteria edit by field for identification criteria before the
field/selection edit. This provides a fast path when you just want to
specify criteria by field.
2 To perform criteria edit by field for selection criteria before the
field/selection edit. This provides a fast path when you just want to
specify criteria by field.

The options above are ignored for dynamic templates. If you specify Create
dynamic or edit an existing dynamic template, then File Manager always takes you
to the dynamic edit panel.

158 File Manager for z/OS V12R1 User's Guide


Managing templates

Edit template

Source No Multiple No Criteria edit No Field selection


definition? record types? or dynamic edit? edit
1 2
Yes Yes Yes 1, 2

Advanced Record type Criteria edit by field Criteria edit


copybook selection or by field
selection dynamic template
edit
E E

Field selection
edit

1 Source definition:


v Type "S" specified and Edit template option selected, or
v CC or U command entered on Template Workbench panel with:
Advanced copybook selection option selected, or
v E command entered on Template Workbench panel with:
Copybook data set name specified, and
No template data set name specified, and
Advanced copybook selection option selected
2 Criteria edit or dynamic edit:
v Type "1" or "2" specified and Edit template option selected, or
v Template is a dynamic template, or
v CE or DE command entered during an editor session

Figure 56. Editing a template: task flow

To edit a template from a supported panel:


1. In the Copybook or Template section, specify the data set name of a copybook
or template.
Templates can be stored in sequential (PS), PDS or PDSE data sets. CA-Panvalet
libraries can only be used as input data sets for copybooks.
2. In the same section, specify the Member name or leave the Member name field
blank to choose from the list of data set members.
3. Set the Copybook/template flag to Above or Create dynamic.
4. If you have not selected Create dynamic, then select the Edit template option
and set Type to determine the point at which you want to perform template
editing:
Blank Normal record type or field/selection edit for single layout copybooks
or templates.

Chapter 4. Creating and editing templates 159


Managing templates

S To edit the source definition using the advanced copybook selection


process.
1 To perform criteria edit by field for identification criteria before the
field/selection edit. This provides a fast path when you just want to
specify criteria by field.
2 To perform criteria edit by field for selection criteria before the
field/selection edit. This provides a fast path when you just want to
specify criteria by field.
5. Make the required editing changes and do one of the following:
v When you are creating a new template, pressing the Exit function key (F3)
displays the Template Save pop-up panel.
v Type SAVE on the Command line and press Enter. You can then choose to
make further changes, continue to the next relevant panel or return to your
entry panel.
v Type SAVEAS on the Command line and press Enter. Specify the data set
(and member name if a PDS) of the new template and press the Exit function
key (F3). You can then choose to make further changes, continue to the next
relevant panel or return to your entry panel. The new template is used in
place of the original for the current function.
v Press RunTemp function key (F6) to display the next relevant panel using the
changes you have made but without saving those changes.
v Press Cancel function key (F12) to return to your entry panel without saving
the changes.

To edit an existing copybook template from an editor panel:


1. Type one of the following commands on the Command line and press Enter.
TEdit Template Edit: If your copybook has only one record type, the Field
Selection/Edit panel is displayed. From here, you can enter 1 or 2 to
access the Record Identification Criteria or Record Selection Criteria
panels.
If your copybook has two or more record types, the Record Type
Selection panel is displayed. In the Command field adjacent to the
record type that you would first like to edit, type an E and press Enter.
The Field Selection/Edit panel for that record type is displayed.
CEdit (or CEdit SEL or DEdit)
Criteria Edit (Selection): The CE, CE SEL and DE commands are all
synonymous in this situation and display the Record Selection Criteria
panel, showing the fields in the currently displayed record type. From
here, you can enter 1 to access the Field Selection/Edit panel. If your
copybook has two or more record types, the Record Type Selection
panel displays at this point. In the Command field adjacent to the
record type that you would first like to edit, type an E and press Enter.
The Field Selection/Edit panel is displayed.
CE ID Criteria Edit (Identification): The Record Identification Criteria panel is
displayed. From here, you can enter 1 to access the Field Selection/Edit
panel. If your copybook has two or more record types, the Record Type
Selection panel is displayed at this point. In the Command field
adjacent to the record type that you would like to edit, type an E and
press Enter. The Field Selection/Edit panel is displayed.
2. Make the required editing changes and do one of the following:

160 File Manager for z/OS V12R1 User's Guide


Managing templates

v Press the Exit function key (F3) to save the changes and display the next
relevant panel (for example, the View panel). The message "Template saved"
appears in the upper right corner of the panel.

Note: Unlike when creating a new template, the Template Save pop-up panel
is not displayed at this point. The previous version of the template is
automatically replaced by the changes you have made.
v Type SAVE on the Command line and press Enter. You can then choose to
make further changes, continue to the next relevant panel or return to your
entry panel.
v Type SAVEAS on the Command line and press Enter. Specify the data set
(and member name if a PDS) of the new template and press the Exit function
key (F3). You can then choose to make further changes, continue to the next
relevant panel or return to your entry panel. The new template is used in
place of the original for the current function.
v Press RunTemp function key (F6) to display the next relevant panel using the
changes you have made but without saving those changes.
v Press Cancel function key (F12) to return to your entry panel without saving
the changes.

To edit an existing dynamic template from an editor panel:


1. Type one of the following commands on the Command line and press Enter.
TE Template Edit: The Field Selection/Edit panel is displayed. However,
you cannot change the Field Name, Start, Length or Type fields from
this panel, nor can you change the record selection criteria. To perform
these tasks, enter 1 to display the Dynamic Template panel.
DE (or CE, CE SEL or CE ID)
Dynamic Edit: The CE, CE SEL and DE commands are all synonymous
in this situation and display the Dynamic Template panel.
2. Make the required editing changes and do one of the following:
v Press the Exit function key (F3) to save the changes and display the next
relevant panel (for example, the View panel). The message "Template saved"
appears in the upper right corner of the panel.

Note: Unlike when creating a new template, the Template Save pop-up panel
is not displayed at this point. The previous version of the template is
automatically replaced by the changes you have made.
v Type SAVE on the Command line and press Enter. You can then choose to
make further changes, continue to the next relevant panel or return to your
entry panel.
v Type SAVEAS on the Command line and press Enter. Specify the data set
(and member name if a PDS) of the new template and press the Exit function
key (F3). You can then choose to make further changes, continue to the next
relevant panel or return to your entry panel. The new template is used in
place of the original for the current function.
v Press RunTemp function key (F6) to display the next relevant panel using the
changes you have made but without saving those changes.
v Press Cancel function key (F12) to return to your entry panel without saving
the changes.

RELATED TOPICS
Manipulating the display of fields in records on page 164

Chapter 4. Creating and editing templates 161


Managing templates

Dynamic Template panel on page 524


Record Type Selection panel on page 632
Field Selection/Edit panel on page 561
SAVE primary command on page 811
SAVEAS primary command (templates) on page 811

Updating one or more templates


The Template Update Utility allows you to update one or more templates in either
foreground or batch.

You can filter template member selection to select only templates that reference a
certain copybook or copybooks. You can specify a generic copybook filtering name.
1. Select option 7. Templates from the Primary Option Menu panel to display the
Copybook and Template Utility Functions panel.
2. Select option 4. Update from the Copybook and Template Utility Functions
panel to display the Template Update Utility panel.
3. On the Template Update Utility panel, enter the details to select the templates
you want to update:
v In the Template Data set name field, specify a fully-qualified or generic data
set name to identify the data set (which must be partitioned).
v In the Template Member field, you can specify the name of a member of a
partitioned data set.
v In the Template Copybook filter field, you can specify up to 4 member
names or patterns to be used as a filter so that only templates referencing
those copybooks, or copybooks that match the member patterns, are selected
for processing.
4. In the Output Template Data set name field, you can specify a fully-qualified
or generic data set name to identify the output data set where the updated
templates are to be stored. If you leave this field blank, then the update takes
place on the input data set.
5. In the Output Template Member mask field, you can specify a rename mask so
that the updated templates are stored under an alternative name.
6. Select the processing options:
v To run the function in batch, select Batch execution.
v To replace like-named members in the output partitioned data set, select
Replace members.
v To specify a range of members to be selected, rather than a specific or
generic member name, select Advanced member selection.
v To use the library data sets specified on the entry panel select Use library
data sets.
v To run without showing the member selection list, select Skip member list.
This option bypasses the member list panel and processes all the qualifying
members. If an error (like a duplicate output name) results from the specified
parameters, then the member list panel is displayed with the errors
highlighted.
v To run the function without saving the resulting members, select Check
mode - no update.
v If necessary, select the Preserve copybook library option to ensure that, if a
copybook still exists in the library that it was previously found in and that
library is in the list that the update is using, then that version of the
copybook is used if:

162 File Manager for z/OS V12R1 User's Guide


Managing templates

This option is not selected, or


The copybook no longer exists in the library it was previously found in, or
That library is not in the list the update is using then the utility searches
the libraries in the order they are listed and uses the first version of the
copybook that it finds.
7. If you have selected the Use library data sets option, you can specify up to
twelve copybook library names in the Library data sets Data set name fields.
The copybook library names referenced in the template are changed to the
copybook library names specified in these fields. The new library data sets are
used to locate and compile the copybooks during the update process, so you
need to ensure that all the copybooks referenced in all the templates selected
are available in the libraries you specify to avoid update errors occurring.
8. Press Enter. Unless you have selected the Skip member list processing option,
File Manager displays a member list of templates like those shown in Figure 57.

Process Options Help


Library List
File Manager Template Update Utility Row 1 of 104

Input data set FMN.RFM0047.TEMPLATE


Update data set FMN.RFM0047.TEMPLATE

Sel Name Prompt Created Updated Lang Ver


ABEND 2004/02/11 2004/02/11 09:09:15 COBOL 1
BIGCHAR 2004/07/14 2006/06/28 16:12:31 COBOL 1
BIGCOPY 2003/12/17 2003/12/17 14:39:16 COBOL 1
BIGCOP2 2004/02/11 2004/02/11 10:12:10 COBOL 1
. BIGKSDS 2001/08/10 2001/08/16 13:54:23 COBOL 1
.
.

Figure 57. Member list of templates

Press F11 (Right) to scroll right to display the Description column, and F10
(Left) to return to the original display.
9. In the prefix area (Sel), type any of the following prefix commands and press
Enter to perform the associated action:
v To browse a template, type the B prefix command. The member is displayed
using the ISPF Browse panel (not the File Manager Browse panel).
v To invoke template editing, type the E prefix command. File Manager
invokes template editing.
v To invoke the template source definition edit and interactive update process
for the template, type the U prefix command. File Manager displays the
Copybook Selection panel.
v To select a template for updating, type the S prefix command. File Manager
saves the updated template.

RELATED TOPICS
Template and Copybook Utility functions panel on page 683
Template Update Utility panel on page 685

Chapter 4. Creating and editing templates 163


Manipulating the display of fields in records

Manipulating the display of fields in records


File Manager offers a number of ways to manipulate how fields are displayed
within records. Using the Field Selection/Edit panel, you can:
v Select fields
v Change the order in which fields are displayed
v Change field headings
v Access the Field Attributes panel to change individual field attributes

Selecting and deselecting fields


You can change the display of a record type to show selected fields only, for
display and printing purposes. If you select fields, then only those fields are
displayed or printed. If you do not select fields, then File Manager displays or
prints all fields.

To select or deselect individual fields:


1. Edit your copybook or dynamic template in the Field Selection/Edit panel.
2. In the Cmd field adjacent to the field to be selected, type S and press Enter.
The SHE column displays an S and the line becomes highlighted. For
example, in Figure 58, the REC-TYPE and NAME fields are selected.

.
.
.

File Manager Field Selection/Edit

1 Specify Record Identification by field.


2 Specify Record Selection by field.

Cmd Seq SHE Ref Rdf Field Name Type Start Length
**** Top of data ****
___ ___ 1 1 REC-TYPE01 AN 1 80
___ ___ S 2 2 REC-TYPE AN 1 2
___ ___ S 3 2 NAME AN 3 20
___ ___ 4 2 EMPLOYEE-NO BI 23 2
---------------------- Record Identification Criteria -------------------------
.
.
.

Figure 58. Field Selection/Edit showing selected fields

3. To remove the selection status, type the S command in the Cmd field adjacent
to a selected field. If you remove the selection status from all fields in the
record type, File Manager reverts to its default behavior, which is to display or
print all fields.

You can toggle between selecting and deselecting more than one line at a time by
entering one of the following selection commands:
SS Selects and deselects a block of lines.
Enter SS twice: first in the Cmd field at the start of the block you want to
select or deselect, and second, at the end of the block. File Manager toggles
the selection status of each line in the selected block.
Sn Selects and deselects n lines.

164 File Manager for z/OS V12R1 User's Guide


Manipulating the display of fields in records

Enter Sn in the Cmd field of the first line you want to select or deselect.
File Manager toggles the selection status of each line, starting from the first
line selected for n lines.
S* Selects and deselects a block of lines, starting from the first line selected
and then all subsequent lines.
Enter S* in the Cmd field of the first line you want to select or deselect.
File Manager toggles the selection status of each line, starting from the first
line selected to the last line.

RELATED TOPICS
Field Selection/Edit panel on page 561
Editing a template on page 158

Changing the field display order


By default, fields are displayed in the order in which they occur in the data set.
However, by entering numbers in the Seq field (on the Field Selection/Edit panel),
you can override this order.

Any fields with sequence numbers are displayed before fields without sequence
numbers. Fields with sequence numbers are displayed in the relative order of the
sequence numbers. Sequence numbers do not need to start at 1, or be consecutive.
The remaining fields (without sequence numbers) are displayed in their default
order.

Holding columns when scrolling left or right


You can hold or free fields so that, when you scroll left or right in TABL display
format, those fields are always displayed on the left of the screen regardless of
how far you scroll. To hold a field, enter H in the Cmd field.

When you hold a field, H appears in the middle position of the SHE column on
the Field Selection/Edit panel, and 1 appears in the Seq column to show it is the
first held field. If you hold a second field, 2 appears in the Seq column to show
it is the second held field, and so on.

Note: The sequence numbers of held fields are independent of any other sequence
number you might add. Held fields always appear as the leftmost columns
on the screen (in the order that you held them when editing the template)
and take priority (as far as the left-to-right display is concerned) over other
fields.

Toggling the hold status of more than one field at a time


You can toggle between holding or freeing more than one field at a time by
entering one of the following hold commands in the Cmd field of the Field
Selection/Edit panel:
HH Holds or frees a block of fields.
Enter HH twice: first in the Cmd column at the start of the block of fields
you want to hold or free, and again at the end of the block. File Manager
toggles the hold status of each column in the selected block.
Hn Holds or frees n fields.
Enter Hn in the Cmd field of the first field you want to hold or free. File
Manager toggles the hold status of each field, starting from the first
selected field and continuing for n fields.

Chapter 4. Creating and editing templates 165


Manipulating the display of fields in records

Changing field headings


By default, File Manager uses the field names (from your original copybook or
from your dynamic template) as field headings in SNGL and TABL display format.
You can override this by specifying your own field headings.

To change the field heading:


1. Enter the E (edit) line command in the Cmd field adjacent to the field that you
want to rename.
2. Enter the new field heading in the Heading field on the Field Attributes panel.
3. Press the Exit function key (F3) to save your change and return to the Field
Selection/Edit panel.
4. Repeat for all field headings you want to change.

The field heading may determine the width of the display column. The default
output width is the maximum of the number of characters needed to show the
field heading (or field name, if no heading is specified), and the number of
characters needed to show the value of the field. The following figures
demonstrate how changing a field heading can change the display width of the
field.

.
.
.
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+---->
**** Top of data ****
01 Grant Smith 7712 35 75000 6
01
. Andrew Apple 6645 53 78500 30
.
.

Figure 59. Data set displayed using default field names

.
.
.
Type NAME Emp # AGE SALARY Mth(1) Mth(2)
#2 #3 #4 #5 #6 #7 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4 BI 35:4
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+----> <---+---->
**** Top of data ****
01 Grant Smith 7712 35 75000 6 15
01
. Andrew Apple 6645 53 78500 30 22
.
.

Figure 60. Data set displayed using field headings

Note: While the width of the Employee-No field has reduced, the width of the
Month column has not changed. This is because the Month field has a Type
of BI and Length of 4. The maximum value that can be entered into a field
of this type has 9 digits, therefore, the default output width is 9 characters.
To reduce the width of the Month fields, you would need to modify the
field attributes.

Changing field attributes


Field formatting attributes, such as the width of a field for TABL formatting or
leading zero suppression for numeric fields, can be changed on the Field Attributes

166 File Manager for z/OS V12R1 User's Guide


Manipulating the display of fields in records

panel. You can also specify data create attributes on this panel . The panel comes
in two flavors: one for alphanumeric fields and the other for numeric fields.

Selecting a field for attribute change


You select a field from the Field Selection/Edit panel (Figure 174 on page 562). To
select a record for attribute change, enter E in the Cmd field adjacent to the
required field. You can enter E against as many fields as you like. For each field
you select, File Manager displays a Field Attributes panel.

The attributes you can change are:


v Output width
v Whether to display or suppress leading zeros on numeric fields
v Values to use for creating new records

The attributes are used to determine how to display or print a field.

Changing the attributes for an alphanumeric field


You use the alphanumeric Field Attributes panel to change attributes for an
alphanumeric field or set the pattern for created fields.

To change the output width, enter the new width into the Output width field.

The output width is the number of character positions used by edit, view, and
print panels to show the field in TABL display or print format. The default output
width is the maximum of the number of characters needed to show the field
heading (or field name, if no heading is specified), and the number of characters
needed to show the value of the field, as determined from the field definition.

The minimum width allowed is six characters. The maximum is 30 or the field
width + 10 (whichever is the greater).

You can set any field less than 4 bytes long to be the length field during a
segmented template edit. You can specify the length as inclusive or exclusive. If a
non-blank value is provided, then the segment length is determined from the
binary value contained in the field, and for exclusive fields the field length is
added to this value.

Changing the attributes for a numeric field


You use the numeric Field Attributes panel to change attributes for a numeric field
or set the pattern for created fields.

To change the output width, enter the new width into the Output width field. The
output width is the number of character positions used by edit, view, and print
panels to show the field in TABL display or print format. The default output width
is the maximum of the number of characters needed to show the field heading (or
field name, if no heading is specified), and the number of characters needed to
show the value of the field, as determined from the field definition, including a
sign character and decimal point.

The allowable widths are six to 30 characters.

To display leading zeros on numeric fields in SNGL and TABL display format,
enter YES in the Leading zeros field. The default is NO (suppress leading zeros).

Chapter 4. Creating and editing templates 167


Manipulating the display of fields in records

The following figure demonstrates how field headings and output widths affect the
column width display.

.
.
.
Type NAME Emp # AGE SALARY Mth(1) Mth(2) Mth(3)
#2 #3 #4 #5 #6 #7 #7 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31: BI 35: BI 39:
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+> <---+> <---+>
**** Top of data ****
01 Grant Smith 7712 35 75000 6 15 42
01
. Andrew Apple 6645 53 78500 30 22 46
.
.

Figure 61. Data set displayed using field headings and output width adjustment

You can set any field less than 4 bytes long to be the length field during a
segmented template edit. You can specify the length as inclusive or exclusive. If a
non-blank value is provided, then the segment length is determined from the
binary value contained in the field, and for exclusive fields the field length is
added to this value.

Displaying alphanumeric fields in long hexadecimal


You can change the display of any alphanumeric field using the X, XX, X*, and Xn
prefix commands. When you use the X prefix command, the type for the field
toggles between AN and AX.

When you change the type to AX, the fields are displayed or printed in long
hexadecimal format (as opposed to character format).

Process Options Help



File Manager Field Selection/Edit Line 1 of 33

----------- Criteria - Enter 1 or 2 to specify expression by field -----------


1 Id : +
2 Sel: (#3=Toyota) & (#7>1997) +
Offset 0
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 VEHICLE-REC AN 1 8475
2 2 VEHICLE-TYPE X AX 1 1
3 2 VEHICLE-MAKE X(20) AN 2 20
4 2 VEHICLE-MODEL X(20) AN 22 20
5 2 MODEL-CODE X(6) AN 42 6
6 2 VEHICLE-SUB-MODEL X(20) AN 48 20
7 2 YEAR-OF-MANUFACTURE 9(4) ZD 68 4
8 2 NUMBER-ADVERTISED 9(4) ZD 72 4
9 2 FOR-SALE OCCURS 1 TO 100 TIMES DEPENDING ON
NUMBER-ADVERTISED AN 76 84
10 3 REGO-NUMBER X(8) AN 76 8
Command ===> Scroll CSR
F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 62. Field Selection/Edit panel showing VEHICLE-TYPE flagged to display in long
hexadecimal mode

168 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

Managing templates with the Template Workbench


The Template Workbench is a centralized area in which you can work directly with
templates, independently from specific data sets. You can use this area to create,
edit or update copybook templates. You cannot create dynamic templates in this
area, however, you can edit existing dynamic templates.

Editing a template (E)


To edit a template:
1. In the Data set name field in the Template section, type the name of the data
set in which your existing template is stored.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
2. If you know it, type the Member name of the template into the relevant field or
specify blanks or a pattern for the member name to have a member selection
list displayed. You can then select the required member from the list.
3. On the Command line, type the E command and press Enter.
File Manager displays the Field Selection/Edit panel. (See Field Selection/Edit
panel on page 561 for information about the fields, primary and prefix
commands available on that panel.)

Note: If you do not provide a template data set name, but have entered the details
of a copybook, File Manager creates a temporary template to edit and use to
view data. Before exiting the current panel, you can save the template by
specifying a template name and entering the SAVE command. Otherwise the
template is discarded.

Editing related ID criteria


When you are working with segmented records with related ID criteria (that is, the
ID criteria for a segment layout resides in another segment earlier in the physical
record), you can edit the related ID criteria in the template as follows:
1. In the Data set name field in the Template section of the Template Workbench
panel, type the name of the data set in which your existing template for
segmented data is stored.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
If you know it, type the Member name of the template into the relevant field
or specify blanks or a pattern for the member name to have a member
selection list displayed. You can then select the required member from the list.

.
.
.

Template:
Data set name . FMN.RFM0569.PDSE
Member . . . . TMPLB1
.
.
.

2. On the Command line, type the E command and press Enter.

Chapter 4. Creating and editing templates 169


Managing templates with the Template Workbench

File Manager displays the Record Type Selection panel which lists each of the
level-01 layouts in the template.

Process Options Help



File Manager Record Type Selection Line 1 of 9

Processing Option: Template for segmented data


Cmd SIE Field Name Prompt Offset Length
**** Top of data ****
S HEADER-01 0 20
S HEADER-02 0 20
S HEADER-03 0 20
S DETAIL-0101 0 30
S DETAIL-0102 0 30
S DETAIL-0103 0 30
S DETAIL-0201 0 30
S DETAIL-0202 0 30
S DETAIL-0203 0 30
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F12=Cancel

3. Select (if currently unselected) the Template for segmented data option.
4. Type the E prefix command in the Cmd field against the layout for which you
want to specify related ID criteria (but which is held in another segment).

Process Options Help



File Manager Record Type Selection Line 1 of 9

Processing Option: / Template for segmented data


Cmd SIE Field Name Prompt Offset Length
**** Top of data ****
S HEADER-01 0 20
S HEADER-02 0 20
S HEADER-03 0 20
E S DETAIL-0101 0 30
S DETAIL-0102 0 30
S DETAIL-0103 0 30
S DETAIL-0201 0 30
S DETAIL-0202 0 30
S DETAIL-0203 0 30
. **** End of data ****
.
.

5. Press Enter.
File Manager displays the Field Selection/Edit panel showing the selected
layout.

170 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

Process Options Help



File Manager Field Selection/Edit Line 1 of 6

---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---


0 Rid: +
1 Id : +
2 Sel: 0 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 DETAIL-0101 AN 1 30
2 2 SUBTYPE-FIELD AN 1 9
3 3 SUBTYPECONST X(7) AN 1 7
4 3 TYPEREC X(2) AN 8 2
5 2 DETAILTEXT01 AN 10 21
6 3 DETAIL01-01 X(21) AN 10 21
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Notes:
a. The 0 Rid line at the top of the panel is blank (unless you have previously
specified a related ID expression).
b. The ability to OR the identification criteria with related ID by selecting the
processing option.
6. To enter or edit a related ID expression, type 0 (zero) on the command line
and press Enter.
For the selected layout, File Manager displays the RID Selection panel listing
the other level-01 layouts in the template.

Chapter 4. Creating and editing templates 171


Managing templates with the Template Workbench

Process Options Help



File Manager RID Selection for DETAIL-0101 Line 1 of 8

E against layouts to specify related id criteria


Cmd SIE Field Name Prompt Offset Length
**** Top of data ****
SI HEADER-01 0 20
SI HEADER-02 0 20
S HEADER-03 0 20
SI DETAIL-0102 0 30
S DETAIL-0103 0 30
S DETAIL-0201 0 30
S DETAIL-0202 0 30
S DETAIL-0203 0 30
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F12=Cancel

7. Type the E prefix command in the Cmd field against the layout in which the
related ID criteria are held.

.
.
.

Cmd SIE Field Name Prompt Offset Length


**** Top of data ****
E S HEADER-01 0 20
S HEADER-02 0 20
S HEADER-03 0 20
S DETAIL-0102 0 30
S DETAIL-0103 0 30
S DETAIL-0201 0 30
S DETAIL-0202 0 30
. S DETAIL-0203
.
.

8. Press Enter.
File Manager displays the Related ID expression panel showing the selected
layout.

172 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

Process Options Help



File Manager Related Id expression for DETAIL-0101 Line 1 of 7

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 HEADER-01 AN 1 20
2 2 ALLGROUP AN 1 20
3 3 TYPE-FIELD AN 1 8
4 4 TYPECONST X(6) AN 1 6
5 4 TYPEREC X(2) AN 7 2
6 3 HEADERTEXT AN 9 12
7 4 HEAD01-TEXT X(12) AN 9 12
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Notes:
a. The ability to OR the related criteria with other related ID by selecting the
processing option.
9. On the 0 Rid line at the top of the Related ID expression panel, specify (or
edit) the related ID expression. Alternatively, type 0 (zero) on the command
line and press Enter to specify the related ID expression by field.
Typically, the related ID expression specifies the field, and the value it
contains, in the layout holding the related ID.

Process Options Help



File Manager Related Id expression for DETAIL-0101 Line 1 of 7

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: #5=01 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 HEADER-01 AN 1 20
2 2 ALLGROUP AN 1 20
3 3 TYPE-FIELD AN 1 8
4 4 TYPECONST X(6) AN 1 6
5 4 TYPEREC X(2) AN 7 2
6 3 HEADERTEXT AN 9 12
7 4 HEAD01-TEXT X(12) AN 9 12
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Chapter 4. Creating and editing templates 173


Managing templates with the Template Workbench

10. Press the Exit function key (F3) to return to the RID Selection panel.
11. Press the Exit function key (F3) again to return to the Field Selection/Edit
panel.

Process Options Help



File Manager Field Selection/Edit Line 1 of 6

---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---


0 Rid: SEG(HEADER-01):#5: TYPEREC =01 +
1 Id : +
2 Sel: 0 +
Offset 0 Enter "/" to OR with related ID

**** Top of data ****


1 1 DETAIL-0101 AN 1 30
2 2 SUBTYPE-FIELD AN 1 9
3 3 SUBTYPECONST X(7) AN 1 7
4 3 TYPEREC X(2) AN 8 2
5 2 DETAILTEXT01 AN 10 21
6 3 DETAIL01-01 X(21) AN 10 21
**** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

You will now see the related ID expression on the 0 Rid line at the top of the
Field Selection/Edit panel.
12. On the 1 Id and 2 Sel lines, specify record identification and or selection
criteria by field as required.

Process Options Help



File Manager Field Selection/Edit Line 1 of 6

---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---


0 Rid: SEG(HEADER-01):#5: TYPEREC =01 +
1 Id : #4=01 +
2 Sel: 0 +
Offset 0 Enter "/" to OR with related ID
.
.
.

13. Using SEGNO() and SEGCNT() functions to identify your segments


The SEGNO and SEGCNT functions provide a mechanism for checking the
current segment number being processed and the number of previous
occurrences of a particular segment.
SEGNO() Returns the current segment number.
SEGCNT('01 field-name') Returns the number of previous occurrences of
the segment with 01 field name specified.
The SEGNO and SEGCNT functions can only be specified in a free-format
expression

174 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

Example of their usage:


Consider the following sample data, where the first segment can be used to
determine the number of following A, B, C, or D segments:

..
.
Col 1 Insert Length 8160 Record AT TOP Format CHAR
----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
****** **** Top of data ****
000001 1234AsegBsegBsegCsegCsegCsegDsegDsegDsegDseg
000002 0202BsegBsegDsegDseg
000003 1232AsegBsegBsegCsegCsegCsegDsegDseg
..****** **** End of data ****
.

The data above can be mapped with the following template:

.
.
.
File Manager Record Type Selection Line 1 of 2

Processing Option: Template for segmented data


Cmd SIE Field Name Prompt Offset Length
**** Top of data ****
e SI SEG-HDR 0 4
e SI SEG-A 0 4
e SI SEG-B 0 4
e SI SEG-C 0 4
e SI SEG-D 0 4
. **** End of data ****
.
.

Examine the criteria for each segment.


Header segment segno() = 1 ensures its always the first segment on the
record.

.
.
.
File Manager Field Selection/Edit Line 1 of 5

---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---


0 Rid: +
1 Id : segno()=1 +
2 Sel: +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-HDR AN 1 4
2 2 SEG-NUM-A 9 ZD 1 1
3 2 SEG-NUM-B 9 ZD 2 1
4 2 SEG-NUM-C 9 ZD 3 1
5 2 SEG-NUM-D 9 ZD 4 1
. **** End of data ****
.
.

Note: The segment header contains the number of each of the following
segments that occur.

Chapter 4. Creating and editing templates 175


Managing templates with the Template Workbench

Segment A: note the related expression where we compare the previous


occurrences to the value in the header.

.
.
.
File Manager Field Selection/Edit Line 1 of 3

---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---


0 Rid: SEG(SEG-HDR):segcnt(seg-a) < #2: SEG-NUM-A +
1 Id : +
2 Sel: +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-A AN 1 4
2 2 SEG-TYPE X(1) AN 1 1
3 2 SEG-DATA X(3) AN 2 3
. **** End of data ****
.
.

.
.
.
File Manager RID Selection for SEG-A Line 1 of 4

E against layouts to specify related id criteria


Cmd SIE Field Name Prompt Offset Length
**** Top of data ****
e SI SEG-HDR 0 4
SI SEG-B 0 4
SI SEG-C 0 4
SI SEG-D 0 4
. **** End of data ****
.
.

Press Enter.

.
.
.
File Manager Related Id expression for SEG-A Line 1 of 5

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: segcnt(seg-a) < #2 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-HDR AN 1 4
2 2 SEG-NUM-A 9 ZD 1 1
3 2 SEG-NUM-B 9 ZD 2 1
4 2 SEG-NUM-C 9 ZD 3 1
5 2 SEG-NUM-D 9 ZD 4 1
. **** End of data ****
.
.

Note: We use SEGCNT and compare it to the value in the header to ensure
that the number of SEG-A identified is determined by the header value.
SEG-B, SEG-C, and SEG-D are all defined with a similar expression as follows:

176 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

.
.
.
File Manager Related Id expression for SEG-B Line 1 of 5

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: segcnt(seg-b) < #3 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-HDR AN 1 4
2 2 SEG-NUM-A 9 ZD 1 1
3 2 SEG-NUM-B 9 ZD 2 1
4 2 SEG-NUM-C 9 ZD 3 1
5 2 SEG-NUM-D 9 ZD 4 1
. **** End of data ****
.
.

.
.
.
File Manager Related Id expression for SEG-C Line 1 of 5

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: segcnt(seg-c) < #4 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-HDR AN 1 4
2 2 SEG-NUM-A 9 ZD 1 1
3 2 SEG-NUM-B 9 ZD 2 1
4 2 SEG-NUM-C 9 ZD 3 1
5 2 SEG-NUM-D 9 ZD 4 1
. **** End of data ****
.
.

.
.
.
File Manager Related Id expression for SEG-D Line 1 of 5

-------- Criteria - Enter 0 to specify related ID expression by field --------


0 Rid: segcnt(seg-d) < #5 +
Offset 0 Enter "/" to OR with related ID
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 SEG-HDR AN 1 4
2 2 SEG-NUM-A 9 ZD 1 1
3 2 SEG-NUM-B 9 ZD 2 1
4 2 SEG-NUM-C 9 ZD 3 1
5 2 SEG-NUM-D 9 ZD 4 1
. **** End of data ****
.
.

Viewing the data with a segmented template produces the following where
we can see the header segment has been used to determine the number of
following segments.

Chapter 4. Creating and editing templates 177


Managing templates with the Template Workbench

.
.
.
View FMN.RFM0757.SEGTEST(SEG2) Top of 3
Record AT TOP Format TABL
SEG-NUM-A SEG-NUM-B SEG-NUM-C SEG-NUM-D
#2 #3 #4 #5
ZD 1:1 ZD 2:1 ZD 3:1 ZD 4:1
<> <> <> <>
****** **** Top of data ****
000001 1 2 3 4
- - - - - -1- - - SEG-A - - - - - - - - - - - - - 1 Line(s) suppressed
- - - - - -1- - - SEG-B - - - - - - - - - - - - - 2 Line(s) suppressed
- - - - - -1- - - SEG-C - - - - - - - - - - - - - 3 Line(s) suppressed
- - - - - -1- - - SEG-D - - - - - - - - - - - - - 4 Line(s) suppressed
000002 0 2 0 2
- - - - - -2- - - SEG-B - - - - - - - - - - - - - 2 Line(s) suppressed
- - - - - -2- - - SEG-D - - - - - - - - - - - - - 2 Line(s) suppressed
000003 1 2 3 2
- - - - - -3- - - SEG-A - - - - - - - - - - - - - 1 Line(s) suppressed
- - - - - -3- - - SEG-B - - - - - - - - - - - - - 2 Line(s) suppressed
- - - - - -3- - - SEG-C - - - - - - - - - - - - - 3 Line(s) suppressed
. - - - - - -3- - - SEG-D - - - - - - - - - - - - - 2 Line(s) suppressed
.
.

How File Manager handles segmented data with related ID


criteria
Identification criteria
Identification criteria includes the ability to specify one or more references
to fields within other segment types that occur earlier in the physical
record in relation to the current segment.
Segment types are checked backwards from the current segment location,
so the first matching segment type (for the particular related ID reference)
preceding the current segment is the one used for comparison. ID criteria
and related ID criteria are ANDed together unless ORing is requested by
means of the template option.
Selection criteria
Segment selection criteria affects the selection of the entire record. If a
segment within a record fails the selection criteria, the entire record is
considered to have failed selection and is not presented or available in any
form during subsequent processing.
Template layout selection and deselection
Deselection of a segment type in the template does not affect the
processing of the selection criteria. For Edit or View, segments that have
been deselected in the template (in order to honor the setting) are always
grouped in a not-selected shadow line, regardless of the current grouping
setting (the SHOW settings). The shadow line may be hidden or visible,
depending on the current settings of the SHADOW primary command.
Unidentified segments
Segments that cannot be identified by explicit ID criteria, or by the implicit
criteria of length matching (for those segments that do not have ID criteria
specified), are also marked as not-selected segments. However, in Edit or
View, these continue to obey the current grouping settings. When in Edit
or View and in a multi-line format (TABL, CHAR, HEX or LHEX), and
these segments are ungrouped, then the prefix area contains "=ID" to

178 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

denote that these segments could not be identified. In SNGL format (as
there is no prefix area), a message is issued.
Editor mode of operation
Editing or viewing of segmented data is performed in one of two modes:
In-place, unrestricted size
This mode is used when the template does not contain selection
criteria.
In-memory and in-place
In this mode, only as many records as will fit comfortably into the
current virtual storage are loaded. Only segments of physical
records meeting the template selection criteria are loaded into
storage. Only records that are selected are loaded into memory, so
this does not restrict the scenario where selection criteria are
intended to give a few result records from a large file. This mode is
used when the template contains any selection criteria. If you want
to examine records and segments occurring later in the file than
would be expected to fit into the available storage, you can use the
Start position field.
Identification and selection currency for Edit and View
Identification and selection criteria are only applied to the records and
segments at the time of loading the data into memory (assuming selection
criteria have been supplied and this is an in-memory Edit or View) for the
editor session. They are not re-assessed at any time during the editor
session. For Edit, this means that data changes to segments that potentially
affect the segment type, or would have disqualified the record or segment
for selection, are not acted on in the current Edit session. To reflect this
type of change to the data, it may be saved and the edit session re-entered.

Updating a template from a copybook (U)


If you have made minor changes to the copybook on which a template was based,
you can update the template to reflect these changes.

Minor changes that the update process supports include:


v Changing field names without changing field data types
v Changing field data types without changing field names
v Changing the order of fields in a record
v Deleting unreferenced fields
v Inserting new fields
v Changing record length
v Changing the number of occurrences of fields in an array (table)

Major changes that might cause the update process to produce unwanted results
include:
v Changing field names and field data types
v Changing field names and the order of fields in a record

If the template contains record identification criteria or record selection criteria,


then the update process adjusts the field reference numbers in the criteria to reflect
any changes in the field order.

However, if the criteria refer to a field that has been deleted in the copybook, then
the update process displays the Field Selection/Edit panel, with references to

Chapter 4. Creating and editing templates 179


Managing templates with the Template Workbench

deleted fields changed to #0. Edit the criteria, removing or replacing the obsolete
field references, then press the Exit function key (F3) to continue with the update
process.

If you change the data type of a field to a dissimilar data type (for example,
numeric to non-numeric, or vice versa), then the update process discards any field
attributes that you might have defined for that field (such as create attributes).

To update an existing template from a copybook:

Note: File Manager ignores the Copybook: Data set name field and instead uses
the data set names which were used to create or update the template.

Copybooks can be stored in PDS, PDSE or CA-Panvalet libraries.


1. In the Data set name field in the Template section, type the name of the data
set, in which the template you want updated is stored.
Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet
library, or a library accessed using the Library Management System Exit.
2. In the Member field of the Templates section, type the name of your template
or specify blanks or a pattern for the member name.
3. On the Command Line, type the U command and press Enter.
File Manager takes you to the advanced copybook selection process on the
existing source definition for the specified template. When you press the Exit
function key (F3), File Manager updates the template. A message is displayed
in the upper right corner of the panel, to indicate the success or failure of the
process.

You must specify the PDS member name of the copybook you want to use, and the
data set name or PDS member name of the template you want to update. The
copybook you specify is validated by compiling it with the compiler. For a
description of the compilation process, and information about what you can do if
errors occur, see Data description support on page 136.

Running a function using a copybook or template (RC or RT)


If you entered the Template Workbench from a View or Edit panel (with the
TVIEW command), you can use the Template Workbench to edit the current
template or to select or create a new template, and then view the data.

To do so:
1. From the View or Edit panel, type TView on the Command Line and press
Enter.
The Template Workbench main panel is displayed, with the details of the
currently used copybook and/or template in the relevant fields.

Note: Issuing the TV command followed by a F3 (Exit) or F12 (Cancel) is


synonymous to a TV OFF command. You must issue the RC or RT
command to resume edit with a template from the workbench.
2. You can edit the current template (E command), create a new template from the
current copybook (CC command), create a new template from the current
template (CM command) or simply specify a different copybook or template.
3. Make your editing choices and then type the RC command (to use the
copybook) or RT command (to use the template).

180 File Manager for z/OS V12R1 User's Guide


Managing templates with the Template Workbench

The View or Edit panel displays the data, using the newly specified copybook
or template.

Note: These two commands are not available when you enter the Template
Workbench through option 7.1.

When you enter RC, you are in effect using a temporary template created from the
copybook you specify. You cannot edit this template before the panel is run, and
the template is not saved. If you want to edit or save the template, use the CC
command, and then use the RT command.

To use RC you must specify the PDS member name of the copybook you want to
use. The copybook you specify is validated by compiling it with the compiler. For
a description of this process, and information about what you can do if errors
occur, see Data description support on page 136.

If you use the RT command, the template can be either a permanent one
previously saved in a PDS member, or a temporary one created for the current
panel using the CC command.

Mapping fields (MC or MT)


When you copy data from one data set to another, or compare data in two data
sets, you can first provide:
v A template describing the record structure of the input (Copy) or first (Compare)
data set
v A template describing the record structure of the output (Copy) or second
(Compare) data set
You can then describe the relationship between these record structures (known as
field mapping). Field mapping can be created and edited from the Template
Workbench, using the MC or MT primary commands, or it can be done on the
fly, within the Copy or Compare Utilities.

Within the Template Workbench and the Copy Utility, the templates are known as
the From and To templates. Within the Compare Utility, they are known as the
Old and New templates. However, the template definitions and field mapping
information are independent of any utility and templates intended for use in the
Compare Utility can still be created and edited in the Template Workbench.

You specify field mapping information in the To (or New) template. For each
field in the To template, the field mapping defines which field in the From (or
Old) template (if any) are copied to or compared with the field in the To
template.

Before editing field mapping in a To template, you need to specify a From


template, using either the MC (Map from copybook) or MT (Map from template)
command.

To use a copybook to create a new From template, specify a copybook on the


Template Workbench, then enter the MC command.

To use an existing template as the From template, specify an existing template


on the Template Workbench, then enter the MT command.

Chapter 4. Creating and editing templates 181


Managing templates with the Template Workbench

After you enter an MC or MT command, File Manager displays the Map To panel,
where you can specify a To template, and use the EM or GE commands to begin
editing its field mapping (see Map To panel on page 591).

RELATED TOPICS
Mapping fields between templates on page 186
Copying data sets on page 247
Comparing data sets on page 275

Generating and editing field mapping (GM, GE and EM)


The GM (Generate corresponding map) command generates default field mapping
between the From and To templates, replacing any existing field mapping in
the To template. The GM command does not display the field mapping for
editing. For details on the default field mapping generated by File Manager, see
Mapping fields between templates on page 186.

The EM (Edit mapping) command displays the field mapping for editing. If there
is no existing field mapping in the To template, then the EM command generates
default field mapping (effectively, performing a GM command before displaying
the field mapping for editing).

The GE command is similar to EM, except that it always regenerates the default
field mapping in the To template (replacing any existing field mapping) before
displaying the field mapping for editing.

For details on editing the field mapping, see Mapping fields between templates
on page 186.

Mapping contiguous fields


If you need to map contiguous fields, you may find it more convenient to use the
SS, Sn, or S* prefix commands (see Field Mapping panel on page 559).

When you select more than one field at a time, File Manager displays the From
(or Old) Field Mapping panel (see From (or Old) Field Mapping panel on page
573) for the next selected field each time you press the Exit function key (F3).
When you are viewing the last selected field and press the Exit function key (F3),
File Manager returns you to the Field Mapping panel (see Field Mapping panel
on page 559).

Specifying scrambling options


Scrambling data allows you to create test data based on production (or "live") data,
but with the ability to change the values of certain fields.

When you use the Copy Utility (option 3.3) to copy data from one data set to
another data set, you specify the fields you want scrambled by marking those
fields for scrambling in the output template.

You mark a field for scrambling by setting the scrambling options for that field in
the template.

You can specify or change scrambling options on the Field Attributes panel. The
panel comes in two flavors: one for alphanumeric fields and the other for numeric
fields.
Selecting a field for specifying scrambling options on page 183

182 File Manager for z/OS V12R1 User's Guide


Specifying scrambling options

Scrambling data on page 256


Field Attributes panel - alphanumeric fields on page 548
Field Attributes panel - numeric field on page 554
Value List Edit panel on page 697
Scramble Exit Specification panel on page 642

Selecting a field for specifying scrambling options


You select a field from the Field Selection/Edit panel (Figure 174 on page 562). To
select a field for specifying scrambling options, enter E in the Cmd field adjacent to
the required field. You can enter E against as many fields as you like. For each
field you select, File Manager displays a Field Attributes panel.

After you have updated the scrambling options for a field (or any of the other field
attributes), when you return to the Field Selection/Edit panel you will see an "E"
for that field in the E column (under the "SHE" heading) indicating that the
attributes for that field have changed.

The scrambling options you can specify are:


v Scramble type
v Value option
v Value input column
v Value output column
v Minimum and maximum values for a numeric range
v Value data set name

The scrambling options determine how the input data is scrambled (if at all) when
it is copied to an output dataset.

RELATED TOPICS
Specifying the scramble type
Specifying the value option on page 184
Specifying value input and out columns on page 185
Specifying range values on page 185
Specifying a value data set name on page 185
Specifying and editing a value list on page 186

Specifying the scramble type


The Scramble Type option determines how data is scrambled when it is copied to
the output data set.

Set the scramble type to one of these values:


Blank Data is not scrambled.
1 ("Random")
Data scrambled to produce a random output value on each invocation.
2 ("Repeatable")
Data scrambled to produce the same output value on each invocation.
3 ("Translate")
Data scrambled using input and output values held in the value data set
(specified in the Dsn field).
This option requires you to select the Value option with an input and
output column (In and Out) and value data set name (Dsn). All records in
the translate data set are loaded into memory for the copy operation. The
input and output columns provide the location of the input and output

Chapter 4. Creating and editing templates 183


Specifying scrambling options

field values as stored in the data set. Their lengths are determined by the
respective input and output fields that have been mapped for the copy
operation. If a matching input field value is found, then the corresponding
output field value is obtained from the matching record. If no match is
found, then the field is initialized to zero, or the value determined by the
data create attributes.
4 ("Exit")
Data scrambled using a scrambling exit (as specified on a separate panel).
For details about writing a scrambling exit, see the File Manager
Customization Guide.

RELATED TOPICS
Specifying the value option
Specifying value input and out columns on page 185
Specifying range values on page 185
Specifying a value data set name on page 185

Specifying the value option


The Value option and corresponding fields control the output of the scrambling
process.

The way in which you select, or specify, this option differs according to whether
the associated field is alphanumeric or numeric:
v For alphanumeric fields, do one of these:
Deselect the Value option by entering a blank.
Select the Value option by entering a "/".
v For numeric fields, do one of these:
Deselect the Value option by entering a blank.
Select a range by entering "1".
Select the Value option by entering "2".

Value option selected ("/")

Selecting this option allows you to provide:


v A translate data set. This applies when you select Scramble Type 3 ("Translate")
with input and output columns and a value data set.
v A lookup data set. This applies when you select a Scramble Type of 1
("Random") or 2 ("Repeatable") along with a value data set name. The data set is
loaded into memory and the output value is randomly or repeatably selected
from one of the loaded records. The output column determines the location of
the value that is selected for this field.
v A value list. This applies when you select a Scramble Type of 1 ("Random") or 2
("Repeatable") without a value data set name and allows you to enter the
selection values for this field on the panel displayed when you hit Enter. One of
the values you provide is randomly or repeatably selected during a copy
operation. The values you enter are stored in the template. Value lists are
described in more detail later.

Value option deselected (blank)

Deselecting this option scrambles the input field to produce a random or


repeatable output value. Scramble Type must be set to 1 ("Random") or 2
("Repeatable").

184 File Manager for z/OS V12R1 User's Guide


Specifying scrambling options

Specifying value input and out columns


The input column field (In) defines the start location of the input field value on the
value data set and is used when the translate process is run during a copy
operation to match the input field with a value on the value data set. The length of
the field is set to the length of the input field that is mapped to this field during
the copy process.

Note: This value is only required when you select Scramble Type 3 ("Translate").

The output column field Out defines the start location of the output field value on
the value data set and is used in these ways during a copy operation:
v Translate. If an input field value is matched on the value data set, then the
corresponding output value is used.
v Random or Repeatable. The input value is used to randomly, or repeatably,
select an output value from the value data set.

The length of the field is the field length as displayed on the Field Attributes
panel.

Note: This value is required when you select Scramble Type 3 ("Translate").

If you select Scramble Type 1 ("Random") or 2 ("Repeatable"), and you have


also selected the Value option, then the output column defaults to 1 if you
have specified a value data set name (Dsn).

Specifying range values


When you are specifying scramble options for a numeric field, you can specify a
range of values from which the resultant scrambled value is to be selected.

You specify the minimum value of the range in the Min field and the maximum
value of the range in the Max field.

You can only select the range option with random and repeatable scrambling. The
output value is randomly or repeatably selected from a number within the
specified range.

Specifying a value data set name


The output data set name field Dsn field defines the value data set. It can be any
cataloged sequential, partitioned or VSAM data set containing data that is used to
determine the output field value during a copy process.

If you select Scramble Type 3 ("Translate"), then the data set must contain the
input and output values in the locations provided in the input and output
columns.

If you select Scramble Type 1 ("Random") or 2 ("Repeatable"), then the data set
must contain the output value in the locations provided in the output column.

Note: This field is required when you select Scramble Type 3 ("Translate"). If you
select Scramble Type 1 ("Random") or 2 ("Repeatable"), and also select the
Value option, then you can optionally provide a data set name. If you leave
this field blank having selected the Value option, you are prompted to enter
the value list to be stored in the template.

Chapter 4. Creating and editing templates 185


Specifying scrambling options

Specifying and editing a value list


A value list is a list of values which is used in conjunction with the scrambling
options to select a value with which a field is populated during a copy operation.
When the output field is being populated, one of the values in this list is selected.
Scrambling options combine the originating value with the random or repeatable
seed to select a value from the list.

For random and repeatable scrambling, you can specify a value list inline by
leaving the value data set field (Dsn) blank and selecting the Value option.

To edit the related value list, select the Value option and press Enter. File Manager
displays the Value List Edit panel.

The values you provide must be valid for the corresponding field type. Deleting a
value list turns off the value list option on the previous panel.

To enter hexadecimal values, use the X'hhhh' format:


xC1C2C3

To provide leading blanks or a blank value, use a quoted string:


SMITH

Blank value lines (no quotes) are ignored.

Use the FIND and LOCATE commands to bring a value containing or starting with
a given string to the current line.

You can use prefix commands to copy, insert, move, repeat or delete lines.

To save the values, press F3. To ignore changes, press Cancel.

RELATED TOPICS
Value List Edit panel on page 697

Mapping fields between templates


Field mapping can be used when copying or comparing data. When copying, you
must specify a From and a To template (see Copying data sets on page 247);
when comparing, you must specify an Old and a New template and specify
the Formatted Compare Option (see Comparing data sets on page 275). File
Manager uses field mapping information stored in the To or New template to
determine which fields are used in the process.

By default, File Manager generates field mapping information by matching the


names of fields in the templates (this is case-sensitive). In many cases, the default
field mapping is enough to perform the action you require. However, you can also
edit the field mapping, allowing you to specify which record types are mapped
and which fields within those record types are mapped. You can set up mapping
so that, in the extreme case, a field is mapped to a field with a different name,
length, and data type.

Default field mapping


While the same templates can be used for either copying or comparing, you need
to understand the way that File Manager uses them in each situation.

186 File Manager for z/OS V12R1 User's Guide


Mapping fields between templates

First, File Manager pairs record types in the templates by looking for matching
field names. Then, within each pair of record types, File Manager maps fields with
matching names. The following two examples show the default results of this
mapping in the copy and compare processes.

Copying with the default field mapping


A field mapping between From and To templates could be generated as:

From template To template

REC-TYPE-A  NEW-TYPE-A 1


FIELD-A1  FIELD-A1
FIELD-A2  FIELD-A2
FIELD-A3 2

REC-TYPE-B  NEW-TYPE-B
FIELD-B1  FIELD-B1
FIELD-B2  FIELD-B2
FIELD-B3 3

REC-TYPE-C 4 REC-TYPE-C 5


FIELD-C1 FIELD-Z1
FIELD-C2 FIELD-Z2

Figure 63. Example of default field mapping

Given an input data set that consists of three records (one of each type defined in
the From template), like this:
FIELD-A1 FIELD-A2 FIELD-A3  REC-TYPE-A

FIELD-B1 FIELD-B2  REC-TYPE-B

FIELD-C1 FIELD-C2  REC-TYPE-C

then copying the input data set would result in an output data set like this:
FIELD-A1 FIELD-A2  NEW-TYPE-A 2

FIELD-B1 FIELD-B2 FIELD-B3  NEW-TYPE-B 3

FIELD-C1 FIELD-C2  REC-TYPE-C 4

Notes
1 File Manager pairs record types by matching field names within the record
types; the names of the record types (level-01 group items, in the
copybooks) are not important.
2 There is no matching FIELD-A3 in the To template NEW-TYPE-A, so this
field is not copied to the output data set.
3 There is no FIELD-B3 in the From template to map to this FIELD-B3 in
the To template. The field is inserted in the output data set; its value is
initialized according to the field create attributes (if they exist) in the To
template, or to zero (if it is a numeric field) or blanks (if it is an
alphanumeric field).
4 There is no record type in the To template containing fields named
FIELD-C1 or FIELD-C2, so the REC-TYPE-C record type in the From
template is not paired with any record type in the To template (even
though the To template contains a record type named REC-TYPE-C). The

Chapter 4. Creating and editing templates 187


Mapping fields between templates

REC-TYPE-C record from the input data set is copied intact to the output
data set. To stop this record from being copied, you need to edit the
From template and deselect the REC-TYPE-C record type.
5 The REC-TYPE-C record type definition in the To template is unused,
and has no effect on the copy.

Comparing with the default field mapping


A field mapping between Old and New templates could be generated as:

"Old" template "New" template

OLD-TYPE-A  NEW-TYPE-A 1


FIELD-A1  FIELD-A1
FIELD-A2  FIELD-A2
FIELD-A3 2

OLD-TYPE-B  NEW-TYPE-B
FIELD-B1  FIELD-B1
FIELD-B2  FIELD-B2
FIELD-B3 3

OLD-TYPE-C REC-TYPE-C 4


FIELD-C1 FIELD-Z1
FIELD-C2 FIELD-Z2

Figure 64. Example of default field mapping

With the above field mapping, an Old data set containing one record of each
type defined in the Old template:
FIELD-A1 FIELD-A2 FIELD-A3  OLD-TYPE-A

FIELD-B1 FIELD-B2  OLD-TYPE-B

FIELD-C1 FIELD-C2  OLD-TYPE-C

and a New data set containing one record of each type defined in the New
template:
FIELD-A1 FIELD-A2  NEW-TYPE-A

FIELD-B1 FIELD-B2 FIELD-B3  NEW-TYPE-B

FIELD-Z1 FIELD-Z2  REC-TYPE-C

would be compared as follows:


v FIELD-A1 in the NEW-TYPE-A record is compared to FIELD-A1 in the
OLD-TYPE-A record.
v FIELD-A2 in the NEW-TYPE-A record is compared to FIELD-A2 in the
OLD-TYPE-A record.
v FIELD-A3 in the OLD-TYPE-A record is not compared with any field in any
record in the New data set. 2
v FIELD-B1 in the NEW-TYPE-B record is compared to FIELD-B1 in the
OLD-TYPE-B record.
v FIELD-B2 in the NEW-TYPE-B record is compared to FIELD-B2 in the
OLD-TYPE-B record.
v FIELD-B3 in the NEW-TYPE-B record is not compared with any field in any
record in the Old data set.3

188 File Manager for z/OS V12R1 User's Guide


Mapping fields between templates

v The REC-TYPE-C records are not compared because there is no mapping match
between the fields in the OLD-TYPE-C record and any record in the "New"
template.4

Notes
1 File Manager pairs record types by matching field names within the record
types; the names of the record types (level-01 group items, in the
copybooks) are not important.
2 There is no matching FIELD-A3 in the New template NEW-TYPE-A, so
this field is not mapped and is not used in the comparison.
3 There is no FIELD-B3 in the Old template to map to this FIELD-B3 in the
New template, so this field is not mapped and is not used in the
comparison.
4 There are no fields named FIELD-C1 or FIELD-C2 in any record type in the
New template, so the OLD-TYPE-C record type in the Old template is
not paired with a record type in the New template.
The New data in the REC-TYPE-C record is reported using the field
descriptions in the NEW-TYPE-A record type. This is because the templates
do not contain record identification criteria and NEW-TYPE-A is the first
record type in the New template with a length matching the length of
the REC-TYPE-C record in the New data set.
The Old data is not reported because there is no mapping match
between the fields in the OLD-TYPE-C record and any record in the "New"
template. Instead, the message " *** Old data is not mapped to any data ***
" is reported.

Editing the field mapping


You can edit the field mapping either when performing a copy or a compare, or by
using the Template Workbench panel.

To access the field mapping when performing a copy, you must have specified
both a From and a To template and selected the Edit template mapping
option in the To panel (see Copying using a copybook or template on page
253).

To access the field mapping when performing a compare, you must have specified
both an Old and a New template in the first two panels and selected the 2.
Formatted Compare Type and Edit template mapping option in the third panel
(see Comparing data sets on page 275).

To edit the field mapping from the Template Workbench panel:


1. On the Template Workbench (option 7) panel, specify a copybook or template
that you plan to use for a From or Old template.
Although you need to specify this template before you can begin to edit the
field mapping, you do not edit the mapping in this template: field mapping
information is stored in the template that you specify on the next panel (To
or New).
2. Enter either an MC (Map from copybook) or an MT (Map from template)
command.

Chapter 4. Creating and editing templates 189


Mapping fields between templates

3. On the Map From panel, specify a copybook (if you want to create a new
template) or an existing template that you plan to use for a To or New
template.
4. Enter an EM (Edit mapping) command to edit the field mapping in that
template.

Note: Template mapping information is used by both the Compare and Copy
Utilities. When using the Template Workbench, the panel labels are those
used by the Copy Utility (From and To).

Regardless of the method used to edit the field mapping, one of the following
occurs:
v If the To template was generated from a copybook containing only one record
type or was created as a dynamic template, the Template Mapping panel is
displayed. (For panel details, see Field Mapping panel on page 559.)
v If the To template was generated from a copybook containing more than one
record type, the Record Type Mapping panel is displayed. (For panel details, see
Record Type Mapping panel on page 630).

Note: The examples in this section assume that you are editing the field
mapping from within the Template Workbench.

Process Options Help



File Manager Record Type Mapping

TO FMN.SFMNSAM1(FMNCCPY2) FROM FMN.SFMNSAM1(FMNCCPY)


Cmd Field name Len Field name Len
**** Top of data ****
___ NEW-TYPE01 84 | REC-TYPE01 84
___ NEW-TYPE02 100 | REC-TYPE02 100
**** End of data ****

Command ===> _____________________________________________________ Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F6=Describe
F7=Up F8=Down F9=Swap F12=Cancel

Figure 65. Record Type Mapping panel

To edit the mapping for a particular record type in the To template, type an S in
the adjacent Sel column and press Enter.

File Manager displays the Field Mapping panel, showing the existing mapping
between the fields in the To template record type and fields in the From
template.

Setting up a mapping for a field


To set up or change the mapping for a field in the To template, enter S against
the field name. The From Field Mapping panel is displayed, listing the fields in the
From template that you can map to the To field:

190 File Manager for z/OS V12R1 User's Guide


Mapping fields between templates

Process Options Help



File Manager Field Mapping Line 1 of 7

To FMN.SFMNSAM1(FMNCCPY2)
From FMN.SFMNSAM1(FMNCCPY)

Cmd Lv To Field Name Type Len Lv From Field Name Type Len
**** Top of data ****
1 NEW-TYPE01 AN 84 | 1 REC-TYPE01 AN 80
2 REC-TYPE AN 2 | 2 REC-TYPE AN 2
2 NAME AN 20 | 2 NAME AN 20
2 SERIAL-NO BI 4 |
2 AGE BI 2 | 2 AGE BI 2
2 SALARY PD 4 | 2 SALARY PD 4
2 MONTH BI 4 | 2 MONTH BI 4
**** End of data ****

Command ===> Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F5=RFind F6=Describe
F7=Up F8=Down F9=Swap F12=Cancel

Figure 66. The Field Mapping panel

In the example panel above, note that there is no From field against the To
field SERIAL-NO. This field is unmapped.

To set up or change the mapping for a field in the To template, enter S against
the field name. The From Field Mapping panel is displayed, listing the fields in
the From template that you can map to the selected To field:

Process Options Help



File Manager From Field Mapping
To template/copybook : FMN.SFMNSAM1(FMNCCPY2)
From template/copybook : FMN.SFMNSAM1(FMNCCPY)
To field . . . . . . : #4 SERIAL-NO
From field . . . . . . :
Corresponding(Y/N) . . : N (Auto map for group items).

Sel Ref Lvl Old Field Typ Start Length


**** Top of data ****
___ D -- Delete "Old field"
___ 1 1 REC-TYPE01 AN 1 84
___ 2 2 REC-TYPE AN 1 2
___ 3 2 NAME AN 3 20
___ 4 2 EMPLOYEE-NO BI 23 4
___ 5 2 AGE BI 27 2
___ 6 2 SALARY PD 29 4
___ 7 2 MONTH(13) BI 33 4
**** End of data ****

Command ===> _____________________________________________________ Scroll PAGE


F1=Help F2=Split F3=Exit F4=CRetriev F7=Up F8=Down
F9=Swap F12=Cancel

Figure 67. The From Field Mapping panel

Chapter 4. Creating and editing templates 191


Mapping fields between templates

This screen is similar to the Primary Field Selection/Edit panel, on page 562. You
edit fields in the same way, by entering E against the field name. For copying in
particular, you may wish to edit a field so that you can set the create attributes for
the field. These are described in detail in Changing the attributes for an
alphanumeric field on page 167 and Changing the attributes for an alphanumeric
field on page 167.

The information at the top of the panel shows you the current mapping. In the
panel above, the To field is SERIAL-NO. There is currently no From field,
because there is no From field that has the same name.

To specify a From field to map to SERIAL-NO, enter S against a From field.


The information at the top of the panel changes immediately to reflect the new
mapping. For example, if you enter S against field #4 (EMPLOYEE-NO), then the
information at the top of the panel looks like this:

..
.
File Manager From Field Mapping
To template/copybook : FMN.SFMNSAM1(FMNCCPY2)
From template/copybook : FMN.SFMNSAM1(FMNCCPY)
To field . . . . . . : #4 SERIAL-NO
From field . . . . . . : #4 EMPLOYEE-NO
..Corresponding(Y/N) . . : N (Auto map for group items).
.

Press the Exit function key (F3) to return to the Field Mapping panel. This panel
now shows that EMPLOYEE-NO is mapped to SERIAL-NO.

..
.
File Manager Field Mapping Line 1 of 7

To FMN.SFMNSAM1(FMNCCPY2)
From FMN.SFMNSAM1(FMNCCPY)

Cmd Lv To Field Name Type Len Lv From Field Name Type Len
**** Top of data ****
1 NEW-TYPE01 AN 84 | 1 REC-TYPE01 AN 80
2 REC-TYPE AN 2 | 2 REC-TYPE AN 2
2 NAME AN 20 | 2 NAME AN 20
2 SERIAL-NO BI 4 | 2 EMPLOYEE-NO BI 2
2 AGE BI 2 | 2 AGE BI 2
2 SALARY PD 4 | 2 SALARY PD 4
2 MONTH BI 4 | 2 MONTH BI 4
.. **** End of data ****
.

Deleting a field mapping


If the mapping for a field is deleted and the template is used as the To template
in a copy operation, the value in the output data set is initialized according to the
field create attributes in the To template, rather than being copied from a field in
the input data set. If the template is used as the New template in a compare
operation, the field is not used in the comparison.

To delete the mapping for a field in a template:


1. Select the field on the Field Mapping panel.
2. On the From Field Mapping panel, enter S next to the Delete "From field"
line.

192 File Manager for z/OS V12R1 User's Guide


Mapping fields between templates

Pairing with a different record type


To pair a record type in the To template with a different record type in From
template:
1. Select the level-01 field name for the record type on the Field Mapping panel.
2. On the From Field Mapping panel, select the From record type that you want
to pair with the To record type.

Note: This is useful when your To template contains only one record type that
you wish to map to a second record type in your From template.

Mapping group items


In addition to mapping elementary items (as shown in the above example, between
the SERIAL-NO and EMPLOYEE-NO fields), you can also map group items (that
contain elementary items). If you choose to map a group item in the From
template without mapping its subsidiary elementary items, then data in the
From group item is treated as a single alphanumeric field. If you map the Old
group item to a To group item without mapping its subsidiary elementary items,
then the data is copied to the output data set (unchanged) or is compared, without
regard for any data type differences between the elementary fields in the mapped
group items.

If you do want to map the elementary items in a From group item with the
elementary items in a To group item then, before selecting the From group
item on the From Field Mapping panel, type Y in the Corresponding (Y/N) field.
This instructs File Manager to automatically map subsidiary items with the same
name in the From and To group items. (This is just a quick way to set up the
mapping for these items; after File Manager has set up these mappings, you can
edit themdelete the mapping, or map to a different itemas if you had
manually set up the mapping.)

Mapping contiguous fields


If you need to map contiguous fields, you may find it more convenient to use the
SS, Sn, or S* prefix commands (see Field Mapping panel on page 559).

When you select more than one field at a time, File Manager displays the From
Field Mapping panel (see From (or Old) Field Mapping panel on page 573) for
the next selected field each time you press the Exit function key (F3). When you
are viewing the From Field Mapping panel for the last selected field and press the
Exit function key (F3), File Manager returns you to the Field Mapping panel (see
Field Mapping panel on page 559).

Creating data for a field


If you have specified a From field for a copy operation, then the data is
transferred to the To field, with appropriate truncating or padding. If you have
not specified a From field, then File Manager creates data for the field.

The rules that apply to the field are exactly the same as those used when creating a
new data set. For more information, see Managing templates on page 142.

Mapping using different templates


The mapping relationship is stored in the To or New template. The mapping
information is the field identifier and the field name. When you reuse a template
to copy or compare data, the mapping information is checked. File Manager makes
sure that the field in the specified position has the specified name. If this is not the
case, File Manager indicates that the mapping has broken down, with an Invalid
mapping in target message.

Chapter 4. Creating and editing templates 193


Mapping fields between templates

This means that you can use a template that is different from the From or Old
template you used to set up the mapping, provided that the structure of the new
From or Old template does not differ from the structure of the original From
or Old template. That is, no fields that have been used in the mapping are in a
different position or have a different name. The new From or Old template
can, however, have different selection conditions.

You can also use a To or New template as a From or Old template.


However, any mapping information in the template is ignored.

Field mapping rules


File Manager uses the rules shown in Table 3 to determine if a given from field
can be mapped to a given to field. Yes indicates that the mapping is valid.
No indicates that the mapping is invalid.
Table 3. Field mapping rules
To field
From field
Alphanumeric Numeric Floating-point
1 2
Alphanumeric Yes Yes Yes2
Numeric integer3 Yes Yes Yes
4
Numeric non-integer No Yes Yes
5
Floating-point No Yes Yes

Notes:
1. The category alphanumeric includes the COBOL categories: alphabetic, alphanumeric,
alphanumeric-edited, numeric-edited, and DBCS. PICTURE clause editing characters are
ignored. Group fields are treated as elementary alphanumeric fields.
2. The from field must consist only of numeric characters, and is treated as a numeric
field.
3. The category numeric integer includes the following COBOL data types: binary
(comp or comp-4 items), packed decimal (comp-3 items), and zoned decimal (PIC 9(n)
items). The decimal items cannot have an implied decimal point.
4. The category numeric non-integer includes packed and zoned decimal items with an
implied decimal point and one or more decimal digits.
5. The category floating point includes the COBOL floating point data types (comp-1 or
comp-2 items). These are representations of real numbers stored with a mantissa and
exponent.

These rules describe how a validly mapped from field is moved to a to field.
When the to field is:
Alphanumeric
The data is aligned at the leftmost character position and, if necessary,
truncated or padded with spaces at the right. The COBOL JUSTIFIED
clause, if specified, is ignored.
If the from field is a numeric field, the absolute (unsigned) value is used.
If the field is defined as signed and the sign occupies a separate character,
that character is not moved, and the sending item is considered to be one
less character than the actual size.
Numeric
The data is aligned on the assumed decimal point and, if necessary,

194 File Manager for z/OS V12R1 User's Guide


Mapping fields between templates

truncated or padded with zeros. If an assumed decimal point is not


explicitly specified in the field definition, one is assumed immediately to
the right of the field.
For a negative number when the from field is signed numeric, the data
is moved as if both the from field and to field were described as
signed.
When the from field is alphanumeric, the data is moved as if the from
field were described as a signed numeric.
Internal Floating-Point
A decimal point is assumed immediately to the left of the field. The data is
aligned then on the leftmost digit position following the decimal point,
with the exponent adjusted accordingly.
External Floating-Point
The data is aligned on the leftmost digit position, and the exponent
adjusted accordingly.

Copybook View and Print Utility (option 3.13 or 7.2)


You can use the Copybook View and Print Utility (option 3.13 or 7.2) to view or
print the field definition information stored in:
v a copybook
v a template that was based on a copybook (not DB2 templates)
v a dynamic template
v an IMS view
v an IMS criteria set

You can also navigate to the Copybook View and Print Utility panel by:
1. Selecting option 7. Templates from the Primary Option Menu panel to display
the Copybook and Template Utility functions panel, and then
2. Selecting option 2. Print from the Copybook and Template Utility functions
panel to display the Copybook View and Print Utility panel.

You can view the report in foreground (view), print the report to your current
print data set, or submit a batch job to print the report. When using foreground
execution, you can view and print multiple members by selecting them from a
member list. When using batch execution, you can specify a generic member name
to print multiple members.

To view or print copybook report:


1. From the Utilities Functions menu, select option 13 (Copybook Print and
View).
2. Enter the name of the data set that contains your copybook, template, IMS
view or IMS criteria set.
3. Enter the name of the member that you wish to view or print, or enter a
blank or a pattern to select from a member list.
4. Set your View/Print Option to either 1 (View) or 2 (Print).
5. To run the function in batch (and, if necessary, edit the JCL), select the Batch
Execution option.
6. To show all occurrences of array elements, select the Show array elements
option.

Chapter 4. Creating and editing templates 195


Utility functions: Copybook View and Print (option 3.13 or 7.2)

7. To show start and end values as hexadecimal offsets, select the Show
start/end as hex offset option.
8. To show length values as hexadecimal, select the Show length in hex option.
9. To show template criteria, select the Show template criteria option.
The information shown when you select the Show template criteria option
depends on the type of input data set:

Input data set Information shown


Copybook The Show template criteria option has no
effect. Copybook layout reported, with no
explicit indication that criteria are not
present, and no indication that an extraneous
option was selected.
Template with no identification or selection Template layout reported, with messages to
criteria indicate that criteria are not present.
Template with identification or selection Template layout and criteria reported
criteria

10. Press Enter to process the panel.


If you specified a pattern or a blank for the member name, the Member
Selection list is displayed. Enter S in the Sel field for each member that you
want to view or print, then press Enter.
If you selected Batch execution, the generated JCL is displayed. You can tailor
this JCL and then submit it for processing.

Note: Batch execution ignores the View/Print processing option.


11. If you used foreground execution and chose to view the report, the View
panel is displayed. You can browse the contents of this panel, or print the
contents to the current print data set by entering 1.

RELATED TOPICS
Utility Functions menu panel on page 695
Template and Copybook Utility functions panel on page 683
Copybook View and Print: Entry panel on page 502

196 File Manager for z/OS V12R1 User's Guide


Chapter 5. Filtering records with templates
Once you have created your templates, you can use them to select records within
data sets, and then display, copy, print or otherwise manipulate the selected
records.

The major tasks and concepts described in this chapter are:


1. Selecting records with templates
2. Defining criteria expressions on page 201
3. Filtering record display using templates on page 218

Selecting records with templates


When working with a data set in a panel or function, you can use a template to
select the specific records that you want to use. You can specify two levels of
criteria to select the records you want to process.
Record identification criteria
This identifies the unique characteristics of a record type, enabling File
Manager to distinguish it from other types of record in the same data set.
By default, if you do not specify these criteria, File Manager uses record
length to identify a record type.
If the length of a record matches more than one record definition in the
template, and no further record identification criteria are specified, File
Manager uses the first matching record type in the template to display all
records.
Record selection criteria
After a record has been identified as belonging to a particular type, you
can narrow down which records of that type you want to process by
specifying record selection criteria.

You specify record identification criteria and record selection criteria using
comparison expressions. When you specify criteria, you should be aware of the
potential for incurring processing overheads as a result of invoking REXX to
resolve the criteria expressions.

RELATED TOPICS
Selecting records by record type
Specifying record identification criteria on page 198
Specifying record selection criteria on page 200

Selecting records by record type


When working with a data set that contains records of more than one record type,
you need to use a copybook or copybook template that describes each type.
Dynamic templates cannot be used as they cannot specify more than one record
type. Provided that the copybook or copybook template contains more than one
type description, each time that you opt to edit the template, the Record Type
Selection panel displays a list of record types.

RELATED TOPICS
Field Selection/Edit panel on page 561

Copyright IBM Corp. 2000, 2012 197


Selecting records with templates

Record Type Selection panel on page 632

RELATED CONCEPTS
Improving performance using internal expression processing on page 207

To select records for viewing or editing using record type:


1. On your entry panel, specify a copybook or copybook template that contains
more than one record type and edit the template.
This can be done in a number of ways. For example, from the View Entry, Edit
Entry or various Utilities panels, you can select the Edit Template option; on
the View or Edit panels, you can enter the TE command; or on the Template
Workbench panel, you can enter the E command.
The Record Type Selection panel is displayed.
2. On the Record Type Selection panel, type an S in the Cmd field adjacent to the
type you want, and press Enter.
This toggles the record type between selected and unselected. The
command only affects the selection of records where File Manager can identify
the record as belonging to a particular type. To do this, you may need to add
record identification criteria.

Specifying record identification criteria


Where your copybook or template contains multiple records types, each type is
initially distinguished by the record length. Provided that each type has a unique
record length, you can select and display the various types. However, if two or
more of the record types have the same length, you need to supply some record
identification criteria. This usually takes the form of a field that contains a value
unique to each record of the same type.

For example, in the following copybook definition, the Orders and Item records are
of different lengths. As such, they can be selected and displayed without additional
identification criteria.
01 ORDERS.
05 ORDER-ID PIC X(5).
05 CUSTOMER-ID PIC X(5).
05 ORDER-DATE.
10 ORDER-YEAR PIC 9(4).
10 ORDER-MONTH PIC 9(2).
10 ORDER-DAY PIC 9(2).
01 ITEM.
05 PRODUCT-ID PIC X(9).
05 QUANTITY PIC 9(4) BINARY.
05 UNIT-COST PIC 9(8) BINARY.

However, if the records are of identical length, such as in the sample copybook
shown below, File Manager is unable to distinguish between these records unless
some record identification criteria is used. By examining the data, we can
determine that in all REC-TYPE01 records, the REC-TYPE field contains the value
'01', and in all REC-TYPE02 records, the REC-TYPE field value is '02'. In this case,
both record types include a REC-TYPE field, however, each record type does not
need to use the same field in its identification.
01 REC-TYPE01.
05 REC-TYPE PIC XX.
05 NAME PIC X(20).
05 EMPLOYEE-NO PIC 9(4) BINARY.
05 AGE PIC 9(4) BINARY.
05 SALARY PIC 9(7) PACKED-DECIMAL.
05 MONTH PIC 9(8) BINARY OCCURS 12 TIMES.

198 File Manager for z/OS V12R1 User's Guide


Selecting records with templates

05 FILLER PIC XX.


01 REC-TYPE02.
05 REC-TYPE PIC XX.
05 NAME PIC X(20).
05 JOB-TITLE PIC X(14).
05 ADDR1 PIC X(20).
05 ADDR2 PIC X(20).
05 POSTCODE PIC X(4).

If any record types in your data have the same record length, it is strongly
recommended that you specify record identification criteria to allow File Manager
to distinguish between them. Otherwise, the results can be unpredictable.

Even if the length of each record type is unique, it is still recommended that you
specify record identification criteria for every record type, to help isolate records
that match the length of a valid record type but contain data that is invalid for that
type.

To specify record identification criteria:


1. On your entry panel, specify a copybook or copybook template that contains
more than one record type and edit the template.
This can be done in a number of ways. For example, from the View Entry, Edit
Entry or various Utilities panels, you can select the Edit Template option; on
the View or Edit panels, you can enter the TE command; or on the Template
Workbench panel, you can enter the E command.
The Record Type Selection panel is displayed.
2. In the Cmd field adjacent to the type you want to edit, type the E prefix
command and press Enter.
The Field Selection/Edit panel is displayed.
3. Do one of the following:
v Enter a freeform expression in the Record Identification Criteria field.
v Type 1 on the Command Line and press Enter, then specify your record
identification criteria by field.
The Record Identification Criteria panel is displayed. This panel is identical
to the Dynamic Template panel, except that:
the Field Name, Start, Length and Type fields are not editable;
in an 80 x 24 display, the Field Name field is displayed by default (instead
of the Start, Length and Type fields);
When you exit, the expression created is returned to the Record
Identification Criteria field on the previous panel.

Note: Freeform criteria expressions and criteria by field expressions are


mutually exclusive.

Once your records can be identified by type (either by the record length or by
record identification criteria), File Manager automatically suppresses the display of
all but one record type, depending upon the setting of the editor option Expose
(do not group) records of types: Suppressed. By default, the first record type
identified is displayed.

RELATED TOPICS
Defining criteria expressions on page 201
Displaying suppressed records on page 218

Chapter 5. Filtering records with templates 199


Selecting records with templates

RELATED CONCEPTS
About expression processing on page 207

Specifying record selection criteria


After specifying the record identification criteria for each record type, you can
specify selection criteria to limit which records from that type you want to work
with.

To specify record selection criteria:


1. From your entry panel, edit the template.
This can be done in a number of ways. For example, from the View Entry, Edit
Entry or various Utilities panels, you can select the Edit Template option; on
the View or Edit panels, you can enter the TE command; or on the Template
Workbench panel, you can enter the E command.
If the template contains only one record type, the Field Selection/Edit panel is
displayed immediately.
If the template contains more than one record type, the Record Type Selection
panel is displayed. In the Cmd field adjacent to the type you want to edit, type
the E prefix command and press Enter. The Field Selection/Edit panel is
displayed.
2. Perform either of these actions
v Enter a freeform expression in the Record Selection Criteria field.
v Type 2 on the Command Line and press Enter, then specify your record
selection criteria by field.
The Edit Record Selection Criteria panel is displayed. This panel is identical
to the Dynamic Template panel, except that:
the Field Name, Start, Length and Type fields are not editable;
in an 80 x 24 display, the Field Name field is displayed by default (instead
of the Start, Length and Type fields).
When you exit, the expression is returned to the Record Selection Criteria
field on the previous panel.

Note: Freeform criteria expressions and criteria by field expressions are


mutually exclusive.

RELATED TOPICS
Defining criteria expressions on page 201
Displaying not-selected records on page 220

RELATED CONCEPTS
About expression processing on page 207

Specifying offset values


When you are editing a template, you can enter an offset value in the Field
Selection/Edit panel to change the starting position of the currently displayed
record type. If the template contains more than one Level 01 field, you can use the
OFFSET primary command in the Record Type Selection panel to change one or
more Level 01 fields. (For an explanation of how the offset values work, see
Adjusting your view to allow for header information on page 225.)

To change the offset in a single record type:


1. From your entry panel, edit the template.

200 File Manager for z/OS V12R1 User's Guide


Selecting records with templates

This can be done in a number of ways. For example, from the View Entry, Edit
Entry or various Utilities panels, you can select the Edit Template option; on
the View or Edit panels, you can enter the TE command; or on the Template
Workbench panel, you can enter the E command.
2. If there are multiple record types in your template, enter E in the prefix
command line, adjacent to the record type you want to edit.
3. In the Field Selection/Edit panel, enter a positive or negative number, between
-32760 and 32760, in the Offset field.
The offset value is added to the record length of the Level 01 field and to the
starting position of all fields within the record type.

To change the offset in multiple record types:


1. From your entry panel, edit the template.
This can be done in a number of ways. For example, from the View Entry, Edit
Entry or various Utilities panels, you can select the Edit Template option; on
the View or Edit panels, you can enter the TE command; or on the Template
Workbench panel, you can enter the E command.
2. If there are multiple record types in your template, the Record Type Selection
panel is displayed.
3. On the Command line, enter the OFFSET primary command and the offset
value. For more information on the behavior of the OFFSET primary command
in this panel, see Record Type Selection panel on page 632.
By default, the offset value is applied to all record types with a current offset
value of zero. To apply the offset value to all record types in the template,
regardless of the current offset value, use the ALL keyword with the primary
command. To apply the offset value to a specific record type, specify the field
name with the primary command.
The offset value is added to the record length of the Level 01 field and to the
starting position of all fields within the specified record type or types.

Defining criteria expressions


This section describes the ways in which you can enter criteria expressions to
select records; outlines how the expressions are evaluated and processed within
File Manager and provides a list of operators and functions that can be used in
criteria expressions.

To specify record identification or record selection criteria, you can enter a freeform
expression into a relevant field or you can build the expression by field. These
methods are mutually exclusive. If you create a freeform expression and then
create an expression by field, your freeform expression is overwritten. Once you
have specified an expression by field, you cannot enter a free form expression until
you delete the by field expression from the relevant panel.

RELATED TOPICS
Entering criteria as a freeform expression on page 202
Entering criteria by field on page 203

RELATED CONCEPTS
About expression processing on page 207

Chapter 5. Filtering records with templates 201


Defining criteria expressions

Entering criteria as a freeform expression


To enter a freeform expression:
1. Display the Field Selection/Edit panel for your template.
2. In either the Record Identification Criteria or Record Selection Criteria fields,
enter the freeform expression.
3. Press Enter.
File Manager evaluates the expression to see if it can be processed internally or
needs to be passed to REXX. If REXX is required, the message REXX required
is displayed in the upper right corner. You can choose to either modify the
expression so that REXX is not required, or use the expression with REXX
processing instead of internal processing.
4. Press Exit (F3) to save your criteria and return to your starting panel.

A freeform expression must take the form of:


#ref comp-op value
#ref Field that returns a value from the current record to be used in the
expression. Fields are identified using the # symbol, followed by the field
Reference number, for example #5.
You can also use the value returned by performing a calculation with a
number of fields, for example (#5 + #6). To do this, you must embed the
calculation within parentheses and use valid arithmetic operators, together
with at least one field reference.
Another alternative is to use a REXX function that lists at least one field as
an argument, for example MAX(#5,#6,#7).
comp-op
Comparison Operator. A symbol that expresses the way in which the value
derived from the field or field calculation is to be compared with value, for
example the ">" symbol represents "is greater than". File Manager supports
all of the REXX comparison operators.
value Any expression that returns a single value to be used in the criteria
expression. This can take the form of a string, a numeric value, a field, a
calculation that returns a value or a REXX function.

Logical operators, such as AND (&) and OR (|) can be used to create multiple
criteria expressions. Parentheses can be used to control the order of evaluation in
calculations and criteria expressions.

Note: At least one field reference must be made in the criteria expression. It is
common practice to put this reference on the left side of the equation,
although it works equally well on the right side. That is, while #5 > 100 is
the more usual way of expressing this criteria, writing it as 100 <= #5 does
not cause an error (note the reversal of the comparison operator). If no field
reference is included, the criteria are evaluated as either true or false on
their own merit and, when true, all records are returned or, when false, all
records become not-selected.

RELATED CONCEPTS
About expression processing on page 207
Improving performance using internal expression processing on page 207
Overview of REXX expressions on page 209
Comparison operators on page 212
Arithmetic operators on page 213
202 File Manager for z/OS V12R1 User's Guide
Defining criteria expressions

Logical (boolean) operators on page 214


Useful functions on page 215

Entering criteria by field


By field expressions can be entered on any of these panels:
v Dynamic Template
v Record Identification Criteria
v Record Selection Criteria
v Related ID expression panel

For the purpose of entering criteria "by field", these panels operate in an identical
manner.

To enter a single criteria expression by field:


1. Display the appropriate panel for your needs.
2. Type an operator in the Op field and a value in the Value field.
3. Press Enter.
File Manager evaluates the expression to see if it can be processed internally or
needs to be passed to REXX. If REXX is required, the message REXX required
is displayed in the upper right corner when you press Enter on the relevant
panel. You can choose to either modify the expression so that REXX is not
required, or use the expression with REXX processing instead of internal
processing.

Note: When exiting from the Record Identification Criteria or Record Selection
Criteria panels, your "by field" expression replaces any existing freeform
expressions in the relevant field of the Field Selection/Edit panel.

To enter multiple criteria expressions by field:


1. Display the appropriate panel for your needs.
2. Type an operator and value for the each criteria in the appropriate fields.
3. Where you want to use the same field for a number of different criteria, use the
available prefix commands to copy and rearrange field definitions within the
panel.
4. Use the AND and OR connectors to join the various expressions.
5. Use the ( and ) parenthesis fields to group your expressions.
6. Press Enter.
File Manager evaluates the expression to see if it can be processed internally or
needs to be passed to REXX.

For example, using the sample data, you may want to display all the Programmers
or Developers in your list. To do this, you would need the Job Title field to appear
twice in the panel, each with an operator and value, and you would use the OR
connector to join them.

Chapter 5. Filtering records with templates 203


Defining criteria expressions

..
.
Cmd Con ( Field Name Op Value )
*** **** Top of data ****
___ ___ _ REC-TYPE02 ___ __________________________________________ _
___ AND _ REC-TYPE ___ __________________________________________ _
___ AND _ NAME ___ __________________________________________ _
___ AND _ JOB-TITLE =__ Programmer________________________________ _
___ OR_ _ JOB-TITLE =__ Developer_________________________________ _
___
.. AND _ ADDR1 ___ __________________________________________ _
.

Dynamic Template panel on page 524


Record Identification Criteria panel on page 621
Record Selection Criteria panel on page 627
Related ID expression panel on page 636

Entering criteria expressions for an array element


You can enter criteria expressions by field for an array element (a data element
with an OCCURS clause in COBOL).

You can refer to a subscripted data item on the "by field" display, and optionally
enter a subscript, operator, and one or more values. The expression generated uses
the TFLD external REXX function.

Alternatively, you can code a free-form expression that refers to any or all the
elements of an array by using the TFLD external REXX function.

Figure 68 shows a record layout containing an array element (MONTH-DETAILS).

Process Options Help



File Manager Field Selection/Edit Line 1 of 11

----------- Criteria - Enter 1 or 2 to specify expression by field -----------


1 Id : +
2 Sel: +
Offset 0
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 RFM0411 AN 1 940
2 2 REC-TYPE X AN 1 1
3 2 FILLER X(5) AN 2 5
4 2 CONTRACTOR X(40) AN 7 40
5 2 SERIAL-NO 999999 ZD 47 6
6 2 MONTH-DETAILS OCCURS 12 TIMES AN 53 74
7 3 PAY S9(8) ZD 53 8
8 3 JOB-LOCATION X(20) AN 61 20
9 3 CONTRACT-NO 999999 ZD 81 6
10 3 FIRST-NAME X(20) AN 87 20
11 3 SURNAME X(20) AN 107 20
Command ===> Scroll CSR
F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 68. Record layout containing an array element

204 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

Enter "1" to display the Record Identification Criteria panel shown in Figure 69:

Process Options Help



File Manager Record Identification Criteria Line 1 of 11

Cmd Con ( Field Name Op Value )


<-> - <---+----1----+----2----+----3----> <-> <+----1----+----2----+-- -
*** **** Top of data ****
RFM0411
AND REC-TYPE
AND FILLER
AND CONTRACTOR
AND SERIAL-NO
AND MONTH-DETAILS()
AND PAY()
AND JOB-LOCATION()
AND CONTRACT-NO()
AND FIRST-NAME()
AND SURNAME()
*** **** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 69. Record Identification Criteria panel

The fields suffixed "()" are dimensioned fields.

Figure 70 shows criteria expressions specified for some of the dimensioned fields
within MONTH-DETAILS:

Process Options Help



File Manager Record Identification Criteria Line 1 of 11

Cmd Con ( Field Name Op Value )


<-> - <---+----1----+----2----+----3----> <-> <---+----1----+----2----+-- -
*** **** Top of data ****
RFM0411
AND REC-TYPE
AND FILLER
AND CONTRACTOR
AND SERIAL-NO
AND MONTH-DETAILS()
AND PAY() > (ALL) 5000
AND JOB-LOCATION() = (1) Kimberly
AND CONTRACT-NO()
AND FIRST-NAME()
AND SURNAME() CO SMITH, JONES
*** **** End of data ****

Command ===> Scroll CSR


F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 70. Subscripted values specified for dimensioned fields

In Figure 70:

Chapter 5. Filtering records with templates 205


Defining criteria expressions

v The default subscript is (ANY) indicating that at least one element must satisfy
the condition.
v (ALL) indicates that all elements must satisfy the condition.
v (1) indicates the first element must satisfy the condition.

After entering the criteria as shown in Figure 70 on page 205, pressing F3 causes
File Manager to generate the expression:
TFLD(#7(ALL),>,5000) & #8(1) = Kimberly & TFLD(#11,CO,SMITH,JONES)

as shown in Figure 71.

Note: The TFLD function is generated (instead of the FLD_CO function) when the
CO, or CO operators are specified.

Process Options Help



File Manager Field Selection/Edit Line 1 of 11

----------- Criteria - Enter 1 or 2 to specify expression by field -----------


1 Id : TFLD(#7(ALL),>,5000) & #8(1) = Kimberly & TFLD(#11,CO,SMI +
2 Sel: +
Offset 0
Cmd Seq SHE Ref Field Name Picture Type Start Length
**** Top of data ****
1 1 RFM0411 AN 1 940
2 2 REC-TYPE X AN 1 1
3 2 FILLER X(5) AN 2 5
4 2 CONTRACTOR X(40) AN 7 40
5 2 SERIAL-NO 999999 ZD 47 6
6 2 MONTH-DETAILS OCCURS 12 TIMES AN 53 74
7 3 PAY S9(8) ZD 53 8
8 3 JOB-LOCATION X(20) AN 61 20
9 3 CONTRACT-NO 999999 ZD 81 6
10 3 FIRST-NAME X(20) AN 87 20
11 3 SURNAME X(20) AN 107 20
Command ===> Scroll CSR
F1=Help F2=Split F3=Exit F4=Expand F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 71. TFLD expression generated for fields in an array

RELATED TOPICS
TFLD on page 1164
Record Identification Criteria panel on page 621

RELATED TOPICS
Dynamic Template panel on page 524

RELATED CONCEPTS
About expression processing on page 207
Improving performance using internal expression processing on page 207
Overview of REXX expressions on page 209
Comparison operators on page 212
Arithmetic operators on page 213
Logical (boolean) operators on page 214
Useful functions on page 215

206 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

About expression processing


When an expression is entered (freeform or by field), File Manager evaluates the
expression to see if it can be processed internally or if it must be passed to REXX.

REXX stands for the REstructured eXtended eXecutor language. REXX is a general
purpose programming language, similar to PL/I. It includes extensive parsing
capabilities for character manipulation, extensive mathematical capabilities, and
numerous built-in functions that perform various processing, searching, and
comparison functions.

REXX programs are usually run by a language processor (interpreter). That is, the
program is run statement-by-statement, without first being translated to another
form (compiled). Because of the interpretive nature of REXX, File Manager is able
to exploit the power of REXX when processing record identification and record
selection criteria.

Although REXX is a powerful and versatile language, coding selection criteria


using REXX is straightforward. You do not need to know how to write REXX
programs. All you need to know is how to write REXX comparison expressions.
File Manager takes care of turning your selection criteria into a REXX program.

Much of the information in this section has been extracted from the z/OS TSO/E
REXX Reference and z/OS TSO/E REXX User's Guide. For more detailed information
about REXX, refer to those manuals.

Improving performance using internal expression processing


For simple criteria, File Manager can process the expression internally without
needing to invoke REXX. This can result in faster processing of record
identification and record selection criteria. If an expression is not eligible for
internal processing, File Manager displays the message REXX required when you
press Enter on the relevant panel. In this case, you can choose to either modify the
expression so that REXX is not required, or use the expression with REXX
processing instead of internal processing.

For an expression to be eligible for internal processing, it must consist only of:
v Literal strings: These include ordinary quoted strings as well as binary and
hexadecimal strings. For a more detailed description of literal strings, see
Overview of REXX expressions on page 209.
v Numerics: Unlike REXX, the internal expression processor distinguishes between
character and numeric types. To ensure internal processing uses the correct
numeric value, enter numeric data as unquoted strings.
For example, the internal expression processor treats the string 5 as a number
and compares it equal to any other numeric with a value of five. However, it
treats the string 5 as character data and compares it equal to a string
containing X'F5' (with optional leading and trailing blanks for non-strict
comparison). REXX treats both strings the same and handles them as character
data, but allows them to behave as numbers in appropriate contexts.
Non-floating point numerics are limited to 31 decimal digits, and floating point
numerics are limited to the range of numbers that can be stored as a
double-precision floating point number. See Handling floating point numbers
on page 211 for a more complete discussion of how the internal processor and
REXX differ in the way they handle floating point numbers.
v Comparison operators: The internal expression processor supports all the REXX
comparison operators.

Chapter 5. Filtering records with templates 207


Defining criteria expressions

The internal processor performs numeric comparisons when both operands are
numeric or contain numeric data (formatted references to numeric fields, or FLD
references specifying a numeric formatting type); bit comparisons when both
operands are bit fields; otherwise, the internal processor performs character
comparisons.
Where both operands have the same value, numeric comparisons match
regardless of the length and type of the data. Bit comparisons match only when
both bit fields are the same. Leading zero-bits are ignored in the longer field if
the fields are not the same length. Character comparisons match only if the two
strings are identical, except that leading and trailing blanks are ignored by the
non-strict operators. The internal expression processor compares character
strings byte by byte according to the standard EBCDIC collating sequence and,
where a shorter string matches a longer string up to the end of its length, the
longer string is deemed to be greater.
v Logical operators: The only logical operators that the internal processor allows
are the AND (&), OR (|), exclusive OR (&&) and NOT ( or \) operators.
v Arithmetic prefix operators: You can use the plus (+) and minus () operators
before decimal numerics (to indicate sign), and before and within floating point
numerics as defined by the REXX syntax.
v File Manager field references: The internal expression processor supports both
formatted and unformatted references when evaluating identification or selection
criteria. Field references are not supported in FASTREXX procedures.
v Function invocations: The following functions can be included in an expression
that is to be processed internally:
FLD
FLD_CO
FLD_TM
FLD_TYPE
FLDI
FLDO
I_LENGTH
O_LENGTH
PRTCOUNT
RECSIN
RECSOUT
SEGCNT
SEGNO
TESTC
TESTN
TFLD
v Parentheses

These rules also apply when creating conditions in an IF-THEN-ELSE statement


within a FASTREXX procedure.

RELATED CONCEPTS
Comparison operators on page 212
210
Using internal (FASTREXX) processing on page 406
FLD on page 1123

208 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

FLD_CO on page 1125


FLD_TM on page 1129
FLD_TYPE on page 1130
I_LENGTH on page 1135
O_LENGTH on page 1140
PRTCOUNT on page 1149
RECSIN on page 1152
RECSOUT on page 1153
TFLD on page 1164

Overview of REXX expressions


REXX expressions consist of one or more terms interspersed with zero or more
operators that denote operations to be carried out on terms. Expressions are
evaluated left to right, modified by parentheses and by operator precedence in the
usual algebraic manner. When parentheses are encountered (other than those that
identify function calls), the entire sub-expression between the parentheses is
evaluated immediately when the term is required. Expressions are wholly
evaluated, unless an error occurs during evaluation. The REXX language uses a
free format. This means you can insert extra spaces between terms without causing
an error.

The terms you can use in a selection criteria expression are described below.
Literal strings
A literal string is a sequence including any characters and delimited by the
quotation single mark () or the double quotation mark ("). Use two
consecutive double quotation marks ("") to represent a " character within a
string delimited by double quotation marks. Use two consecutive quotation
marks () to represent a character within a string delimited by quotation
marks. A literal string is a constant and its contents are never modified
when it is processed.
These are valid strings:
Fred
"Dont Panic!"
You shouldnt /* Same as "You shouldnt" */
A string followed immediately by a ( is considered to be the name of a
function. If followed immediately by the symbol X or x, it is considered to
be a hexadecimal string. If followed immediately by the symbol B or b, it is
considered to be a binary string.
A hexadecimal string is a literal string, expressed using a hexadecimal
notation of its encoding. It is any sequence of zero or more hexadecimal
digits (0-9, a-f, A-F), grouped in pairs. A single leading 0 is assumed, if
necessary, at the front of the string to make an even number of
hexadecimal digits. The groups of digits are optionally separated by one or
more blanks, and the whole sequence is delimited by single or double
quotation marks, and immediately followed by the symbol X or x. (Neither
x nor X can be part of a longer symbol. A hexadecimal string is a literal
string formed by packing the hexadecimal digits given. Packing the
hexadecimal digits removes blanks and converts each pair of hexadecimal
digits into its equivalent character, for example: C1X is the same as the
character "A".
Hexadecimal strings let you include characters in a program even if you
cannot directly enter the characters themselves. These are valid
hexadecimal strings:

Chapter 5. Filtering records with templates 209


Defining criteria expressions

ABCDx
"1d ec f8"X
"1 d8"x

A binary string is a literal string, expressed using a binary representation


of its encoding. It is any sequence of zero or more binary digits (0 or 1) in
groups of 8 (bytes) or 4 (nibbles). The first group may have fewer than
four digits; in this case, up to three 0 digits are assumed to the left of the
first digit, making a total of four digits. The groups of digits are optionally
separated by one or more blanks, and the whole sequence is delimited by
matching single or double quotation marks and immediately followed by
the symbol b or B.
A binary string is a literal string formed by packing the binary digits
given. If the number of binary digits is not a multiple of eight, leading
zeros are added on the left to make a multiple of eight before packing.
Binary strings allow you to specify characters explicitly, bit by bit.
These are valid binary strings:
11110000b /* == f0x */
"101 1101"b /* == 5dx */
1b /* == 00000001b and 01x */
10000 10101010b /* == 0001 0000 1010 1010b */
b /* == */
Symbols
Character strings, without quotation marks, which are translated to
uppercase. Any symbol that begins with a # is treated as a reference to a
field in the record being processed, and the value of the field is used. All
other symbols are treated as constants.
File Manager assigns to each field defined in a template a unique field
reference number. When you want to refer to a field in a selection criteria
expression, you specify the field's Reference number prefixed by #. You can
only refer to fields defined in the record you are currently working with.
You cannot refer to fields defined in a different record type. In record
identification criteria, you can only refer to fields defined in the static
portion of the record (that is, the portion of the record that precedes any
variable-length array defined with the OCCURS DEPENDING ON clause).
REXX expression evaluation only processes data in the form of typeless
character strings (typeless because they are not, as in the case of COBOL,
of a particular data type such as binary, packed-decimal, and so forth).
Therefore, when you refer to a numeric field, File Manager converts the
value of the field to a numeric character string that can be processed by
REXX when evaluating the selection criteria expression. The number of
integer and decimal digits in the character string is determined by the field
definition in your template. For example, if you refer to a packed-decimal
field with a COBOL PICTURE clause of 999V99, File Manager converts the
value of the field to a character string consisting of numeric digits, a
period for the virtual decimal place, and, if the value of the field is
negative, a leading sign character (such as -123.45). Note that all numeric
fields are treated as signed, regardless of whether the COBOL PICTURE
clause contains a sign symbol.
Occasionally, you might want to evaluate the value of a numeric field
without converting it to a numeric character string. To do this, prefix the
field reference number by #u instead of #. This tells File Manager not to
convert the number to a numeric character string. For example, if you

210 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

wanted to test a two-byte binary numeric field (with a field reference


number of 45) for a special value of X'FFFF', you could code:
#u45 == FFFFx

When you refer to a field in an array, you must qualify the field reference
with the required number of subscripts enclosed in parentheses and
separated by commas. The number of subscripts you specify must equal
the number of dimensions in the array that contains the field you are
referencing. In COBOL terms, there must be a subscript for each OCCURS
clause in the hierarchy containing the field, including any OCCURS clause
for the field itself. Each subscript you specify must be a positive integer in
the range 1 to the maximum number of occurrences of the field as
specified in the OCCURS clauses. If the field you refer to is in a
variable-length array (specified using the OCCURS DEPENDING ON
clause), you should ensure that you do not refer to an occurrence of the
field that, for any given record, might not exist. If you do refer to a
non-existent field, the selection criteria cannot be satisfied, and the record
is not selected.

Note: The object of an OCCURS DEPENDING ON clause must be defined


as a field in the static portion of the same record as the array (that
is, the portion of the record that precedes any variable-length array
defined with the OCCURS DEPENDING ON clause). If the object of
the OCCURS DEPENDING ON clause is not so defined, you cannot
refer to any fields in the array or any fields in the record that follow
the array.
Function call
A call to a REXX built-in function.
Sub-expressions
Terms in an expression bracketed within left and right parentheses.

RELATED CONCEPTS
Support for variable-length arrays on page 137

Handling floating point numbers


The internal expression processor operates on internal floating point fields in their
native, hexadecimal floating point format. External floating point fields are
converted to double-precision internal format before being processed as if they
were internal floating point fields. If two fields in a comparison have different
precisions, then the field with the greater precision is rounded to the lesser
precision, and the comparison is performed using the lesser precision. Because
internal floating point fields are converted to external (decimal) format and passed
to REXX as strings, and external floating point fields are also passed as strings, the
result of evaluating a comparison can differ between REXX and the internal
expression processor.

To ensure consistency, pay attention to the following points when coding


expressions involving floating point fields:
v When comparing a floating point field to a constant, make sure you use a
constant that matches the external representation used by File Manager. For
example, -2.2527494E+08 and -2.2527495E+08 are both stored as C7D6D6C4x
when entered for a single-precision floating point field, but File Manager always
displays the data as -2.2527494E+08. Using either value matches with the
internal expression processor, but only -2.2527494E+08 matches with REXX.

Chapter 5. Filtering records with templates 211


Defining criteria expressions

v Use hex strings and unformatted field references instead of external format to
precisely represent internal floating point values. For example, instead of #2 =
-2.2527494E+08 you can use #U2 = x2c(C7D6D6C4). This technique can only be
applied if your expression requires REXX, because the x2c() function is not
processed internally.
v Comparing floating point fields with different precisions using REXX might not
produce the results expected because the external representations of floating
point numbers with values that match (with or without rounding) but with
different precisions are generally not the same. For example, the external
representation of C7D6D6C4x (-2.2527494E+08) is different from that for
C7D6D6C4 00000000x (-2.2527494400000000E+08) because the extra precision of
the field produces a more precise external representation. This situation, where
the internal values match exactly can be handled in REXX by truncating the
longer field (assuming #2 refers to a short float and #3 refers to a long float):
#U2 = Substr(#U3,1,4)
Simulating the rounding process to achieve the same results as the internal
processor, and therefore achieving a more general test of equality between fields
of different precision requires the following extraordinary expression:
#U2 = d2c(c2d(Substr(#U3,1,4))+Substr(x2b(c2x(Substr(#U3,5,1))),1,1),4)
This works by:
Truncating the long float to four bytes and converting it to decimal.
Adding the high-order byte of the discarded half of the characteristic.
Converting the result back to internal format.
The addition is valid because the characteristic is in the rightmost bits of the
field, and any carry from the addition increments the mantissa as required. The
only case it does not handle is that of exponent overflow.

Comparison operators
REXX comparison operators compare two terms and return the value 1 if the result
of the comparison is true, or 0 otherwise. Comparison operators can compare
numbers or character strings. The most commonly used comparison operators are:
Operator Meaning
= Equal
=, \= Not equal
< Less than
<, \< Not less than
> Greater than
>, \> Not greater than
<= Less than or equal to
>= Greater than or equal to
>< Greater than or less than (same as not equal)
<> Less than or greater than (same as not equal)

The not character (), is synonymous with the backslash (\). You can use the two
characters interchangeably.

When comparing terms using these comparison operators, if both terms in the
expression are numeric, REXX performs a numeric comparison. Otherwise, both
terms are treated as character strings and REXX performs character comparison. (A
number in REXX is a string that contains one or more decimal digits, an optional
decimal point, and an optional leading sign character. The string can contain one
or more leading or trailing blanks, and the sign character can be separated from
the digits by one or more blanks.)

212 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

In a character comparison, leading and trailing blanks are ignored, and the shorter
string is padded with blanks on the right. Character comparisons are
case-sensitive. Therefore, you should delimit character strings with quotation
marks to prevent lowercase characters being translated to upper case. For example,
if the field #4 contains the value MixedCase both the following comparison
operations would be true:
#4 = MixedCase
#4 = MixedCase

but the following comparison operation would not be true:


#4 = MixedCase

In numeric comparisons, the comparison is effected by subtracting the two


numbers (calculating the difference) and then comparing the result with 0. For
example, the comparison operation:
#6 = 10

is identical to the operation:


(#6 - 10) = 0

In addition to these comparison operators, REXX provides a number of strict


comparison operators that are mainly intended for use when comparing character
strings. The strict comparison operators all have one of the characters defining the
operator doubled, such as == (strictly equal).

The strict comparison operators are:


Operator Meaning
== Strictly equal
==, \== Strictly not equal
<< Strictly less than
<<, \<< Strictly not less than
>> Strictly greater than
>>, \>> Strictly not greater than
<<= Strictly less than or equal to
>>= Strictly greater than or equal to

When you use the == comparison operator (strictly equal), the two character strings
being compared must be identical (character by character) and of the same length
to be considered strictly equal. Leading and trailing blanks are significant. For
example, continuing the example using field #4 that contains the value MixedCase,
only the first of the following comparison operations would be true:
#4 == MixedCase
#4 == MixedCase

Similarly, the strict comparison operators such as >> or << carry out a simple
character-by-character comparison, with no padding of either of the strings being
compared. The comparison of the two strings is from left to right. If one string is
shorter than and is a leading substring of another, then it is smaller than (less than)
the other. The strict comparison operators do not attempt to perform a numeric
comparison on the two terms, and should not be used to compare numeric fields.

Arithmetic operators
You can process numeric terms in comparison expressions using the arithmetic
operators:
Operator Meaning
Chapter 5. Filtering records with templates 213
Defining criteria expressions

+ Add
- Minus
* Multiply
/ Divide
% Integer divide (divide and return the integer part of the result)
// Remainder (divide and return the remainder--not modulo, because
the result might be negative)
** Power (raise a number to a whole-number power)
Prefix - Same as the subtraction: 0 - number
Prefix + Same as the addition: 0 + number

You can use these operators to produce an intermediate result that you can
compare with another term. For example, if the field #6 contains a numeric value
representing an employee's annual salary, and the fields #15 and #23 contain
numeric values representing the employee's annual travel allowance and annual
bonus, respectively, you could use the following comparison to select records for
employees with a combined annual payment of greater than $100,000:
(#6 + #15 + #23) > 100000

For another example, if field #45 contains the number of sick days an employee is
entitled to annually, and the field #46 contains the number of sick days an
employee has used in the current year, you could use the following comparison to
select records for employees who have used 50% or more of their sick day
entitlements:
(#46 / #45) >= .5

Note: In each of these examples, the arithmetic sub-expression is contained in


parentheses. This ensures that the entire sub-expression is evaluated before
the comparison operation.

The order of precedence of arithmetic operators is as follows (highest is at the top):


Operator Meaning
+-\ Prefix operators
** Power
*/ Multiply and divide
+- Add and subtract

For example, * (multiply) has a higher priority than + (add), so 3+2*5 evaluates as
13 (rather than the 25 that would result if strict left to right evaluation occurred).
To force the addition to occur before the multiplication, you could rewrite the
expression as (3+2)*5. Adding the parentheses makes the first three tokens a
sub-expression.

Logical (boolean) operators


REXX comparison expressions return a true (1) or false (0) value when processed.
Logical operators combine two comparisons and return the true (1) or false (0)
value depending on the results of the comparisons.

The logical operators are:


Operator
Meaning
& AND
Returns 1 if both comparisons are true. For example:

214 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

(4 > 2) & (a = a) /* true, so result is 1 */


(2 > 4) & (a = a) /* false, so result is 0 */
| Inclusive OR
Returns 1 if at least one comparison is true. For example:
(4 > 2) | (5 = 3) /* at least one is true, so result is 1 */
(2 > 4) | (5 = 3) /* neither one is true, so result is 0 */
&& Exclusive OR
Returns 1 if only one comparison (but not both) is true. For example:
(4 > 2) && (5 = 3) /* only one is true, so result is 1 */
(4 > 2) && (5 = 5) /* both are true, so result is 0 */
(2 > 4) && (5 = 3) /* neither one is true, so result is 0 */
Prefix \
Logical NOT
Returns the opposite response. For example:
\ 0 /* opposite of 0, so result is 1 */
\ (4 > 2) /* opposite of true, so result is 0 */

Logical expressions are used in complex comparisons and can act as checkpoints to
stop unwanted conditions (such as testing a field for a value of zero before using it
as a divisor). When you have a series of logical expressions, for clarification, use
one or more sets of parentheses to enclose each expression. For example:
(#46 = 999) | ((#45 > 0) & (#46 / #45) >= .5)

Useful functions
REXX provides a rich set of built-in functions, including character manipulation
and conversion functions. Some of these functions might be of use when you are
writing your comparison expressions, and they are described below. File Manager
also provides some functions that might be of use. They are also described below.
To call a function, type the function name directly followed by one or more
arguments within parentheses. There can be no space between the function name
and the left parenthesis. For example:
function(arguments)

A function call can contain up to 20 arguments separated by commas. Each


argument can be one or more of the following:
Argument Example
Blank function( )
Constant function(55)
Symbol function(#5)
Literal string function('With a literal string')
Option recognized by function
function(option)
Another function
function(function(arguments))
Combination of argument types
function('Literal string', #5, option)

Some of the built-in functions provided by REXX that you might find useful are:
ABS()

Chapter 5. Filtering records with templates 215


Defining criteria expressions

Syntax

 ABS (number) 

Returns the absolute value of a number. For example, if you want to select
records in which field #12 contains a value in the range -10 to +10, you
could specify:
ABS(#12) <= 10
MAX()

Syntax

 MAX (  number ) 

Returns the largest number from the list specified. For example, if you
want to select records in which any of fields #10, #11, or #12 contains a
value greater than 55, you could specify:
MAX(#10, #11, #12) > 55
MIN()

Syntax

 MIN (  number ) 

Returns the smallest number from the list specified. For example, if you
want to select records in which any of fields #10, #11, or #12 contains a
value less than 0, you could specify:
MIN(#10, #11, #12) < 0
POS()

Syntax

 POS ( needle , haystack ) 


,start

Returns the position of one string, needle, in another, haystack. Returns 0 if


needle is a null string, or is not found in haystack, or if start is greater than
the length of haystack. By default the search starts at the first character of
haystack (that is, the value of start is 1). You can override this by specifying
start (which must be a positive whole number), the point at which the

216 File Manager for z/OS V12R1 User's Guide


Defining criteria expressions

search starts. For example, if you want to select records in which any
character in field #22 is a blank, you could specify: POS( ,#22) > 0.
SUBSTR()

Syntax

 SUBSTR ( string,n ) 
,
length ,pad

Returns the substring of string that begins at the nth character and is of
length length, padded with pad if necessary. n is a positive whole number.
If n is greater than the length of string, then only pad characters are
returned.
If you omit length, the rest of the string is returned. The default pad
character is a blank.
For example, if you want to select records in which characters 4-6 of field
#22 are the string 'NOT', you could specify:
SUBSTR(#22,4,3) == NOT

The functions provided by File Manager that you might find useful are shown
below.
FLD() Refer to a field from the current input record. For details, see FLD on
page 1123.
COntains()
Check a field for a list of character values. For details, see CONTAINS
on page 1121.
NCOntain()
Check a field for a list of numeric values. For details, see NCONTAIN on
page 1140.

Examples of REXX comparison expressions


The following are examples of REXX comparison expressions:
Example 1
Select records in which the transaction date (field #14) is any date in July
2000, or the transaction value (field #27) is greater than $100,000.00
(#14 >= 20000701 & #14 < 20000801) | #27 > 100000.00
Example 2
Select records in which the count of credit notes (field #62) is greater than
10% of the count of invoices (field #61)
#62 > #61/10
Example 3
Select records in which the employee identifier (field #17) starts with any
of the letters A, C, or E.
CO(SUBSTR(#17,1,1),A,C,E)
Example 4
Select records in which the supplier number (field #23) is 997644 or 997645,
and the item description (field #33) contains the word 'CABINET'
NCO(#23,997644,997645) & CO(#33,CABINET)

Chapter 5. Filtering records with templates 217


Defining criteria expressions

Example 5
Select records in which the 4-byte packed decimal field starting at position
17 in the record contains a negative value
FLD(17,4,P) < 0
Example 6
Select records in which either the transaction value (field #27) is greater
than $50,000.00 and the purchase order number (field #25) starts with
characters other than 'TX', or the transaction value is greater than $70,000
and the supplier number (field #23) is 984545, but not if both sets of
conditions are true
(#27 > 50000.00 & SUBSTR(#25,1,2) == TX) &&
(#27 > 70000.00 & #23 = 984545)

Note: Examples 1 and 6 would be processed internally.

Filtering record display using templates


One of the main reasons for using a template to view your data is that it allows
you to filter the display of your records by applying record identification or record
selection criteria.

The tasks described in this section are:


v Displaying suppressed records;
v Changing display of the record type on page 219;
v Displaying not-selected records on page 220;
v Hiding or showing records in SNGL display format on page 222;
v Using the SHOW command in an editor session on page 222;
v Viewing segmented data on page 223 and
v Adjusting your view to allow for header information on page 225.

Displaying suppressed records


When you are viewing a data set using a template with multiple record types, you
can instruct File Manager to include all record types in actions of commands, or
only the record type that is current. Only one record type can be "current" at any
one time. The inclusion of all record types, or limiting to one record type, is
controlled by the SHOW SUP command setting. Once your records can be
identified by type (either by the record length or by record identification criteria)
and the current SHOW SUP setting is OFF, File Manager suppresses the display of
all but one record type and groups the other record types into a single display line.
By default, the first record type identified is displayed.

You can choose to hide suppressed record groups from display, or represent them
by shadow lines:
- - - - - record type - - - - - - - - - - - n Line(s) suppressed

In TABL display format, you can only show fields from one record type on the
screen at a time. Records belonging to other record types are either grouped and
re-displayed as suppressed record lines or, if SHOW SUP ON is in effect or the
Expose option Suppressed on the Editor Options panel is selected, represented
by a line containing the name of their respective record type. In other display
formats, there is no display limitation and the contents of records belonging to
other record types are displayed.

218 File Manager for z/OS V12R1 User's Guide


Filtering record display using templates

Note: Suppressed records are only hidden from display. They are still selected and
are still included in any print, copy or create data functions.

You can control whether the suppressed record groups are completely hidden or
are represented by shadow lines.
v To hide the shadow line for suppressed record groups, enter SHADOW SUP OFF on
the Command line The shadow lines disappear, and SHAD appears at the top left
of the screen, indicating that there are records that are hidden because shadow
lines have been turned off.
You can also hide the shadow line for suppressed records by deselecting the See
shadow lines option, Suppressed, on the Editor Options panel.
v To turn on shadow lines for suppressed record groups, enter SHADOW SUP ON on
the Command line.
You can also turn on shadow lines for suppressed records by selecting the See
shadow lines option, Suppressed, on the Editor Options panel.

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 13 of 40
Record 13______ Format TABL
REC-TYPE NAME EMPLOYEE-NO AGE SALARY MONTH(1)
#2 #3 #4 #5 #6 #7
AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 BI 31:4
<> <---+----1----+----> <---+-> <---+-> <---+--> <---+---->
01 Bill McCork 4565 40 76200 10
01 Keith Sampson 2329 40 71550 26
01 John Neptune 3486 40 69000 30
01 Brian Van Der Velde 4574 30 84500 34
01 Ann Norwich 7838 33 67000 2
01 Michael Bevan 5455 46 83250 10
01 Mary Sands 7790 36 58000 18
01 Antony Burke 7732 46 102000 6
- - - - - - REC-TYPE02 - - - - - - - - - - 20 Line(s) suppressed
**** End of data ****

Command ===> _____________________________________________________ Scroll PAGE


F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 72. View panel displaying suppressed records

RELATED TOPICS
Managing templates on page 142
Defining criteria expressions on page 201
SHOW primary command on page 815
SHADOW primary command on page 814

Changing display of the record type


When only one record type is being displayed, to change the current record type in
any display format except SNGL:
1. If necessary, turn on the shadow lines for your suppressed records, by entering
SHADOW SUP ON on the Command line.
2. Type VIEW (or V) on the Command line.

Chapter 5. Filtering records with templates 219


Filtering record display using templates

3. Move the cursor to a shadow line for the suppressed record type you want to
view.
4. Press Enter. The suppressed records are displayed and the previous record type
becomes suppressed.

RELATED TOPICS
Managing templates on page 142
Defining criteria expressions on page 201
Record Selection Criteria panel on page 627
Record Identification Criteria panel on page 621
SHADOW primary command on page 814
VIEW primary command on page 829

Displaying not-selected records


A record is considered to be selected if all of the following conditions are true:
v The record length matches the length of one of the record types (level-01 items)
in the template. If any of the data description entries for the fields in a record
type included an OCCURS DEPENDING ON clause, then records of various
lengths might match a record type; for details, see Support for variable-length
arrays on page 137.
v The record data matches the record identification criteria for a type with that
record length.
If a record matches the record identification criteria for a record type, but the
record length is outside the valid range for that record type, then the record
matches the record type only if you choose the Length error option on the
Editor Options (option 0.6) panel. If you choose this option then such records
appear with a =LGTH indicator in their prefix area. If you do not choose this
option, then the record does not match the record type.
v The record data matches the record selection criteria for that type.
v The record type is indicated as being selected on the Record Selection panel
(when editing the template).

Otherwise, a record is considered to be not-selected for processing.

You can choose to show not-selected records, hide them, or represent them by
shadow lines.
- - - - - - - - - - - - - - - - - - - - - - n Line(s) not selected
v To show not-selected records, enter SHOW NOT ON on the Command line. (In
SNGL or TABL display format, the record data is formatted according to the
structure of the current record type.)
You can also show not-selected records by selecting the Expose option, Not
selected, on the Editor Options panel.
v To group not-selected records, enter SHOW NOT OFF on the Command line. The
records are either completely hidden or represented by shadow lines, depending
on the current setting of the SHADOW command.
v To turn on shadow lines for not-selected records, enter SHADOW NOT ON on the
Command line.
You can also turn on shadow lines for not-selected records by selecting the See
shadow lines option, Not selected, on the Editor Options panel.
v To turn off the shadow lines, completely hiding all but the selected records of
the current record type, enter SHADOW NOT OFF on the Command line. The

220 File Manager for z/OS V12R1 User's Guide


Filtering record display using templates

shadow lines disappear, and SHAD appears at the top left of the screen, indicating
that there are records that are hidden because shadow lines have been turned
off.
You can also turn off the shadow lines by deselecting the See shadow lines
option, Not selected, on the Editor Options panel.

Process Options Help



View FMN.V11R1M0.SFMNSAM1(FMNCDATA) Rec 0 of 40
Record 0_______ Format TABL
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#2 #3 #4 #5 #6 +
AN 1:2 AN 3:20 AN 23:14 AN 37:20 AN 57:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
**** Top of data ****
- - - - - - - - - - - - - - - - - - - - - - 20 Line(s) not selected
02 Grant Smith Developer 22 Montrose St Thornlie
02 Andrew Apple Developer 44 Eagle Rise Riverton
02 Graham Prestcott Developer 256 Hay St Cannington
02 Bill Somers Developer 84 Murchison Rd Dianella
02 Ted Dexter Developer 92 Smith St Belmont
02 Roddy Armstrong Manager 184 Alexander Dve Swan View
02 Cliff Roberts Manager 28 Bern Rd Middleswan
02 James Browne Manager 123 Wellington St Guildford
02 Silvia Carrot Programmer 48 Small Lane Mt Pleasant
02 Dan Peters Programmer 661 Ayton Way Floreat Park
02 John Laws Tech Writer 20 Uppercrust Cres Shents
Command ===> _____________________________________________________ Scroll PAGE
F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel

Figure 73. View panel displaying the not-selected shadow line

RELATED TOPICS
Managing templates on page 142
Defining criteria expressions on page 201
SHOW primary command on page 815
SHADOW primary command on page 814

Seeing why a record is not-selected


In an editor session, if a record is not selected, File Manager indicates the reason in
the prefix area for the record.

When you use the SHOW command (or one or more of the Expose options on the
on the Editor Options panel is selected) to show not-selected records, the prefix
area (if displayed) indicates why each record was not selected. One of the
following values is displayed in the prefix area of each not-selected record:
=DATA
Indicates the record was not selected because, although it matched one of
the record types identified in the template, it did not match the record
selection criteria provided for that record type.
=LGTH
Indicates the record was not selected because one of the following is true:
v The record length did not fall within the valid range for any of the
record types in the template.

Chapter 5. Filtering records with templates 221


Filtering record display using templates

v The record length falls within the valid range for a record type in the
template, but that record type contains a variable-length array, and the
record length is not consistent with the value of the field that defines the
number of items in the array.

RELATED TOPICS
Managing templates on page 142
Defining criteria expressions on page 201
Support for variable-length arrays on page 137
SHOW primary command on page 815
SHADOW primary command on page 814

Hiding or showing records in SNGL display format


In SNGL display format, the VIEW command does not apply: the current record
type automatically changes to match the record being displayed. The record type
used to format the record being displayed is indicated at the top of the screen.

In this display format, shadow lines are not displayed. If SHOW NOT OFF is in
effect, then not-selected records are hidden; if SHOW SUP OFF is in effect, then
suppressed records are hidden.

If you use the Next function key (F11) or Previous function key (F10) to scroll
through records in SNGL display format, then the only indication that a hidden
record has been skipped is that the record number (shown in the upper right
corner of the screen) skips accordingly.

If you display a not-selected record in SNGL display format, then the record type
used to format the data is the record type that was current prior to showing the
not-selected record.

RELATED TOPICS
Managing templates on page 142
Defining criteria expressions on page 201
SHOW primary command on page 815
SHADOW primary command on page 814
VIEW primary command on page 829
71

Using the SHOW command in an editor session


The SHOW command in an editor session has the following features:
v If you use the SHOW command to show not-selected records, then the prefix
area (if displayed) indicates why each record was not selected. For details, see
Seeing why a record is not-selected on page 221.
v If you use the SHOW command to show not-selected records in TABL display
format, and the records contain invalid data when interpreted according to the
field definitions for the current record type, then the invalid data is shown as
highlighted asterisks. Additionally, in Edit, File Manager moves the cursor to the
first occurrence of invalid data.

Examples

In SNGL display format, to show only the selected records for the current record
type, enter:

222 File Manager for z/OS V12R1 User's Guide


Filtering record display using templates

SHOW NOT OFF


SHOW SUPP OFF

(or just SHOW ALL OFF)

In SNGL display format, to show all selected records, enter:


SHOW NOT OFF
SHOW SUPP ON

(as you step through the records using the Next function key (F11) and the
Previous function key (F10), the field headings change to match the type of the
current record)

In SNGL display format, to show all records, enter:


SHOW NOT ON
SHOW SUPP ON

(not-selected records are formatted according to the record type that was current
prior to moving to that record).

RELATED TOPICS
SHOW primary command on page 815
SHADOW primary command on page 814

Viewing segmented data


When viewing data using a segmented data template, in either the View or Edit
panels, only one segment type is displayed at a time in TABL, CHAR, HEX or
LHEX display modes, depending upon the current setting of the SHOW SUP
command. In this respect, viewing segmented data is very similar to viewing
unsegmented data with many record types.

To view a different segment type in the editor panel:


1. Type the VIEW (V) primary command on the command line.
2. Place your cursor on the shadow line for the segment type you want to display
and press Enter.

To view a different segment type in the Edit panel you can use the method
described above or you can:
1. Enter the V command in the prefix field for the appropriate shadow line.

Note: Both of these methods are identical to changing record types in


unsegmented data.

Because segmented records typically have many segment types, each of which will
display as a separate shadow line, you may find it convenient to hide the shadow
lines while looking at a particular segment type. To do this:
1. Enter the SHAD SUP OFF primary command on the command line.

For example, if this command is applied to the sample data seen in Figure 53 on
page 135, the result would be:

Chapter 5. Filtering records with templates 223


Filtering record display using templates

SHAD
REC-TYPE DEPT-ID JOB-DESC
#2 #3 #4
AN 1:2 AN 3:3 AN 6:20
<> <-> <---+----1----+---->
****** **** Top of data ****
000001 01 FIN Accountant
000003 01 FIN Purchasing Officer
000005 01 FIN Accounts Receivable
000007 01 MKT Sales Representative
000009 01 MKT Promotions Manager
000011 01 MKT Market Research
000013 01 ADM Chief Executive
000015 01 ADM Secretary/PA
000017 01 ADM Receptionist
000019 01 ADM Clerical Officer
****** **** End of data ****

Figure 74. Segmented records with suppressed shadow lines turned off.

To switch the segment types, you need to redisplay the shadow lines (SHAD SUP
ON), then re-apply the VIEW command to the required Record Type.

Viewing segmented data in SNGL display mode


In SNGL display mode, the File Manager default is to hide the suppressed records.
(This is controlled by the Expose (do not group) records of types editor option, for
which you can select these types of records: Not selected, Suppressed, Length
error). This means that when you access SNGL mode, you will only see one
segment type as you scroll through the data using the NEXT (F11) and PREVIOUS
(F10) commands.

To view all the segment types in SNGL mode, you need to display the suppressed
records, by entering the SHOW SUP ON command. When the suppressed records
are displayed, the NEXT (F11) and PREVIOUS (F10) commands scroll through each
segment type, treating each as a separate record. To scroll through the physical
records, you can use the NEXTREC (Shift+F11 or F23) and PREVREC (Shift+F10 or
F22) commands. These commands take you to the beginning of the next or
previous physical record, that is, you will view the first segment type of each
record. You can also use the UP (F7) or DOWN (F8) commands to scroll within the
current record.

To find a segment type and then scroll through segmented data in SNGL display
mode, viewing the same segment type:
1. Enter the SHOW SUP ON command to display all the segment types.
2. Use the NEXT command (F11) to scroll through the segment types until the
type you want is displayed.
3. Enter the SHOW SUP OFF command. This hides the display of the suppressed
records.
4. Use the PREV or NEXT commands to scroll, looking at the same segment type
each time.

To switch the segment types, you need to redisplay the suppressed records (SHOW
SUP ON), scroll to the desired segment type and then re-hide the suppressed
records.

RELATED TOPICS
NEXTREC primary command on page 790

224 File Manager for z/OS V12R1 User's Guide


Filtering record display using templates

PREVREC primary command on page 796

Adjusting your view to allow for header information


When you are using a copybook or template to format your records, there are
times when the information in your records is displaced because your copybook or
template defines its fields as beginning to the right or left of the actual data in the
record. For example, your records may include header information, which is not
defined in the copybook record structure, or your copybook may include a
definition for some header information which is not in the actual record. (PL/I
copybooks are sometimes coded with a 4 byte RDW field that File Manager strips
from the record, as it isn't normally considered part of the data.) To map your
template to your records without changing the originating copybook, you can
specify an offset value, which changes the template's field starting positions to the
left or right.

The offset value is an integer between -32760 and 32760, which is applied to one or
more Level 01 fields in the template. The starting position of each field within the
Level 01 record structure is increased or decreased by this value. A positive offset
moves the fields to the right and some fields might be mapped beyond the length
of the record. Data that falls beyond the length of the record is not represented.
You cannot edit a field where the data you supply would fall beyond the physical
end of the record (whether the record is of fixed or variable length). A negative
offset moves the fields to the left and all fields with a resultant zero or negative
start location are removed from the display.

All required fields must have a positive start location. Required fields are fields
such as OCCURS DEPENDING ON target fields, PL/I REFER fields, or fields
referenced in record identification or record selection criteria. If a required field
would have a negative or zero start column value under the supplied offset, the
offset is invalid, and thus not allowed. If the first element of a dimensioned field is
at a zero or negative start location, that field (all array elements) is removed from
the display.

The offset is applied before values are calculated for use in identification or
selection criteria.

RELATED TOPICS
OFFSET primary command on page 791
Managing templates on page 142
Selecting records with templates on page 197
Defining criteria expressions on page 201
Manipulating the display of fields in records on page 164

Example of a positive offset


If your copybook defined its fields as:
Ref Field Name Picture Type Start End Length
1 1 REC-TYPE02 AN 1 80 80
2 2 REC-TYPE XX AN 1 2 2
3 2 NAME X(20) AN 3 22 20
4 2 JOB-TITLE X(14) AN 23 36 14
5 2 ADDR1 X(20) AN 37 56 20
6 2 ADDR2 X(20) AN 57 76 20
7 2 POSTCODE X(4) AN 77 80 4
**** End of data ****

and your data records, without a template, consisted of (note the header
information in bold):

Chapter 5. Filtering records with templates 225


Filtering record display using templates

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
000000000102Grant Smith Developer 22 Montrose St Thornlie
000000000202Andrew Apple Developer 44 Eagle Rise Riverton
000000000302Graham Prestcott Developer 256 Hay St Cannington
000000000402Bill Somers Developer 84 Murchison Rd Dianella
000000000502Ted Dexter Developer 92 Smith St Belmont
000000000602Roddy Armstrong Manager 184 Alexander Dve Swan View

applying the template generated from this copybook would display your data as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#2 #3 #4 #5 #6 +
AN 1:2 AN 3:20 AN 23:14 AN 37:20 AN 57:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
00 0000000102Grant Smit h Deve loper 22 Montro se St Th
00 0000000202Andrew App le Deve loper 44 Eagle Rise Ri
00 0000000302Graham Pre stcott Deve loper 256 Hay St Ca
00 0000000402Bill Somer s Deve loper 84 Murchi son Rd Di
00 0000000502Ted Dexter Deve loper 92 Smith St Be
00 0000000602Roddy Arms trong Mana ger 184 Alexan der Dve Sw

By adjusting the template with an offset of 10, the records would display as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#2 #3 #4 #5 #6 +
AN 11:2 AN 13:20 AN 33:14 AN 47:20 AN 67:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
02 Grant Smith Developer 22 Montrose St Thornlie
02 Andrew Apple Developer 44 Eagle Rise Riverton
02 Graham Prestcott Developer 256 Hay St Cannington
02 Bill Somers Developer 84 Murchison Rd Dianella
02 Ted Dexter Developer 92 Smith St Belmont
02 Roddy Armstrong Manager 184 Alexander Dve Swan View

Example of a negative offset


If your copybook defined its fields as:
Ref Field Name Picture Type Start End Length
1 1 REC-TYPE02 AN 1 84 84
2 2 REC-RDW 9(8) BI 1 4 4
3 2 REC-TYPE XX AN 5 6 2
4 2 NAME X(20) AN 7 26 20
5 2 JOB-TITLE X(14) AN 27 40 14
6 2 ADDR1 X(20) AN 41 60 20
7 2 ADDR2 X(20) AN 61 80 20
8 2 POSTCODE X(4) AN 81 84 4
**** End of data ****

and your data records, without a template, consisted of:


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
02Grant Smith Developer 22 Montrose St Thornlie 614
02Andrew Apple Developer 44 Eagle Rise Riverton 613
02Graham Prestcott Developer 256 Hay St Cannington 602
02Bill Somers Developer 84 Murchison Rd Dianella 456
02Ted Dexter Developer 92 Smith St Belmont 620
02Roddy Armstrong Manager 184 Alexander Dve Swan View 613

applying the template generated from this copybook would display your data as:
REC-RDW REC-TYPE NAME JOB-TITLE ADDR1
#2 #3 #4 #5 #6
BI 1:4 AN 5:2 AN 7:20 AN 27:14 AN 41:20
<---+----1> <> <---+----1----+----> <---+----1---> <---+----1----+---->
**** Top of data ****
-252524647 an t Smith Deve loper 22 Montrose St Thor
-252526187 dr ew Apple Deve loper 44 Eagle Rise Rive
-252524647 ah am Prestcott Deve loper 256 Hay St Cann

226 File Manager for z/OS V12R1 User's Guide


Filtering record display using templates

-252525943 ll Somers Deve loper 84 Murchison Rd Dian


-252517499 d Dexter Deve loper 92 Smith St Belm
-252520042 dd y Armstrong Mana ger 184 Alexander Dve Swan

By adjusting the template with an offset of -4, the records would display as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#3 #4 #5 #6 #7 +
AN 1:2 AN 3:20 AN 23:14 AN 37:20 AN 57:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
**** Top of data ****
02 Grant Smith Developer 22 Montrose St Thornlie
02 Andrew Apple Developer 44 Eagle Rise Riverton
02 Graham Prestcott Developer 256 Hay St Cannington
02 Bill Somers Developer 84 Murchison Rd Dianella
02 Ted Dexter Developer 92 Smith St Belmont
02 Roddy Armstrong Manager 184 Alexander Dve Swan View

Specifying an offset value


You can specify the offset value for a record in three different ways:
1. When you are editing or viewing a data set with a template, use the OFFSET
command to enter an offset value. This offset value only applies to the current
editor session.

Note: Under some circumstances, when you use the OFFSET command in an
editor session, the command only affects the display formatting of
records. You must re-enter the editor session for the select of records or
segments to reoccur. These circumstances apply on one of these
situations:
v A template indicating segmented records and some selection criteria
are present
v Record sampling
v A record limit of MEMORY
For more information on using the OFFSET primary command, see OFFSET
primary command on page 791.
2. When you are editing a template, you can enter an offset value in the Field
Selection/Edit panel to change the starting position of the currently displayed
layout. If the template contains more than one Level 01 field, you can use the
OFFSET primary command in the Record Type Selection panel to change one
or more Level 01 fields. If you wish, you can save the offset changes in the
template, so that they apply to subsequent editor sessions. For more
information about specifying an offset in a template, see Specifying offset
values on page 200.
3. When you are running a File Manager function using a template, batch
keywords let you specify offset values. The following functions support the use
of offset keywords:
Function Keywords
DSC OFFSETIN, OFFSETOUT
DSEB OFFSETIN
DSM OFFSETOLD, OFFSETNEW
DSP OFFSETIN
DSU OFFSETIN
For more information about using these keywords, see the relevant function
description in Chapter 16, Functions, on page 831.

Chapter 5. Filtering records with templates 227


Filtering record display using templates

228 File Manager for z/OS V12R1 User's Guide


Chapter 6. Managing data sets
Large-scale file management tasks, such as data creation and data copying, can be
performed by treating your data sets as entire units, rather than working with
individual records within data sets.

The major tasks described in this chapter are:


Working with data set lists
Creating data sets and records on page 236
Copying data sets on page 247
Finding and changing data in multiple PDS members on page 264
Comparing data sets on page 275
Printing from File Manager on page 293

Similar tasks can be performed on HFS files and between z/OS data sets and HFS
files. They are described in Chapter 11, Using UNIX System Services and the
Hierarchical File System, on page 385.

Working with data set lists


The data set list facility provides an easy way to select frequently-used data sets
within File Manager and is available for functions whose entry panel allows you to
specify the primary data set and, optionally, a copybook or template.

The data set list facility is available with these functions:


v Browse
v Compare
v Copy
v Create
v Edit
v Print
v View

Note: The use of data set lists is not yet supported through the FM/CICS
interface.

Data set lists are lists of up to 30 data set names, and optionally the names of the
volumes on which the data sets reside, member names, Copybook or Template
data set names, and member names.

File Manager maintains a special dynamic reference list (called REFLIST) of the
last 30 data sets referenced by the function entry panel.

Note: Merely typing a data set name in a panel does not cause File Manager to
add that name to the reference list. The data set name has to be actually
allocated by File Manager before it is added to the reference list.

In addition to File Manager maintaining the reference list, you can create and
maintain your own personal data set lists with details of up to 30 data sets in
each list. You allocate a name to each personal data set list you create so that you
can identify it. You can use personal data set lists to retrieve frequently used data

Copyright IBM Corp. 2000, 2012 229


Working with data set lists

set names and to create customized data set lists. This facility is similar to ISPF
personal data set lists, but the lists are not interchangeable between ISPF and File
Manager.

Each list (that is, REFLIST and any personal data set lists you have created)
includes the data set name and provision for storing associated details such as
member name, volume serial, copybook or template data set name, and member
name.

File Manager maintains data set lists for each user ID, across functions, and from
one File Manager session to another. For example, say you browsed a data set a
few days ago and now want to print some records from that same data set, you
can find the details of that data set in REFLIST (and any personal data set lists you
may have added the data set details to) providing you have not accessed more
than 30 data sets in the meantime.

You can open any list (making it the current data set list) and retrieve details to
the function entry panel.

Whenever you view or edit a data set, File Manager records the name of the data
set in the reference list (REFLIST). If you specified a volume name on the function
entry panel, or a member name for a PDS data set, File Manager also records those
details in the reference list. For a PDS, if you do not enter a member name on the
function entry panel, but instead select it from the member selection list, File
Manager records just the data set name.

File Manager also records the copybook or template data set name and member
name, but only if they are used. For example, if the Copybook/template processing
option is set to 3. None then, even if the Copybook or Template Data set name
and Member entry fields are not blank, File Manager does not record the contents
of those entry fields in the reference list as those details were not used. This avoids
the reference list (and potentially any personal data set lists) from holding
irrelevant and unnecessary information.

You create personal data set lists by typing in the data set names (and optionally
other details), or by saving an existing list (including the reference list) with a new
name.

Accessing data set lists


You can access data set lists in one of two ways:
v On the function entry panel, selecting the Process pull-down menu on the action
bar
v Using one of the fastpath commands, REFL, REFD, or REFA.

The following sections describe each method of accessing data set lists.

Process pull-down menu


The function entry panels have a pull-down menu (when you select Process on the
action bar) that helps you use data set lists. The Process pull-down menu allows
you to access data set lists (including the reference list, REFLIST) and define,
modify, save and delete personal data set lists. From the Process pull-down menu,
you can select one of the following:
Current Data Set List
Displays the contents of the current data set list and allows you to modify,
save, or delete the list.
230 File Manager for z/OS V12R1 User's Guide
Process pull-down menu

Personal Data Set Lists


Displays names of all of your personal data set lists, as well as the
reference list, REFLIST. You can then open a list to make it active (making
it the current data set list), and update, delete, or save the list to another
name.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610

Fastpath commands
You can use the following fastpath commands to access and manage data set lists:
REFA Adds the name of the data set (and associated information) most recently
referenced by the function entry panel to the specified data set list.
REFD Displays the list of data set lists.
REFL Displays the current data set list.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610

Managing personal data set lists


You can create, change, or delete data set lists through a set of panels which are
accessible by means of the Process pull-down menu available on the function entry
panel. You can also access the data set list panels with the REFL and REFD
fastpath commands.

Making a list the current data set list


Before you can retrieve information from a data set list, you must make the data
set list the current data set list.

The current data set list determines:


v The list used by the NRETRIEV primary command (or related function key if
allocated to NRETRIEV).
v The list displayed when you select the Current data set list option on the
Process pull-down menu from the action bar.
v The list displayed when you issue the REFL fastpath command.

To make a data set list the current data set list, perform either of these actions:
1. Enter the REFD fastpath command to display the Personal Data Set Lists panel.
2. Open the required data set list by typing the O line command alongside the
name on the list.
1. Save an existing list to a new name. The newly-saved list becomes the current
data set list.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610

Creating a new personal data set list


To create a new personal data set list, perform one of these actions:

Chapter 6. Managing data sets 231


Creating a new personal data set list

v Start with an empty list by selecting the Personal Data Set Lists option from the
Process pull-down menu on the function entry panel, and use the N (New list)
line command to create a new list, then enter the data set names and optional
additional information (member name, volume, copybook or template data set
name and member name) and use the A (Save as) line command to save it with
whatever name you choose.
v Start with the reference list (REFLIST) by selecting the Personal Data Set Lists
option from the Process pull-down menu on the function entry panel, and use
the A (Save as) line command to save it with a new name, and then change the
list as needed.
v Start with another personal data set list by selecting the Personal Data Set Lists
option from the Process pull-down menu on the function entry panel, and use
the A (Save as) line command to save it with a new name, and then change the
list as needed.
Notes:
1. For details about how to add a description to a data set entry, see Adding a
description to an entry in a data set list on page 233.
2. The N (New list) and A (Save as) line commands are also available when you
are modifying an open list.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610

Editing an existing data set list


You can modify any data set list (including the reference list, REFLIST) by:
v Adding a new data set entry to the list.
v Deleting a data set entry from the list.
v Changing details (including adding a description) for an existing data set entry.

Adding a new entry to a data set list: There are three ways you can add a new
entry to a data set list:
v Overtype an existing entry on the list
For an existing entry on the data set list, overtype the details with new
information. If necessary, you can also enter new details on any blank lines.
v Editing the list
1. Use the REFL fastpath command or the Process drop-down menu to display
the data set list you want to edit on the Personal Data Set List panel.
2. Enter the E (Extended Edit) line command to display the Edit Personal Data
Set List panel.
3. Type in the details of the new data set entry. When you are adding a new
entry to a data set list, you might find the following line commands useful:
I Insert a list entry
R Repeat a list entry
v Using the REFA fastpath command
Use the REFA fastpath command to add the name of the data set (and associated
information) most recently referenced by the function entry panel to the
specified data set list.
For example:
REFA NEWLIST

232 File Manager for z/OS V12R1 User's Guide


Editing a data set list

adds the name of the data set most recently referenced by the function entry
panel to the data set list, NEWLIST.
The list name must begin with an alphabetic character, followed by any valid
alphanumeric character for a total length of up to 8 characters. If the specified
list name does not exist, File Manager creates it.

Note: For details about how to add a description to a data set entry, see Adding a
description to an entry in a data set list.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610
Edit Personal Data Set List panel on page 538

Deleting an entry from a data set list: To delete an entry in a data set list:
1. Use the REFL fastpath command or the Process drop-down menu to display
the data set list you want to edit on the Personal Data Set List panel.
2. Enter the E (Extended Edit) line command to display the Edit Personal Data Set
List panel.
3. Type D (Delete a list entry) against the data set entry you want to delete and
press Enter. File Manager deletes the entry from the list.

RELATED TOPICS
Edit Personal Data Set List panel on page 538

Changing details for an existing entry in a data set list: To change the details for
an existing entry in a data set list:
1. Perform either of these actions:
v To modify the current data set list, either use the REFL fastpath command or,
on the function entry panel select the Current Data Set List option from the
Process pull-down menu, to open and display the current data set list, and
modify the list as required.
v To modify a data set list other than the current data set list, either use the
REFD fastpath command or, on the function entry panel select the Personal
Data Set Lists option from the Process pull-down menu, to display the list of
data set lists and use the O (Open) or E (Edit) line command on the Personal
Data Set Lists panel to open and display the required data set list, and
modify the list as required.
2. Change any of the existing information by overtyping it.

Note: For details about how to add a description to a data set entry, see Adding a
description to an entry in a data set list.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610

Adding a description to an entry in a data set list: You can add a description to
an individual entry within a data set list. For example, you might want to further
identify a data set called EMPOSEAS with the description "Employees who have
worked overseas in the last five years".

To add or view descriptions while modifying a personal data set list, on the
Personal Data Set panel, perform either of these actions:

Chapter 6. Managing data sets 233


Adding a description to an entry in a data set list

v Type the E (Extended Edit) line command to display the Edit Personal Data Set
List panel.
v Enter the LISTVIEW command.

File Manager changes the format of the display to include an extra (third) line
where you can add or view the description for that data set entry.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610
Edit Personal Data Set List panel on page 538
LISTVIEW primary command on page 782

Deleting a data set list


To delete a personal data set list, perform one of these actions:
v Select the Personal Data Set Lists option from the Process pull-down menu (or
use the REFD fastpath command).
v Place a D next to the list you want to delete and press Enter.
v While viewing a list, place a D in the action field and press Enter.
Notes:
1. If you delete the currently active list, then REFLIST becomes the current data
set list.
2. You cannot delete the reference list, REFLIST. You can, however, clear its
contents. When you use the D line command against REFLIST, File Manager
deletes the contents of REFLIST, leaving REFLIST as an empty data set list.

RELATED TOPICS
Personal Data Set List panel on page 608

Retrieving details from a data set list


When you use the function entry panel, you can speed up the selection of
commonly-used data sets by retrieving the data set name (and any associated
details) from a data set list.

When File Manager retrieves details from a data set list, it fills the Data set name
entry field on the panel with the retrieved name. If other details (such as the
associated member name, volume serial, copybook or template data set name and
member name details) are also stored for that entry in the data set list, File
Manager also retrieves those details and fills the corresponding entry fields on the
panel with the retrieved names.

Note: You can only retrieve details from the current data set list. See Making a
list the current data set list on page 231.

There are two ways to retrieve data set details:


Progressive retrieval (NRETRIEV primary command)
Progressively retrieves the details of each data set held in the current data
set list.
Point-and-shoot retrieval
Retrieves the details of a specific data set from the current data set list.

The following sections describe each of these methods.

234 File Manager for z/OS V12R1 User's Guide


Retrieving details from a data set list

Progressive retrieval (NRETRIEV primary command)


To retrieve a data set name from the current data set list:
1. Make the required data set list the current data set list. (See Making a list the
current data set list on page 231.)
2. From the function entry panel, enter the NRETRIEV primary command (or
press the function key to which you have assigned the NRETRIEV primary
command).
File Manager retrieves the first data set name from the current data set list.
3. To retrieve the details for the next data set in the current data set list, repeat the
NRETRIEV primary command (or press the associated function key again).
4. Continue to retrieve the details for each data set in the current data set list until
you have retrieved the details for the data set you want.

Point-and-shoot retrieval
To retrieve a data set name from the current data set list:
1. Open the required data set list to make it the current data set list. (See Making
a list the current data set list on page 231.)
2. Place the cursor in the field to the left of the data set name you want, and press
Enter.
The function entry panel is redisplayed with the selected name in the Data Set
Name field and any associated information in the other entry panel fields.

RELATED TOPICS
Personal Data Set List panel on page 608
Personal Data Set Lists panel on page 610
Edit Personal Data Set List panel on page 538
NRETRIEV primary command on page 791

Allocating program function keys


If you are accessing data set lists frequently, you will probably find it worthwhile
to allocate one or more program function (PF) keys to commands used to manage
data set lists.

The commands for which you may find it helpful to allocate a PF key are:
LISTVIEW
On the Personal Data Set List panel, toggles the format of the display to
include an extra (third) line where you can add or view the description for
that data set entry.
On the Personal Data Set Lists panel, toggles between the standard and
extended list format. The extended list format shows the first 6 data set
names for each list.
NRETRIEV
Retrieves the details of the first data set entry from the current data set list.
Repeated use of NRETRIEV returns details of the next data set in the
current data set list. You can only use NRETRIEV on the function entry
panel.
REFD Displays the list of data set lists.
REFL Displays the current data set list.

To allocate PF keys to one or more of the above commands, use the ISPF
command, KEYS.

Chapter 6. Managing data sets 235


Creating data sets and records

Creating data sets and records


Using the Data Create Utility, you can:
v Create new records in existing sequential data sets or VSAM data set members,
appending to or replacing the existing records.
v Create new records in existing PDS or PDSE members, replacing the existing
records.
v Create new records in new VSAM data set members and new PDS or PDSE data
set members.
v Create new records in entirely new sequential data sets, VSAM data sets and
PDS or PDSE data sets.

With this utility, you can specify the number of records that are to be created and
how they are to be initialized. You can use fill characters and patterns to initialize
the data. By using a copybook or a template, you can also initialize records at the
field level. You can change the data create attributes for individual fields by editing
the template.

The tasks described in this section are:


Creating data without using a template
Creating data sets using a template on page 238
Allocating a new data set on page 240
Setting the Data Create Attributes in your template on page 240

Creating data without using a template


To create data in a new or existing data set, without using a template:
1. From the Primary Option Menu panel, select option 3. Utilities and then
option 1. Create.
The Data Create Utility panel is displayed.
2. Do one of the following:
v Specify the name of an existing data set; for PDS(E) data sets, also specify a
new or existing member.
The new records replace or are appended to the records in the existing data
set or member, depending upon how you set the Disposition Processing
Option.
v Specify the name of a new data set; for PDS(E) data sets, also specify a new
member name.
When you press Enter to process this panel, you are asked to allocate and
define the new data set.
3. If you are creating data in variable length records and you want the new
records to have a length less than that of the maximum record size, type a
value in the Record length field. Otherwise, leave this field empty. (The field
is ignored for fixed length and undefined length records.)
4. Enter the number of records that you want to create, in the Records field.

Note: To create an empty data set, specify the number of records as 0.


5. To initialize the data at the record level, enter a value in the Fillchar field.
6. If you would like to include a sequence field as part of the record, specify the
Sequence field position, Sequence field length and Sequence field
increment values.

236 File Manager for z/OS V12R1 User's Guide


Creating data sets and records

7. If you have specified the name of a new data set and you want to use another
data set as a model, spedify the name of the model data set in the Like data
set field.
8. Select your Disposition Processing Option.
1. Old/Reuse
Choose this option when you want your new data to initialize from
the beginning of an existing data set, replacing any existing records.

Note: If your VSAM data set is set to NOREUSE, selecting this option
results in an error when the panel is processed.
2. Mod
Choose this option when you want your new data to be appended to
any existing records in the data set.

Note: You cannot append records to a PDS or PDSE member or to a


packed sequential data set. You also cannot append packed
records to a non-packed sequential data set. You must use the
Old/Reuse option to replace these records.
9. In the Copybook or template processing option, select 3. None.
The contents of the Copybook or Template Data set name and Member fields
are ignored.
10. If you want to select a range of PDS(E) members based on one or more
criteria, select the Advanced member selection option to display the
Advanced Member Selection panel.
For details about selecting a range of PDS(E) members, see Selecting a range
of PDS(E) members on page 39.
11. If you want to generate the JCL needed to run this function in batch, select the
Batch execution option. The generated JCL is displayed in an Edit session
when the panel is processed.
12. If you want to run a user I/O exit in conjunction with your create action,
select the Use I/O exit option and then specify the exit name in the adjacent
field.
This option is only available when File Manager is installed with the option
USEIOX=ENABLE, and the Exit enabled field in the Set System Processing
Options panel is set to YES. If a default is specified with either of those
options, it is displayed in the field to the right of Use I/O exit.
13. If you want to create the new records in ISPF PACK format, select option 2
Pack in the ISPF Packing field.

Note: This option is only applicable to PDS or PDSE members. You cannot
specify Pack if you have elected to use an I/O exit.
14. Press Enter.
If you have specified an existing data set and the process is successful, a
message is displayed to show the number of records written to the file.
If you have specified a new data set name, you are asked to allocate it. When
the data set has been successfully allocated, the Data Create panel is displayed
again, with a message to show the number of records written to the file.

RELATED TOPICS
Specifying a data set and a member name on page 20
Allocating a new data set on page 240
Using File Manager functions in batch jobs on page 395

Chapter 6. Managing data sets 237


Creating data sets and records

Data Create Utility panel on page 510


DSG (Data Set Generate) on page 927

Creating data sets using a template


When you use a template to create a data set, the template provides structure for
the data. You can also use create attributes in the template to initialize field
values in the data set.

Initialization can be performed at two levels: record level and field level.
Field-level initialization takes place when you specify that a copybook or template
is to be used. In this case, the record is first filled with the character specified by
the Fillchar entry field. Selected fields are then individually initialized using the
field create attributes specified in a template.

When File Manager is creating a data set, it uses only the first record type
described in the template. The length of the records written depends upon whether
the records are fixed-length or variable-length, and the length of the record
description in the template:
v For fixed-length records, all records are created with the record length specified
for the data set. If the length of the record in the template is less than the data
set record length, the records are padded with the value specified for the
Fillchar field.
v For variable-length records, the length of each record depends upon the length
of the record built using the field attributes in the template. If the template
record description contains one or more variable-length arrays, the length of the
record varies according to the values assigned to the objects of the OCCURS
DEPENDING ON clauses or, in the case of a template created from a PL/I
copybook, arrays or variables whose number of elements or length is controlled
by a REFER variable.

Note: The length of the record in the template must always be less than or equal
to the maximum data set record length.

To create data in a new or existing data set, using a template:


1. From the Primary Option Menu panel, select option 3. Utilities and then
option 1. Create.
The Data Create Utility panel is displayed.
2. Do one of the following:
v Specify the name of an existing data set; for PDS(E) data sets, also specify a
new or existing member.
The new records replace or are appended to the records in the existing data
set or member, depending upon how you set the Disposition Processing
Option.
v Specify the name of a new data set; for PDS(E) data sets, also specify a new
member name.
When you press Enter to process this panel, you are asked to allocate and
define the new data set.
3. If you are creating data in variable length records and you want the new
records to have a length less than that of the maximum record size, type a
value in the Record length field. Otherwise, leave this field empty. (The field
is ignored for fixed length and undefined length records.)
4. Enter the number of records that you want to create, in the Records field.

238 File Manager for z/OS V12R1 User's Guide


Creating data sets and records

Note: To create an empty data set, specify the number of records as 0.


5. To initialize the data at the record level, enter a value in the Fillchar field.
To initialize data at the field level, you must use a template in which the
Create Attributes values have been defined for the template fields. If these
values have not yet been defined for your template, you can select the Edit
Template option and define them as part of this process.
If you would like to include a sequence field as part of the record, you must
specify this as part of your template Create Attribute values. When you are
using a template, information in the Sequence field position, Sequence field
length and Sequence field increment fields is ignored.
6. If you have specified the name of a new data set and you want to use another
data set as a model, spedify the name of the model data set in the Like data
set field.
7. Specify your template by doing one of the following:
v In the Copybook or Template Data set name and Member fields, specify
the name of an existing copybook or template, then set the Copybook or
Template processing option to 1. Above.
v Set the Copybook or Template processing option to 2. Previous. This tells
File Manager to use the copybook or template that you have most recently
associated with this data set (discrete to each user). File Manager ignores
the contents of the Data set name and Member fields.
v Set the Copybook or Template processing option to 4. Create Dynamic. File
Manager ignores the contents of the Data set name and Member fields and
displays the Dynamic Template panel when you press Enter to process the
Create Data panel.
8. If you want to run this process as a batch job, select the Batch execution
option. See Using File Manager functions in batch jobs on page 395 for
details about using batch mode.
9. Select your Disposition, Use I/O exit, Use proc and ISPF Packing Processing
Options to suit your needs (see Creating data without using a template on
page 236 for details).
10. Press Enter.
If you have specified an existing data set and template, and the process is
successful, a message is displayed to show the number of records written to
the file.
If you have elected to create a dynamic template, the Dynamic Template panel
is displayed. If you have specified an existing template and selected the Edit
Template option, the appropriate template editing panel is displayed. When
you have finished defining your template, File Manager either creates the
records or asks you to allocate a new data set, depending upon whether you
specified an existing or new data set name.
If you have specified a new data set name, you are asked to allocate it after
your template has been specified or created. When the data set has been
successfully allocated, the Data Create panel is displayed again, with a
message to show the number of records written to the file.

RELATED TOPICS
Setting the Data Create Attributes in your template on page 240
Specifying a data set and a member name on page 20
Allocating a new data set on page 240

Chapter 6. Managing data sets 239


Creating data sets and records

Allocating a new data set


When you specify an output data set that does not exist, File Manager prompts
you to allocate the new data set by displaying 2 panels. You select the organization
type for the new data set on the first panel. Your choice of data set organization
determines which panel is displayed next. You can also provide a "Like data set" to
be used as a model to provide data set attributes for the new data set. You can
either specify the name of the model data set (which must already exist) directly
on the Data Set Create utility panel, or on the new data set Allocation panel. You
enter allocation specific information, such as primary and secondary space
allocation and record length on the second panel. The second panel allows either
the creation of a VSAM data set, a physical sequential or partitioned data set, an
HFS file, or an IAM KSDS or ESDS data set.

To allocate a new data set:


1. On the Allocate: New Data Set Organization panel, select the option for the
data set organization type.
2. If you want to copy the allocation attributes of an existing data set, specify the
name of the data set in the Existing Data Set field.
3. Press Enter. The panel that is appropriate for the selected data set organization
type is displayed.
4. Complete the fields in this panel to create the data set you require. For general
information about defining data sets, see the DFSMS Using Data Sets manual
appropriate for your operating system. For specific information about valid
field values, use File Manager's Field-level Help (put your cursor in the field
and press F1).

RELATED TOPICS
Creating data without using a template on page 236
Creating data sets using a template on page 238
Allocate panel on page 442
DFSMS Using Data Sets

Setting the Data Create Attributes in your template


To enter create attributes for a field:
1. Display your template (dynamic or copybook) in the Field Selection/Edit panel.
For details on how to do this, see Editing a template on page 158.
2. Type E in the Cmd field adjacent to the relevant field, and press Enter.
The Field Attributes panel is displayed.
3. Enter values in the Create Attributes fields.
4. Press the Exit function key (F3) to return to the Field Selection/Edit panel.
An E is displayed under the SHE column to indicate that the attributes for
the field have changed.
5. Save your changes and exit from your template.

RELATED TOPICS
Field Attributes panel - alphanumeric fields on page 548
Field Attributes panel - numeric field on page 554

Creating, replacing, and adding data using existing data


When you are in an Edit or View editor session, you can create data elsewhere
from the data you are currently editing or viewing.

240 File Manager for z/OS V12R1 User's Guide


Creating, replacing, and adding data using existing data

You can create or replace data in a member of a partitioned data set (PDS or PDSE)
or a sequential, VSAM, or z/FS data set, using data from one or more lines of the
data in the current editor session.

You can also add data to a sequential, VSAM, or z/FS data set, using data from
one or more lines of the data in the current editor session.
v To create data in a new member or a new data set using one or more lines of the
data in the current editor session, use the CREATE (or CREATEX) primary
command. See Creating a new member or data set using data from an edit
session.
v To replace data in an existing member or a data set with one or more lines of the
data in the current editor session, use the REPLACE (or REPLACEX) primary
command. See Replacing a member or data set using data from an edit session
on page 243.
v To add data to an existing data set using one or more lines of the data in the
current editor session, use the APPEND (or APPENDX) primary command. See
Adding data to a data set using data from an edit session on page 244.
v To create data in a new member or a new data set using all of the data in the
current editor session, use the SAVEAS (or SAVEASX) primary command. See
Using all the data from an edit session to create a new member or data set on
page 245.

Creating a new member or data set using data from an edit


session
The CREATE primary command (or its abbreviation, CRE) creates a new member
of a partitioned data set (PDS or PDSE) or a new sequential, VSAM, or z/FS data
set from one or more lines of the data in the current editor session. If the specified
member or data set exists, a warning panel is displayed and a choice is presented,
allowing you to either replace the existing member (or data set) or to stop
processing. (To replace an existing member or data set without being prompted,
use the REPLACE primary command. See Replacing a member or data set using
data from an edit session on page 243.)

To specify the lines to be put into the new member or data set, use one of these:
v C or CC prefix commands (to copy lines)
v M or MM prefix commands (to copy lines, then delete them)
v A label range. (You must specify the "from" and "to" labels on the REPLACE
command.)

Note that the lines that are copied or moved to the specified data set or member
are only those lines which are not grouped. This means that lines in any of these
groups are not copied (or moved):
v Excluded groups.
v Suppressed groups (groups of other record types when using a template).
v Not-selected groups (groups of not-selected records when using a template).
This allows for a wide variety of control over what you create in the target
member or data set, matching the current SHOW settings in the editor session.

If you specify the member name or data set name as part of the CREATE primary
command, and the move or copy line commands (or range operand) are entered,
the new member or data set is created immediately from the data in the current
editor session. The allocation attributes for a data set created in this way are taken
from the data set in the current editor session.

Chapter 6. Managing data sets 241


Creating, replacing, and adding data using existing data

When the current editor session is using a PDS, you can enter the member name
with or without parentheses which is taken to mean a member within the same
PDS.

You can specify a partially-qualified or fully-qualified data set name as part of the
command.

Examples:
CREATE MEMNAM
Creates the new member, MEMNAM.
CREATE (MEMNAM)
Creates the new member, MEMNAM.
CREATE datasetname(MEMB1)
Creates member, MEMB1.
CREATE userid.datasetname(MEMB2)
Creates member, MEMB2.
CREATE userid.datasetname
Creates data set userid.datasetname, based on the current data set attributes.

If you enter the CREATE command without a member name or data set name, or
you enter the extended version of this command, CREATEX (or its abbreviation,
CREX), File Manager displays an extended create panel allowing you to enter the
name of a target data set and, optionally, member. This panel also allows you to
decide what data set to use as a model, or, if you want, to manually enter
allocation attributes for the target data set. Otherwise, the default data set
attributes are taken from the data set on which the editor session is currently
operating.

Examples:
CRE .STRT .END
Displays an extended create panel where you can enter the data set name
and, optionally, the member name.
CREX userid.dataset
Displays an extended create panel where you can enter the data set name
and, optionally, the member name.

The Pack option on the extended create panel allows you to choose whether the
data being created is stored in ISPF packed or standard format. The displayed
default reflects the current pack mode of the data being edited or viewed.

After the create processing is completed, File Manager returns you to the existing
editor session.
Notes:
1. In a CICS environment, CICS resources are not available as a target for this
command. Also, MQ resources are not available as a target for this command.
2. If the target file for a CREATE is a KSDS VSAM, the occurrence of duplicate
keys causes an informational message to be displayed, but processing of the
command continues.

RELATED TOPICS
CREATE, CREATEX primary commands on page 751

242 File Manager for z/OS V12R1 User's Guide


Creating, replacing, and adding data using existing data

Create panel on page 507

Replacing a member or data set using data from an edit


session
The REPLACE primary command (or its abbreviation, REPL) creates, if it does not
already exist, a new member of a partitioned data set (PDS or PDSE) or a new
sequential, VSAM, or z/FS data set from one or more lines of the data in the
current editor session. If the specified member or data set already exists, it is
overwritten. (To display a warning panel that prompts you when you attempt to
replace an existing member or data set, use the CREATE primary command. See
Creating a new member or data set using data from an edit session on page
241.)

To specify the lines to be put into the new member or data set, use one of these:
v C or CC prefix commands (to copy lines)
v M or MM prefix commands (to copy lines, then delete them)
v A label range. (You must specify the "from" and "to" labels on the REPLACE
command.)

Note that the lines that are copied or moved to the specified data set or member
are only those lines which are not grouped. This means that lines in any of these
groups are not copied (or moved):
v Excluded groups.
v Suppressed groups (groups of other record types when using a template).
v Not-selected groups (groups of not-selected records when using a template).
This allows for a wide variety of control over what you create in the target
member or data set, matching the current SHOW settings in the editor session.

If you specify the member name or data set name as part of the REPLACE primary
command, and the move or copy line commands (or range operand) are entered,
the new member or data set is created immediately from the data in the current
editor session. The allocation attributes for a data set created in this way are taken
from the data set in the current editor session.

When the current editor session is using a PDS, you can enter the member name
with or without parentheses which is taken to mean a member within the same
PDS.

You can specify a partially-qualified or fully-qualified data set name as part of the
command.

Examples:
REPLACE MEMNAM
Replaces or creates the new member MEMNAM.
REPLACE (MEMNAM)
Replaces or creates the new member, MEMNAM.
REPLACE datasetname(MEMB1)
Replaces or creates member, MEMB1.
REPLACE userid.datasetname(MEMB2)
Replaces or creates member, MEMB2.

Chapter 6. Managing data sets 243


Creating, replacing, and adding data using existing data

REPLACE userid.datasetname
Replaces or creates data set userid.datasetname, based on the current data set
attributes.

If you enter the REPLACE command without a member name or data set name, or
you enter the extended version of this command, REPLACEX (or its abbreviation,
REPLX), File Manager displays an extended replace panel allowing you to enter
the name of a target data set and, optionally, member. This panel also allows you
to decide what data set to use as a model, or, if you want, to manually enter
allocation attributes for the target data set. Otherwise, the default data set
attributes are taken from the data set on which the editor session is currently
operating.

Examples:
REPL .STRT .END
Displays an extended replace panel where you can enter the data set name
and, optionally, the member name.
REPLX userid.dataset
Displays an extended replace panel where you can enter the data set name
and, optionally, the member name.

The Pack option on the extended replace panel allows you to choose whether the
data being created is stored in ISPF packed or standard format. The displayed
default reflects the current pack mode of the data being edited or viewed.

After the replace processing is completed, File Manager returns you to the existing
editor session.
Notes:
1. In a CICS environment, CICS resources are not available as a target for this
command. Also, MQ resources are not available as a target for this command.
2. If the target file for a replace is a KSDS VSAM, the occurrence of duplicate keys
causes an informational message to be displayed, but processing of the
command continues.

RELATED TOPICS
REPLACE, REPLACEX primary commands on page 803
Replace panel on page 641

Adding data to a data set using data from an edit session


The APPEND primary command (or its abbreviation, APP) adds data from one or
more lines of the data in the current editor session to a sequential, VSAM, or z/FS
data set.

To specify the lines to be added to a data set, use one of these:


v C or CC prefix commands (to copy lines)
v M or MM prefix commands (to copy lines, then delete them)
v A label range. (You must specify the "from" and "to" labels on the append
command.)

Note that the lines that are copied or moved to the specified data set are only
those lines which are not grouped. This means that lines in any of these groups are
not copied (or moved):
v Excluded groups.

244 File Manager for z/OS V12R1 User's Guide


Creating, replacing, and adding data using existing data

v Suppressed groups (groups of other record types when using a template).


v Not-selected groups (groups of not-selected records when using a template).
This allows for a wide variety of control over what you create in the target data
set, matching the current SHOW settings in the editor session.

If you specify the data set name as part of the APPEND primary command, and
the move or copy line commands (or range operand) are entered, the specified
data in the current editor session is appended to the data set immediately.

You can specify a partially-qualified or fully-qualified data set name as part of the
command.

Example:
APPEND userid.datasetname
Appends data to userid.datasetname.

If you enter the APPEND command without a data set name, or you enter the
extended version of this command, APPENDX (or its abbreviation, APPX), File
Manager displays an extended append panel allowing you to enter the name of a
target data set.

Examples:
APP .STRT .END
Displays an extended append panel where you can enter the data set
name.
APPX userid.dataset
Displays an extended append panel where you can enter the data set
name.

The Pack option on the extended append panel allows you to choose whether the
data being created is stored in ISPF packed or standard format. The displayed
default reflects the current pack mode of the data being edited or viewed.

After the append processing is completed, File Manager returns you to the existing
editor session.
Notes:
1. In a CICS environment, CICS resources are not available as a target for this
command. Also, MQ resources are not available as a target for this command.
2. If the target file for an append is a KSDS VSAM, the occurrence of duplicate
keys causes an informational message to be displayed, but processing of the
command continues.

RELATED TOPICS
REPLACE, REPLACEX primary commands on page 803
Replace panel on page 641

Using all the data from an edit session to create a new


member or data set
The SAVEAS primary command creates a new member of a partitioned data set
(PDS or PDSE) or a new sequential, VSAM, or z/FS data set from all the lines of
the data in the current editor session. If the specified member or data set exists, a

Chapter 6. Managing data sets 245


Creating, replacing, and adding data using existing data

warning panel is displayed and a choice is presented, allowing you to either


replace the existing member (or data set) or to stop processing.

Note that the lines that are copied to the specified data set or member are only
those lines which are not grouped. This means that lines in any of these groups are
not copied:
v Excluded groups.
v Suppressed groups (groups of other record types when using a template).
v Not-selected groups (groups of not-selected records when using a template).
This allows for a wide variety of control over what you create in the target
member or data set, matching the current SHOW settings in the editor session.

If you specify the member name or data set name as part of the SAVEAS primary
command, the new member or data set is created immediately from the data in the
current editor session. The allocation attributes for a data set created in this way
are taken from the data set in the current editor session.

When the current editor session is using a PDS, you can enter the member name
with or without parentheses which is taken to mean a member within the same
PDS.

You can specify a partially-qualified or fully-qualified data set name as part of the
command.

Examples:
SAVEAS MEMNAM
Replaces or creates the member, MEMNAM.
SAVEAS (MEMNAM)
Replaces or creates the member, MEMNAM.
SAVEAS datasetname(MEMB1)
Replaces or creates member, MEMB1.
SAVEAS userid.datasetname(MEMB2)
Replaces or creates member, MEMB2.
SAVEAS userid.datasetname
Replaces or creates data set userid.datasetname, based on the current data set
attributes.

If you enter the SAVEAS command without a member name or data set name, or
you enter the extended version of this command, SAVEASX, File Manager displays
an extended saveas panel allowing you to enter the name of a target data set and,
optionally, member. This panel also allows you to decide what data set to use as a
model, or, if you want, to manually enter allocation attributes for the target data
set. Otherwise, the default data set attributes are taken from the data set on which
the editor session is currently operating.

Examples:
SAVEAS Displays an extended Saveas panel where you can enter the data set name
and, optionally, the member name.
SAVEASX userid.dataset
Displays an extended Saveas panel where you can enter the data set name
and, optionally, the member name.

246 File Manager for z/OS V12R1 User's Guide


Creating, replacing, and adding data using existing data

The Pack option on the extended Saveas panel allows you to choose whether the
data being created is stored in ISPF packed or standard format. The displayed
default reflects the current pack mode of the data being edited or viewed.

After the saveas processing is completed, the editor session you are returned to is
an edit of the target PDS member or data set as specified, and the previous
member or data set is released without any save occurring. Also note that any
starting position, record limits, or sampling information that may have been
previously specified, is not active for this edit of the SAVEAS target data set.
Notes:
1. In a CICS environment, CICS resources are not available as a target for this
command. Also, MQ resources are not available as a target for this command.
2. If the target file for a SAVEAS is a KSDS VSAM, the occurrence of duplicate
keys causes an informational message to be displayed, but processing of the
command continues.

RELATED TOPICS
SAVEAS, SAVEASX primary commands (data) on page 812
Saveas panel on page 642

Copying data sets


When you are using File Manager under ISPF, you can use the Copy Utility
(option 3.3) to copy data from one data set to another data set; when you are
programming a batch job, REXX procedure or TSO clist, you can use the equivalent
function, DSC (Data Set Copy). Whether you are using the panel or the function,
the Copy Utility (option 3.3) lets you copy data using no templates, a From
template only, or both From and To templates, in order of increasing flexibility.

You can also invoke the Copy Utility by issuing the COPY line command (or by
selecting Copy from the Process pull-down menu) on the Data Set List panel,
reached using the Catalog Services Utility (3.4). For more information, see
Working with a list of catalog entries on page 308.

With or without templates, you can enhance File Manager copy processing by
specifying a REXX procedure or DFSORT statements. Using a procedure potentially
allows you greater flexibility than any of the choices listed here, but it involves the
extra complexity of programming.

With or without templates, you can copy records where the input and output data
sets have different:
v Record formats
v Record lengths
v Block sizes

You can use the Copy Utility to:


v Copy data from any supported data set to any other supported data set.
Concatenated like and unlike sequential data sets are supported. Note that,
under some conditions (with tape data sets), File Manager may not be able to
detect unlike data set attributes and still invoke DFSORT for copy processing.
Such invocation may fail since DFSORT does not allow for unlike concatenation
of data sets. In such cases, the DFSORT use may be disabled with the NOSORT
function to allow for successful processing of concatenated datasets with unlike
attributes.

Chapter 6. Managing data sets 247


Copying data sets

Concatenated partitioned data sets with like attributes are fully supported.
Mixed partitioned data sets with like and unlike attributes are processed
correctly providing that the members being selected for processing come from
libraries with matching attributes, otherwise errors may be reported.
v Select the records to be copied using the start key (VSAM only), skip and copy
count fields, or a conditional expression defined in an input template.
v Change file attributes. You can copy records where the input and output data
sets have differing record formats, record lengths or block sizes. The copy
process truncates or pads records appropriately. To specify a pad character to be
used, use the PAD processing option on the Set Processing Options (option 0)
panel.
v Copy selected fields, change the size of fields, and create new fields in the
output file by using a From template with a To template.
v Generate data in external format
v Allocate a non-VSAM data set, or define a VSAM data set.
v Copy sequential data sets or PDS or PDSE members, converting the data to or
from ISPF PACK data format.

Note: File Manager supports the copying of Load Modules, when the following
conditions are met:
v Your input and output data sets are PDS or PDSEs.
v Your TSO environment is active (and you can use the TSO authorized
program services), or you are running File Manager as
program-authorized.
v You have not specified a REXX or DFSORT user procedure.
v You have not specified Start key, Skip or Copy counts.
v You are not using templates.
v You do not request member record counts.

The tasks described in this section are:


Copying without using a template
Selecting a range of PDS(E) members on page 39
Renaming members as you copy on page 252
Copying using a copybook or template on page 253
Copying records with segmented data templates on page 256
Copying files or members containing JCL on page 261
Copying records with segmented data templates on page 256
Generating data in external format - XML representation on page 257
Using a DFSORT or REXX procedure on page 261
REXX member selection on page 262

Copying without using a template


When you are copying data sets and do not use a template, all data in an input
data set record is copied to the output data set. You can limit the number of
records selected by using the Start key, Skip count and Copy count fields on the
Copy Utility (option 3.3) panel (for example, you can specify the number of
records to be copied).

If you are not using a template for your copy, use the Copy Utility panel (see
Figure 142 on page 487) as follows:
1. From the Primary Option Menu panel, select option 3. Utilities and then option
3. Copy.

248 File Manager for z/OS V12R1 User's Guide


Copying data sets

The Copy Utility panel is displayed.


2. Perform either of these actions
v Specify the data set that contains the data you want to copy, using a
combination of the Data set name, Member, and Volume serial entry fields
as appropriate.
v To select a range of members based on selection criteria, specify the data set
name or name pattern for a PDS(E) data set, optionally the member name or
pattern, and select the Advanced member selection option

Note: If you enter details in the Member field and select the Advanced
member selection option, File Manager populates the Member name
field on the subsequent Advanced Member Selection panel with the
same value.
3. Set your record-level selection, using the following entry fields on the Copy
Utility panel:
Start key
If required, specify a Start key for the data (VSAM only). Copying
starts at the first record with a key or slot number greater than or equal
to the specified value. If the key contains lowercase characters, blanks,
or commas, enclose it in quotation marks. Keys may also be in
hexadecimal format (e.g. X'0102').
Skip count
If required, specify a Skip Count for the data. Copying starts after
skipping the number of records specified in the field.
Include
If required, specify the number of physical records that to be included
in a repeating sample from a data set. Both Include and Repeat Skip
fields must have non-zero values for sampling to take effect.
Repeat skip
If required, specify the number of physical records to be skipped in a
repeating sample from a data set. Both Include and Repeat Skip fields
must have non-zero values for sampling to take effect.
Copy count
Specify the number of records to be copied. Enter ALL to copy all
records.

Note: The Start key and Skip count fields are mutually exclusive.
4. Select 2. None in the Copybook/template usage field.

Note: When this field is set to None, data in the Copybook or Template Data
set name and Member fields is ignored.
5. Select the processing options that you want:
Batch execution
Select this option when you want to generate the JCL needed to run the
function in batch. The generated JCL is displayed in an Edit session.
Use proc
Select this option when you want to run a REXX procedure or DFSORT
statements in conjunction with your copy action, and then specify the
procedure name in the adjacent field.

Chapter 6. Managing data sets 249


Copying data sets

To create a temporary procedure for one-time use enter an asterisk (*).


File Manager displays an Edit panel that you can use to create a new
procedure.
To use an existing procedure, specify the name of the member
containing the procedure you want to use. The member must belong to
the PDS allocated to ddname FMNEXEC. You can enter the name of the
member or a member name pattern (other than *). If you specify a
pattern, the Member Selection panel for the PDS is displayed when you
press Enter. You can then select the required member by entering an S
in the Sel field.
Ignore length mismatch
Select this option when you want to include records in the copy process
that are shorter than the matching template structure length.
Use I/O exit
Select this option when you want to run a user I/O exit that processes
the From (input) data set in conjunction with the copy action. If
selected, specify the exit name in the adjacent field.

Note: This option is only available when File Manager is installed with
the option USEIOX=ENABLE, and the Exit enabled field in the
Set System Processing Options panel is set to YES. If a default is
specified with either of those options, it is displayed in the field
to the right of Use I/O exit.

Do not select this option if you plan to use the ISPF Packing
option on the next panel.
Skip member selection list
Select this option when you have either used a generic name in the
Member field or specified Advanced member selection, and want to
copy all members that match the name or range of names, without
further refining the member list. This option is ignored if errors are
found whilst copying.
Directory integrity
Forces an override of the default PDS(E) member processing method
which allows for faster PDS directory access.
This option has significant performance impact. When selected, the
members are processed in a way which allows concurrent directory
updates as File Manager accesses the members using current directory
information.
When not selected, the member processing is performed faster, but may
be affected by PDS(E) directory updates, possibly causing I/O errors if
the data set is updated concurrently.
Report PDS record counts
Select this option when you want the count of records for copied
PDS(E) members to be displayed (online) or printed (batch).
6. Press Enter. The Copy To panel is displayed.
7. Type the To data set details. Use a combination of the Data set name,
Member, and Volume serial entry fields (the volume serial is only required for
data sets which are not accessible via the system catalog) to specify the data set
(and PDS(E) member if appropriate) to which you want to copy the data.

250 File Manager for z/OS V12R1 User's Guide


Copying data sets

If the output data set does not exist, File Manager displays the Allocation
panels to help you create a new data set.
8. Select the processing options for the Copy To panel:
DISP Determines the disposition of the To (output) data set. Specify OLD
or MOD.
1. OLD
Select this option when you want the copied records to be
placed into the To data set, starting from the beginning of the
data set and overwriting any existing records.
2. MOD
Select this option when you want the copied records to be
appended to the end of an existing output data set.

Note: You cannot append records to a PDS or PDSE member or


to a packed sequential data set. You also cannot append
packed records to a non-packed sequential data set. You
must use the OLD option to replace these records.

Note: SMS might modify the allocation of new data sets on your
system. For details, contact your SMS Administrator.
Replace members
Select this option when you want to replace like-named members in an
output partitioned data set.
Use I/O exit
Select this option when you want to run a user I/O exit that processes
the To (output) data set in conjunction with the copy action. If
selected, specify the exit name in the adjacent field.
If you specify an I/O exit, you cannot use the ISPF Packing option.
ISPF Packing
Provided that the output data set is a sequential, PDS or PDSE file, an
I/O exit routine is not used and the DISP is set to OLD, select one of
these options to control the copy behavior when processing data that is
in ISPF PACK format.
1. Asis
Select this option when you want File Manager to write the
output in the same format (packed or unpacked) as the input
records. If the input data is packed, it is unpacked for the
processing operation, and then written out in ISPF PACK
format.
2. Unpack
Select this option when you want File Manager to write the
output in unpacked format, regardless of the format of the
input records. If the input data is packed, it is unpacked for the
processing operation, and then written out without the ISPF
PACK format.
3. Pack
Select this option when you want File Manager to write the
output in ISPF PACK format, regardless of the format of the
input records. If the input data is packed, it is unpacked for the
processing operation, and then written out in the ISPF PACK
format.

Chapter 6. Managing data sets 251


Copying data sets

4. None
Select this option when you do not want File Manager to check
for packed records or unpack records for processing. If the
input data is packed, any processing actions operate on the
records in their packed format.
This is the only option allowed when an I/O exit has been
specified, when the Disposition is set to MOD or when the
Copy To data set is not a sequential file or PDS(E) member.
5. Skip
Select this option when you want to halt the copying or
processing actions, if the input data is packed.
9. Press Enter.
If you selected the Advanced member selection option, File Manager displays
the Advanced Member Selection panel:
a. Specify the selection criteria to select the members you want to copy and
press Enter.
b. If you have left the Member name field on the Advanced Member Selection
panel blank or have entered an asterisk (*) or a mask, (and you did not
select the Skip member name list on the Copy From panel), File Manager
displays the Member selection panel. In this case, select the members you
want to copy (either by typing an S in the Cmd field, or with the SELECT
primary command) and press Enter.
File Manager copies the selected data in the From data set to the To data
set.

Care must be taken when attempting to combine the Use proc, Use I/O exit and
ISPF Packing options. You cannot use an I/O exit and the ISPF Packing option at
the same time. You can provide a procedure and use an I/O exit or the ISPF
Packing option but you cannot include *Fastproc DFSORT statements in your
procedure.

RELATED TOPICS
Allocating a new data set on page 240
Copy From panel on page 486
Copy To panel on page 492
Specifying a data set and a member name on page 20
DSC (Data Set Copy) on page 879
Selecting a range of PDS(E) members on page 39
Advanced Member Selection panel on page 433

Renaming members as you copy


You can use the Copy Utility to change the names of multiple members in a
PDS(E), as you copy members from one data set to another. For example, you
might want to copy a range of members named TESTxxx to a new data set and
rename all of these as PRODxxx.

To rename members as you copy:


1. In the Copy From panel, enter a member name mask in the Member field.
OR
Select the Advanced member selection option and specify a range of member
names.
2. Specify the remainder of your copy options, as required, then press Enter.

252 File Manager for z/OS V12R1 User's Guide


Copying data sets

3. In the Copy To panel, enter a new member name mask in the form of a
member name pattern.
A member name pattern can consist of any characters that are valid in a
member name and two special pattern characters: the asterisk (*) and percent
sign (%).
Asterisk (*)
The asterisk is a place-holding character that means multiple characters
with no change. Only one asterisk should appear in the mask. Any
subsequent asterisk characters are treated as percent signs. For example,
if you enter:
ABC*

The renamed members all begin with ABC followed by the remainder
of the old member name.
Percent sign (%)
The percent sign is a place-holding character that means a single
character with no change. As many percent symbols as necessary may
appear anywhere in a member name. For example, if you enter:
%%%A*

The 1st 3 characters of the renamed members remain unchanged, the


4th character is replaced with the letter A and the remainder of the
old member name remains unchanged.
4. Press Enter. The new member names are displayed in the Prompt field on the
Member selection panel.
Sel Name Prompt Alias-of Size Created
DATA1 TEST1 43 01/01/09
DATA2 TEST2 21 02/09/06
DATA3 TEST3 40 02/09/06
5. Select the members that you want to copy and press Enter. The Prompt field
entry changes to *COPIED for the members that were successfully copied and
renamed.

Copying using a copybook or template


When you choose to use templates in your copy action, you can specify a From
template only or both From and To templates.
"From" template only
Excludes not-selected records from the output data set.
You can use the From template to exclude not-selected input records
from being copied to the output data set. During the copy, the Copy Utility
uses the From template to provide information about the selected record
types, record identification criteria, record selection criteria and record
structure. Once selected, the entire contents of the record are copied. Any
field selection and field resequencing settings in the From template are
ignored for copying, as field mapping and field create attributes are taken
from the To template.
You determine which records are selected or excluded by editing the
template and:
v selecting record types;
v specifying record identification criteria; and/or
v specifying record selection criteria.
Not-selected records:

Chapter 6. Managing data sets 253


Copying data sets

v do not match a record type in the template, due to either record


identification criteria or record length;
v match a record type, but belong to an unselected record type; or
v do not meet the record selection criteria for the record type.
"From" and "To" templates (based on the same copybook or dynamic template
structure)
Allows you to specify how fields in the input data set are mapped to the
output data set: to the same field (this is the default), to a different field or
unmapped.
You can use the To template to specify field mapping to determine
which fields in the input data set are copied to the fields in the output data
set. Unmapped fields are initialized in the output data set according to
create attributes in the To template. (If no create attributes have been
specified, then unmapped numeric fields are initialized to zero and
unmapped alphanumeric fields are initialized to blanks.)
File Manager ignores any record type selection, record identification
criteria or record selection criteria in the To template, as this information
is drawn from the From template.
The only information in the To template that is used for copying is the
record structure, field mapping and field create attributes.
"From" and "To" templates (based on different copybook or dynamic template
structures)
Allows the input and output data sets to have different record structures,
according to the differences in the copybook or dynamic template.
The Copy Utility inserts, deletes or moves fields, or changes field lengths
or data types, according to the differences between the templates. For
example:
v To insert a field, use a To template that is identical to the From
template, except for an inserted field definition.
v Similarly, to delete a field, use a To template that is identical to the
From template, but with the unwanted field removed.
Typically, you create the To template by copying the From copybook
or dynamic template, then you edit the To copybook (or dynamic
template) so that it describes the record structure that you want in the
output data set.

The table below summarizes how the Copy Utility uses information in the From
and To templates:

The Copy Utility determines... Using this information... In this template...


From To
Which records are copied Selected record types U
Record identification criteria
Record selection criteria
Which fields are copied, and to Field mapping U
where
How new (or unmapped) fields Create attributes U
are initialized

254 File Manager for z/OS V12R1 User's Guide


Copying data sets

By default, the Copy Utility maps fields in the From template to fields with the
same name in the To template. You can edit the field mapping in the To
template, and either delete the mapping for a field (so that its value in the output
data set is initialized, rather than copied from the input data set), or specify
yourself which field in the From template is mapped to a field in the To
template.

The Copy Utility truncates or pads records appropriately. You can specify the pad
character in the PAD field on the Set Processing Options (option 0) panel.

If you are using a copybook or template for your copy, use the Copy Utility panel
(see Figure 142 on page 487) as follows:
1. From the Primary Option Menu panel, select option 3. Utilities and then option
3. Copy.
The Copy Utility panel is displayed.
2. Enter the From data set details.
3. Enter the From copybook or template details. Use a combination of the Data
set name and Member entry fields to specify the copybook or template that
describes the data in the From data set.
You can select data for copying at either record level or field level:
v For record-level selection, set the record identification and record selection
criteria in your From template.
v For field-level selection, use a From template with a To template, and
specify the selected fields, field attributes and field mapping in your To
template.
If you specify both record-level and field-level selection, File Manager first
selects data at record level, then at field level.
4. Select Copybook/template Processing Option 1. Above or 3. Create dynamic
press Enter.
If you selected option 1, an extended version of the Copy To panel appears.
This form of the panel allows you to specify the To copybook or template.
If you selected option 3, then you must create the dynamic template. Once you
have done so, the extended Copy To panel is displayed.
5. Type the To data set details.
6. Select Copybook/template Processing Option 1. Above, 2. Noneor 3. Create
dynamic press Enter.
7. If you selected option 1, enter the To copybook or template details. Use a
combination of the Data set name and Member entry fields to specify the
copybook or template that contains field selection and mapping information for
your To data set.
8. If required, select the Edit template mapping option. When the template is
displayed, you can specify the mapping of input fields to output fields the data
creation patterns for new fields.
9. Press Enter. File Manager copies the selected data in the From data set to the
To data set.

RELATED TOPICS
Copying without using a template on page 248
Specifying a data set and a member name on page 20
Mapping fields between templates on page 186
DSC (Data Set Copy) on page 879

Chapter 6. Managing data sets 255


Copying data sets

Scrambling data
Scrambling data allows you to create test data based on production (or "live") data,
but with the ability to change the values of certain fields. In this way, you can
avoid sensitive or confidential information appearing in test data.

When can you scramble data?


When you use the Copy Utility (option 3.3) to copy data from one data set to
another data set, you can choose to scramble some or all of the fields being copied.

For scrambling to occur during the copy process, you must supply an output
template which has mapped fields marked for scrambling.

Scrambling rules
File Manager scrambles data according to these rules:
v If you do not specify any value or range options:
Uppercase alphabetic characters are scrambled to other uppercase alphabetic
characters.
Lowercase alphabetic characters are scrambled to other lowercase alphabetic
characters.
DBCS characters are scrambled to other DBCS characters.
Numerics are scrambled to other numerics.
Any other characters remain unchanged.
Repeatable scrambling produces unique results for numeric fields defined
with Leading zeros set to YES, and all non-numeric and non-DBCS fields.
v If you provide a value list, then the field is populated with a value from the list.
v If you provide a range, then the resultant number is in the range provided.
v If you specify a scramble type of random or repeatable and also the value option
and a value data set, then the field is populated with a value from the data set.
v If you specify a scramble type of translate, then the input field value is matched
and the corresponding output value is used from the value data set.

RELATED TOPICS
Specifying scrambling options on page 182
Field Attributes panel - alphanumeric fields on page 548
Field Attributes panel - numeric field on page 554
Value List Edit panel on page 697
Scramble Exit Specification panel on page 642

Copying records with segmented data templates


Previous releases of File Manager that copied data with a segmented template,
desegmented the output file. This behaviour has been changed so segmented data
can be copied, and the record segment relationships, or physical record structures,
are maintained. This means you can:
v Selectively copy records from a segmented data set using an input template with
selection criteria.
v Use an input and output template to reformat segmented data. This includes the
ability to scramble output. Note that the output segment lengths will be
determined by the output template, and input segments will be padded or
truncated during reformatting. To ensure you do not get unexpected results,
make sure you do not have length errors when mapping input segments.
v Use a procedure to drop or insert segments within a physical record. Procedure
processing sees the input data one segment at a time. Coding a RETURN 'DROP'
will remove that segment from the current output record. Coding a WRITE()

256 File Manager for z/OS V12R1 User's Guide


Copying data sets

statement inserts a segment on the current output record. Coding a RETURN


'STOP' will only write out the current physical record if the segment being
processed is the last segment on that physical record, otherwise it behaves like a
RETURN 'STOP IMMEDIATE' where the current physical record being processed
is not written. See given examples:
Example 1.
Insert a new segment in the output record.

Consider the following input segmented record:


AsegBsegCsegDseg

is mapped by a segmented template with 5 layouts mapping segments A to


E:
$$FILEM DSC ,
$$FILEM TCIN=MYSEG.TEMPLATE(SEGTP),,
$$FILEM PROC=*
IF FLD(1,1) = D THEN DO /* found a Dseg */
WRITE() /* Write out current segment */
OVLY_OUT(E,1) /* Create Eseg in output area */
END /* normal return writes Eseg */

After running the above procedure ,the output record would be


AsegBsegCsegDsegEseg.
Example 2.
Delete a segment in the output record.

Consider the following input segmented record:


AsegBsegCsegDseg
$$FILEM DSC ,
$$FILEM TCIN=MYSEG.TEMPLATE(SEGTP),,
$$FILEM PROC=*
IF FLD(1,1) = C THEN /* found a Cseg */
Return DROP /* drop this segment */

After running the above procedure the output record would be


AsegBsegDseg
Example 3.
Desegment a segmented file.
//DDIN DD DISP=SHR,DSN=MYSEG.DATA
//DDOUT DD DUMMY
//DDDESEG DD DISP=SHR,DSN=MYDESEG.DATA
//SYSIN DD *
$$FILEM DSC ,
$$FILEM TCIN=MYSEG.TEMPLATE(SEGTP),
$$FILEM PROC=*
WRITE(DDDESEG) /* Write segment out as physical record */
RETURN DROP /* dont copy any data */
/*

RELATED TOPICS
Segmented data templates on page 133
Setting up a template to be used with segmented data on page 153

Generating data in external format - XML representation


A traditionally formatted data set or file, with format described by a template
(copybook), can be represented in an external format. This is possible by applying

Chapter 6. Managing data sets 257


Copying data sets

external format rules to the data in a character format determined by the input
template. The output of a copy operation has an external format which can be
recognized by applications on various platforms.

Currently, you can request that the output of the copy operation be "well- formed"
XML data (the concept and terminology of Extensible Markup Language can be
found in the XML Specification 1.0 from the World Wide Web Consortium,
www.w3.org). The output format derived from the input template also conforms to
XML rules. A typical record in the output file is an XML line corresponding to an
elementary data item in the input record, and has the format:
start-tag content end-tag

where start-tag and end-tag include the data item name and content is a character
representation of the data item.

Using the copybook shown in About copybook templates on page 131:


01 ORDERS.
05 ORDER-ID PIC X(5).
05 CUSTOMER-ID PIC X(5).
05 ORDER-DATE.
10 ORDER-YEAR PIC 9(4).
10 ORDER-MONTH PIC 9(2).
10 ORDER-DAY PIC 9(2).

and the input record with an Order ID of O1002 and a Customer ID of C0015
made on 20050110, the corresponding sequence of XML lines is:
<ORDER>
<ORDER-ID>O1002</ORDER-ID>
<CUSTOMER-ID>C0015</CUSTOMER-ID>
<ORDER-DATE>
<ORDER-YEAR>2005</ORDER-YEAR>
<ORDER-MONTH>01</ORDER-MONTH>
<ORDER-DAY>10</ORDER-DAY>
</ORDER-DATE>
</ORDER>

File Manager assumes that the names used in a copybook or template are
legitimate XML names according to the XML specification. It does not check that
each data name, other than FILLER, is unique within the containing group.
However, names which do not start with a letter or an underscore are prefixed
with an underscore.

The format of elementary data depends on the input template or copybook. The
result is similar to the output from the Print Utility. Numeric data is converted to
character representation. File Manager removes leading zeros and blanks, trailing
blanks, skips a positive sign, and so on. Character data is included into the XML
content with trailing blanks removed (leading blanks are significant in data and are
not suppressed).

There are situations when data cannot be represented in the XML output by its
value. Data may not match the data type requirements. For example, when a
numeric field contains non-numeric characters. Character data can contain
non-printable and special characters. Non-printable characters are defined by the
default (or customized) FMNTRTBS translation table. The following special
characters have special meaning in the XML output and require different
representation:
">" (greater than)
"<" (less than)

258 File Manager for z/OS V12R1 User's Guide


Copying data sets

"'" (apostrophe)
"'" (quote)
"&" (ampersand)

The XML output is generated in the character set of the input data (EBCDIC,
DBCS), but can optionally be converted to Unicode. File Manager uses standard
z/OS support for Unicode, assuming that appropriate infrastructure and services
are present. Conversion to Unicode is possible if the conversion environment is
created and activated (for details, see the z/OS Support for Unicode Using Conversion
Services). File Manager assumes CCSID 0037 for EBCDIC, 0939 for DBCS (MBCS),
and 1200 for Unicode.

You can tailor the format and content of the XML output by specifying:
v How to represent special characters
v How to represent non-printable characters
v How to represent invalid data
v Whether FILLER should be included or ignored
v Whether redefinitions are to be included or ignored
v Whether to get the XML output in the character set of input data (EBCDIC,
DBCS) or in Unicode
v The number of blanks used to indent each logical level of XML tag nesting for
better readability (logical levels 1, 2, 3, and so on), are assigned by FM by
renumbering user levels specified in the copybook (for example 01, 05, 10, and
so on)

The XML output contains additional information included as separate lines, or


attributes following data-element names. They document:
v The input data set name and the template (copybook). For example:
<INPUT FILE="FMN.SEQ1" FORMAT="FMN.TEMPLATE(SEQ1)">
v The record sequence number and, in the case of keyed data, the key value. For
example:
<ORDER SEQ_NUMBER="998" KEY="O1002">
v The occurrence number, if the data element is an array. For example:
<MONTH-END ITEM_NUMBER="(2)">24</MONTH-END>
v Non-printable or special characters found in the content of the element and
converted according to processing parameters. For example:
<EMP-ID NONPRINT_CHAR="REPLACE">AA..17</EMP-ID>
<JOB-ID SPECIAL_CHAR="ESCAPE">A15&B32</JOB-ID>
v Any invalid data conditions met when converting a numeric data to a character
string; the element is presented according to processing parameters. For
example, skipped:
<EMP-SALARY INVALID_DATA="SKIP"></EMP-SALARY>

In the cases of invalid data, non-printable and special characters, the attributes
document the actual processing of particular data rather than the parameters
specified. For example, if a data field contains both non-printable and special
characters, with SKIP and REPLACE as the corresponding parameters, the content
is skipped. REPLACE is inconsistent with SKIP in this case and is ignored. In
general, if a data field contains both special and non-printable characters, SKIP and
HEX have precedence over all other options. CDATA has less priority than SKIP
and HEX, but higher priority than the rest of the options.

Chapter 6. Managing data sets 259


Copying data sets

The XML output can be any data set allowed by the Copy Utility, except for VSAM
KSDS. The output data set may be fixed or variable in length. If you want an
output record created for each XML line, make sure that the maximum logical
record length (LRECL) can contain the largest generated XML line. The size of the
line depends on the names used in the template, the maximum length of the
character representation of values, and the way the special and non-printable
characters and invalid data are processed. Some special characters are substituted
with strings, some data presented in hexadecimal form, and so on. This can make
the line considerably longer than expected. If you want each XML line to be placed
in a single output record, and the record is not long enough for a particular XML
line, File Manager truncates the XML line, ends processing and reports an error
(and, if in batch, sets a tailorable condition code of 8 indicating a truncation error).
If you decide that an XML line can span multiple output records, the output
dataset can have any logical record length.

To generate XML-formatted output, use the Copy From panel as follows:


1. From the Primary Option Menu panel, select option 3 (Utilities), and then
option 3 (Copy). File Manager displays the Copy Utility panel.
2. Enter the "From" data set details.
3. Enter the "From" copybook or template details. Use a combination of the Data
set name and Member entry fields to specify the copybook or template that
describes the data in the "From" data set. You can select data for copying at
either record level or field level:
v For record-level selection, set the record identification and record selection
criteria in your "From" template.
v For field-level selection, use a "From" template with a "To" template, and
specify the selected fields, field attributes and field mapping in your "To"
template.
If you specify both record-level and field-level selection, File Manager first
selects data at record level, then at field level.
4. Select Export mode to indicate that you want output in an external format.
5. Select Copybook/template Processing Option 1 (Above) or 3 (Create dynamic)
press Enter.
If you selected option 1, File Manager displays an extended version of the
Copy To panel. This form of the panel allows you to specify the additional
options.
If you selected option 3, then you must create the dynamic template. Once you
have done so, File Manager displays the extended Copy To panel.
6. Type the "To" data set details.
7. Optionally, customize the generation of output. For XML, you can affect the
generation and readability by specifying how to represent non-printable
characters and invalid data, whether to include fillers and redefines, how to
indent when nesting successive levels of XML tag nesting, and so on.
8. Press Enter. File Manager generates the selected data from the "From" data set
and writes it, in XML format, to the "To" data set.

RELATED TOPICS
Specifying a data set and a member name on page 20
Copy From panel on page 486
Copy To panel on page 492
DSC (Data Set Copy) on page 879

260 File Manager for z/OS V12R1 User's Guide


Copying data sets

Copying files or members containing JCL


If the file or PDS(E) members you are copying contain JCL, you can instruct File
Manager to maintain the integrity of the JCL syntax where the contents of the file
or PDS(E) member have been changed during the copy process.

To maintain the integrity of JCL syntax as you copy, in the Copy From panel:
1. Select the JCL Source format option.
2. Select the Use proc option.
3. Specify the remainder of your copy details as required and press Enter.
4. Specify details on the Copy To panel as necessary and press Enter.
File Manager copies the selected data in the From data set to the To data
set, maintaining the integrity of any JCL where the JCL is changed during the
copy process.

RELATED TOPICS
Copy From panel on page 486
Copy To panel on page 492
DSC (Data Set Copy) on page 879
Working with files or members containing JCL on page 273

Using a DFSORT or REXX procedure


You can specify an existing DFSORT or REXX procedure, or create a new one, to
further enhance the way in which data is selected and copied.

You can code any number of DFSORT or REXX statements and functions to
manipulate the output record, select specific records, print reports and tally
numeric values.

When you are coding a REXX procedure, be aware of the following:


v A copy procedure is run after record-level selection, and any field selection
supplied in a template, has been performed.
v If the record has been reformatted as a result of the template processing, the
variable INREC contains the input record value and the variable OUTREC
contains the reformatted output record.
v If a Copy count is specified, this can affect the number of records presented to
the REXX procedure. The Copy count only applies to the number of records
written to the primary output data set. It does not apply to records written in
the REXX procedure with the WRITE() function.
v When using the PRINT() function with field formatting (TABL or SNGL), the
template is determined as follows:
If an input template without an output template has been specified, the input
template is used.
If an output template is specified, and the record value specified to pri