Saturday, November 17, 2012

File-Aid: Printing File Contents



Chapter 12. Printing File Contents

File-AID has several utilities for generating reports that show the contents of your data files as well as contents of the files you create and maintain with File-AID.
When you select the Print utility (option 5), File-AID displays a selection menu where you can choose the type of file you want to print, including:
  • Data files
  • XREF members (and referenced layouts if requested)
  • Selection criteria members
  • Interpreted record layouts (similar to the View utility)
  • Audit trail files.

12.1 Accessing the Print Selection Menu (Option 5)

The Print Selection Menu is located on File-AID's Primary Option Menu as option 5.
Step:
  1. From the File-AID Primary Option Menu (not shown here), select File-AID option 5 to access the Print Selection menu (Figure 12-1).

12.2 Selecting the Type of File To Be Printed

Select an option number on the Print Selection Menu to specify the type of file you want to print. In this example, you print the FASAMP.EMPLOYEE file using a record layout to format the data fields in each record.
Since you want to print a data file, select the Print Data File option (1).
Steps:
  1. Type a 1 in the OPTION field to select the Print Data File utility.
  2. Press <Enter>. File-AID displays the Print Data File screen as illustrated in Figure 12-2.
Figure 12-1. Print Selection Menu
+--------------------------------------------------------------------------------+
| File-AID ------------------  Print Selection Menu  ----------------------------|
| OPTION ===> 1                                                                  |
|                                                                                |
|    1  Data File          - Print the contents of a data file:                  |
|                               in formatted mode using record layout            |
|                               in three-line hexadecimal mode                   |
|                               in single-line character mode                    |
|                                                                                |
|    2  Record/Layout XREF - Print the contents of a record/layout XREF:         |
|                               Print a record/layout XREF                       |
|                               Print XREF with referenced record layouts        |
|                                                                                |
|    3  Selection Criteria - Print the contents of selection criteria            |
|                                                                                |
|    4  Record Layout      - Print a record layout in formatted mode             |
|                                                                                |
|    5  Audit Trail        - Print the contents of an audit trail                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+--------------------------------------------------------------------------------+

More About the Print Selection Menu
  • You can bypass this menu by specifying the option number of the file type on the Primary Option Menu. For example, to go directly from the Primary Option Menu to the Print Data File screen, enter 5.1 in the OPTION field.

12.3 Requesting a Print of a Data File

You can print your data file in one of three formats: F (formatted), C (character), and H (hexadecimal).
If you select the F (formatted) print option, you must specify record layout or XREF information. You must also specify the type of field description information to show on the report. The field description options are:
  • F (Format) - Field length and current field format
  • N (Number) - System-assigned field numbers
  • O (Offset) - Offset of each field from beginning of the dataset
  • P (Picture) - Representation of the original data declaration for each elementary item.
Record Layout Usage
If you choose print format F (Formatted), you must specify a single record layout or XREF dataset member to define the layout(s) to use for printing the data records.
Layout usage is ignored for print formats C (Character) and H (Hex).
Selection Criteria
You may use standard File-AID selection criteria to select specific records for printing. You can use existing field selection criteria (created using the Selection Criteria function) or create temporary field selection criteria (options T (temporary) or Q (quick)).
Figure 12-2. Print Data File Screen
+--------------------------------------------------------------------------------+
| File-AID --------------------- Print Data File --------------------------------|
| COMMAND ===>                                                                   |
|                                                                                |
| Specify Print Information:                                                     |
|    Print format    ===> F                 (F = Formatted; C = Char; H = Hex)   |
|    Show            ===> O                 (Format, Number, Offset or Picture)  |
|                                                                                |
| Specify Print Dataset:                                                         |
|    Print dataset   ===> FASAMP.EMPLOYEE                                        |
|    Member          ===>                   (Blank or pattern for member list)   |
|    Volume serial   ===>                                                        |
|                                                                                |
| Specify Record Layout and XREF Information:                                    |
|    Record layout usage    ===> S          (S = Single; X = XREF; N = None)     |
|    Record layout dataset  ===> FASAMP.LAYOUTS                                  |
|    Member                 ===> EMPLOYEE   (Blank or pattern for member list)   |
|    XREF dataset           ===>                                                 |
|    Member                 ===>            (Blank or pattern for member list)   |
|                                                                                |
| Specify Selection Criteria Information:   (E=Use existing; M=Modify existing   |
|    Selection criteria usage ===> N         T=Create temporary; N=None)         |
|    Selection dataset        ===>                                               |
|    Member                   ===>          (Blank or pattern member list)       |
|                                                                                |
+--------------------------------------------------------------------------------+

Steps:
  1. Type an F in the Print format field.
  2. Type an O in the Show field to request field offsets in the formatted report.
  3. Verify the values in the other fields are specified as shown in Figure 12-2. If they are not the same, type over the existing values to change them.
  4. Press <Enter>. File-AID displays the PRINT - JCL Specification screen where you specify the print JCL information for batch processing. This screen is shown in Figure 12-3.

12.4 Submitting the Print Job

File-AID executes a print request only through a batch job. The PRINT - JCL Specification screen (Figure 12-3) is displayed to let you set your output class and JOB parameters.
From the PRINT - JCL Specification screen, you can invoke several processing commands, including:
JCL Generates and displays the JCL so you can edit it before you submit it. While editing the JCL you can use the Edit commands CREATE, REPLACE or SUBMIT to save or submit your Print JCL.
SUBMIT Generates the JCL and processes your print request.
END Returns to the Print Data File screen without submitting the job.
Steps:
  1. Type SUBMIT in the COMMAND field to generate and submit the JCL to perform your print request.
  2. Verify your JOB parameters and Sysout class. Use a hold class so that you can browse your report online.
  3. Press <Enter>. File-AID processes your print request. You can see the results of your print request online as illustrated in Figure 12-4.
Figure 12-3. PRINT - JCL Specification Screen (SUBMIT Command)
+--------------------------------------------------------------------------------+
| File-AID ---------------- PRINT - JCL Specification  --------------------------|
| COMMAND ===> SUBMIT                                                            |
|                                                                                |
| JCL Information for Batch Processing:                                          |
|                                                                                |
|  Sysout class    ===> *                                                        |
|                                                                                |
| JOB Statement Information:                                                     |
|  ===> //USERID9 JOB (0100,PMGT),'your name',CLASS=A,                           |
|  ===> //    MSGCLASS=R,NOTIFY=USERID9                                          |
|  ===>                                                                          |
|  ===>                                                                          |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
| Use JCL command to edit generated JCL                                          |
| Use SUBMIT command to submit batch job                                         |
| Use END to return to main PRINT panel without submitting job                   |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+--------------------------------------------------------------------------------+

12.5 Viewing the Report Output

Your report is printed and routed to the printer you specified in your JOB statement and sysout class. If you specified a hold queue for your sysout class (or MSGCLASS if Sysout class=*), use split screen and access your output viewing facility to examine the report.
A portion of the report is shown in Figure 12-4.
Figure 12-4. Print Data File Result (Formatted Output, Show Offset)
+--------------------------------------------------------------------------------+
| SDSF OUTPUT DISPLAY USERID9B JOB05403  DSID   103 LINE 2       COLUMNS 01- 80  |
| COMMAND INPUT ===>                                            SCROLL ===> CSR  |
| 28 MAY 1994               FILE-AID 8.0 PRINT FACILITY    12:40:29  PAGE     1  |
|                                                                                |
|                               FILE CONTENTS REPORT                             |
| File Printed                  USERID9.FASAMP.EMPLOYEE                          |
| Type                          VSAM KSDS                                        |
|                                                                                |
|                                                                                |
| RECORD:     1                                          EMPLOYEE-MASTER-FILE    |
| ---- FIELD LEVEL/NAME ------- RELATIVE ----+----1----+----2----+----3----+----4|
|                                                                                |
| 5 EMP-NUMBER                      0    00090                                   |
| 5 EMP-LAST-NAME                   5    MARTIN                                  |
| 5 EMP-FIRST-NAME                 20    EDWARD                                  |
| 5 EMP-MID-INIT                   30    M                                       |
| 5 FILLER                         31                                            |
| 5 EMP-TITLE                      33    AIRPLANE MANUFACTURER                   |
| 5 EMP-PERSONAL-INFO SYNC         63                                            |
|   10 EMP-NATL-ID-NUMBER          63    427890125                               |
|   10 FILLER                      72                                            |
|   10 EMP-DATE-OF-BIRTH           73    101954                                  |
|   10 EMP-HIRE-DATE               79    920101                                  |
|   10 EMP-MARITAL-STATUS          85    M                                       |
+--------------------------------------------------------------------------------+

More About the Print Function
  • Through the Print function, you can also print XREF members, selection criteria members (existing, not temporary), record layouts, and audit trails from edited files. See the File-AID MVS Online Reference Manual (SPF and XE) for a complete description of the features of the Print function.

12.6 Exiting the Print Function

To return to the File-AID Primary Option Menu, use PF3 (the END command).
Step:
  1. Press PF3 (END) until the File-AID Primary Option Menu is displayed.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.