ez-case plusv6.5.0/6.6.0 working with · 2019. 5. 6. · e. nhancement. s. ummary . product:...
TRANSCRIPT
-
A Pitney Bowes Company
Working With EZ-CASE Plus
Software Release 6.5.0/6.6.0
November 2006
For MVS, VSE, Linux, Unix, and Windows
-
© 2006 Group 1 Software, Inc.
All rights reserved. Group 1 Software is a registered trademark of Group 1 Software, Inc. Group 1, the Group 1 logo, The Marketing Software Company and EZ-CASE Plus are trademarks of Group 1 Software, Inc. Pitney Bowes and "Engineering the flow of communication" are trademarks of Pitney Bowes, Inc. All other marks are trademarks or registered trademarks of the respective owners.
Group 1 Software, Inc. holds a nonexclusive license to publish and sell ZIP+4® databases on optical and magnetic media.
GROUP 1 SOFTWARE, INC DOCUMENTATION DEPARTMENT STE 600 4200 PARLIAMENT PL LANHAM MD 20706-1844
CASS, CASS Certified, DPVô , eLOT, FASTforward, NCOALinkô , LACSLink, Postal Service, Post Office, POSTNET, RDIô , United States Post Office, USPSÆ, United States Postal Service, ZIP Codeô , and ZIP+4 are registered trademarks of United States Postal Service (USPSÆ). This list is not exhaustive of the trademarks belonging to the Postal Service.
Group 1 Software is a non-exclusive licensee of USPSÆ for NCOALinkô processing.
Prices for Group 1's products, options and services are not established, controlled or approved by USPSÆor United States Government. When utilizing RDIô data to determine parcel-shipping costs, the business decision on which parcel delivery company to use is not made by the USPSÆ or United States Government.
A Reflection of Our Commitment to You... The Group 1 Software Mission Statement
ì The first and foremost objective of Group 1 Software is the total, unreserved satisfaction of each Group 1 Client ó satisfaction with Group 1 products and product support, with Group 1 people and with all other facets of the Client relationship. Every other Corporate objective is subordinate to and is addressed by this one.î
DZKz660OPWWG
-
E N H A N C E M E N T S U M M A R Y
Product: EZ-CASE Plus for Open Systems
This book applies to versions 6.5.0 and 6.6.0 of EZ-CASE Plus for Open Systems. The enhancements for both are described in the sections that follow.
Version 6.6.0
The major change for this release is that the product has moved from Micro Focus to ACUCOBOL-GT. This change is reflected Chapter 2 of Working With EZ-CASE Plus, which references the product directory structure and offers script samples. Examples are provided to accommodate both versions 6.5.0 and 6.6.0.
Version 6.5.0
The major enhancements included in this release are summarized below.
EZ-CASE Plus is now enabled to work under the Dispatcher4 Workflow Console graphical user interface (GUI).
Provide the ability to perform any combination of the following functions in a single pass:
ñ Change case
ñ Add or remove punctuation
ñ Add titles
ñ Replace text from tables
ñ Standardize/format address elements
ñ Condense result data.
Minor enhancements:
ñ Pass through special characters rather than discarding them
ñ Add statistics to execution log
ñ Provide option to convert to lower case
ñ Improve handling of invalid zip code/postal code formats.
Add options for processing multinational characters:
ñ Convert multinational characters to ASCII ì equivalentsî
ñ Process (case) multinational characters using CP850/E500 codepage
Working With EZ-CASE Plus iii
-
ñ Process (case) multinational characters using ISO-8859-1 codepage.
EZ-CASE Plus has added a Firm Table. The Firm table is a user-defined table that allows you to expand, edit and override the system Base Table and Ancillary Tables.
Software Release 6.5.0/6.6.0/November 2006 iv
-
T A B L E O F C O N T E N T S
ENHANCEMENT SUMMARY Product: EZ-CASE Plus for Open Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
BEFORE YOU BEGIN
Purpose of This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Finding the Information You Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Conventions Used in This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x Terms Used in This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x If You Need More Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
The Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi eService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
To Obtain Additional User's Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Your Comments Are Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
CHAPTER 1. SAMPLE EZ-CASE PLUS JOB
Analyzing the Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 File Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Defaults for Print Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Casing and Punctuation Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Reformat Output Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 Ancillary Table Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Firm Table Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Tutorial Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 1. Defining Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 2. Specifying Casing and Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 3. Specifying Reformat Output Record Definitions . . . . . . . . . . . . . . . . . . 1-12 4. Specifying Ancillary Table Information. . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 5. Specifying Firm Table Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 6. Running the Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 7. Reading The Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
CHAPTER 2. WORKING IN DIFFERENT ENVIRONMENTS
The UNIX Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Step 1. Source bin/setup (Bourne shell) or bin/setup.csh (C-Shell) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Step 2. Modify the UNIX Shell Script(s). . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Step 3. Source the Job Shell Script(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Step 4. Submit the Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Create an Ancillary Table During EZ-CASE Plus Processing . . . . . . . . . . . . 2-9 Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . . . . . 2-9 Setting Environment for Firm Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
The Windows Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Customization Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Working With EZ-CASE Plus xiii
-
Table of Contents
Step 1. Edit/Save Job Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Step 2. Edit/Save Parameter Record Files. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 Step 3. Run a Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Create an Ancillary Table During EZ-CASE Plus Processing. . . . . . . . . . . . 2-21 Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . . . . . 2-22 Setting the Environment for the Firm Table . . . . . . . . . . . . . . . . . . . . . . . . 2-25
The MVS Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26 Create an Ancillary Table During EZ-CASE Plus Processing. . . . . . . . . . . . 2-28 Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . . . . . 2-28
The VSE Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30 Create an Ancillary Table During EZ-CASE Plus Processing. . . . . . . . . . . . 2-33 Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . . . . . 2-33
CHAPTER 3. C LANGUAGE APPLICATION PROGRAM INTERFACE (C API)
What Is C API for EZ-CASE Plus? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Parameter Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 What Is ZKPCase? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Calling ZKPCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Return Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
CHAPTER 4. CREATING ANCILLARY AND FIRM TABLES
Creating the Ancillary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Building the Ancillary Table Source File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Sample Ancillary Table Source File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Creating the Firm Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Building the Firm Table File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Sample Firm Table File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
CHAPTER 5. FREQUENTLY ASKED QUESTIONS
GLOSSARY
INDEX
Software Release 6.5.0/6.6.0/November 2006 xiv
-
B E F O R E Y O U B E G I N
This chapter discusses the purpose and use of this guide, how its conventions are presented, and how to obtain assistance from Group 1 Software, Inc.
Purpose of This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Finding the Information You Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Conventions Used in This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Terms Used in This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi If You Need More Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
The Website. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii eService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
To Obtain Additional User's Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Your Comments Are Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Working With EZ-CASE Plus xv
-
Purpose of This Guide
Welcome to the EZ-CASE Plus casing and punctuation system. This Working With EZ-CASE Plus Guide is intended to provide you with information you need to effectively use the EZ-CASE Plus System.
This guide was developed for experienced users of the EZ-CASE Plus System. The following information is included:
A step-by-step sample job description
Information on the C API
How to create Ancillary and Firm Tables
How to work with EZ-CASE Plus in different operating system environments
How to produce reports.
The other two books that make up the EZ-CASE Plus documentation suite are:
Getting Started With EZ-CASE Plus ó provides basic information about the EZ-CASE Plus System, its features, functions, and terminology, and concepts that are important to understanding its performance. This guide also provides explanations of each of the components of the EZ-CASE Plus System.
EZ-CASE Plus Reference Guide ó provide appendices for referencing parameters, calling instructions and other important and useful information.
Finding the Information You Need
The following table summarizes the chapters in this guide.
Table 1: Working With EZ-CASE Plus Overview
Chapter Topics Discussed
Chapter 1. Sample EZ-CASE Plus Job
This chapter provides an overview in analyzing an EZ-CASE Plus Job and step-by-step instructions for creating an EZ-CASE Plus Job.
Chapter 2. Working in Different Environments
This chapter gives special processing instructions for setting up your supported environment and submitting your job.
Chapter 3. C Language Application Program Interface (C API)
This chapter describes how to call the EZ-CASE Plus program module from your Windows 32-bit application using the C Language Application Program Interface (C API).
Chapter 4. Creating Ancillary and Firm Tables
This chapter describes the steps you can take to create an Ancillary Table or Firm Table.
Software Release 6.5.0/6.6.0/November 2006 xvi
-
Conventions Used in This Guide
Table 1: Working With EZ-CASE Plus Overview
Chapter 5. This chapter describes the reports automatically generated by the EZ-CASE Plus system when you The EZ-CASE Plus Reports execute a job and it runs to completion.
Glossary Provides definitions for terms used in this guide.
Index Provides access to the subjects covered in this guide.
Conventions Used in This Guide
This guide uses the following typefaces and symbols for presentation purposes:
Bold Indicates a button, check box, field, folder, keyboard key, list box,
path, radio button, text box, toolbar, or user input.
Italic Indicates a book name, dialog box, menu, or window.
Script Indicates system information, such as scripts or screen data.
ì Quotedî Indicates one of the following (1) text that appears on a screen,
window, text, or dialog box, such as a message or list box option or
(2) text that you are to type (you do not type the quotation marks).
NOTE: Indicates important information or warnings.
1 Indicates numbered steps in a process.
.. Indicates spaces (blanks) in parameter record images or example data.
This column is used for references to other sections or Throughout this manual, the term ì Windowsî refers to either Microsoft Windows NT or chapters containing Windows 2000 operating systems unless otherwise specified. related information.
Working With EZ-CASE Plus xvii
-
Terms Used in This Guide
The following are important terms used frequently in this guide.
Argument ó Name-and-address data or any other word, character string, or word string that is either passed to EZ-CASE Plus for processing or returned by EZ-CASE Plus as a result of processing. Arguments are passed to EZ-CASE Plus as segments (fields) of an input record and are defined according to the type of data they contain: either name information, street address information, city/state information, job title information, or other information.
Data Element ó A single element of an argument (for example, the professional suffix of a name argument).
Multi-component ó Referring to an argument that contains more than one data element, where each element is separated by at least one space.
Software Release 6.5.0/6.6.0/November 2006 xviii
-
If You Need More Help
If You Need More Help
If you are unable to resolve a problem, a Group 1 Technical Support Representative can help guide you to a solution. When you call Group 1 Technical Support, please have the following information ready:
A description of the task you were performing
The resulting reports (specifically, the Execution Log and Parameter Record Listing).
Reporting complete details to Technical Support will help you and the technical support representative quickly resolve the problem.
Group 1 Software technical support representatives work closely with you so that:
Your questions on using EZ-CASE Plus are answered quickly
Any problems you may encounter while using the EZ-CASE Plus System are resolved.
The Technical Support Hotline number for customers in the United States and Canada is 800-367-6950.
The Website
You can also find out about Group 1 products and services through the Group 1 Software website at http://www.g1.com. Registered users can obtain electronic copies of product documentation, join online discussion forums, download software and databases, find out about our training classes, or sign up for Group 1ís List Services. From the home page, click Support and log in to the Customer Support area.
NOTE: Registered users are those who have a maintenance agreement with Group 1 Software. Contact Technical Support to obtain your user ID and password.
eService
eService, available through the Group 1 website, provides supported Group 1 Customers with direct access to Service Requests and the Group 1 Solutions Knowledge Base. You can search for your own Service Requests, search the Group 1 Knowledge Base, and access a variety of other Technical Support services. You must be a registered user, with an ID and password, to access eService.
Working With EZ-CASE Plus xix
http:http://www.g1.com
-
Education
Group 1 Software offers comprehensive training courses on all of its products, allowing you to maximize the usability of your software.
Group 1 offers access to its courses in three ways: public seminars, eLearning, and on-site training. You can choose the option that best fits your needs.
For information about public seminars or eLearning classes, visit our website at www.g1.com/Education.
For information about on-site training, contact the Group 1 Education Manager at (301) 918-6392.
Software Release 6.5.0/6.6.0/November 2006 xx
www.g1.com/Education
-
To Obtain Additional User's Guides
To Obtain Additional User's Guides
To obtain electronic copies of our product manuals, go to the Group 1 website at www.g1.com and click on Customer Login in the upper right corner. Log in with your User ID and password. On the left side of the window under ì Technical Servicesî click on Documentation to download copies (.pdf files) of available user guides.
NOTE: To view.pdf files, you must have Adobe Acrobat Reader version 5.0 (or later) installed on your PC. If you do not have Acrobat Reader, you can download it for free from http://www.adobe.com.
Your Comments Are Welcome
We appreciate and welcome your comments concerning this guide! If you have suggestions, please let us know. For your convenience, a Documentation Comment Form is available online at http://www.g1.com/Support/Forms/.
You can also send your comments via snail mail to:
Group 1 Software Inc. Attn.: Documentation Manager 4200 Parliament Pl Ste 600 Lanham MD 20706-1844
Your product enhancement suggestions are also appreciated and encouraged. With your help and suggestions, we can continue to provide quality software. The System Enhancement Form is available at the web address provided above.
Thank you.
Working With EZ-CASE Plus xxi
http://www.g1.comhttp://www.g1.com/Support/Formshttp:http://www.adobe.com
-
Software Release 6.5.0/6.6.0/November 2006 xxii
-
C H A P T E R 1
Sample EZ-CASE Plus Job
This chapter provides an overview in analyzing an EZ-CASE Plus Job and step-by-step instructions for creating an EZ-CASE Plus Job.
Analyzing the Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 File Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Defaults for Print Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Casing and Punctuation Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Input and Processing Requirements. . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Output Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Reformat Output Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 Ancillary Table Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Firm Table Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Tutorial Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 1. Defining Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Filling the Fields: FILEDF Parameter Record . . . . . . . . . . . . . . . . . 1-8 2. Specifying Casing and Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Filling the Fields ó ARGDEF Parameter Record . . . . . . . . . . . . . . 1-9 Filling the Fields ó ARGOUT Parameter Record . . . . . . . . . . . . 1-11
3. Specifying Reformat Output Record Definitions . . . . . . . . . . . . . . . 1-12 4. Specifying Ancillary Table Information . . . . . . . . . . . . . . . . . . . . . . 1-13
Filling the Fields ó ANCSRC Parameter Record . . . . . . . . . . . . . 1-13 Creating the Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Selecting the Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
5. Specifying Firm Table Information . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 Creating the Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 Selecting the Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
6. Running the Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 7. Reading The Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
The Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17 The Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Working With EZ-CASE Plus 1-1
-
1 Sample EZ-CASE Plus Job
Analyzing the Job
In this chapter we are going to create an example job that uses the EZ-CASE Plus functions to case, punctuate, and add titles to name-and-address data before it is formatted for labels. Before we begin defining the job, we will analyze the job requirements and the input data. The following sections describe our requirements for each area of the EZ-CASE Plus system.
File Definitions
Defaults for print output requirements
Reformatting input record requirements
Casing and punctuation definition requirements
Reformatting output record requirements
Ancillary Table selection requirements
Firm Table Selection requirements.
File Definitions
EZ-CASE Plus has two files, ZKCPNAM (input) and ZKCPOUT (output), that will be used for your input and output files, regardless of their dataset names. Before proceeding further, you should consult Appendix B, pages B-12 to B-17, of this guide for in-depth information on file definitions.
Figure 1-1 represents the complete sample input file we are using for this job:
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+.. RICHARD BELDING PHD PRESIDENT ABRAMS INSTRUMENT CORPORATIO MICHAEL RYAN TEST SPECIALIST GROUP1 ED MCGOVERN AT&T PO BOX 31111 DAVE STEIN PRESIDENT PRIME ENTERPRISES S W PAI GENERAL MANAGER REN ELECTRONICS CORP JAMES BRIGHT MANAGER MKTG PROGRAMS GENERAL ELECTRIC MICHAEL M MODAN JR MANAGER-PATENT STRATEGY & LICSGENERAL ELECTRIC COMPANY HAL L KRAMER MGR OF ADVANCED ENGINEERING GENERAL ELECTRIC CO JAMES HASHEM PRESIDENT DIAGNOSTIC INSTRUMENT CORP ROD HODGMAN ALCORN DESIGN SYSTEMS EDWARD R ELLIS NATIONAL SALES MANAGER MOD TAP
Figure 1-1: Sample Input File
Software Release 6.5.0/6.6.0/November 2006 1-2
-
Analyzing the Job 1
The following is the layout of the input file:
Table 1-1: Sample Input File Layout
Position Data Element
1-30 Name
31-60 Job Title
61-90 Firm Name
91-138 City/State/ZIP
139 Ancillary Table Code
140 Filler
This input file contains four data types over the six fields outlined above. They are:
Name-type data
Job title data
Firm name data
City-type data (including city name, state or province abbreviation, and ZIP or Postal Code).
Defaults for Print Output
When running a job, EZ-CASE Plus automatically creates two reports, the Execution Log and the Parameter Record Listing, both discussed in more detail later in this guide.
Casing and Punctuation Definition
In this component we must define each argument, including its location in the input record, its data type, and each function we want to perform. Additionally, we must define where to store the result arguments in the output record. Name data requires you to specify an Ancillary Table match.
Working With EZ-CASE Plus 1-3
-
1 Sample EZ-CASE Plus Job
Input and Processing Requirements
The input and processing requirements for each argument are as follows:
Table 1-2: Sample Input Requirements
Argument 1 Argument 2 Argument 3 Argument 4
Position 1 31 61 91
Length 30 30 30 48
Data Type Name Job Title Firm Name City (including
State and ZIP)
Casing Yes Yes Yes Yes
Punctuation Yes Yes Yes Yes
Titling Yes N/A N/A N/A
Address Standardization
N/A N/A N/A N/A
Ancillary Match Y N N N
Output Requirements
We want to store output arguments and return codes, as follows:
Table 1-3: Sample Output Requirements (Part 1 of 2)
Data Type Position Length
Argument #1
Name
Result Length Location
(RC) for Argument storage
141
291
295
30
3
1
Argument #2
Job Title
Result Length Location
(RC) for Argument storage
171
297
301
30
3
1
Software Release 6.5.0/6.6.0/November 2006 1-4
-
1 Analyzing the Job
Table 1-3: Sample Output Requirements (Part 2 of 2)
Data Type Position Length
Argument #3
Firm
Result Length Location
(RC) for Argument storage
201
303
307
30
3
1
Argument #4
City/State/ZIP
Result Length Location
(RC) for Argument storage
(RC) for zip verification
231
309
313
315
60
3
1
1
Reformat Output Record
Before EZ-CASE Plus writes the record to the output file, we will move spaces to the positions where argument data or return codes will not be written. Moving spaces to these positions will ensure us that those fields are blank and do not contain any unwanted data in our output record.
Table 1-4: Reformatting Output Records
Output Data Target Field Length
Space 294 1
Space 296 1
Space 300 1
Space 302 1
Space 306 1
Space 308 1
Space 312 1
Space 314 1
Working With EZ-CASE Plus 1-5
-
1 Sample EZ-CASE Plus Job
Ancillary Table Definition
In our sample job, we will create an Ancillary Table that will change the maturity suffix Jr on our input file to Junior. The table is called Sample.AND (located in the products Data subdirectory) and contains the following search and result arguments:
Table 1-5: Table Definition
Search Argument Result Argument
JR Junior
We also want to indicate that this entry applies to name-type data arguments ONLY.
NOTE: Ancillary Table search arguments must be entered into the table in upper case characters.
Firm Table Definition
Our sample job will also contain a Firm Table. We will create a Firm Table that will change the company name GROUP1 to Group 1 Software. The table is called Sample.Frm and will contain the following search and result argument:
Table 1-6: Firm Table Search and Result Arguments
Search Argument Result Argument
GROUP1 Group 1 Software
NOTE: The Firm Table search argument must be entered on the table exactly the way it appears on the input record.
Software Release 6.5.0/6.6.0/November 2006 1-6
-
Tutorial Steps 1
Tutorial Steps
In this tutorial, we illustrate in detail the tasks listed below. In each of the task explanations you will be directed to the parameter record (all listed in Appendix A of the EZ-CASE Plus Reference Guide) that applies to each of these specific tasks:
1 Defining files.
2 Specifying casing and punctuation definitions.
3 Specifying reformat output record definitions.
4 Specifying Ancillary Table selection definitions.
5 Specifying Firm Table definitions.
6 Running the job.
7 Reading the output.
1. Defining Files
You will need to look at the FILEDF parameter record in Appendix A of the EZ-CASE Plus Reference Guide. The FILEDF parameter record identifies your input and output file specifications, as well as any input or output exit routines you chose to include with this job. On this parameter record you will provide EZ-CASE Plus with the following information:
Name of the file
Record format (fixed length, variable length or line sequential)
Record length (up to 32,768)
Block size
Device type
Label type
Exit routine
Number of records to skip before beginning processing
Cross-sectional sampling
Maximum number of records to process.
Working With EZ-CASE Plus 1-7
-
1 Sample EZ-CASE Plus Job
Filling the Fields: FILEDF Parameter Record
The following table illustrates how you will fill in the FILEDF fields for our tutorial example.
Table 1-7: FILEDF Parameter Record
Type This Information: To define the following:
FILEDF in positions 1 through 6 KEYWORD Defining the files and record structure you want EZ-CASE Plus to use.
ZKCPNAM in positions 8 through 15 FILE NAME Name of the input file.
ZKCPOUT in positions 8 through 15 FILE NAME Name of the output file.
L in position 17 RECORD FORMAT Code indicating that the records in the file is Line Sequential.
315 in positions 19 through 22 RECORD LENGTH The length in bytes of the record in the file.
315 in positions 24 through 28 BLOCK SIZE The size in bytes of the blocks in the file.
You will need to fill in the following fields according to your own site and preferences. Refer to Appendix A of the EZ-CASE Plus Reference Guide for more in-depth information.
30-33 DEVICE TYPE The type of device on which this file resides.
34 TAPE REEL HANDLING Code indicating how to handle tape reels.
35 LABEL TYPE Code indicating whether the records on the file have standard or omitted labels.
39-46 EXIT ROUTINE NAMES Name of the input or output exit routine that is called when EZ-CASE Plus is ready to send a record from this file. Optional.
50-56 NUMBER OF RECORDS TO SKIP Number of records EZ-CASE Plus should skip before selecting the first record. Optional.
58-64 CROSS-SECTIONAL SAMPLING Number indicating the portion of records in the file that should be processed. EZ-CASE Plus assumes a decimal point before the first digit. Optional.
66-72 MAXIMUM NUMBER OF RECORDS Maximum number of records EZ-CASE Plus should read from or write to this file. Optional.
Software Release 6.5.0/6.6.0/November 2006 1-8
-
Tutorial Steps 1
2. Specifying Casing and Punctuation
Our second task is to define the locations of the input arguments in the reformatted input record, to specify the functions EZ-CASE Plus is to perform on each argument, and to indicate the storage location for each argument on the output record.
EZ-CASE Plus uses two parameter records for this task, ARGDEF , and ARGOUT. Refer to Appendix A in the EZ-CASE Plus Reference Guide for more information about these parameters.
Filling the Fields ó ARGDEF Parameter Record
ARGDEF defines arguments in your input record to be passed to EZ-CASE Plus for processing. For each argument defined, an ARGDEF parameter record is created to indicate:
Data type.
Location in the input record.
Length of argument.
Processing to be performed on the argument ó casing, punctuation, titling, Ancillary Table matching, address standardization and multinational characters.
This parameter record also contains special instructions for handling city type argument data.
Code indicating whether to expand all state/province abbreviations
Code indicating whether to extract country names
Code indicating that the input argument is the city name only
Code indicating the disposition for the returned state/province
In our sample records, we want all arguments fully cased and punctuated and name arguments to be given titles whenever possible. ARGDEF and ARGOUT allow us to give EZ-CASE Plus these instructions.
These records will be matched against an Ancillary Table and Firm Table (to be created later) to convert irregular arguments that are not defined in the base table.
Working With EZ-CASE Plus 1-9
-
1 Sample EZ-CASE Plus Job
The following table illustrates how you will fill in the ARGDEF fields for our tutorial example. The table illustrates the data type NAME only.
Table 1-8: ARGDEF Parameter Record (Part 1 of 2)
Type This Information: To Define the Following:
ARGDEF in positions 1 through 6 KEYWORD Defining arguments in your input record to be passed to EZ-CASE Plus for processing.
1 in position 8 SEQUENCE NUMBER Uniquely identifies the ARGDEF parameter record in a series of argument definitions. Can be a number from 1 to 9.
N in position 10 ARGUMENT DATA TYPE Specifies the type of input argument data this ARGDEF parameter record represents. In this case N is for NAME type data.
1 in positions 12 through 14 INPUT FILE ARGUMENT DATA POSITION Location of input argument in the input file.
30 in positions 16 through 17 INPUT FILE ARGUMENT DATA LENGTH Input argument length.
M in position 19 ATTEMPT CASING? Indicates that EZ-CASE Plus is to perform its mixed casing function.
Y in position 21 ATTEMPT PUNCTUATION? Indicates that EZ-CASE Plus is to perform its punctuation functions.
Y in position 23 ATTEMPT TITLING? Indicates that EZ-CASE Plus is to perform titling on untitled names for which gender can be determined.
Y in position 25 ANCILLARY MATCH? Specifies that you wish to use the Ancillary Table for table look-ups.
N in position 27 ADDRESS STANDARDIZATION Indicates that EZ-CASE Plus will not perform address standardization such as PO Box and Rural Route.
N in position 29 MULTINATIONAL CHARACTERS Indicates that EZ-CASE Plus will not perform multinational character processing.
The following fields are used for City Data ONLY type arguments and are included here for your convenience. In this example, we are displaying NAME Data type arguments. so you will not need the fields for this example.
50 RETURN EXPANDED STATE NAMES? Indicates whether EZ-CASE Plus should return the expanded state name from the state abbreviation (Y or N).
52 RETURN EXTRACTED COUNTRY NAMES? Indicates whether EZ-CASE Plus should return the extracted country name from the input argument data (Y or N).
Software Release 6.5.0/6.6.0/November 2006 1-10
-
Tutorial Steps 1
Table 1-8: ARGDEF Parameter Record (Part 2 of 2)
Type This Information: To Define the Following:
54 INPUT IS CITY NAME ONLY Specifies whether to return a city name only (Y or N).
56 DISPOSITION FOR RETURNED STATE Indicates the disposition for the returned state or province, as follows:
S Return the state extracted from the input only. If the extracted state is blank, return blanks.
B Return the extracted state if present in the input. If the extracted state is blank, return the state from the extracted ZIP Code.
Z Return the state from the extracted ZIP Code only, regardless of the extracted state.
Filling the Fields ó ARGOUT Parameter Record
The ARGOUT parameter record indicates storage locations on an output file for the following:
Output argument data,
Output argument length,
General return code, and
ZIP Verification return code.
This parameter record specifies output control information, such as the maximum allowable length for an output argument and the disposition indicator for output argument data that does not fit within the specified length.
The following table illustrates how you will fill in the ARGOUT fields for our tutorial example. The table illustrates the data type NAME only.
Table 1-9: ARGOUT Parameter Record (Part 1 of 2)
Type This Information: To Define the Following:
ARGOUT in positions 1 through 6 KEYWORD Defining storage locations in an output file.
1 in position 8 SEQUENCE NUMBER Uniquely identifies the ARGOUT parameter record in a series of argument definitions. Can be a number from 1 to 9.
141 in positions 10 through 12 OUTPUT RESULT DATA POSITION Location in the output file where the output argument will be stored.
30 in positions 14 through 15 OUTPUT RESULT DATA LENGTH Specifies a maximum allowable result length.
Working With EZ-CASE Plus 1-11
-
1 Sample EZ-CASE Plus Job
Table 1-9: ARGOUT Parameter Record (Part 2 of 2)
Type This Information: To Define the Following:
291 in positions 17 through 19 RESULT LENGTH LOCATION Location in the output file where the output argument's three-byte length will be stored.
295 in positions 21 through 23 RETURN CODE FOR OUTPUT ARGUMENT STORAGE Location in the output file where the one-byte general Return Code will be stored.
blank in positions 25 through 27 ZIP VERIFICATION RETURN CODE Location in the output file where the one-byte ZIP Verification Return Code will be stored.
T in position 70 DISPOSITION FOR OUTPUT GREATER THAN LENGTH SPECIFIED Specifies what should be stored in the Output Argument Data location if the output argument length exceeds the maximum allowable length. It can be one of the following codes:
B Store blanks in the output argument location (DEFAULT).
T Store output argument data, truncated from the right.
X Do not store anything.
3. Specifying Reformat Output Record Definitions
The MOVEO parameter is used to rearrange the pieces of the output record after the record is processed and before it is written to the output file. In this sample we have written spaces to fields in the output record that may contain unwanted data from the input record.
Table 1-10: ARGOUT Parameter Record
Type This Information: To Define the Following:
MOVEO in positions 1-6 KEYWORD Defining pieces of the output record you want to define before the record is written.
SPC in positions 8-10 SOURCE FIELD Location in the work area of the information to be copied to the target field. In this case a space.
01 in positions 12-13 LENGTH Length of the information to be copied.
294 in positions 5-17 TARGET FIELD location in the output in which you want source information copied.
NOTE: You can repeat this for fields 296, 300, 302, 306, 308, 312, and 314.
Software Release 6.5.0/6.6.0/November 2006 1-12
-
Tutorial Steps 1
4. Specifying Ancillary Table Information
Ancillary Tables are created to specify case and punctuation definitions that may not exist in the Base Table. Two parameter records are used for this task, ANCDTA and ANCSRC (See Appendix A of the EZ-CASE Plus Reference Guide, ì Parameter Record Referencesî ).
ANCDTA tells EZ-CASE Plus to store the data converted from the Ancillary Table to be used for processing input argument data. The parameter record file has only one field, the KEYWORD field, which is always ANCDTA.
The ANCSRC parameter record identifies the Ancillary Table source file.
Filling the Fields ó ANCSRC Parameter Record
The following table illustrates how you will fill in the ANCSRC fields for our tutorial example.
Table 1-11: ANCSRC Parameter Record
Type This Information: To Define the Following:
ANCSRC in positions 1 through 6 KEYWORD Identifies the Ancillary Table source file.
S in position 8 CREATE ANCILLARY TABLE Code indicating whether EZ-CASE Plus should use the Ancillary Table source file specified below to create an Ancillary Table data file defined by the ANCDTA parameter record. It will be one of the following:
S Attempt to create an Ancillary Table from the specified source file.
P Do not attempt to create an Ancillary Table from source.
“Blank” in positions 10-12 Ancillary Table Code
In our sample job, we will create the following Ancillary Table:
Table 1-12: Table Definition
Search Argument Result Argument
JR Junior
For the following entry, we also indicate that the data is NAME-type argument data only. This task is broken down into two subtasks: creating the Table and selecting the Table.
Working With EZ-CASE Plus 1-13
-
1 Sample EZ-CASE Plus Job
Creating the Table
The Ancillary Table sample file is called Sample.AND and is located in the products Data subdirectory. You may also create the Ancillary Table by running the Ancillary Table creation job. See Chapter 2 on how to run the table creation job specific to your platform environment.
To create an Ancillary Table, use the editor of your choice to make a file that looks like the following:
** ANCLDATA — EZ-CASE CASING AND PUNCTUATION ANCILLARY FILE * * ENTRY FORMAT: * 01-20: SEARCH ARGUMENT (WHICH MIGHT MATCH A LOOKUP ARGUMENT) * 22-23: SEARCH ARGUMENT LENGTH (ACTUAL LENGTH) * 25-52: RESULT ARGUMENT (INCLUDING ANY NECESSARY PUNCTUATION) * 54-55: RESULT ARGUMENT LENGTH (INCLUDING TRAILING SPACE) * 57-57: DATA USAGE TYPE, AS FOLLOWS: * C - CITY, STATE, ZIP * J - JOB TITLE * N - NAME/FIRM NAME * S - STREET ADDRESS * BLANK - AMBIGUOUS (APPLIES TO ANY MATCH) * * NOTE: 'N' DATA USAGE TYPE IS GOOD FOR NAME (N) AND FIRM NAME (F) * * ENTRIES WHICH START WITH AN ASTERISK (*) WILL BE IGNORED. * NON-* ENTRIES MUST NOT USE LOWER-CASE FOR THE INPUT ARGUMENT * NON-* ENTRIES MAY HAVE UP TO 5 PUNCTUATIONS IN THE RESULT ARGUMENT * MULTIPLE NON-* ENTRIES, DISTINGUISHED BY DATA TYPE, ARE ACCEPTED * * NON-* ENTRIES MUST BE ARRANGED IN ALPHABETICAL ORDER BY SEARCH * ARGUMENT (1-20) AND DATA TYPE (57-57) * * THE FOLLOWING “model” ENTRIES ILLUSTRATE THE WAY THE FIELDS ARE USED * (REFER TO LAY-OUT ABOVE): * *....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
Input Argument *nn*Result Argument *nn*t JR *02 Junior *07*N
Figure 1-2: Sample Ancillary Table
Selecting the Table
Even though you have created a table, no table will be used in a job unless you select the table and execute the ZKPRUN script to process the job in batch mode. You may also create the Ancillary Table by running the Ancillary Table creation job outside of EZ-Case processing. See Chapter 2 on how to run the Ancillary creation job specific to your platform environment.
The following steps will select the Ancillary Table during EZ-Case Plus processing:
1 Define the following variables in your job setup files.
DD_ANCFILE
DD_INTABLE
DD_OUTABLE
Software Release 6.5.0/6.6.0/November 2006 1-14
-
1 Tutorial Steps
The path of the INTABLE statement must point to the location of your Ancillary Table file (Sample.AND).
2 Put ANCDTA and ANCSRC in your parameter file. Position 8 of the ANCSRC parameter must be an S to create the table during processing.
5. Specifying Firm Table Information
Firm Tables are created to specify casing and punctuation definitions for company names that may not exist in the Base Table or could not be modified in the Ancillary Tables.
NOTE: There are no parameters needed to select the Firm Table. The Firm Table will also be processed before the Ancillary Table.
In our sample job we will create the following Firm Table.
Table 1-13: Firm Table Arguments
Search Argument Result Argument
GROUP1 Group 1 Software
Creating the Table
To create a Firm Table, use the editor of your choice to make a file that looks like the following. A Sample Firm Table file is located in your products Data subdirectory. The file is called Sample.FRM.
** EZ-CASE PLUS SAMPLE FIRM TABLE * * ENTRY FORMAT: * 001-100: SEARCH ARGUMENT (ENTRY MUST BE IDENTICAL TO INPUT RECORD) * 101-200: RESULT ARGUMENT ** GROUP1 Group 1 Software
Figure 1-3: Sample.FRM File
Selecting the Table
Even though you have created the Table, the table will not be used unless you define the variable (DD_ ZKPFTBL) in your setup files. You must point the path to the location of
Working With EZ-CASE Plus 1-15
-
1 Sample EZ-CASE Plus Job
your Firm Table. See Chapter 2 on how to set the variables for your specific platform environment.
6. Running the Job
You have now completed setting up your EZ-CASE Plus job. See Chapter 2 on how to run the job for your specific platform environment.
7. Reading The Output
Our final task is to read the output. We will look at our output file and all of the reports that were printed.
The Output File
Look at the file SAMPLE.OUT, shown below. This is the output file. The complete output file should look as follows:
Mr. Richard Belding, Ph.D. President Abrams Instrument Corporation Mr. Michael Ryan Test Specialist Group 1 SoftwareMr. Ed McGovern AT&T Mr. Dave Stein President Prime EnterprisesS. W. Pai General Manager Ren Electronics Corp.Mr. James Bright Manager, Mktg. Programs General Electric Mr. Michael M. Modan, Junior Manager Patent Strategy & Lics General Electric CompanyMr. Hal L. Kramer Mgr. of Advanced Engineering General Electric Co. Mr. James Hashem President Diagnostic Instrument Corp.Mr. Rod Hodgman Alcorn Design SystemsMr. Edward R. Ellis National Sales Manager Mod Tap
Figure 1-4: Sample Output File
NOTE: NOTE: The input file information appears at the beginning of the output file.
The Reports
EZ-CASE Plus automatically generates two reports for each job submitted: a Parameter Listing and an Execution Log.
The Parameter Record Listing shows all of the parameter images that were generated for that particular job. Parameters are listed by their six-byte parameter ID in the order in which they were executed. A comprehensive reference for all positions on each of the parameters
Software Release 6.5.0/6.6.0/November 2006 1-16
-
1 Tutorial Steps
that EZ-CASE Plus generates can be found in Appendix A of the EZ-CASE Plus Reference Guide.
Look at your Parameter Record Listing Report, as shown below.
ZKCP00 EZ-CASE PLUS VERSION 6.5 EZ-CASE PLUS PROCESSING REPORT PARAMETER RECORDS LISTING 1
...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 FILEDF ZKXXPXT F 0080 00800 FILEDF ZKCPNAM L 0140 00140 FILEDF ZKCPOUT L 0315 00315 MOVE O SPC 01 294 MOVE O SPC 01 296 MOVE O SPC 01 300 MOVE O SPC 01 302 MOVE O SPC 01 306 MOVE O SPC 01 308 MOVE O SPC 01 312 MOVE O SPC 01 314 CONTRL *---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 ARGDEF 1 N 001 30 M Y Y Y N N ARGOUT 1 141 30 291 295 T ARGDEF 2 J 031 30 M Y N N N N ARGOUT 2 171 30 297 301 T ARGDEF 3 F 061 30 M Y N N N N ARGOUT 3 201 30 303 307 T ARGDEF 4 C 091 48 M Y N N N N Y B ARGOUT 4 231 60 309 313 315 T ANCSRC S 139 ANCDTA *---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 **** PARAMETER RECORDS FROM FILE ZKCPPXT HEADER OPEN SYSTEMS ZKP
...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
ZKCP00 EZ-CASE PLUS VERSION 6.5 EZ-CASE PLUS PROCESSING REPORT PARAMETER RECORDS LISTING 1
Figure 1-5: Parameter Record Listing Report
The Execution Log shows the steps EZ-CASE Plus took to execute the job, including compilation information and the total number of records read from the input file (ZKCPNAM) and written to the output file (ZKCPOUT).
Footer text for both reports is determined from your specifications through the Defaults for Print Output component of EZ-CASE Plus. The system headers ì EZ-CASE Plus Casing and Punctuation Systemî and ì Execution Logî are automatically generated and cannot be suppressed.
Working With EZ-CASE Plus 1-17
http:5...10...15...20...25...30...35...40...45...50...55...60...65...70...75http:5...10...15...20...25...30...35...40...45...50...55...60...65...70...75
-
1 Sample EZ-CASE Plus Job
Look at your Execution Log as shown below.
ZKCP00 EZ-CASE PLUS VERSION 6.5 EZ-CASE PLUS PROCESSING REPORT
0030522 123101ZKCP00IEZ-CASE PLUS VERSION 6.5 20030522 123101ZKCP00ICOPYRIGHT 1990-2003 GROUP1 SOFTWARE, INC. ALL RIGHTS RESERVED. 20030522 123101ZKCP00IZKCP00-STARTED. GEN 2003/05/07 11:16:49. COMPILED 05/07/2003 15:30:29. 20030522 123101ZKCPVP00IZKCPVP00 STARTED. GEN 2003/05/07 11:20:08. COMPILED 05/07/2003 15:30:30. 20030522 123101ZKCPVP00IZKCPVP00 ENDED. 20030522 123105ZKCP00IEOF REACHED FILE ZKCPNAM. 20030522 123106ZKCP00IRECORDS READ, FILE ZKCPNAM : 10000 20030522 123106ZKCP00IRECORDS WRITTEN, FILE ZKCPOUT : 10000 20030522 123106ZKCP00IZKCP00 ENDED. GEN 2003/05/07 11:16:49. COMPILED 05/07/2003 15:30:29.
ZKCP00 EZ-CASE PLUS VERSION 6.5 EZ-CASE PLUS PROCESSING REPORT
Figure 1-6: Execution Log Report
Software Release 6.5.0/6.6.0/November 2006 1-18
-
C H A P T E R 2
Working in Different Environments
This chapter provides instructions for setting up your supported environment and submitting your job. These instructions show how to submit the tutorial job in Chapter 1.
The UNIX Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Step 1. Source bin/setup (Bourne shell) or bin/setup.csh (C-Shell) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Step 2. Modify the UNIX Shell Script(s) . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Bourne Job Script for Program ZKCP00. . . . . . . . . . . . . . . . . . . . . 2-4 C-shell Script for Program ZKCP00 . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Step 3. Source the Job Shell Script(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Step 4. Submit the Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
The runzkp Script for ZKCP00. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 The runzkanc Script for ZKCP00 . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Create an Ancillary Table During EZ-CASE Plus Processing . . . . . . . . . 2-9 Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . . 2-9 Setting Environment for Firm Table . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
The Windows Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Customization Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Step 1. Edit/Save Job Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Important Job File Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Creating a New Job File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Editing a Job File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Step 2. Edit/Save Parameter Record Files . . . . . . . . . . . . . . . . . . . . . . . 2-15 Creating a New Parameter Record File . . . . . . . . . . . . . . . . . . . . . 2-15 Editing a Parameter Record File . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Step 3. Run a Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Running an EZ-CASE Plus Job. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Create an Ancillary Table During EZ-CASE Plus Processing . . . . . . . . 2-21 Ancillary Table 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 Ancillary Table 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . 2-22 The Run Create Ancillary Table Job Icon Program . . . . . . . . . . . . 2-23
Setting the Environment for the Firm Table . . . . . . . . . . . . . . . . . . . . 2-25 The MVS Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Create an Ancillary Table During EZ-CASE Plus Processing . . . . . . . . 2-28 Ancillary Table 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28 Ancillary Table 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . 2-28
Working With EZ-CASE Plus 2-1
-
2 Working in Different Environments
The VSE Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30 Create an Ancillary Table During EZ-CASE Plus Processing . . . . . . . . 2-33
Ancillary Table 1:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33 Ancillary Table 2:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33
Create an Ancillary Table External to EZ-CASE Plus Processing . . . . . 2-33
Software Release 6.5.0/6.6.0/November 2006 2-2
-
2 The UNIX Environment
The UNIX Environment
With the UNIX environment, we show you how to source the appropriate files, modify job scripts, and submit your job with the appropriate command. Note that all the scripts we show are on your installation tape and are provided in both a Bourne or C-shell format, if necessary.
1 Source the bin/setup (Bourne shell) or bin/setup.csh (C-Shell).
2 Modify the job name, file names, and directories in the appropriate UNIX job shell script.
3 Source your job shell script(s).
4 Submit your job.
The following sections show you how to perform these tasks.
Step 1. Source bin/setup (Bourne shell) or bin/setup.csh (C-Shell)
Each time you establish a new environment by either logging in or exiting the shell in which the source command was issued or executing another Group 1 product, you must source the EZ-CASE Plus bin/setup file. This ensures that all subshells you create have the EZ-CASE Plus variables defined. Note that there are two bin/setup files: one for the Bourne type shells and one for C-Shell. One of these files would have been modified at installation time. Type the appropriate command below:
. bin/setup (for Bourne type shells)
source bin/setup.csh (for C-Shell)
Step 2. Modify the UNIX Shell Script(s)
The next step is to modify the Bourne or C-shell job scripts so that the scripts conform to the job name, file names, and directories to be used in your job. There is a Bourne and a C-shell script; each sets up external variables for program ZKCP00, which performs casing and punctuation operations.
The Bourne and C-shell scripts we show are on your installation tape. You can modify them accordingly to submit the tutorial job presented in Chapter 1 or copy and modify them for other jobs. Italicized text represents information (external variables) you may need to modify to conform to your job. If you use the default name, sample.zkpnam, you should not have to make any changes.
Working With EZ-CASE Plus 2-3
-
2 Working in Different Environments
Bourne Job Script for Program ZKCP00
(SAMPLE Bourne shell script for sample job)
#This file is sourced to setup the environment #for processing the sample run configuration of #the Group 1 software product, EZ-CASE Plus. # #It assumes that the setup shell source file has
#been customized and sourced already.
#
# NOTE: This file is for use with Bourne type shells.
#If using C-shell, source the bin/samplec file
#instead.
G1JOB="sample"
# The following two files are used by the ZKCRTANC program to create a new
# casing argument file with ancillary arguments included, so that it does
# not have to be done every time EZ-Case Plus is executed.
DD_INTABLE="$G1ZKP/data/$G1JOB.ancdata"# Default ancillary argument file
DD_OUTABLE="$G1ZKP/data/$G1JOB.ancfile"# Default combined argument file
DD_ANCFILE="$G1ZKP/data/$G1JOB.ancfile"
DD_PRNTRPT="$G1ZKP/data/$G1JOB.prntrpt"
DD_PRNTXLG="$G1ZKP/data/$G1JOB.prntxlg"
DD_ZKCPNAM="$G1ZKP/data/$G1JOB.zkcpnam"
DD_ZKCPOUT="$G1ZKP/data/$G1JOB.zkcpout"
DD_ZKCPPRM="$G1ZKP/data/$G1JOB.zkcpprm"
DD_ZKG1PXT="$G1ZKP/data/$G1JOB.zkg1pxt"
Figure 2-1: SAMPLE Bourne Shell Script
Software Release 6.5.0/6.6.0/November 2006 2-4
-
2 The UNIX Environment
C-shell Script for Program ZKCP00
(SAMPLEC shell Script)
#This file is sourced to setup the environment
#for processing the sample run configuration of
#the Group 1 software product, EZ-CASE Plus.
#
#It assumes that the setup shell source file has
#been customized and sourced already.
#
# NOTE: This file is for use with the C-shell. If using
#Bourne type shells, source the bin/sample file
#instead.
setenv G1JOB 'sample'
# The following two files are used by the ZKCRTANC program to create a new
# casing argument file with ancillary arguments included, so that it does
# not have to be done every time EZ-Case Plus is executed.
DD_INTABLE="$G1ZKP/data/$G1JOB.ancdata"# Default ancillary argument file
DD_OUTABLE="$G1ZKP/data/$G1JOB.ancfile"# Default combined argument file
setenv DD_ANCFILE "$G1EZC/data/$G1JOB.ancfile"
setenv DD_PRNTRPT "$G1EZC/data/$G1JOB.prntrpt"
setenv DD_PRNTXLG "$G1EZC/data/$G1JOB.prntxlg"
setenv DD_ZKCPNAM "$G1EZC/data/$G1JOB.zkcpnam"
setenv DD_ZKCPOUT "$G1EZC/data/$G1JOB.zkcpout"
setenv DD_ZKCPPRM "$G1EZC/data/$G1JOB.zkcpprm"
setenv DD_ZKG1PXT "$G1EZC/data/$G1JOB.zkg1pxt"
Figure 2-2: SAMPLE C Shell Script
Step 3. Source the Job Shell Script(s)
After you modify your job shell script(s) accordingly, you must source the script(s) before you execute the job. Source your job shell script by typing the following command:
To source the casing and punctuation script, type the appropriate command:
. bin/sample (for Bourne type shells)
source bin/sample.csh (for C-shell)
Working With EZ-CASE Plus 2-5
-
2 Working in Different Environments
Step 4. Submit the Job
After you complete steps 1 through 3, you can submit your EZ-CASE Plus job.
NOTE: The ì runî scripts apply to all shell script users (Bourne, C-shell, etc.).
To perform your casing and punctuation operations, enter the following command:
bin/runzkp
Your job will run in the background.
Software Release 6.5.0/6.6.0/November 2006 2-6
-
2 The UNIX Environment
The runzkp Script for ZKCP00
NOTE: If you are running version 6.5.0 of EZ-CASE Plus, all references to lib in the script should be replaced by pgms, .acu extensions should be replaced with .gnt, and runcbl should be replaced with cobrun.
#!/bin/sh #set -xv #This Bourne shell script launches the execution of the current #batch run configuration defined for the Group 1 software product, #EZ-CASE Plus. It expects no parameters; rather, the environment #must be defined by sourcing the product's setup file and then #the customer-defined run configuration file. This script #starts the processing and immediately finishes -- the actual #run is processed as a background process tree immune to the #status of the terminal from which it was launched. doit() { ( date# Log the time the job began $G1ECHO# Log a blank line # Log the relevant environment variables: set | egrep '^DD_|^COB|^TMPDIR=|^LD_LIBRARY_PATH=' $G1ECHO# Log a blank line if [ "" != "$COBCONFIG" ] then$G1ECHO "The COBCONFIG file contains:" cat $COBCONFIG fi $G1ECHO# Log a blank line # Log the status of the input files:
$G1ZKP/bin/lsdds# Log the status of the DD_ files
$G1ECHO# Log a blank line # Log the time the program began: $G1ECHO`date` -- starting ZKCP00 # Run EZ-CASE Plus: $COBDIR/bin/runcbl $G1ZKP/lib/ZKCP00.acu cs=$?# Save the program's status code # Determine if any parms were bad: if [ `grep '*ERRORS*' $DD_PRNTRPT | wc -l` -gt 0 ] then pe=' -- Parm Errors!' else pe='' fi # Report on the program's results: $G1ECHO`date` -- ZKCP00 ended with status $cs$pe # Log the status of the output files:
$G1ZKP/bin/lsdds# Log the status of the DD_ files
$G1ECHO# Log a blank line date# Log the time the job ended # Log the run delimiter line: $G1ECHO "================================================================" ) }
# If the necessary variables are not defined, issue a message and exit: : ${G1ZKP:?} ${G1ECHO:?} ${G1JOB:?}
: ${G1ZKPDATA:=$G1ZKP/data}; export G1ZKPDATA
if test -f "$G1ZKPDATA/$G1JOB.log" then
rm $G1ZKPDATA/$G1JOB.log fi
(doit >> $G1ZKPDATA/$G1JOB.log 2>&1) &
Figure 2-3: runzkp Script
Working With EZ-CASE Plus 2-7
-
2 Working in Different Environments
The runzkanc Script for ZKCP00
NOTE: If you are running version 6.5.0 of EZ-CASE Plus, all references to lib in the script should be replaced by pgms, .acu extensions should be replaced with .gnt, and runcbl should be replaced with cobrun.
#!/bin/sh #set -xv #This Bourne shell script launches the execution of the creation #of the ancillary file for the Group 1 software product, #EZ-CASE Plus. It expects no parameters; rather, the environment #must be defined by sourcing the product's setup file and then #the customer-defined run configuration file. An example of this #is in the file crtanc. This script starts the processing and #immediately finishes -- the actual run is processed as a background #process tree immune to the status of the terminal from which it was #launched.
doit() { ( date# Log the time the job began $G1ECHO# Log a blank line if [ "" != "$COBCONFIG" ] then$G1ECHO "The COBCONFIG file contains:" cat $COBCONFIG fi $G1ECHO# Log a blank line # Log the status of the input files:
$G1ZKP/bin/lsdds# Log the status of the DD_ files
$G1ECHO# Log a blank line # Log the time the program began: $G1ECHO`date` -- starting ZKCRTANC # Run EZ-CASE Plus: $COBDIR/bin/runcbl $G1ZKP/lib/ZKCRTANC.acu cs=$?# Save the program's status code # Determine if any parms were bad: # Report on the program's results: $G1ECHO`date` -- ZKCRTANC ended with status $cs$pe # Log the status of the output files: $G1ZKP/bin/lsdds# Log the status of the DD_ files
$G1ECHO# Log a blank line date# Log the time the job ended # Log the run delimiter line: $G1ECHO "================================================================" ) }
# If the necessary variables are not defined, issue a message and exit: : ${G1ZKP:?} ${G1ECHO:?} ${G1JOB:?}
: ${G1ZKPDATA:=$G1ZKP/data}; export G1ZKPDATA
if test -f "$G1ZKPDATA/$G1JOB.log" then
rm $G1ZKPDATA/$G1JOB.log fi
(doit >> $G1ZKPDATA/$G1JOB.log 2>&1) &
Figure 2-4: runzkanc Script
Software Release 6.5.0/6.6.0/November 2006 2-8
-
2 The UNIX Environment
Create an Ancillary Table During EZ-CASE Plus Processing
The following environments must be set in the bin/setup (bourne shell) or bin/setup.csh (C-shell) and the bin/yourjobname (bourne shell) or bin/yourjobname.csh (c-shell) in order to perform Ancillary Table matching during EZ-CASE Plus processing.
Ancillary Table 1
DD_INTABLE="$G1ZKP/data/$G1JOB.ancdata"
DD_OUTABLE="$G1ZKP/data/$G1JOB.ancfile"
DD_ANCFILE="$G1ZKP/data/$G1JOB.ancfile"
Ancillary Table 2
DD_INTABL2="$G1ZKP/data/$G1JOB.ancdat2"
DD_OUTABL2="$G1ZKP/data/$G1JOB.ancfil2"
DD_ANCFIL2="$G1ZKP/data/$G1JOB.ancfil2"
Create an Ancillary Table External to EZ-CASE Plus Processing
Follow these steps to create an Ancillary Table outside of the EZ-CASE Plus environment.
1 Source the setup file.
. bin/setup (Bourne shell)
bin/setup.csh (C-shell)
2 Source the creatanc file
. bin/creatanc (Bourne shell)
bin/creatanc.csh (C-shell)
3 To run the Ancillary Table Creation job, type
bin/runzkanc
This script accomplishes the following:
Calls the bin/setup (Bourne shell) or bin/setup.csh (C-shell) file to initialize the EZ-CASE Plus environment.
Working With EZ-CASE Plus 2-9
-
2 Working in Different Environments
Calls the bin/creatanc (Bourne shell) or bin/creatanc.csh (C-shell) file to tailor the environment to the job requested. (Make sure the G1JOB name within the creatanc file is equal to your job name.)
Runs the CREATANC program which relates the compiled Ancillary files.
If you create and compile Ancillary Tables external to EZ-CASE Plus processing, your bin/ yourjobname (Bourne shell) or bin/yourjobname.csh (C-shell) file is only required to set these environments:
DD_ANCFILE="$G1ZKP/data/$G1JOB.ancfile"
DD_ANCFIL2="$G1ZKP/data/$G1JOB.ancfil2"
Setting Environment for Firm Table
The following environments must be set in the bin/setup (Bourne shell) or bin/setup.csh (C-shell) and bin/yourjobname (Bourne shell) or bin/yourjobname.csh (C-shell) files in order to perform Firm Table matching:
DD_ZKPFTBL="$G1ZKP/data/$G1JOB.zkcpfrm"
Software Release 6.5.0/6.6.0/November 2006 2-10
-
2 The Windows Environment
The Windows Environment
This section assumes you are familiar with EZ-CASE Plus Windows Installation Instructions and the details of how the product was installed on your system. The Group 1 products for the Windows environment are designed so that you can set up and run a job with a minimum amount of typing. Information that does not change from job to job is stored in files that you can edit via the Group 1 icons provided using your preferred text editor.
This section describes how to:
1 Edit/Save job files.
2 Edit/Save parameter record files.
3 Run an EZ-CASE Plus job.
Customization Issues
If you need to modify the EZ-CASE Plus components to suit your needs, be prepared to add your modifications again when we send a product update. Record the modifications you make, so that if you need to call Group 1 Technical Support, Group 1 can duplicate your problem.
In EZ-CASE Plus, the CMDS\SETUP.BAT (6.5.0) or BIN\SETUP.BAT (6.6.0) file defines environment variables needed for any invocation of EZ-CASE Plus functions.
You should review this file for any customization that is necessary for your system.
Step 1. Edit/Save Job Files
A job file is a batch command file (.BAT extension) that configures the Windows environment for the current job. An EZ-CASE Plus job file is called when the EZ-CASE Plus program is executed.
Group 1 provides an example job named SAMPLE.BAT that can configure the environment.
This section describes important job file commands, how to create a new job file, and how to edit an existing job file. For illustration purposes, we show SAMPLE.BAT on the following pages.
Working With EZ-CASE Plus 2-11
-
2 Working in Different Environments
Important Job File Commands
The most important job file commands use the SET command to initialize the G1JOB variable and the DD_environment variables. DD_environment variables associate the system file names used by the EZ-CASE Plus programs with the files you want processed in your job.
Creating a New Job File
The easiest way to create a new job file is to modify an existing one, such as the SAMPLE.BAT provided on your installation CD-ROM disc. To create a new job file, you can use the following two methods:
1 Use Windows Explorer to copy BIN\SAMPLE.BAT to BIN\MYJOB.BAT.
NOTE: If you are using version 6.5.0, all references to ì BINî should be replaced by ì CMDSî .
2 Select the Edit EZ-CASE Plus Job icon and specify MYJOB as the file to edit.
OR
1 Select the Edit EZ-CASE Plus Job icon.
2 Specify the name of a non-existent job file.
3 Paste in BIN\SAMPLE.BAT or CMDS\SAMPLE.BAT.
For purposes of illustration, the SAMPLE.BAT follows. It is always a good idea to change the opening comments to describe the batch job.
Software Release 6.5.0/6.6.0/November 2006 2-12
-
2 The Windows Environment
The SAMPLE.BAT Job File
@ECHO OFF rem This batch file is called to setup for the execution rem of the EZ-Case Plus Installation Verification Procedure rem (IVP) sample job. rem rem It is designed to be called from the ZKPRUNXX.BAT rem file built by running the CMDS\ZKPRUN.BAT file or the rem ZKPANCXX.BAT file built via the CMDS\ZKPANC.BAT file.
IF ."%G1ZKP%"==."" GOTO ENVERR1
SET G1JOB=SAMPLE SET DD_ANCFILE=%G1ZKP%\DATA\%G1JOB%.ANF SET DD_ANCFIL2=%G1ZKP%\DATA\%G1JOB%.ANF2 SET DD_INTABLE=%G1ZKP%\DATA\%G1JOB%.AND SET DD_INTABL2=%G1ZKP%\DATA\%G1JOB%.AND2 SET DD_OUTABLE=%DD_ANCFILE% SET DD_OUTABL2=%DD_ANCFIL2% SET DD_ZKPFTBL=%G1ZKP%\DATA\%G1JOB%.FRM SET DD_PRNTRPT=%G1ZKP%\DATA\%G1JOB%.RPT SET DD_PRNTXLG=%G1ZKP%\DATA\%G1JOB%.XLG SET DD_ZKCPNAM=%G1ZKP%\DATA\%G1JOB%.NAM SET DD_ZKCPOUT=%G1ZKP%\DATA\%G1JOB%.OUT SET DD_ZKCPPRM=%G1ZKP%\DATA\%G1JOB%.PRM SET DD_ZKG1PXT=%G1ZKP%\DATA\%G1JOB%.PXT
GOTO ENDSAMP
:ENVERR1 ECHO The G1ZKP environment variable is not set. GOTO ENDSAMP
:ENDSAMP
Figure 2-5: SAMPLE.BAT Job File
Editing a Job File
You can edit job files by invoking the Edit EZ-CASE Plus Job icon or by invoking your text editor and editing the job file in the BIN or CMDS directory. Ensure that the job file has the extension .BAT and that the job name is unique among the batch files in the directory.
The following program, %G1ZKP%\BIN\ZKPJOB.VBS, which runs the BIN\ZKPJOB.VBS VB program, is invoked when you double-click on the Edit EZ-CASE Plus Parm File icon.
Working With EZ-CASE Plus 2-13
-
2 Working in Different Environments
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
'-------------------------------------------------------' ZKPJob.vbs '-------------------------------------------------------Option Explicit
Dim intRet Dim strCmdLine Dim strFileName Dim strEditor Dim strProdDir Dim strProdCode Dim strProdName Dim WshShell Set WshShell = WScript.CreateObject("Wscript.Shell")
strProdCode = "ZKP" strProdName = "EZ-CASE Plus" ' Verify that product environment variable is defined strProdDir = WshShell.ExpandEnvironmentStrings("%G1" & strProdCode & "%")
If strProdDir = "%G1" & strProdCode & "%" Then sText = "The G1" & strProdCode & " environment variable is not set." MsgBox sText, vbCritical, sTitle WScript.Quit
End If strEditor = WshShell.ExpandEnvironmentStrings("%G1EDIT%") If strEditor = "%G1EDIT%" Then
strEditor = "notepad.exe" End If strFileName = GetFileName()
' Launch the editor strCmdLine = strEditor & " " & strProdDir & "\CMDS\" & strFileName & ".BAT" intRet = WshShell.Run(strCmdLine, 1, False) WScript.Quit '-------------------------------------------------------' GetFileName '-------------------------------------------------------Function GetFileName()
' Prompt the user for the job name Dim strName strName = InputBox("Enter the name of the job batch file to be edited:",
strProdName) ' Verify something was entered
If strName = "" Then WScript.Quit
End If ' Return the user entered file name and continue
GetFileName = strName End Function
Figure 2-6: ZKPJOB.VBS File
NOTE: This program accepts the G1EDIT environment variable as the name of the editor you prefer to use. If G1EDIT is not defined, NOTEPAD is used as the editor.
Software Release 6.5.0/6.6.0/November 2006 2-14
-
2 The Windows Environment
Step 2. Edit/Save Parameter Record Files
Parameter record files use the .PRM extension. Group 1 provides an example parameter record file with the product called SAMPLE.PRM. This section describes how to create a new parameter record file and edit an existing one.
NOTE: An editing icon is not provided for the ZKXXPXT auxiliary parameter files. Edit them with your text editor as needed. Group 1 provides an example auxiliary parameter record file: DATA\SAMPLE.PXT.
Creating a New Parameter Record File
The easiest way to create a new parameter record file is to modify an existing one, such as the SAMPLE.PRM file provided on your installation CD-ROM disc. To create a new parameter record file, you can use the following two methods:
1 Use the File Manager to copy DATA\SAMPLE.PRM to DATA\MYJOB.PRM.
2 Select the Edit EZ-CASE Plus Parm File icon and specify MYJOB as the file to edit.
OR
1 Select the Edit EZ-CASE Plus Parm File icon.
2 Specify the name of a non-existent job file.
3 Paste in DATA\SAMPLE.PRM.
Editing a Parameter Record File
You can edit parameter record files by invoking the Edit EZ-CASE Plus Parm File icon or by invoking your text editor and editing the parameter record file in the DATA directory. Ensure that the parameter record file has the extension .PRM and that the job name is unique among the batch files in the directory.
The following program, /RUN %G1ZKP%\BIN\ZKPPRM.VBS, which runs the BIN\ZKPPRM.VBS VB program, is invoked when you double-click on the Edit EZ-CASE Plus Parm File icon.
Working With EZ-CASE Plus 2-15
-
2 Working in Different Environments
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
Software Release 6.5.0/6.6.0/November 2006 2-16
-
2 The Windows Environment
NOTE: This program accepts the G1EDIT environment variable as the name of the editor you prefer to use. If G1EDIT is not defined, NOTEPAD is used as the editor.
'-------------------------------------------------------' ZKPPrm.vbs '-------------------------------------------------------
Option Explicit
Dim intRet Dim strCmdLine Dim strFileName Dim strEditor Dim strProdDir Dim strProdCode Dim strProdName Dim WshShell
Set WshShell = WScript.CreateObject("Wscript.Shell") strProdCode = "ZKP" strProdName = "EZ-CASE Plus"
' Verify that product environment variable is defined strProdDir = WshShell.ExpandEnvironmentStrings("%G1" & strProdCode & "%")
If strProdDir = "%G1" & strProdCode & "%" Then sText = "The G1" & strProdCode & " environment variable is not set." MsgBox sText, vbCritical, sTitle WScript.Quit
End If strEditor = WshShell.ExpandEnvironmentStrings("%G1EDIT%")
If strEditor = "%G1EDIT%" Then strEditor = "notepad.exe"
End If strFileName = GetFileName()
' Launch the editor strCmdLine = strEditor & " " & strProdDir & "\DATA\" & strFileName & ".PRM"
intRet = WshShell.Run(strCmdLine, 1, False) WScript.Quit
'-------------------------------------------------------' GetFileName '-------------------------------------------------------Function GetFileName()
' Prompt the user for the job name Dim strName strName = InputBox("Enter the name of the parameter file to be edited:",
strProdName)
' Verify something was entered If strName = "" Then
WScript.Quit End If
' Return the user entered file name and continue GetFileName = strName
End Function
Figure 2-7: ZKPPrm.vbs File
Working With EZ-CASE Plus 2-17
-
2 Working in Different Environments
Step 3. Run a Job
The ZKCP00 program is invoked via the Run EZ-CASE Plus Job icon. The icon prompts you for the name of the job you want to run, then runs the job. When the job completes running, you are prompted to press a key to continue so that the window is not refreshed before you read any error messages.
The following sections show how to perform this function.
Running an EZ-CASE Plus Job
To run an EZ-CASE Plus job, double-click on the Run EZ-CASE Plus icon. Once you enter a job name, the Run EZ-CASE Plus icon (1) runs the VB program BIN\ZKPRUN.VBS, which builds a temporary batch file; and (2) transfers control of the job to the temporary file. The temporary file:
1 Calls the BIN\SETUP.BAT file to initialize the EZ-CASE Plus environment.
2 Calls the BIN\jobname.BAT file to tailor the environment to the job requested.
3 Runs the ZKCP00 program.
4 Pauses the process so you can see any error messages and then deletes the temporary job file.
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
Software Release 6.5.0/6.6.0/November 2006 2-18
-
2 The Windows Environment
The BIN\ZKPRUN.VBS VB Program
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
'-------------------------------------------------------' ZKPRUN.vbs '-------------------------------------------------------Option Explicit
Dim blnWindow Dim intRet Dim objArgs Dim objBatFile Dim objFS Dim strBatName Dim strCmdLine Dim strEditor Dim strFileName Dim strJobName Dim strLogName Dim strPause Dim strProdDir Dim strProdCode Dim strProdName Dim WshShell
Set WshShell = WScript.CreateObject("Wscript.Shell")
' To show the console window when a job is run, change this value to True blnWindow = False strProdCode = "ZKP" strProdName = "EZ-CASE Plus"
' Verify that product environment variable is defined strProdDir = WshShell.ExpandEnvironmentStrings("%G1" & strProdCode & "%")
If strProdDir = "%G1" & strProdCode & "%" Then sText = "The G1" & strProdCode & " environment variable is not set." MsgBox sText, vbCritical, sTitle WScript.Quit
End If ' Get the job name, if supplied. Otherwise prompt for it. ' Obtain arguments supplied to this script. Set objArgs = WScript.Arguments
' Handle the usual case where command line has right number of objArgs If objArgs.Count > 0 Then
strJobName = objArgs(0) ' Handle the case where no objArgs given, i.e. not automatic, hands off execution ElseIf objArgs.Count < 1 Then
strJobName = GetJobName() ' Log and batch filenames created from user input
Figure 2-8: BIN/ZKPRUN.VBS Program, Part 1
Working With EZ-CASE Plus 2-19
-
2 Working in Different Environments
End If ' Create the batch file to run the job ' Create the file system object for the new job bat file; ' create the file. Set objFS = CreateObject("Scripting.FileSystemObject") strFileName = objFS.GetTempName strBatName = objFS.GetBaseName(strFileName) strFileName = UCase(strProdDir & "\CMDS\" & strBatName & ".bat") Set objBatFile = objFS.CreateTextFile(strFileName, True) strLogName = "%G1" & strProdCode & "%\DATA\" & strJobName & ".rlg"
' Write commands in the new batch file objBatFile.WriteLine ("@ECHO OFF") objBatFile.WriteLine ("CALL %G1" & strProdCode & "%\CMDS\SETUP.bat") objBatFile.WriteLine ("IF NOT '%G1ERR%'=='' GOTO ENDRUN") objBatFile.WriteLine ("CALL %G1" & strProdCode & "%\CMDS\" & strJobName & ".bat") objBatFile.WriteLine ("IF NOT '%G1ERR%'=='' GOTO ENDRUN") objBatFile.WriteLine ("%G1ZKP%\DLL\ZKCP00") objBatFile.WriteLine (":ENDRUN") objBatFile.WriteLine ("SET G1ERR=") If (blnWindow = True) Then
objBatFile.WriteLine ("IF NOT '%G1PAUSE%'=='NO' PAUSE") End If objBatFile.WriteLine ("SET G1ERR=")
' Close the bat file just written to objBatFile.Close
' Run the bat file just created; ' use the command shell to execute the job bat file ' To have the job window visible, change blnWindow = True at the beginning ' of this script. If (blnWindow = False) Then
strCmdLine = "%COMSPEC% /C " & strFileName & " > " & strLogName & " 2>&1" intRet = WshShell.Run(strCmdLine, 0, True)
Else strCmdLine = "%COMSPEC% /C " & strFileName intRet = WshShell.Run(strCmdLine, 1, True)
Figure 2-9: BIN/ZKPRUN.VBS Program, Part 2
Software Release 6.5.0/6.6.0/November 2006 2-20
-
2 The Windows Environment
End If
objFS.DeleteFile (strFileName)
strPause = WshShell.ExpandEnvironmentStrings("%G1PAUSE%") strPause = UCase(strPause)
If (strPause = "%G1PAUSE%" Or strPause "NO") Then If (blnWindow = False) Then
intRet = WshShell.Popup("Job " & strJobName & " complete. View results?", , strProdName, 4 + 32)
If (intRet = 6) Then strEditor = WshShell.ExpandEnvironmentStrings("%G1EDIT%") If strEditor = "%G1EDIT%" Then
strEditor = "notepad.exe" End If ' Launch the editor strCmdLine = strEditor & " " & strLogName intRet = WshShell.Run(strCmdLine, 1, False)
End If End If
End If
WScript.Quit '-------------------------------------------------------' GetJobName - Get Job Name ' If the job name was not specified as an argument for ' this script, then we require the user to input it ' manually. The job name will be used to create the ' batch file for the job. '-------------------------------------------------------Function GetJobName()
' Prompt the user for the job name Dim strName Dim str strName = InputBox("Enter the name of the batch job to be run:",
strProdName)
' Verify something was entered If strName = "" Then
WScript.Quit End If ' Return the user entered job name and continue GetJobName = strName
End Function
Figure 2-10: BIN/ZKPRUN.VBS Program, Part 3
Create an Ancillary Table During EZ-CASE Plus Processing
The following environments must be set in the BIN/SETUP.BAT and BIN/ yourjobname.BAT files in order to perform Ancillary Table matching during EZ-CASE Plus processing.
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
Working With EZ-CASE Plus 2-21
-
2 Working in Different Environments
Ancillary Table 1
SET DD_ANCFILE=%G1ZKP%\DATA\%G1JOB%.ANF
SET DD_INTABLE=%G1ZKP%\DATA\%G1JOB%.AND
SET DD_OUTABLE=%DD_ANCFILE%
Ancillary Table 2
SET DD_ANCFIL2=%G1ZKP%\DATA\%G1JOB%.ANF2
SET DD_INTABL2=%G1ZKP%\DATA\%G1JOB%.AND2
SET DD_OUTABL2=%DD_ANCFIL2%
Create an Ancillary Table External to EZ-CASE Plus Processing
To run the Ancillary Table Creation job, double-click the VBScript file BIN\ZKPANC.vbs and type jobname CREATANC.
NOTE: For version 6.5.0, replace ì BINî with ì CMDSî .
This script accomplishes the following:
Calls the BIN\SETUP.bat file to initialize the EZ-CASE Plus environment.
Calls the BIN\CREATANC.bat file to tailor the environment to the jobs requested. (Make sure the G1JOB name within the CREATANC.bat file is equal to your job name.)
Runs the CREATANC program.
Pauses the process so you can see any error messages.
Creates the compiled ancillary files.
NOTE: If you create and compile Ancillary Tables external to EZ-CASE Plus processing, your BIN\yourjobname.bat file is only required to set these environments:
SET DD_ANCFILE
SET DD_ANCFIL2
Software Release 6.5.0/6.6.0/November 2006 2-22
-
2 The Windows Environment
NOTE: In order to create an Ancillary Table, you must first specify the Ancillary Table information. For more information, refer to the section Specifying Ancillary Table Information in Chapter 1.
Working With EZ-CASE Plus 2-23
-
2 Working in Different Environments
The Run Create Ancillary Table Job Icon Program
'-------------------------------------------------------' ZKPAnc.vbs '-------------------------------------------------------
Option Explicit
Dim blnWindow Dim intRet Dim objArgs Dim objBatFile Dim objFS Dim strBatName Dim strCmdLine Dim strEditor Dim strFileName Dim strJobName Dim strLogName Dim strPause Dim strProdDir Dim strProdCode Dim strProdName Dim WshShell
Set WshShell = WScript.CreateObject("Wscript.Shell")
' To show the console window when a job is run, change this value to True blnWindow = False strProdCode = "ZKP" strProdName = "EZ-CASE Plus Plus"
' Verify that product environment variable is defined strProdDir = WshShell.ExpandEnvironmentStrings("%G1" & strProdCode & "%")
If strProdDir = "%G1" & strProdCode & "%" Then sText = "The G1" & strProdCode & " environment variable is not set." MsgBox sText, vbCritical, sTitle WScript.Quit
End If
' Get the job name, if supplied. Otherwise prompt for it. ' Obtain arguments supplied to this script. Set objArgs = WScript.Arguments
' Handle the usual case where command line has right number of objArgs If objArgs.Count > 0 Then
strJobName = objArgs(0) ' Handle the case where no objArgs given, i.e. not automatic, hands off execution ElseIf objArgs.Count < 1 Then
strJobName = GetJobName() ' Log and batch filenames created from user input
Figure 2-11: Create Ancillary Table Job Icon Program, Part 1
Software Release 6.5.0/6.6.0/November 2006 2-24
-
2 The Windows Environment
End If
' Create the batch file to run the job ' Create the file system object for the new job bat file; ' create the file. Set objFS = CreateObject("Scripting.FileSystemObject") strFileName = objFS.GetTempName strBatName = objFS.GetBaseName(strFileName) strFileName = UCase(strProdDir & "\CMDS\" & strBatName & ".bat") Set objBatFile = objFS.CreateTextFile(strFileName, True) strLogName = "%G1" & strProdCode & "%\DATA\" & strJobName & ".log"
' Write