Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Report Writer Speedup Tips Article
Spectrum SMF Writer - the 4GL SMF Report Writer.

Add customized reports and PC export files to your product!

Table of Contents

NOTE: you can find this and other lessons in a
more complete and viewable format (including all Figures) in our Tutorial PDF.

Lesson 3. How to Export SMF Data to PC Programs

  1. This lesson teaches you how to turn your SMF data into PC export files. It also explains how to produce two or more different outputs (reports and/or files) during a single pass of the input file. The control statements discussed are:
  2. the PC parm of the OPTIONS statement
  3. the NEWOUT statement
  4. To create a PC export file instead of a report, just add this OPTION statement near the beginning of your control statements.

OPTION: PC /* MAKE A PC FILE INSTEAD OF A REPORT */
INPUT: SMF14 /* COPY SMF 14 RECORD DEFINITIONS */
INCLUDEIF: SMF14RTY = 14 /* SELECT JUST TYPE 14 RECORDS */
COLUMNS: SMF14DTE SMF14TME SMF14JBN SMF14PGN SMF14TIOE5 SMF14_JFCBDSNM_SMF14_JFCLRECL SMF14EXCP

  1. The Figure below shows a portion of the PC file created with the above statements. It also shows the spreadsheet obtained after importing the PC file into Excel.
  2. An Excel spreadsheet containing data from SMF 14 records
     

     

     

  3. Let's examine what each statement does. The OPTION statement above tells Spectrum SMF Writer that you want to produce a comma-delimited PC file (instead of a report) in this run. Such PC files can be imported into virtually any PC spreadsheet, data base or word processing program You can use this option to turn virtually any report into a PC export file.
  4. The INPUT statement identifies the SMF record that contains the data that you want to put into your PC file.
  5. The INCLUDEIF statement tells which records from the input file to include in your PC export file.
  6. The COLUMNS statement specifies what columns of data you want in the PC spreadsheet. Here you name the individual fields from the input file that you want to populate the columns of the spreadsheet.
  7. With just these four statements, we've given Spectrum SMF Writer everything it needs to turn your selected SMF data into a PC file! That's all there is to creating custom PC files with Spectrum SMF Writer. Four simple statements let you accomplish what would otherwise have taken an entire COBOL program to do!
Making Multiple Reports/Export Files in a Single Run
  1. What if you want SMF data both as a printed report and as an export file? Spectrum SMF Writer lets you get both outputs during the same run. Producing multiple outputs in a single run lets you avoid having to read and process the large SMF file more than once. That can save lots of I/O and CPU time, an important factor when working with such large files.
  2. To produce a second (or third, etc.) output, just add a NEWOUT statement to you request.

NEWOUT:

  1. This statement should go after you have finished describing the first report that you want. Everything after the NEWOUT statement applies only to the new report (or export file).

INPUT: SMF14 /* COPY SMF 14 RECORD DEFINITIONS */
INCLUDEIF: SMF14RTY = 14 /* SELECT JUST TYPE 14 RECORDS */
COLUMNS: SMF14DTE SMF14TME SMF14JBN SMF14PGN SMF14TIOE5 SMF14_JFCBDSNM_SMF14_JFCLRECL SMF14EXCP

NEWOUT:

OPTIONS: PC /* THIS OUTPUT IS A PC FILE, NOT A REPORT */
INCLUDEIF: SMF14RTY = 14 /* SELECT JUST TYPE 14 RECORDS */
COLUMNS: SMF14DTE SMF14TME SMF14JBN SMF14PGN SMF14TIOE5 SMF14_JFCBDSNM_SMF14_JFCLRECL SMF14EXCP

  1. The above control statements would produce the report in Figure _ and the export file in Figure _ in the same run. Spectrum SMF Writer will only make a single pass through the SMF input file.
  2. Notice that we do not specify another INPUT statement after the NEWOUT statement. The same input file is always used for all of the outputs in a run.
  3. But you are free to change everything else, if you like. In this example, we used the same INCLUDEIF statement for both outputs. (We selected all type 14 records.) But the INCLUDEIF statements can be completely different, if you like. (For example, it could select a different type of SMF record.)
  4. The COLUMNS statement can also be different, and so on.
  5. When creating additional outputs in a run, your JCL will need a new DD for each additional output. In this example, you need a new SWOUT002 DD to write the PC export file to. The new DD 's are numbered sequentially after that ( SWOUT003 , etc.)
Summary
  1. Here is a summary of what we learned in this lesson:
  2. just add OPTION: PC to turn a report into a PC export file
  3. an INCLUDEIF statement is used to tell Spectrum SMF Writer which records from the input file to include in the report
  4. use a NEWOUT statement to begin describing a different report or PC file (from the same input file)
  5. The next lesson will teach you how to process SMF records that sections which occur more than once in the same record.
To Learn More
  1. You can also learn:
  2. how to make tab-delimited (rather than comma-delimited) export files
  3. how to specify the format to use for dates in the export file
  4. how to specify the quote character to be used in the export file
  5. how to write single-line (legend style) column headings at the beginning of your export file, with the HGCOLHDG option
  6. read more about using the NEWOUT statement in
  7. the complete syntax for the NEWOUT statement, in
NEXT LESSON: How to Report on Multiple Occurrences of an SMF Section

Spectrum SMF Writer - the 4GL SMF Report Writer.

Copyright 2024.
Pacific Systems Group.
All rights reserved.
Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions