· 2019. 4. 15. · © 2002 Group 1 Software, Inc. All rights reserved. Group 1, Group 1 Software,...
Transcript of · 2019. 4. 15. · © 2002 Group 1 Software, Inc. All rights reserved. Group 1, Group 1 Software,...
Tbe Marketing Software Company T )I
Generalized Selection Plustrade Userrsquos Guide
Software Release 621
October 2002
For the AS400
dgsp621Rpusg
copy 2002 Group 1 Software Inc
All rights reserved Group 1 Group 1 Software the Group 1 logo The Marketing Software Company and Generalized Selection Plus are trademarks of Group 1 Software Inc All other trademarks referenced herein are the property of their respective owners
You may make up to three copies of this publication without the express written permission of Group 1 Software for use at the authorized installation site Reproduction and distribution outside of the licensed site is strictly prohibited If you would like to make more than three copies you must contact the Group 1 Documentation Department for written permission The contents of this Guide are subject to the confidentiality and non-disclosure provisions in your license agreement with Group 1 Software
Group 1 Software makes a sincere effort to ensure that the information in our user guides is accurate at the time of publication If you think the information in this version of the Guide may have gotten out-of-date please contact Group 1 Technical Support at 800-367-6950 Group 1 products are warranted to perform as documented on hardware platforms running versionsreleases of operating systems subsystems compilers and facilities that are currently supported by their manufacturers Please see your license agreement for additional details
Address written requests to make copies of all or any part of this publication to
GROUP 1 SOFTWARE INC DOCUMENTATION DEPARTMENT STE 600 4200 PARLIAMENT PL LANHAM MD 20706-1844
T A B L E O F C O N T E N T S
BEFORE YOU BEGIN IMPORTANT INFORMATION
Purpose of This Guide xviii
Finding the Information You Need xx Related Publications xxi If You Need More Help xxii
Group 1 Web Site xxii Fax-on-Demand xxii
To Order Additional Users Guides xxiii Your Comments Are Welcome xxiii
Who Should Use This Guide xviii Conventions Used in This Guide xix
CHAPTER 1 INTRODUCING GENERALIZED SELECTION PLUS
What is Generalized Selection Plus 1-2 Check Sort Sequence of Input Files 1-2 Identify Duplicate Input Records 1-3 Ignore Certain Input Records 1-3 Sample Input Records 1-4 Perform Data Conversion and Mathematical Functions 1-4 Add Data to the Input Record 1-4 Generate a Custom Statistical Report 1-5 Generate StateProvince Counts Report 1-5 Generate Up to Five Output Files 1-6 Create Seed Name Records 1-6
Why Use Generalized Selection Plus 1-6 Decreases Development Time 1-6 Efficiently Uses Resources 1-7 Increases Target Marketing Responses 1-7 Eliminates Duplicate Records 1-7 Generates Extensive Reports 1-7
Generalized Selection Plus Concepts 1-8 Match Codes 1-8 Work Areas 1-9 Input and Output Files 1-10 Auxiliary Input Files 1-10
Match Code Files and Relational Databases 1-10 ZIP Code File 1-12 Kill File 1-12
Job Parameters and Instruction Parameters 1-13 Applications 1-14 Job Sets 1-15 Jobs and Instructions 1-15
How Do They Work 1-16 Operands 1-16
Generalized Selection Plus Userrsquos Guide - AS400 iii
Table of Contents
Sample Applications 1-17 Manipulate Your Mailing List 1-17 Match and Merge 1-19
Chapter Summary 1-20
CHAPTER 2 GENERALIZED SELECTION PLUS SYSTEM OVERVIEW
Using Generalized Selection Plus System 2-2 Generalized Selection Plus System 2-2 Screens 2-6 Program and Screen ID 2-7 Release Number 2-8 DateTime Stamp 2-8 Job ID 2-9 User-Defined System Heading 2-9 System-Defined Screen Heading 2-9 Fields 2-9 Function Keys 2-10
Saving to an External File 2-10 Online Help 2-10 Chapter Summary 2-11
CHAPTER 3 DEFINING YOUR INPUT
Defining Input 3-3 Step 1 Identify Input File and Details 3-4 Step 2 Specify Summary File Control Field Length (Optional) 3-7 Step 3 Identify Auxiliary Input Files 3-9 Step 4 Define Auxiliary Input File Default Record-MDATA (Optional) 3-11 Step 5 Define Seed Records (Optional) 3-13 Define Input Files Screen Reference 3-19 Input File and Auxiliary Input Files 3-21
Input Files 3-21 Sort Input Files 3-22
Exit Routines 3-23 Parameter EXITP1 3-23 Parameter EXITP2 3-24 Parameter EXITP3 3-24 Parameter EXITP4 3-24
Input File Identification Details Screen (GSCPID05) 3-25 Work Area N 3-26 Clearing the Entire N Work Area 3-26 Fields 3-26 Function Keys 3-29
Input File Details Screen (GSCPID10) 3-30 Fields 3-31 Function Keys 3-33
Match Code File Details Screen (GSCPID15) 3-34 Work Area M 3-35 Fields 3-36
621 - 102002 iv
Function Keys 3-37 MATCHx Files 2-9 (GSCPID30) 3-38
Work Area M 3-39 Fields 3-40 Function Keys 3-41
Match Code File Default Record (MDATA) Screen (GSCPID18) 3-42 Fields 3-43 Function Keys 3-44
ZIP Code File Details Screen (GSCPID20) 3-45 Work Area Z 3-46 Fields 3-46 Function Keys 3-47
ZIP Code File Default Record (ZDATA) Screen (GSCPID18) 3-48 Fields 3-50 Function Keys 3-51
Kill File Identification Screen (GSCPID25) 3-52 Fields 3-53 Function Keys 3-53
Seed Name Definition Screen (GSCPID41) 3-54 Fields 3-55 Function Keys 3-56
Add a Seed Name Definition Screen (GSCPID50) 3-57 Fields 3-58 Function Keys 3-58
SEEDED CODE Replacement Data Screen (GSCPID72) 3-59 Fields 3-60 Function Keys 3-60
SEEDED MARK Replacement Data Screen (GSCPID71) 3-61 Fields 3-62 Function Keys 3-62
Edit SEEDED Record Screen (GSCPID61) 3-63 Fields 3-64 Function Keys 3-65
Statistics File Control Field (SMFILE) Screen (GSCPID12) 3-66 Fields 3-67 Function Keys 3-67
CHAPTER 4 PROCESSING YOUR INPUT FILES
Input Files 4-2 Work Areas For Data 4-2 Input File Processing 4-3
Input Files 4-3 Auxiliary Input Files 4-4 Select an Input Record 4-5 Match with the Kill File 4-7 Match with the ZIP Code File 4-8
Sorting Your Input and Auxiliary Input Files 4-10 If You Use Match Code Files 4-11
Generalized Selection Plus Userrsquos Guide - AS400 v
Table of Contents
Execute Your Job and Instruction Parameters 4-12
CHAPTER 5 WHAT ARE JOBS AND INSTRUCTIONS
What Are Job and Instruction Parameters 5-3 What Do They Look Like 5-3 How Do They Work 5-5 How Do I Define Jobs and Instructions 5-6 Step 1 Define a Job Parameter 5-6 Step 2 Define an Instruction Parameter 5-9 Step 3 Manage Your Job and Instruction List 5-12
Copy Parameters 5-13 Define Jobs and Instructions Reference Screens 5-17 Job and Instruction Definition Screen (GSCPJI11) 5-20
Fields 5-22 Function Keys 5-23
Screen GSCPIP10 (to Copy Existing Data) 5-24 View 1 5-24
Fields 5-25 View 2 5-26
Fields 5-26 View 3 5-27
Fields 5-28 Function Keys 5-28
Split-Screen Mode Screen 5-29 Fields 5-30 Function Keys 5-30
Function Menu Screen (GSCPJI45) 5-31 Fields 5-32 Function Keys 5-32
Job Card Parameters Screen (GSCPJI20) 5-33 Fields 5-34 Function Keys 5-35
Counts and Limits Screen (JOB) (GSCPJI21) 5-36 Fields 5-37 Function Keys 5-38
Instruction Card Parameters Screen (GSCPJI30) 5-39 What Are First and Second Operands 5-40
Comparing Data 5-41 For NumericNon-Numeric Testing 5-42 For Mathematical Functions 5-43 For Converting Data 5-44 For Moving Data 5-45 For Branching to a Different Job 5-45
Connector Word Field 5-46 Left Parenthesis Field and Right Parenthesis Field 5-48 Fields 5-49 Function Keys 5-52
Instruction Code Options Screen (GSCPJI32) 5-53 Instruction Field 5-54
621 - 102002 vi
Comparing Data Function 5-55 Testing for Numeric and Non-Numeric Data 5-55 Performing Mathematical Functions 5-56 Converting Data 5-56 Moving Data 5-56 Branch to a Different Job 5-57 Fields 5-57 Function Keys 5-58
Counts and Limits (INSTRUCTION) Screen (GSCPJI31) 5-59 Fields 5-60 Function Keys 5-61
View Work Areas Screen (GSCPJI80) 5-62 Work Areas 5-63 Function Keys 5-64
Prompt Function 5-65 Fields 5-66 Function Keys 5-67
Insert Remark Screen (GSCPJI50) 5-68 Fields 5-68 Function Keys 5-69
External Reference (EXTREF) Screen (GSCPJI70) 5-70 Fields 5-71 Function Keys 5-72
View External Reference (GSCPVX11) 5-73 Fields 5-74 Function Keys 5-74
CHAPTER 6 DEFINING JOBS AND INSTRUCTIONS
Defining Your Jobs and Instructions 6-2 Comparing Data 6-3
Character Data 6-3 Packed Data 6-4 Data Comparison Example 6-4 Current System Date Comparison Example 6-6
Testing for Numeric and Non-Numeric Data 6-8 Performing Mathematical Functions 6-10
Non-packed 6-10 Packed 6-10
Converting Data 6-13 Moving Data 6-15 Branching to a Job 6-17 Grouping Your Instructions 6-20 Sampling Records 6-23
For a Job Parameter 6-23 For an Instruction Parameter 6-25
Producing Job and Instruction Counts 6-27 Statistics File Processing 6-28 For a Job Parameter 6-30
Generalized Selection Plus Userrsquos Guide - AS400 vii
Table of Contents
For an Instruction Parameter 6-32
CHAPTER 7 DEFINING A STATISTICAL REPORT
Defining Your Statistical Report 7-3 Step 1 Select Define Statistical Report Component 7-4 Step 2 Define Report Headers 7-6 Step 3 Define Constant Value(s) 7-9 Step 4 Define Break Levels 7-11 Step 5 Define Information to Move 7-14 Step 6 Define Print Columns 7-17 Step 7 Re-calculate Print Column 7-20 Step 8 Select Statistical Report Output File 7-22 Step 9 Review Statistical Report Layout 7-25 Define Statistical Report Screen Reference 7-27
Component Overview 7-27 Statistical Report Files 7-29
Work Library Files 7-29 Report Functions Menu Screen (GSCPRP05) 7-30
Fields 7-31 Function Keys 7-32
Define Headers for Columns Screen (GSCPRP10) 7-33 Fields 7-34 Function Keys 7-35
Constant Value Definition (CONSTn) Screen (GSCPRP15) 7-36 Fields 7-37 Function Keys 7-37
Break Level Definition (BREAKn) Screen (GSCPRP20) 7-38 Fields 7-39 Function Keys 7-41
Move Data to Print Line (MOVE) Screen (GSCPRP25) 7-42 Fields 7-43 Function Keys 7-45
Column Selection (PRINTn) Screen (GSCPRP30) 7-46 Fields 7-47 Function Keys 7-48
Column Definition (PRINTn) Screen (GSCPRP31) 7-49 Fields 7-50 Function Keys 7-51
Column Re-definition (RECALn) Screen (GSCPRP35) 7-52 Fields 7-53 Function Keys 7-53
Detail File Field Selection (DETLnn) Screen (GSCPRP45) 7-54 Fields 7-55 Function Keys 7-55
Detail File Field Definition (DETLnn) Screen (GSCPRP46) 7-56 Fields 7-57 Function Keys 7-58
Report Layout Screen (GSCPRP65) 7-59
621 - 102002 viii
Function Keys 7-60
CHAPTER 8 EXAMPLE BATCH JOB
Analyzing the Job 8-3 Defaults for Print Output 8-3 Define Input Files 8-3
Input File Layout 8-3 Input File Data 8-4 ZIP Code File Layout 8-5 ZIP Code File Data 8-5
Define Jobs and Instructions 8-5 Define Statistical Report 8-5 Submit Batch Job 8-6
Tutorial Steps 8-7 Creating the Job 8-8 Specifying Defaults for Print Output 8-12 Identifying the Input Files 8-17 Defining the First Job 8-23
The Job 8-23 The Instructions 8-27
Defining the Second Job 8-30 The Job 8-31 The Instructions 8-32
Defining the Third Job 8-39 The Job 8-41 The Instructions 8-42
Defining the Statistical Report 8-46 Define Break Levels 8-48 Define Information to Move 8-50 Define Print Columns 8-52 Select Statistical Report Output File 8-57 Review Statistical Report Layout 8-58
Submitting the Jobs 8-60 Reading Our Output 8-63
Output File A 8-64 Output File B 8-64 Output File C 8-64 Statistics File 8-65 State Counts Report For Output File B 8-66 State Counts Report For Output File C 8-66 Statistical Report 8-67 Output Summary File 8-68 Run Control Totals 8-69 Job Control Totals 8-70 Execution Log 8-71
CHAPTER 9 SUBMIT BATCH JOB SCREENS
Component Overview 9-2
Generalized Selection Plus Userrsquos Guide - AS400 ix
Table of Contents
Files and File Names 9-4 Sort Files 9-5 Work Library Files 9-6
Exit Routines 9-7 Parameter EXITP1 9-7 Parameter EXITP2 9-8 Parameter EXITP3 9-8 Parameter EXITP4 9-8
Submit Batch Job Screen 1(GSCPSB02) 9-9 Fields 9-10 Function Keys 9-11
Submit Batch Job Screen 2 (GSCPSB04) 9-12 Record Length Field 9-13 Fields 9-14 Function Keys 9-16
Submit Batch Job Screen 3 (GSCPSB06) 9-17 Record Length Field 9-18 Fields 9-19 Function Keys 9-22
Context Errors Screen (GSCPSB95) 9-23 Fields 9-24 Function Keys 9-24
Sort Option Screen (GSCPSB10) 9-25 Fields 9-26 Function Keys 9-26 Sorting to a New File 9-27 Fields 9-28 Function Keys 9-30
Serial Numbering Screen (1) (GSCPSB88) 9-31 Fields 9-32 Function Keys 9-34
Serial Numbering Screen (2) (GSCPSB89) 9-35 Fields 9-36 Function Keys 9-38
CHAPTER 10 DEFAULTS FOR PRINT OUTPUT SCREENS
Component Overview 10-2 Types of Headers and Footers 10-3 Defaults for Print Output Screen (GSCPPX01) 10-5
Fields 10-6 Function Keys 10-6
Define headers and footers Screen (GSCPPX03GSCPPX04) 10-7 Fields 10-8 Function Keys 10-8
CHAPTER 11 ADMINISTRATIVE SCREENS
Overview 11-2 Screen GSCPIP10 (to Copy Existing Data) 11-3
621 - 102002 x
View 1 11-3 Fields 11-4 View 2 11-5 Fields 11-5 View 3 11-6 Fields 11-7 Function Keys 11-7
Screen GSCPOP10 (to Save to an External File) 11-8 Fields 11-9 Function Keys 11-9
Confirm Delete of Job Definition Screen (GSCPMM06) 11-10 Fields 11-10 Function Keys 11-10
Copy Jobs Screen (GSCPCJ03) 11-11 Fields 11-12
Function Keys 11-12 Create New Job Screen (GSCPNJ01) 11-13
Fields 11-13 Function Keys 11-14 Fields 11-15 Function Keys 11-15
Define andor Submit a Batch Job Screen (GSCPDS01) 11-16 Fields 11-17 Function Keys 11-17
Rename Jobs Screen (GSCPRJ03) 11-18 Fields 11-19 Function Keys 11-19
Work with Jobs Screen (GSCPMM03) 11-20 Fields 11-21 Function Keys 11-22
CHAPTER 12 GENERATED REPORTS
Report Overview 12-2 Run Control Totals 12-2
Sample Run Control Totals Report 12-3 Job Control Totals 12-4
Sample Job Control Totals Report 12-5 StateProvince Counts Report 12-6
Sample StateProvince Counts Report 12-6 Statistical Report 12-7
Sample Statistical Report 12-7 Execution Log 12-8
Sample Execution Log Report 12-8
CHAPTER 13 SUBMITTING JOBS FROM THE COMMAND LINE
Submitting Jobs to Run Interactively or in Batch 13-2 Running a Generalized Selection Plus Job mdash GSRUNJOB 13-2
Generalized Selection Plus Userrsquos Guide - AS400 xi
Table of Contents
Submitting a Generalized Selection Plus Job mdash GSSBMJOB 13-2 GSRUNJOB and GSSBMJOB Screens 13-3
Define Processing Details and Output Files 13-3 Define Input File Sorting Options 13-5
Additional Parameters Screens 13-6 Override Input Files 13-6
APPENDIX A GSP10 PARAMETER RECORDS
DUPCTL Parameter Record (Optional) A-2 Example A-3
EXITOP Parameter Record (Optional) A-4 Additionally Using a FILEDF Output Exit Routine A-4 EXITOP Parameters A-4 Field-by-Field A-5 Example A-5
FILEDF Parameter Record (Required) A-6 File Names A-6
Input Files A-6 Output Files A-7
Exit Routines A-7 Input Exit Routines A-7 Output Exit Routines A-8
FILEDF Exit Routine Parameters A-8 Parameter EXITP1 A-8 Parameter EXITP2 A-9 Parameter EXITP3 A-9 Parameter EXITP4 A-9
Field-by-Field A-10 Example A-12
FILEZD Parameter Record (Optional) A-13 Field-by-Field A-13 Example A-13
FLCODE Parameter Record (Optional) A-14 Field-by-Field A-14 Example A-14
HEADER Parameter Record (Optional) A-15 Field-by-Field A-15 Example A-15
Job Instruction Parameter Records (Required) A-16 Begin Job Instruction Parameter Record (JOBBGN) A-16
Field-by-Field A-16 Job Parameter Record A-17
Job Set Sampling A-17 Field-by-Field A-18 Nth Record Sampling Example A-20 Fractional Record Selection Example A-20 Limiting Records Example A-21 StateZIP Code Counts Example A-21
Job Detail Parameter Record A-22
621 - 102002 xii
Instruction Sampling A-22 Length of Operand Field (Position(s) 40 through 41) A-23 Field-by-Field A-23 Comparison Example with State Counts A-28 Sampling Example A-28
End Job Parameter (JOBEND) A-29 Field-by-Field A-29
JOBCTL Parameter Record (Optional) A-30 Clearing the Entire N Work Area A-30 Field-by-Field A-31 Example A-31
LISTOF Parameter Record A-32 Field-by-Field A-32
LISTON Parameter Record A-33 Field-by-Field A-33
MATCHI Parameter Record (Required) A-34 Field-by-Field A-34 Example A-35
MATCHx Parameter Records (Optional) A-36 Field-by-Field A-37 Example A-40
MDATA Parameter Record (Optional) A-41 Field-by-Field A-41 Example A-43
PAGESZ Parameter Record (Optional) A-44 Field-by-Field A-44 Example A-44
SEEDED Parameter Record (Optional) A-45 Field-by-Field A-45 Example A-46
SEEDED MARK Parameter Record (Optional) A-48 Field-by-Field A-48 Example A-48
SEEDED CODE Parameter Record (Optional) A-50 Field-by-Field A-50 Example A-50
SEEDED Match Code Parameter Record (Optional) A-52 Field-by-Field A-52 Example A-53
SEQERR Parameter Record (Optional) A-54 Field-by-Field A-54 Example A-54
SEQUN Parameter Record (Optional) A-55 Field-by-Field A-55 Character Sequence Number Example A-56
SMFILE Parameter Record (Optional) A-57 Field-by-Field A-57 Example A-57
TESTIT Parameter Record (Optional) A-58
Generalized Selection Plus Userrsquos Guide - AS400 xiii
Table of Contents
Field-by-Field A-58 UFT Parameter Record (Optional) A-59
Field-by-Field A-59 Example A-59
UHD Parameter Record (Optional) A-60 Field-by-Field A-60 Example A-60
ZDATA Parameter Record (Optional) A-61 Field-by-Field A-61 Example A-62
ZIPIN Parameter Record (Required) A-63 Field-by-Field A-63 Example A-63
ZIPINM Parameter Record (Required with Match Code File) A-64 Field-by-Field A-64 Example A-64
ZIPINZ Parameter Record (Required with ZIP Code File) A-65 Field-by-Field A-65 Example A-65
Reports A-66 Parameter Record Listing A-67 Job Request Summary A-68 Run Control Totals A-69 Job Control Totals A-70 State Count A-71
APPENDIX B GSP90 PARAMETER RECORDS
BREAK Parameter Record (Custom Report mdash Optional) B-2 Field-by-Field B-3 Example B-4
CONST Parameter Record (Custom Report mdash Optional) B-5 Field-by-Field B-5 Example B-5
DETL Parameter Record (Custom Report mdash Optional) B-6 Field-by-Field B-6 Example B-8
FILEDF Parameter Record (Required) B-9 File Names B-9
Input Files B-9 Output Files B-10 Statistical Report Files B-10
Exit Routines B-11 Input Exit Routines B-11 Output Exit Routines B-11
FILEDF Exit Routine Parameters B-12 Parameter EXITP1 B-12 Parameter EXITP2 B-12 Parameter EXITP3 B-13 Parameter EXITP4 B-13
621 - 102002 xiv
Field-by-Field B-13 Example B-15
HEAD Parameter Record (Custom Report mdash Optional) B-16 Field-by-Field B-16 Example B-17
HEADER Parameter Record (Optional) B-18 Field-by-Field B-18 Example B-18
MOVE Parameter Record (Custom Report mdash Optional) B-19 Field-by-Field B-19 Example B-21
PRINT Parameter Record (Custom Report mdash Optional) B-23 Default Columns B-23 Field-by-Field B-24 Example B-26
PRTDTL Parameter Record (Optional for Statistical Report) B-27 Field-by-Field B-27 Example B-27
RECAL Parameter Record (Custom Report mdash Optional) B-28 Field-by-Field B-28 Example B-29
TESTIT Parameter Record (Optional) B-30 Field-by-Field B-30
UFT Parameter Record (Optional) B-31 Field-by-Field B-31 Example B-31
UHD Parameter Record (Optional) B-32 Field-by-Field B-32 Example B-32
Reports B-33 Parameter Record Listing B-34 Statistical Report B-35
APPENDIX C COMMON QUESTIONS
APPENDIX D RECORD LAYOUTS
File Layouts 15-2 Statistics File Record Examples 15-2 Statistics File Layout 15-3 Detail File Layout 15-7 Summary File Layout 15-8
GLOSSARY
INDEX
Generalized Selection Plus Userrsquos Guide - AS400 xv
Table of Contents
621 - 102002 xvi
B E F O R E Y O U B E G I N
Important Information
This chapter describes the purpose and use of the Generalized Selection Plus Users Guide conventions used in this guide and how to obtain assistance from Group 1 Software Inc
Purpose of This Guide xviii Who Should Use This Guide xviii Conventions Used in This Guide xix Finding the Information You Need xx Related Publications xxi If You Need More Help xxii
Group 1 Web Site xxii Fax-on-Demand xxii
To Order Additional Users Guides xxiii Your Comments Are Welcome xxiii
Generalized Selection Plus Userrsquos Guide - AS400 xvii
Important Information
Purpose of This Guide
This Users Guide is intended to provide you with all of the information you need to effectively use Generalized Selection Plus With this guide you will learn about Generalized Selection Plus concepts as well as defining and running jobs
This guide has three sections
Part I Concepts mdash Provides basic information about Generalized Selection Plus including terminology and concepts This section describes each component of the Generalized Selection Plus system
Part II Tasks mdash Provides instructions for preparing a job creating a sample job defining jobs and instructions and using Generalized Selection Plus in the supported environments
Part III Reference mdash Provides complete reference for every field on every parameter record a glossary of terms common questions and how to resolve parameter record problems
Who Should Use This Guide
This guide was developed for both new and experienced Generalized Selection Plus users Novice users will find parts I and II most useful while experienced users may want to refer to the reference section in Part III
xviii 621 - 102002
Conventions Used in This Guide
Conventions Used in This Guide
This guide uses the following typefaces and symbols for presentation purposes
TYPEFACE This typeface is used for system generated information such as parameter records
Italics This typeface is used for emphasis and for the titles of publications
Bold This typeface is used for emphasis
^^^ Indicates spaces (blanks) in parameter records or example data
1
2
3 Indicates steps in a process or a numbered list
NOTE Indicates important information or warnings
This space is used for references to other sections of the userrsquos guide
Generalized Selection Plus Userrsquos Guide - AS400 xix
Important Information
Finding the Information You Need
The following table summarizes the chapters in this guide The shaded rows indicate the different sections of the book
Table 1 Overview of Chapters
Chapter Descriptions
Part I Concepts
Chapter 1 Introducing Generalized Selection Plus
Describes Generalized Selection Plus features and benefits and presents three sample applications describing how organizations can use Generalized Selection Plus
Chapter 2 Generalized Selection Plus Overview
Provides an overview of Generalized Selection Plus terms and components and describes the ldquomatching processrdquo which Generalized Selection Plus performs
Chapter 3 Defining Your Input
Explains how to define your Generalized Selection Plus input files and describes information you should know before you develop your Generalized Selection Plus application This information includes input file layout file names processing requirements parameter record files parameter records and work areas
Part II User Tasks
Chapter 4 Processing Your Input Files
Describes how Generalized Selection Plus processes your input files and auxiliary input files
Chapter 5 What are Jobs and Instructions
Describes step-by-step all the possible functions you can perform with job and instruction parameter records
Chapter 6 Defining Jobs and Instructions
Provides instructions on using the Define Jobs and Instructions component to define a job list
Chapter 7 Defining a Statistical Report
Describes step-by-step how to define a custom Statistical Report The parameter records you develop are included in the tutorial files on the installation tape
Chapter 8 Example Batch Job
Provides step-by-step instructions in a tutorial format for creating a Generalized Selection Plus job
Chapter 9 Submit Batch Job Screens
Provides a complete reference for the Submit Batch Job component
Chapter 10 Defaults for Print Output Screens
PRovides a complete reference for the Defaults for Print Output component
Chapter 11 Administrative Screens
Provides a complete reference for the administrative Generalized Selection Plus screens
Chapter 12 Generated Reports
Provides examples of the reports taht are automatically generated by Generalized selection Plus
Chapter 13 Submitting Jobs from the Command Line
Provides instructions for running and submitting Generalized selection Plus from the system command line
Part III Reference
Appendix A GSP10 Parameter Records
Provides the layout and fields for each of the parameters used by Generalized Selection Plusrsquos processing program GSP10 Examples of each parameter are also included
Appendix B GSP90 Parameter Records
Provides the layout and fields for each of the parameters used by Generalized Selection Plusrsquos report program GSP90 Examples of each parameter are also included
621 - 102002 xx
Related Publications
Table 1 Overview of Chapters
Chapter Descriptions
Appendix C Common Questions
Provides answers to some commonly asked questions about Generalized Selection Plus
Appendix D Record Layouts
Shows the layouts of the Statistics File which is used to generate the user-defined Statistical Report and the Detail File and Summary File which you can generate from the Statistical Report
Glossary Provides definitions for terms used in this book
Index Provides easy access to the subjects covered in this guide
Related Publications
The publication listed below may assist you in understanding and complying with postal regulations
Table 2 Canadian Publications
Title Description Availability
Group 1s AS400 Job Management Guide
A guide that describes the administrative tasks you must perform to create and run jobs
httpwwwg1com (in the documentation section of the Technical Support area)
Generalized Selection Plus Userrsquos Guide - AS400 xxi
Important Information
If You Need More Help
If you are unable to resolve a problem Group 1s Technical Support Representatives 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 at the time the error condition occurred
The resulting reports (specifically the Execution Log Parameter Record Listing and Job Log if one exists)
Reporting complete details to Technical Support enables you and the Technical Support Representative to pinpoint and quickly resolve the problem
Use the information below to contact Group 1rsquos Technical Support Department
Technical Support Hotline (United States and Canada) mdash 800-367-6950
Facsimile (address your cover sheet to Technical Support) mdash 301-918-0462
Technical Support E-mail Address mdash supportg1com
Group 1 Web Site
You can obtain information about Group 1 products services and technical support through the Group 1 web site To gain access to the technical support area you must have a user ID and password To obtain a ID and password contact the Technical Support Department by phone or by e-mail
Group 1 Web Site mdash httpwwwg1com
Fax-on-Demand
Group 1rsquos Fax-on-Demand (FOD) system allows you to have information about Group 1 products and services faxed directly to your site Available documents include product alerts and announcements information on training classes promotions and authorized re-sellers The FOD system is constantly updated with the latest information
Fax-on-Demand mdash 301-918-0781
621 - 102002 xxii
To Order Additional Users Guides
To Order Additional Users Guides
If you wish to order additional Generalized Selection Plus Users Guides or any other Group 1 system manuals a Documentation Order Form is provided at the back of this publication Complete the form and send it to
GROUP 1 SOFTWARE INC ATTN DOCUMENTATION MANAGER 4200 PARLIAMENT PL STE 600 LANHAM MD 20706-1844
FAX 301-918-0735
To obtain electronic copies of Group 1 product manuals go to the Group 1 Web site at httpwwwg1com and click on Support Log in with your user ID and password to download copies (pdf files) of available user guides
NOTE To view pdf files you must have Adobe Acrobat Reader version 40 or later installed on your PC If you do not have Acrobat Reader you can download it free at httpwwwadobecom
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 provided at the back of this publication
If the Documentation Comment Form is missing from the back of this book address your comments to
GROUP 1 SOFTWARE INC DOCUMENTATION DEPT 4200 PARLIAMENT PL STE 600 LANHAM MD 20706-1844
We also include a System Enhancement Form on which you may request enhancements to Generalized Selection Plus If the System Enhancement Form is missing from the back of this book please address your comments to
GROUP 1 SOFTWARE INC CUSTOMER SERVICES DEPT 4200 PARLIAMENT PL STE 600 LANHAM MD 20706-1844
Thank you
Generalized Selection Plus Userrsquos Guide - AS400 xxiii
Important Information
xxiv 621 - 102002
C H A P T E R 1
Introducing Generalized Selection Plus
This chapter describes and lists the features and benefits of Generalized Selection Plus and presents three example Generalized Selection Plus applications
What is Generalized Selection Plus 1-2 Check Sort Sequence of Input Files 1-2 Identify Duplicate Input Records 1-3 Ignore Certain Input Records 1-3 Sample Input Records 1-4 Perform Data Conversion and Mathematical Functions 1-4 Add Data to the Input Record 1-4 Generate a Custom Statistical Report 1-5 Generate StateProvince Counts Report 1-5 Generate Up to Five Output Files 1-6 Create Seed Name Records 1-6
Why Use Generalized Selection Plus 1-6 Decreases Development Time 1-6 Efficiently Uses Resources 1-7 Increases Target Marketing Responses 1-7 Eliminates Duplicate Records 1-7 Generates Extensive Reports 1-7
Generalized Selection Plus Concepts 1-8 Match Codes 1-8 Work Areas 1-9 Input and Output Files 1-10 Auxiliary Input Files 1-10
Match Code Files and Relational Databases 1-10 ZIP Code File 1-12 Kill File 1-12
Job Parameters and Instruction Parameters 1-13 Applications 1-14 Job Sets 1-15 Jobs and Instructions 1-15
How Do They Work 1-16 Operands 1-16
Sample Applications 1-17 Manipulate Your Mailing List 1-17 Match and Merge 1-19
Chapter Summary 1-20
Generalized Selection Plus Userrsquos Guide - AS400 1-1
1 Introducing Generalized Selection Plus
What is Generalized Selection Plus
Generalized Selection Plus is a powerful and flexible tool that enables you to develop complex applications that can manipulate and build effective mailing lists With Generalized Selection Plus you can skip records match and merge against other files append data to your records and generate up to five output files
You can develop these types of applications with the following Generalized Selection Plus features
Input record sampling
Data conversion
Mathematical functions
Custom Statistical Report generation
Seed name usage
Besides the many applications for which you can use Generalized Selection Plus there are other basic features that allow you to manipulate your input and output files These features include the ability to
Identify duplicate input records
Ignore certain input records
Sample records
Convert data and perform mathematical functions
Add information to an input record
Generate custom Statistical Report
Generate StateProvince Counts Report
Generate up to five output files
Create seed name records
Check Sort Sequence of Input Files
Generalized Selection Plus provides a feature to check the sort sequence of your input files and your auxiliary input files (Match Code File(s) ZIP Code File and Kill File) Auxiliary input files are the files to be compared to the regular nameaddress Input files Note that you can also sort these files to a new file to retain the format of your original file
When you sort input nameaddress files or Match Code Files you sort according to match code A match code can be one or more fields on the input record If you sort your ZIP Code File you must sort it by ZIP Code and if you sort your Kill File it is sorted based on the entire record
621 - 102002 1-2
1 What is Generalized Selection Plus
IMPORTANT It is very important that you sort your input files and auxiliary input files by match code when you are matching against auxiliary input files or identifying input record duplicates Sorting ensures that the matching and duplicate detection processes work accurately
Identify Duplicate Input Records
When you use Generalized Selection Plus you can process up to three input nameaddress files at once If you are processing multiple input files you may want to identify and count duplicate records When Generalized Selection Plus identifies duplicates it identifies them according to a field or group of fields that you define For example you could identify duplicates according to an account number or you could identify duplicates according to account number and date Below is a list of Generalized Selection Pluss duplicate handling options
Identify intra-file duplicates mdash Duplicates within the same input file
Identify inter-file duplicates mdash Duplicates between input files
Process the first duplicate in a group all duplicates in a group or no duplicates in a group
To define your duplicate options see the Define Input Files section
Ignore Certain Input Records
Do you have a list of accounts that were taken off your mailing list With Generalized Selection Plus you can place these customer records in an auxiliary input file called the Kill File If an input record matches the Kill File Generalized Selection Plus automatically ignores that input record and selects the next input record for processing This is a simple way to keep your company from mailing unnecessary mail pieces
To define a Kill File see the Define Input Files section
Generalized Selection Plus Userrsquos Guide - AS400 1-3
1 Introducing Generalized Selection Plus
Sample Input Records
For instructions on converting data refer to ldquoSampling Recordsrdquo in Chapter 6
Generalized Selection Plus allows you to conduct record sampling so that you can limit the number of records that meet the criteria of your job The three sampling functions available are
Nth record selection mdash Includes or excludes every nth record that meets the criteria of a job or instruction
Fraction of records mdash Includes a fraction of the records that meet the criteria of a job or instruction
Record limit mdash Controls the number of records that can meet the criteria of a job or instruction
Perform Data Conversion and Mathematical Functions
Generalized Selection Plus has the capability to convert data from packed to unpacked data For instructions on and from unpacked data to packed data You can also perform mathematical functions converting data refer to with data or constant values You can use the addition subtraction multiplication and ldquoConverting Datardquo in Chapter 6 division functions
Add Data to the Input Record
Generalized Selection Plus allows you to move data from an auxiliary input file to a matching input record For our example if a recordrsquos ZIP Code matches an auxiliary input filersquos ZIP Code the customer resides in the vicinity of a local dealership For this application the matching auxiliary input file record consists of a dealership name and address of a local dealership for marketing purposes Refer to Figure 1-1
Input Record+1+2+3+4+5+6+7 John Smith 18473 Blue Sky Lane Gaithersburg MD 20879
Auxiliary Input File Record+1+2+3+4+5+6+7 Williams Cars 2837 Kane Road Gaithersburg MD 20879 January 14th
Input Record and Auxiliary Input File
ZIP Code
Figure 1-1 Input Record Matching
621 - 102002 1-4
1 What is Generalized Selection Plus
Z
The information from the matching auxiliary input file record is moved to the end of the input record Refer to Figure 1-2
Auxiliary Input File Record+1+2=3+4+5+6+7 Williams Cars 2837 Kane Road Gaithersburg MD 20879
IP Code data placed Input Recordat end of the input +1+2+3+4+5+6+7
record John Smith 18473 Blue Sky Lane Gaithersburg MD 20879
+8+9+10+11+12+13+14 Williams Cars 2837 Kane Road Gaithersburg MD 20879
Figure 1-2 Appending Data to the Input Record
The entire input record is then moved to an output file When the job completes there is an output file consisting only of customers in the vicinity of the dealership sale and the appropriate dealership information for each potential customer
Generate a Custom Statistical Report
A very powerful feature is the ability to define your own custom Statistical Report This report allows you to generate statistics about your input files and the records selected by your job criteria You can also manipulate the statistics using mathematical functions (adding subtracting dividing multiplying)
To produce a custom Statistical Report refer to Chapter 8 ldquoStatistical Report Tutorialrdquo
Note that to produce a Statistical Report you must have a complete understanding of Generalized Selection Plus processing
Generate StateProvince Counts Report
To generate a State Province Counts Report refer to Chapter 7 ldquoGenerating Standard Outputrdquo
Another type of report you can produce with Generalized Selection Plus is the State Province Counts Report You can generate record counts by state or province counts based on the records selected by your job criteria For example if you have an output file containing records with potential female customers who are making $30000 or more and in your target market you can produce StateProvince Counts Reports to show you the number of potential customers in each stateprovince
Generalized Selection Plus Userrsquos Guide - AS400 1-5
1 Introducing Generalized Selection Plus
Generate Up to Five Output Files
As you can see from the example applications listed at the beginning of this chapter you can produce output files containing very specific types of information An output file can contain data based on one set of criteria and the next output file can contain data based on another set of criteria With this capability you can generate up to five output files and produce lists of very specific data all in one pass of your input files
To define your output files see the Submit Job section
Create Seed Name Records
To define seed name records refer to Chapter 4 ldquoPreparing Your Jobrdquo
Seed names are records that you can place in mailing lists you generate Brokers and mailers often place seed names in their mailing lists Every time a mailing list client conducts a mailing a mail piece is sent back to the broker and the broker can ensure that the mailing list is not being misused If you conduct mailings through a service bureau you may also want to place your name as a seed name record in the file you give to the service bureau You will then receive a mail piece and know if the service bureau has conducted the mailing on time
Why Use Generalized Selection Plus
Generalized Selection Plus provides you cost savings both before and after the application is developed Generalized Selection Plus provides the following benefits
Reduces development costs and testing time
Efficiently uses resources
Increases target marketing responses
Provides extensive reporting
Decreases Development Time
Generalized Selection Plus provides a more efficient method of developing complex applications than using a programming language Coding time can be cut in half when you use Generalized Selection Plus because using mathematical operations compares data moves and ldquoifthenrdquo logic is as simple as typing a few commands instead of writing a program
621 - 102002 1-6
Why Use Generalized Selection Plus 1
Efficiently Uses Resources
You do not have to be a programmer to develop a Generalized Selection Plus job Office personnel familiar with Generalized Selection Plus can develop their own applications
Increases Target Marketing Responses
Generalized Selection Plus allows you to define record selection criteria to target specific members of the demographic population to mail a sales offer You can select records by reviewing data in a record by value ranges or greater thanless thanequal to comparisons This enables you to ldquoweed outrdquo the customers that are least likely to be interested in your product
Eliminates Duplicate Records
Generalized Selection Plus eliminates duplicate records within your input file This eliminates the embarrassment of sending the same mailpiece to the same residence It also saves you in postal costs for redundant mail pieces
Generates Extensive Reports
Generalized Selection Plus provides standard and user-defined reports to generate state province totals 3-digit and 5-digit ZIP code totals and any other information about your selection criteria
Generalized Selection Plus Userrsquos Guide - AS400 1-7
1 Introducing Generalized Selection Plus
Generalized Selection Plus Concepts
Now that you know what Generalized Selection Plus can do this section will give you an overall description of the important concepts of Generalized Selection Plus and how they work Important components of Generalized Selection Plus that you need to be familiar with include
Match codesmdashUsed to determine matches betweenamong files
Work areasmdashAreas where Generlized Selection Plus stores matched records during processing
Auxiliary input filesmdashFiles that contain records to be compared to the input name address file(s)
ApplicationmdashA group of tasks that perform a function such as generating multiple output files
Job setsmdashOne task within an application
Job and instructionsmdashOne step within a task
OperandsmdashFields within an instruction that are used to perform the step such as comparing two values
The following sections discuss these components in detail
Match Codes
If you use an auxiliary input file the match code is the data in your input record that the auxiliary input record used to test for a match Match codes are also used for
Checking the sequence of your input files according to the match code
Sorting your input files according to the match code
Detecting duplicate input records according to the match codes within the same input file or between two input files
A match code can be one field of data such as an account number or a string of up to ten fields of data (up to 99 bytes) such as a combination of the account number and the date field If you define more than one field and use an auxiliary input file you have to match both fields in the auxiliary input file If you are sorting your input files by multiple match code fields the files will be sorted by the first match code field and then by the second match code field etc
NOTE It is important that the auxiliary input files and the input files are sorted by match code prior to running your Generalized Selection Plus job
621 - 102002 1-8
Generalized Selection Plus Concepts 1
Work Areas
Work areas are locations where Generalized Selection Plus stores data during processing By storing these matching records you can access the data and perform the following tasks
Append data from a match code to an input record
Move the data
Convert the data to a different format
Compare the data
Test for the presence or absence of numeric or non-numeric data
Perform calculations
For an explanation of how and where Generalized Selection Plus stores data as it processes your input files and auxiliary input files refer to Chapter 4 ldquoPreparing Your Jobrdquo
The following table identifies the Generalized Selection Plus work areas
Table 1-1 Generalized Selection Plus Work Areas
Work Area Description
M The M work area is a 10000-byte area where Generalized Selection Plus automatically moves up to nine Match Code File records if it matches the input record
N The N work area is a 10000-byte area where Generalized Selection Plus automatically moves the input record Work area N is the only area from which you can send data to an output file
S The S work area is a 1000-byte area where the Statistics File records are constructed
W The W work area is a 1000-byte area to use for any function Generalized Selection Plus does not move any data here automatically
X The X work area is a 1000-byte area to use for any function Generalized Selection Plus does not move any data here automatically
Y The Y work area is a 1000-byte area to use for any function Generalized Selection Plus does not move any data here automatically
Z The Z work area is a 1000-byte area where Generalized Selection Plus automatically moves the ZIP Code File record if it matches the input record
NOTE All work area names are pre-defined by Generalized Selection Plus Any data changes must be moved to work area N before it is sent
Generalized Selection Plus Userrsquos Guide - AS400 1-9
1 Introducing Generalized Selection Plus
Input and Output Files
Generalized Selection Plus allows you to process up to three input files Based on your job criteria you can then generate up to five output files In addition to the five output files you may generate other output files including the following
Duplicates File mdash Contains all of the duplicate records that Generalized Selection Plus encountered in the input file(s)
Master File mdash Contains all of the input records processed from all of the input files
Report Files mdash Includes parameter listings and control totals for all output files generated
StateProvince Counts Report mdash Records the number of input records per state or province based on the first three digits of the input record ZIP Code or postal code
Statistics File mdash Records the number of input records per ZIP Code postal code or a portion of the input match code (This file is used to generate your custom report)
If you choose to define a custom Statistical Report Generalized Selection Plus uses the Statistics File as input for the report The following is a list of the possible output you can generate Note that you can generate a Detail File or a Summary File but not both
Statistical Report mdash Shows custom totals that you define
Detail File mdash Contains one record for each record processed
Summary File mdash Contains the totals for the lowest Statistical Report break level
Auxiliary Input Files
Auxiliary input files are files containing information that you can match against your input files There are three possible types of auxiliary input files
Match Code File (nine available)
ZIP Code File
Kill File
Match Code Files and Relational Databases
You can define up to nine Match Code Files which contain records that you compare to input file records Each Match Code File record contains a match code and any data associated with the match code which is compared to the input record match code You must define the same match code in every Match Code File but the match code data does not have to reside in the same position
1-10 621 - 102002
Generalized Selection Plus Concepts 1
For example if you define your match code as a combination of the ZIP Code and account number these two fields of information can reside in different positions in each Match Code File record Match Code File 1s ZIP Code could reside in positions 50-54 while Match Code File 2s ZIP Code could reside in positions 80-84 Match Code File 1s account number could reside in positions 1-4 while Match Code File 2s account number could reside in positions 10-14
The capability to define up to nine Match Code Files allows you to take advantage of a relational database You can define your relational database files as Match Code Files and then each Match Code File would contain the same match codes but with different associated data
For example you have Match Code File 1 containing account numbers (match codes) with the associated phone numbers and Match Code File 2 containing the same account numbers but with the associated mailing addresses When a Match Code File account number matches against an input file account number you have access to both the phone number and the mailing address for that account number in specific positions in work area M
At this point you can use the associated data from any of the Match Code File records for any function including
Adding data to the input record
Using the data for data comparisons numeric testing andor mathematical functions
NOTE The match code for a Match Code File can consist of up to ten fields that are no longer than 99 bytes
The following figure shows an example of a Match Code File record For this example the Account Number field and the Date field is the match code The remaining record data is associated with the account number and the date
Match Code File Record
+1+2+3+4+5+6+7+
03985 131999 153 Target Marketing Conference Dallas Texas (Acct) (Date)
Match code fields
Data associated with match code
Figure 1-3 An Example Match Code File Record
Generalized Selection Plus Userrsquos Guide - AS400 1-11
1 Introducing Generalized Selection Plus
ZIP Code File
The ZIP Code File contains ZIP Codes and any data associated with the ZIP Code The ZIP Code File is different from the Match Code File because the only data in the ZIP Code File that can be matched against an input record is the ZIP Code When the ZIP Code Filersquos ZIP Code matches an input filersquos ZIP Code the ZIP Code File record is placed in work area Z At this point you can use the associated data for any function including
Adding data to the input record
Using the data for data comparisons numeric testing andor mathematical functions
NOTE If you process an auxiliary ZIP Code File you can specify whether to match against a 5-digit ZIP Code or a 3-digit Sectional Center Facility (SCF) code
Figure 1-4 shows an example of a ZIP Code File record For this example the ZIP Code File record consists of a ZIP Code and the information associated with that ZIP Code
ZIP Code File Record
+1+2+3+4+5+6+7
20879 Retail Exclusive March 14 1999ZIP Code
Data associated with ZIP Code
Figure 1-4 An Example ZIP Code File Record
Kill File
The Kill File is used to compare its match code to the match code in an input file If an input record matches the Kill File the record is ignored automatically The Kill File contains only match code information and no other data The entire Kill File record has to match an input recordrsquos match code for the input record to be automatically ignored The Kill File is useful for listing any accounts that you wish to eliminate from the mailing
Figure 1-5 shows an example of a Kill File record For this example the account number file code and phone number in the input record have to match this information to be ignored automatically
1-12 621 - 102002
1 Generalized Selection Plus Concepts
Kill File Record
Figure 1-5 An Example Kill File Record
Job Parameters and Instruction Parameters
+1+2+3+4+5+6+7 (Acct) (File Code) (Phone number) 67254 012 301-999-9999Match code
For detailed instructions on defining job and instruction parameters refer to Chapter 6 ldquoDefining Jobs and Instructionsrdquo
You define job and instruction parameters to define how to test and manipulate the data available to you In the example for ldquoManipulate Your Mailing Listrdquo on the next page Lauren needs to mail a brochure concerning a retail store to a group of customers To do this she writes a set of job and instruction parameters to check for an input record gender code of ldquoFrdquo (female) and an income level of $35000 a year
A possible name for her job parameter could be MAILING The first instruction parameter would identify the location of the gender code in the input record and test for an ldquoFrdquo for female The second instruction parameter would identify the location of the annual income level in the input record and test for $35000 or more
Besides doing simple comparisons like those described above you can also do the following
Compare character data or packed or unpacked numeric data to test if it is equal to not equal to less than less than or equal to greater than or greater than or equal to another field of data or a constant value
Test for the presence or absence of numeric and non-numeric data
Add or subtract a constant or field value tofrom another piece of data or divide or multiply a constant or field value by another piece of data
Convert packed data to unpacked data or unpacked data to packed data
Move data to a different location
Branch to another job
Generalized Selection Plus Userrsquos Guide - AS400 1-13
1 Introducing Generalized Selection Plus
Applications
An application or job is a group of Generalized Selection commands that produces some kind of result such as generating three targeted mailing lists Figure 2-1 is an application consisting of three job sets Each job set sends records to a different output file (A B C) Each job set consists of one job parameter record and one or more subsequent instruction parameter records
Job set JOBST1 sends records to output file A if the instruction criteria are met
Instructions in the JOBST1 job set test the input record file code for the presence of 012 024 and 036
Output File 1
Output File 2
Output File 3
JOBST1 01 A JOBST1 02 012 JOBST1 02 024 JOBST1 02 036
JOBST2 B JOBST2
JOBST3 C JOBST3
Figure 1-6 ApplicationJob Set Organization
1-14 621 - 102002
Generalized Selection Plus Concepts 1
Job Sets
A job set consists of a group of functions which in combination perform a particular task A group of job sets represents an application that generates a result such as an output file to be used for a targeted mailing
As an example you can have a Generalized Selection Plus application consisting of three job sets
Job set FILECD selects only those input records that have a file code of 012 024 or 036 If a record meets any of these criteria it is processed by the next job FEMALE
Job set FEMALE tests for an input record gender code of ldquoFrdquo for female and an income level between $20000 and $40000 If a record meets these criteria the record goes to output file 1
Job set MINCST tests for an input record gender code of ldquoMrdquo for male and a state code of ldquoNYrdquo or ldquoCArdquo If a record meets these criteria the record goes to output file 2
A job set is made up of one job parameter record and one or more instruction parameter records
Jobs and Instructions
Job and instruction parameter records are Generalized Selection Plus commands The job parameter record names the job set and indicates the action to perform if a record fulfills the job set criteria The instruction parameters that follow have the same name as the job parameter record and define the processing steps to execute You can use instructions to
Limit the number of records sent to an output file
Compare character or packed data
Test for the presence or absence of numericnon-numeric data
Perform mathematical functions with character or packed data
Convert data to packed or unpacked data
Move data
Branch to another job
Generalized Selection Plus Userrsquos Guide - AS400 1-15
1 Introducing Generalized Selection Plus
How Do They Work
Its important to understand how job and instruction parameter records work For example we defined a job set to send input records to output file A if the record has all of the following elements
A gender code of M AND
An income level greater than or equal to $20000 AND
An income level less than or equal to $40000 AND
A state code of NY NJ or CA
Each of the above bullets represents one or more instruction parameter records in this job set All instruction parameter record criteria must be met for the input record to be sent to output file 1 because all of the instruction parameter records are connected by ldquoANDrdquo Note that you can also use ldquoORrdquo and parentheses to group instructions
The following input record will not be sent to output file 1 Why
John Smith 2300 Bellwood Dr Trenton PA 15237 M 35000
Although it does test true for the gender code criteria (M) and for the income level criteria (between $20000 and $40000) it does not test true for the state code criteria
The following input record will also not be sent to output file A Why
Paul Morton 6250 Monty Avenue Williamsburg CA 70362 M 50000
Although it does test true for the gender code criteria (M) and the state code of CA it does not test true for the income criteria All criteria have to be true because of the ldquoANDrdquo connector words
Operands
Operands are the parts of an instruction that perform a step in the job set For example in the bullets above the gender code value and the M are operands and are compared to one another to determine a match In the second bullet the income level value and $20000 are the operands that are also compared to each other
1-16 621 - 102002
1 Sample Applications
Sample Applications
The easiest way to show you what Generalized Selection Plus can do is to present some application examples We present sample applications
Using a single input file with selections to product a single output file
Using a single input file with selections to product multiple output files
Target a market
Each sample shows how Generalized Selection Plus can save your organization money
Manipulate Your Mailing List
Lauren works at an upscale retail chain in Maryland called Retail Exclusive Retail Exclusive has two stores in Montgomery County one in Rockville and one in Chevy Chase The Rockville store services ZIP Codes 20847 through 20859 and the Chevy Chase store services ZIP Codes 20813 through 20825 Lauren purchased a mailing list consisting of prospective customers from Montgomery County
Retail Exclusive wants to send a brochure to all prospective customers on this list that are female making more than $35000 a year and living in the ZIP Codes that each store services All of this information is available in the mailing list but Lauren has to select the addresses that fit the criteria The figure below shows what Lauren wants to do with her mailing list
Generalized Selection Plus
Selects only qualified prospects
Figure 1-7 Targeting Your Best Market
Generalized Selection Plus Userrsquos Guide - AS400 1-17
1 Introducing Generalized Selection Plus
For this application Lauren will use the mailing list containing prospective customers as an input file and then set up her Generalized Selection Plus job to test for
ZIP codes in the vicinity of the Rockville store (ZIP Codes 20847 through 20859) or the Chevy Chase store (20813 through 20825)
Gender code of ldquoFrdquo (female)
Annual income level of $35000
If a record meets these criteria it goes to output file A
When the job completes Lauren has generated an output file containing customer mailing information for people most likely to shop at Retail Exclusive By mailing to a targeted list Retail Exclusive saves money Lauren saves time by only mailing to ldquoqualifiedrdquo prospects Thus Generalized Selection Plus has helped Lauren conduct a mailing that could bring increased financial success to her employer Figure 1-5 shows the results of the Retail Exclusive application of Generalized Selection Plus
Generalized Selection Plus
Selects customers based on user-specified criteria
Targeted Mailing based on Output File A
Qualified Prospects
Retail Exclusive
Mailing List (Input File)
Qualified Prospects
(Output File A)
Figure 1-8 Manipulation Results
1-18 621 - 102002
1 Sample Applications
Match and Merge
Bill works at the software company PC Inc The company sells a total of nine different software packages This month PC Inc is about to release a new version of its three best selling software packages MoneyVest Graphics Studio and Word Power Bill needs to mail an upgrade notice to all current users of these three software packages to inform them how much it will cost to upgrade
For this application Bill will use his customer file as an input file and then set up his Generalized Selection Plus job to test for customers who have
All three of the software packages (send these records to output file A)
Two out of the three software packages (send these records to output file B)
One out of the three software packages (send these records to output file C)
When the job completes Bill has three output files From these files Bill can generate three different personalized letters The first will begin ldquoPC Inc is currently releasing the following three software packages that you currently userdquo The letter will then list the three software packages and the upgrade prices Bill will then generate labels from these output files to provide a completely customized package for the release With this personal approach Bill will increase customer satisfaction generate a better response and contribute to PC Incrsquos financial success Figure 1-3 shows the results of PC Incrsquos application of Generalized Selection Plus
Generalized Selection Plus
Selects customers based on user-specified criteria
Output File C Customers with One Software Package
Output File ACustomers with All Three
Software Packages
Output File B Customers with Two Software Packages
PC Inc
PC Inc
PC Inc
Customized mailing
Customized mailing
Customized mailing
Word
Power30
Graphics
Studio 30
Money
Vest 3
0
Figure 1-9 Matching and Merging Results
Generalized Selection Plus Userrsquos Guide - AS400 1-19
1 Introducing Generalized Selection Plus
Chapter Summary
Generalized Selection Plus is a powerful and flexible tool that allows you to develop simple or complex applications that you can use for target marketing mailing list manipulation and statistical analysis by ZIP Codes Generalized Selection Plus allows you to decrease development and testing time efficiently use your resources and increase target responses and eliminate duplicates By finding the people most likely to buy your goods and use your services you are able to produce highly targeted marketing efforts that help you get the best use of your marketing dollars
Besides the many applications for which you can use Generalized Selection Plus there are other basic features that you can use to manipulate your input and output files
Identify duplicate input records
Ignore certain input records
Sample records
Convert data and perform mathematical functions
Add information to an input record
Generate a custom Statistical Report
Generate StateProvince Counts Report
Generate up to five output files
Create seed name records
Generalized Selection Plus comprises the following
Match codes mdash This is the data in your input record and auxiliary input record that tests for a match the data used for checking the sequence of your input files and the data for determining duplicates by match code
Work areas mdash These are locations where Generalized Selection Plus stores data during processing or where you can test data while processing your job criteria
Input files mdash You can process up to three input files at one time
Auxiliary input files mdash These are files containing information that you can match against your input files
Output files mdash You can generate up to five output files plus the files listed on page 1-10 and also generate a Master File containing every input record used in the job
Job and instruction parameters mdash These parameters are what you use to define how to test the data available to you and define your job criteria
1-20 621 - 102002
C H A P T E R 2
Generalized Selection Plus System Overview
This chapter provides an overview of the Generalized Selection Plus System It explains what each of the components are and explains some of the more complex ldquoglobalrdquo concepts about using Generalized Selection Plus
Using Generalized Selection Plus System 2-2 Generalized Selection Plus System 2-2 Screens 2-6 Program and Screen ID 2-7 Release Number 2-8 DateTime Stamp 2-8 Job ID 2-9 User-Defined System Heading 2-9 System-Defined Screen Heading 2-9 Fields 2-9 Function Keys 2-10
Saving to an External File 2-10 Online Help 2-10 Chapter Summary 2-11
Generalized Selection Plus Userrsquos Guide - AS400 2-1
2 Generalized Selection Plus System Overview
Using Generalized Selection Plus System
Generalized Selection Plus is a screen driven system Note that online help is available from any Generalized Selection Plus screen To obtain online help press ltF1gt or your ltHELPgt key
Generalized Selection Plus System
The Generalized Selection Plus System processes up to three input nameaddress files and can access corresponding records from three types of auxiliary input files Auxiliary input files include up to nine Match Code files one ZIP Code file and one Kill File Based on job and instruction criteria you can produce up to five separate output files
There are five main components (see the figure on page 2-4) of Generalized Selection Plus
Defaults for Print Output
Define Input Files
Define Jobs and Instructions
Define Statistical Report
Submit Batch Job
The Defaults for Print Output component allows you to specify headers and footers for the Generalized Selection Plus reports as well as define the number of lines that are to be printed on each page of the reports
The Define Input Files component allows you to
Define up to three input files to be processed
Define your input record match code field locations and ZIP Code field location which can be compared to the auxiliary input file match code fields
Define up to nine Match Code files and match code field location(s) to be used for comparison (If an input record match code matches against a Match Code File the Match Code File record is read into specific positions in work area M)
Define your ZIP Code file and ZIP Code location (If an input record ZIP Code matches against the ZIP Code file the ZIP Code file record is read into work area Z)
Define the Kill File match code fields (If an input record matches this file the input record is automatically ignored)
Specify how Generalized Selection Plus should deal with duplicates that occur between two input files or within the same input file
Specify how Generalized Selection Plus should deal with input or auxiliary input file records that are out of sequence
Define the location of a File Indicator field on the output record that indicates from which input file a record originates
621 - 102002 2-2
Using Generalized Selection Plus System 2
Define the location of a Duplicate Indicator field on the Duplicate File output record that indicates the first duplicate of a duplicate group
The Define Jobs and Instructions component allows you to define your job names and the instructions for each job With your jobs you can
Convert data to packed or unpacked data
Compare fields of data
Perform mathematical functions
Move data among the work areas
Send records to an output file if your job criteria is met
You can develop your instructions by typing parameters copying deleting and moving one or more parameters at a time or filling out the screen that produces the parameters
The Define Statistical Report component allows you to develop a custom Statistical Report which generates statistics about your input files and the records selected by your job criteria
The Submit Batch Job component allows you to
Define your output files
Indicate whether to sort your input files
Indicate whether to sort your input files to a new file
Define whether you want a sequence number written to each output file
Submit the job and perform the instructions that you defined in the Define Jobs and Instructions component
The diagram below shows the input files the Generalized Selection Plus components accessed from the DefineSubmit Generalized Selection Plus Job screen (except Define Statistical Report) and the output files that can be generated Refer to the next page for a diagram of the Define Statistical Report component
Generalized Selection Plus Userrsquos Guide - AS400 2-3
2 Generalized Selection Plus System Overview
ZIP Code File Input Name amp (Optional)
Address File (1 Required)
Match Code File(s) Kill File (Optional) (Optional)
DefineSubmit Job
Define Input Files Define Jobs and Submit A Batch Print Output Defaults for
Instructions Job
Output Name and State Countsamp Statistics File Address File(s)
Reports (Optional)
Master File Duplicates File (Optional) (Optional)
Figure 2-1 The Components of Generalized Selection Plus
621 - 102002 2-4
2 Using Generalized Selection Plus System
The following diagram below shows the input file for the Define Statistical Report component which is an output file generated from your jobs and instructions and the output files generated by the Define Statistical Report component
NOTE You can generate an output Detail File or an output Summary File mdash not both
Statistics File
Required
Summary File Optional
Detail File Optional
Statistical Report
Define Statistical Report
Figure 2-2 The Define Statistical Report Component
Generalized Selection Plus Userrsquos Guide - AS400 2-5
2 Generalized Selection Plus System Overview
Screens
Each component of Generalized Selection Plus consists of a series of screens Each screen contains fields where you enter specifications about your job To move from screen to screen within the Generalized Selection Plus System you will use function keys
The figure below shows a sample screen and highlights ldquostandardrdquo Generalized Selection Plus screen components
Program and User-Defined System Screen IDs Heading
System-Defined DateTime ReleaseScreen Heading Stamp Number
Job ID
Fields
135923 Generalized Selection System Plus GSCPID00 09102002 Replace with screen heading desired GSCPID15 Job TEST Input File Definition R062M01
Match Code File Details Specify match code file details Press enter to calculate length Match File
Library Exit-routine Member FIRST [ZIPINM] Posn Len Fmt Match file ZIP code position and format C (default) [MATCHx] P Match file match code field(s)
F6=Update F9=More Files F10=MDATA Record F12=Cancel F24=Field Search
Function Keys
Figure 2-3 Screen Sample
621 - 102002 2-6
2 Using Generalized Selection Plus System
As you can see by the callouts in Figure 2-3 there are eight main elements that make up each screen
Program and screen IDs
Release number
Datetime stamp
Job ID
User-defined system heading
System-defined screen heading
Fields
Function keys
Program and Screen ID
The program and screen IDs are located in the upper-right corner of the screen The program ID is above the screen ID The program ID identifies the current program this screen is a part of The screen ID is a unique label that identifies the screen Each program and screen ID is eight characters The table below describes the possible values
Table 2-1 Program and Screen ID Characters
Characters Name Meaning Possible Values
1-4 System ID Identifies what Group 1 AS400 system this screen is a part of
GSCP mdash Generalized Selection Plus
5-6 Module ID Identifies what module within Generalized Selection Plus this screen is a part of (the modules are usually the component name)
CP Copy Job DS Define andor Submit F3 Exit Confirmation ID Define Input Files IP Copy from an external file JI Job and Instruction Definition MM Work with Jobs (main menu) NJ Create New Job OP Copy to an external file PX Defaults for Print Output RJ Rename Job RP Define Statistical Report SB Submit Batch Job VX View an external file
7-8 (screen ID only)
Screen Number
Identifies the screen within the module
Any 2-digit number
For example the program ID in the figure on page 2-6 is GSCPID00 and the screen ID is GSCPID15 We know then that this is screen number 15 in the Input File Definition component
Generalized Selection Plus Userrsquos Guide - AS400 2-7
2 Generalized Selection Plus System Overview
NOTE The screen numbers are not always in sequence nor are they always continuous For example just because the screen ID is GSCPID15 that does not mean that this is the 15th screen you will encounter in the Input File Definition component nor does it necessarily mean that there are 15 screens total in the Input File Definition component
Release Number
The release number is at the top right corner of the screen directly below the screen ID This tells you the software release and modification level of Generalized Selection Plus In our sample screen on page 2-6 the release number is R062M01 which means this is release 62 modification 1
NOTE Except for our sample screen pictures of screens in this book do not show the release number This is done to avoid unnecessary updates to the documentation when there is a new release of the software but the screens themselves havent changed
DateTime Stamp
The datetime stamp located in the upper left corner of the screen shows you the current date and time In our sample screen on page 2-6 the time is 1010 and 34 seconds and the date is October 29 1999 (10291999)
NOTE The datetime stamp reflects the time at which the screen was accessed and will not change until you press a key that causes the screen to change For example if you were interrupted in the middle of your work and came back to your terminal after a few minutes the datetime stamp would not represent the current time
621 - 102002 2-8
Using Generalized Selection Plus System 2
Job ID
The job ID located just below the datetime stamp in the upper left corner of the screen uniquely identifies this Generalized Selection Plus job It is not unique to a specific screen while you are working with a particular job that job ID will be displayed on every screen In the figure on page 2-6 our job ID is ldquoTESTrdquo In our example screens throughout the rest of this book we will not be showing the job IDs
User-Defined System Heading
The user-defined system heading is always ldquoReplace with screen heading desiredrdquo unless you change it The user-defined system heading is not unique to a particular screen or job mdash the same heading will be displayed on each screen regardless of the screen ID or job ID This feature is provided so that you may customize the Generalized Selection Plus to contain your companys name or any other text across the top
System-Defined Screen Heading
The system-defined screen heading tells the name of the specific screen that is displayed on your monitor In addition to the screen heading there is often a subheading that more uniquely identifies the screen For example all of the screens in the Input File Definition component have ldquoInput File Definitionrdquo as the main system-defined screen heading but only one screen has the subheading ldquoMatch Code File Detailsrdquo
Fields
Fields are underlined ldquoblanksrdquo on the screen for you to fill in with information Each field is labeled with a field name and has space for you to type data All of the information that you type about your Generalized Selection Plus job will be entered through fields Some fields are optional and some fields have default values that will be used if you leave them blank
Note also that there is complete online help for each field Simply position your cursor to the field in question and press ltF1gt or your ltHELPgt key On our sample screen the first field has the name Match File ZIP Code Position and Format and has space for you to type up to a 4-digit location and a 2-character format code
Generalized Selection Plus Userrsquos Guide - AS400 2-9
2 Generalized Selection Plus System Overview
Function Keys
Each screen has a specific set of function keys associated with it These function keys allow you to move to a different screen save information you have typed on this screen or perform some task with the data you have typed on the screen At the bottom of each screen you will find a list of the valid function keys On our example screen on page 2-6 the function keys listed are ltF6gt ltF9gt ltF12gt and ltF24gt
There are some function keys that are global to the entire Generalized Selection Plus System These function keys work the same for every screen on which they are available (though not every global function key is available from every screen) These global function keys are
F1 mdash Obtain online help
F3 mdash Exit the system or module
F5 mdash Refresh the screen (put the last-saved values back in the fields)
F6 mdash Update the job or module by saving the information in the current component
F12 mdash ldquoBack-uprdquo one level to the previous screen usually without saving your changes
F17 mdash Position the list at the top
F18 mdash Position the list at the bottom
F19 mdash Shift left to see more information
F20 mdash Shift right to see more information
F24 mdash Display additional function keys or field search option
Saving to an External File
Generalized Selection Plus provides you with the ability to save job parameters to an external file Once you have saved the data you may then load the data from the file into other jobs The file you are saving to must be created before you submit the job to run The file must be a source physical file with a record length of 92
Online Help
Each screen in Generalized Selection Plus has online help available at the touch of a function key Any time you are unsure what you are supposed to type for a particular field or what a specific function key does you can press ltF1gt Context-sensitive information will be displayed about the purpose of the screen the fields on the screen and the function keys you can use from the screen The help text displays information about the field your cursor was on when you pressed ltF1gt
2-10 621 - 102002
Chapter Summary 2
Chapter Summary
Generalized Selection Plus can utilize up to three nameaddress input files and can compare input records for duplicates within the same input file and between other input files You can also compare input records with records within a Match Code file ZIP Code file and Kill File which you define Generalized Selection Plus also allows you to produce reports and generate output files based on the comparisons The system has four main components
Defaults for Print Output
Define Input Files
Job and Instruction Definition
Define Statistical Report
Submit a Batch Job
Each component consists of a series of screens These screens have fields into which you enter information about your job You will use function keys to move from screen to screen
Online help is available with the Generalized Selection Plus System
Generalized Selection Plus Userrsquos Guide - AS400 2-11
2 Generalized Selection Plus System Overview
2-12 621 - 102002
C H A P T E R 3
Defining Your Input
This chapter explains how to define your input files default records seed records and how to specify input file options Additionally this chapter provides a complete reference for the Define Input Files component of Generalized Selection Plus Each screen is presented along with its fields options and function keys
Defining Input 3-3 Step 1 Identify Input File and Details 3-4 Step 2 Specify Summary File Control Field Length (Optional) 3-7 Step 3 Identify Auxiliary Input Files 3-9 Step 4 Define Auxiliary Input File Default Record-MDATA
(Optional) 3-11 Step 5 Define Seed Records (Optional) 3-13 Define Input Files Screen Reference 3-19 Input File and Auxiliary Input Files 3-21
Input Files 3-21 Sort Input Files 3-22
Exit Routines 3-23 Parameter EXITP1 3-23 Parameter EXITP2 3-24 Parameter EXITP3 3-24 Parameter EXITP4 3-24
Input File Identification Details Screen (GSCPID05) 3-25 Work Area N 3-26 Clearing the Entire N Work Area 3-26 Fields 3-26 Function Keys 3-28
Input File Details Screen (GSCPID10) 3-29 Fields 3-30 Function Keys 3-32
Match Code File Details Screen (GSCPID15) 3-33 Work Area M 3-34 Fields 3-35 Function Keys 3-36
MATCHx Files 2-9 (GSCPID30) 3-37 Work Area M 3-38 Fields 3-39 Function Keys 3-40
Match Code File Default Record (MDATA) Screen (GSCPID18) 3-41 Fields 3-42
Generalized Selection Plus Userrsquos Guide - AS400 3-1
3 Defining Your Input
Function Keys 3-43 ZIP Code File Details Screen (GSCPID20) 3-44
Work Area Z 3-45 Fields 3-45 Function Keys 3-46
ZIP Code File Default Record (ZDATA) Screen (GSCPID18) 3-47 Fields 3-49 Function Keys 3-50
Kill File Identification Screen (GSCPID25) 3-51 Fields 3-52 Function Keys 3-52
Seed Name Definition Screen (GSCPID41) 3-53 Fields 3-54 Function Keys 3-55
Add a Seed Name Definition Screen (GSCPID50) 3-56 Fields 3-57 Function Keys 3-57
SEEDED CODE Replacement Data Screen (GSCPID72) 3-58 Fields 3-59 Function Keys 3-59
SEEDED MARK Replacement Data Screen (GSCPID71) 3-60 Fields 3-61 Function Keys 3-61
Edit SEEDED Record Screen (GSCPID61) 3-62 Fields 3-63 Function Keys 3-64
Statistics File Control Field (SMFILE) Screen (GSCPID12) 3-65 Fields 3-66 Function Keys 3-66
621 - 102002 3-2
Defining Input 3
Defining Input
There are five steps to defining Generalized Selection Plus input
1 Identifying input nameaddress files
2 Specifying Statistics File control field length (Optional)
3 Identifying auxiliary input files
4 Defining an auxiliary input file default record (Optional)
5 Defining seed records (Optional)
The following sections describe these steps in detail
Generalized Selection Plus Userrsquos Guide - AS400 3-3
3 Defining Your Input
Step 1 Identify Input File and Details
For our first step we will define two input nameaddress files and specify the input file processing options First display the Define andor Submit a Job screen (GSCPDS01)
92243 Generalized Selection System GSCPDS00 1212001 Replace with screen heading desired GSCPDS01
Define andor Submit a Job
Type options press Enter 2=Edit 6=Create
- - - - -Last Activity- - - - -Opt Function Date Time User
Defaults for Print Output 03182001 105014 D1DEF 2 Define Input Files
Define Jobs and Instructions
Define Statistical Report
Submit Batch Job
F3=Exit F12=PrevScrn
1 Type 2 in the Opt field next to Define Input Files and press ltENTERgt
621 - 102002 3-4
Step 1 Identify Input File and Details 3
The Input File Identification Details screen (GSCPID05) is displayed
163525 Generalized Selection System GSCPID00 01082001 Replace with screen heading desired GSCPID05 Job IVP Input File Definition
Input File Identification Details
Specify input files andor exit routine details Press enter to calculate lengths IA File G1IVPGS Library G1IVP Exit-routine Member FIRST
IB File G1IVPGS Library G1IVP Exit-routine Member G1IVPGS2
IC File Library Exit-routine Member FIRST [JOBCTL] Clear entire N work area N Y N (default) Write record immediately N Y N (default)More
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
2 Identify the input file names libraries and members
3 Specify the processing options
The Clear entire N work area field specifies whether to clear the entire N work area each time an input record is processed or to clear only the defined input record length
The Write record immediately field specifies whether to write the record immediately after it meets the criteria of a job to the defined output file or to wait until the entire job list is executed
4 Press your ltPAGE DOWNgt key to move to the next screen
Generalized Selection Plus Userrsquos Guide - AS400 3-5
3 Defining Your Input
The Input File Details screen is displayed
163632 Generalized Selection System GSCPID00 01082001 Replace with screen heading desired GSCPID10 Job IVP Input File Definition
Input File Details [ZIPIN] Posn Len Fmt ZIP Code location 133 C [MATCHI] Input file match code location(s) 133 5 C C (DFT)
[DUPCTL] P Specify input file duplicate handling
Intra-file C C E C = CountprocessInter-file C C E X E = Countprocess 1st
X = Countprocess none Duplicate indicator 145 1 Value
[SEQERR] Out-of-sequence handling I B = Bypass
C = Processcheck E = Terminate I = Processignore
[FLCODE] File indicator field position 142 3
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
5 Define the input file ZIP Code location
6 Define the Match Code field locations
7 Specify the input file processing options
Input file duplicate handling and duplicate indicator mdash allows you to indicate how to handle duplicates between two input files (Inter-file Dupes) and within one input file (Intra-file Dupes) If you specify input file duplicate handling duplicate input records are sent to the Duplicates File To specify if an input record is the first in a duplicate group define a Value to be placed in the Duplicate indicator field location on the Duplicate File output record
Out-of-sequence handling mdash specifies how to handle input records that are not in match code sequence
File indicator mdash field defines an output record location where Generalized Selection Plus will place the input file indicator (A B or C) for the current record
621 - 102002 3-6
3 Step 2 Specify Summary File Control Field Length (Optional)
Step 2 Specify Summary File Control Field Length (Optional)
The next step is to define the Statistics File control field length The Statistics File will contain counter records and the control field length represents the first nth characters of your match code (the default is 5) Each counter record contains the first nth characters (control field value) of your match code and any counts accumulated for that control field value (You define what is to be counted within your selection criteria (job and instruction list)) When the control field value changes Generalized Selection Plus generates another counter record and set of counts
NOTE If you do not enter a control field length on this screen the default is five
For example if you define a control field length of 5 (default) and the first five characters of your match code is the ZIP Code Generalized Selection Plus will accumulate counts by ZIP Code Each Statistics File record will contain a ZIP Code and the counts accumulated for that ZIP Code
1 To define the control field length go to the Input File Details screen (GSCPID10)
163632 Generalized Selection System GSCPID00 01082001 Replace with screen heading desired GSCPID10 Job IVP Input File Definition
Input File Details
[ZIPIN] Posn Len Fmt ZIP Code location 133 C
[MATCHI] Input file match code location(s) 133 5 C C (DFT)[DUPCTL] P
Specify input file duplicate handling Intra-file C C E C = CountprocessInter-file C C E X E = Countprocess 1st
X = Countprocess none Duplicate indicator 145 1 Value
[SEQERR] Out-of-sequence handling I B = Bypass
C = Processcheck E = Terminate I = Processignore
[FLCODE] File indicator field position 142 3
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
2 Press ltF11gt
Generalized Selection Plus Userrsquos Guide - AS400 3-7
3 Defining Your Input
You will see the Summary File Control Field (SMFILE) screen (GSCPID12)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID12
Input File Definition Summary File Control Field (SMFILE)
Specify details for Statistics File
Control field length (of input match code) 10
Control field output position (if len gt 5) 70
F5=Refresh F6=Save F12=Cancel
3 Enter the length of the entire match code
4 Enter the location for the control field on each Statistics File record
5 Press ltF6gt to return to the Input File Details screen (GSCPID10)
NOTE To keep counts for postal codes instead of ZIP Codes type 6
621 - 102002 3-8
3 Step 3 Identify Auxiliary Input Files
Step 3 Identify Auxiliary Input Files
After you define your Statistics File control field length the next step is to define the auxiliary input files As an example we will define a Match Code File (You can define up to nine Match Code Files) Display the Input File Details screen (GSCPID10)
163632 Generalized Selection System GSCPID00 01082001 Replace with screen heading desired GSCPID10 Job IVP Input File Definition
Input File Details [ZIPIN] Posn Len Fmt ZIP Code location 133 C [MATCHI] Input file match code location(s) 133 5 C C (DFT)
[DUPCTL] P Specify input file duplicate handling
Intra-file C C E C = CountprocessInter-file C C E X E = Countprocess 1st
X = Countprocess none Duplicate indicator 145 1 Value
[SEQERR] Out-of-sequence handling I B = Bypass
C = Processcheck E = Terminate I = Processignore
[FLCODE]File indicator field position 142 3
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
1 Press ltF7gt
Generalized Selection Plus Userrsquos Guide - AS400 3-9
3 Defining Your Input
You will see the Match Code File Details screen (GSCPID15)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID15
Input File Definition Match Code File Details
Specify match code file details Press enter to calculate length Match File Library Exit-routine Member FIRST [ZIPINM] Posn Len Fmt Match file ZIP code position and format C (default) [MATCHx] P Match file match code field(s)
F6=Update F9=More Files F10=MDATA Record F12=Cancel F24=Field Search
2 Identify the Match Code File
3 Indicate the ZIP Code position and format
4 If your match code consists of multiple fields define the field positions lengths and formats across Match Code File match code field(s)
NOTE These match code fields must contain the same information as the input record match code fields but the fields can reside in different locations
5 To define Match Code Files 2-9 press ltF9gt
If you must define more than one Match Code File consider the size of your input record Generalized Selection Plus places Match Code File records in work area M at 1000-byte intervals except for the first Match Code File record which has 2000 bytes If your records are larger than 1000 bytes define your Match Code Files so that records are placed in work area M at larger intervals For example if your Match Code File records are 2000 bytes long use Match Code Files 1 3 and 5 This arrangement will not overlap any records even if Generalized Selection Plus places all three records in work area M at the same time
3-10 621 - 102002
3 Step 4 Define Auxiliary Input File Default Record-MDATA (Optional)
Step 4 Define Auxiliary Input File Default Record-MDATA (Optional)
After you identify your Match Code File(s) you can define a Match Code File default record Generalized Selection Plus will place the default record in work area M if no Match Code File record corresponds with an input file record Display the Match Code File Details screen (GSCPID15)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID15
Input File Definition Match Code File Details
Specify match code file details Press enter to calculate length Match File Library Exit-routine Member FIRST [ZIPINM] Posn Len Fmt Match file ZIP code position and format C (default) [MATCHx] P Match file match code field(s)
F6=Update F9=More Files F10=MDATA Record F12=Cancel F24=Field Search
1 Press ltF10gt
Generalized Selection Plus Userrsquos Guide - AS400 3-11
3 Defining Your Input
Generalized Selection Plus displays the Match Code File Default Record (MDATA) screen (GSCPID18)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID18
Input File Definition Match Code File Default Record (MDATA)
[MDATA] Specify values for the field desired
Posn Match Code file default data +10+20+30+40+50
001-050 0 1 623 23 20879 DEFAULT NAME DEFAULT 051-100 STREET CITY ST 834 101-150 151-200 201-250 251-300 301-350 351-400 401-450
451-500 More
F5=Refresh F6=Update F12=Cancel
2 Fill in the default record according to your Match Code File layout
3 To display the next Match Code File Detail Record screen (GSCPID18) press ltPAGE DOWNgt or ltPAGE UPgt
To update your default record press ltF6gt twice
Generalized Selection Plus displays the Input File Details screen (GSCPID10)
To identify the ZIP Code File ZIP Code File processing options and a ZIP Code File default record press ltF8gt
To identify the Kill File press ltF9gt
3-12 621 - 102002
3 Step 5 Define Seed Records (Optional)
Step 5 Define Seed Records (Optional)
After defining the input files and auxiliary input files you can define up to ten seed records to be placed in your output files in match code sequence Display the Input File Details screen (GSCPID10)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID10
Input File Definition Input File Details
[ZIPIN] Posn Len Fmt ZIP Code location 71 C [MATCHI] Input file match code location(s) 71 5 C C (DFT)
[DUPCTL] 90 3 C P Specify input file duplicate handling
Intra-file C C E C = CountprocessInter-file C C E X E = Countprocess 1st
X = Countprocess none Duplicate indicator 210 1 Value [SEQERR] Out-of-sequence handling C B = Bypass
C = Processcheck E = Terminate I = Processignore
[FLCODE] File indicator field position 200 3
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
1 Press ltF10gt
Generalized Selection Plus Userrsquos Guide - AS400 3-13
3 Defining Your Input
You will see the Seed Name Definition screen (GSCPID41)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID41
Input File Definition Seed Name Definition
[SEEDED CODE] [SEEDED MARK] [SEEDED]Type options press Enter
4=Delete 5=Display 12=Work with Opt Seed name rec
F6=Update F10=Add Seed Name Record F12=Cancel
2 To add a seed record press ltF10gt
Note that when you add seed record information this screen allows you to edit display and delete the information
3-14 621 - 102002
3 Step 5 Define Seed Records (Optional)
You will see the Add a Seed Name Definition screen (GSCPID50)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID50
Input File Definition Add a Seed Name Definition
[SEEDED CODE] [SEEDED MARK] [SEEDED] Specify which type of seed name set to be added press Enter
Seed name type SR SC SM SR
SC = Seeded Code replacement SM = Seeded Mark replacement SR = Seeded name record
F12=Cancel
3 Enter SR in the Seed Name Type field
Generalized Selection Plus Userrsquos Guide - AS400 3-15
3 Defining Your Input
You will see the Edit SEEDED Record screen (GSCPID61)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID61
Input File Definition Edit SEEDED Record
Specify values for the field position desired
Match Code value 20770
Posn Seeded record value +10+20+30+40+50
001-050 DA$$$ SMITH 6404 IVY LANE 051-100 GREENBELT MD 20770 101-150 151-200 201-250 251-300 301-350 351-400 401-450 451-500
More
F5=Refresh F6=Update F12=Cancel
4 Specify a match code value for Generalized Selection Plus to use to place this seed record into an output file in match code sequence
For example if the first five characters of your match code consist of the ZIP Code type a ZIP Code When the same ZIP Code or higher is written in the output file Generalized Selection Plus will place the seed record in the output file in match code sequence
5 Type the seed record you want sent to the output file(s)
The dollar signs ($$$) indicate where you want to replace data according to the output file
6 To define seed record information for bytes 501-999 press ltPAGE DOWNgt
To update your seed record press ltF6gt
3-16 621 - 102002
3 Step 5 Define Seed Records (Optional)
You will see the Add a Seed Name Definition screen (GSCPID61)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID50
Input File Definition Add a Seed Name Definition
[SEEDED CODE] [SEEDED MARK] [SEEDED] Specify which type of seed name set to be added press Enter
Seed name type SC SC SM SR
SC = Seeded Code replacement SM = Seeded Mark replacement SR = Seeded name record
F12=Cancel
7 Type SC in the Seed name type field
We typed three dollar signs ($$$) in the seed record We will define seeded codes to replace the $$$ using SC To replace up to nine dollar signs in a seed record enter SM and define seeded marks
Generalized Selection Plus Userrsquos Guide - AS400 3-17
3 Defining Your Input
You will see the SEEDED CODE Replacement Data screen (GSCPID72)
92243 Generalized Selection System GSCPID00 1212001 Replace with screen heading desired GSCPID72
Input File Definition SEEDED CODE Replacement Data
Specify values to replace the $ in the seeded records
Replacement data for output file A VID
Replacement data for output file B NNY
Replacement data for output file C NA
Replacement data for output file D
Replacement data for output file E
F5=Refresh F6=Update F12=Cancel F24=Field Search
8 Fill in the seeded codes as shown above
The figure below shows our seed record and how the records will appear in the output files based on the our seeded codes
Defined Seed Record DA$$$ SMITH
Information to be replaced
6404 IVY LANE GREENBELT MD 20770
Output File A DAVID SMITH
Seed Record6404 IVY LANE GREENBELT MD 20770
Output File B DANNY SMITH
Output File C DANA SMITH
Seeded Codes
Seed Record6404 IVY LANE
Seed Record 6404 IVY LANE
GREENBELT
GREENBELT
MD 20770
MD 20770
Figure 3-9 SEEDED Code Example
We have finished defining our input
9 Press ltF6gt until the Define andor Submit a Job screen (GSCPDS01) appears
Refer to the remaining chapters of this guide to define your selection criteria
3-18 621 - 102002
Define Input Files Screen Reference 3
Define Input Files Screen Reference
The Define Input Files component allows you to
Identify the input nameaddress file(s) and file details
Identify the input file exit routines if any
Identify the Match Code file(s) and file details
Identify the ZIP Code file and file details
Identify the Kill File and file details
Define any seed name records
You will define these items from the screens listed below The relationship between these screens is displayed on the following page
Input File Identification Detail screen mdashIdentify up to three input nameaddress files (GSCPID05)
Input File Details screen mdash Define how to process duplicate and out-of-sequence input file records identify the input file ZIP Code locations and any match code field locations and indicate the locations of a Duplicate Indicator field and a File Indicator field on the output record (GSCPID10)
Match Code File Details screen mdash Identify the file(s) and define the match code which is the data in the Match Code files that you want compared to the input records (GSCPID15)
More Match Code Files screen mdash Identify up to eight more Match Code files and the locations of each files match code fields (GSCPID30)
Match Code File Default Record (MDATA) screen mdash Define the values for the Match Code file default record (The default record is placed in work area M if the input record does not match any record in the Match Code file (GSCPID18))
ZIP Code File Details screen mdash Identify the file define the location and format of the ZIP code in the ZIP Code file and specify how to process duplicates and whether to match against five digits or three digits (GSCPID20)
ZIP Code File Default Record (ZDATA) screen mdash Define the values for the ZIP Code file default record (The default record is placed in work area Z if the input records ZIP Code does not match any ZIP Code in the ZIP Code file (GSCPID18)
Kill File Details screen mdash Identify the Kill File (GSCPID25)
Seed Name Details screen mdash Define seed name records (GSCPID41)
Add A Seed Name Definition screen mdash Provide the option to type seeded code replacement data seeded mark replacement data or seed name record data (GSCPID50)
SEEDED CODE Replacement Data screen mdash Define the data to replace up to three dollar signs in the seed name record (GSCPID72)
SEEDED MARK Replacement Data screen mdash Define the data to replace up to nine dollar signs in the seed name record (GSCPID71)
Generalized Selection Plus Userrsquos Guide - AS400 3-19
3 Defining Your Input
Match Code File Details
GSCPID15
Match Code File x Details GSCPID30
ltF10gtltF12gtltF6gt ltF9gt ltF12gtltF6gt
SEEDED Record screen mdash Edit the seed name records entered and the match code values (GSCPID12)
Statistics File Control Field mdash Define the match code break field for the statistics file record (GSCPID12)
Edit SEEDED Record screen mdash Define the values for a new seed name record (GSCPID61)
The figure below shows the relationship between these screens
Input File Identification Details
(Screen 1)
GSCPID05
Input File Details (Screen 2)
GSCPID10
DOWNgt
ltF3gt
Define Input Files
ltROLL ltF11gt UPgt ltF12gt
ltROLL ltF6gt
Statistics File Control Field (SMFILE)
GSCPID12
ltF7gt ltF12gt ltF8gt ltF12gt ltF9gt ltF12gt ltF10gtltF6gt ltF6gt ltF6gt ltF12gtltF6gt
ZIP Code File Seed Name Kill File Details Details Definition
GSCPID20 GSCPID25 GSCPID41
ZIP Code File Default Record
(ZDATA)
GSCPID18
Add a Seed Name Definition
GSCPID50
ltF10gtltF12gtltF6gt ltF10gtltF12gtltF6gt
ltF12gt ltF12gtSC ltF6gt SM ltF6gt SR ltF12gtltF6gt
Match Code File Default Record
(MDATA)
GSCPID18
SEEDED CODE Replacement Data
GSCPID72
SEEDED MARK Replacement Data
GSCPID71
Edit SEEDED Record
GSCPID61
Figure 3-10 Define Input Screens
3-20 621 - 102002
3 Input File and Auxiliary Input Files
Input File and Auxiliary Input Files
Generalized Selection Plus can process up to three nameaddress input files and up to nine Match Code files one ZIP Code file and one Kill File The program has internal names for each of these files These internal names will be printed on the Execution Log and on the FILEDF parameter regardless of the actual file library and member names of these files For more information about the FILEDF parameter card please refer to Appendix A ldquoGSP10 Parameter Recordsrdquo
Input Files
The following input file names appear on the FILEDF parameter and the Execution Log
Table 3-1 Output Program File Names
File Name Program Name Description
Nameaddress Files ABC GSPINA GSPINB GSPINC
Nameaddress input files
Match Code Files 1-9 GSPMAT1 GSPMAT2 GSPMAT3 GSPMAT4 GSPMAT5 GSPMAT6 GSPMAT7 GSPMAT8 GSPMAT9
A Match Code file contains any data to be compared to the nameaddress file records Use the Jobs and Instructions component discussed in the next chapter to specify what to do with any matched input record
ZIP Code File GSPZIP The ZIP Code file contains ZIP Codes to be compared to the nameaddress file(s) Use the Jobs and Instructions component discussed in the next chapter to specify what to do with any matched input record
Kill File GSPKIL The Kill File contains match codes to be compared to the name address files If there is a match in a nameaddress file that matched record is not processed You can use this file to store any customer records who were taken off your mailing list
Generalized Selection Plus Userrsquos Guide - AS400 3-21
3 Defining Your Input
Sort Input Files
You can sort your input files to new files using the Sort Option screen (GSCPSB10) in the Submit Batch Job component If you sort them to new files below is a list of the file names that the input and auxiliary input files are sorted into before they are returned to the original input file name
File Name Sort File Name
Input File A SRTIALC
Input File B SRTIBLC
Input File C SRTICLC
Match Code File 1 SRTIMLC
Match Code File 2 SRTM2LC
Match Code File 3 SRTM3LC
Match Code File 4 SRTM4LC
Match Code File 5 SRTM5LC
Match Code File 6 SRTM6LC
Match Code File 7 SRTM7LC
Match Code File 8 SRTM8LC
Match Code File 9 SRTM9LC
ZIP Code File SRTIZLC
Kill File SRTIKLC
3-22 621 - 102002
3 Exit Routines
Exit Routines
The Define Input Files component gives you the option to specify an input exit routine that Generalized Selection Plus should call each time it is ready to read a record from your input nameaddress file If you are using an input exit routine instead of reading the record Generalized Selection Plus will call your exit routine and wait for the exit routine to pass a record back
For example you might have an input exit routine named CODEIT that adds a special code to a record If you want to add that code to each record before the record is passed to Generalized Selection Plus you would specify CODEIT as the name of the exit routine Then every time Generalized Selection Plus is ready to accept a record control is passed to CODEIT CODEIT reads the record adds the code to the record and then passes the record to Generalized Selection Plus where the record may be processed
When you indicate that Generalized Selection Plus should call an exit routine it will call that exit routine with the four parameters in the parameter list at each IO request EXITP1 EXITP2 EXITP3 and EXITP4 Each of these parameters is described below
Parameter EXITP1
This parameter is a total of nine bytes and has two components as follows
Table 3-2 EXITP1 Parameter for EXITOP
Position Field Name Description
1-8 EXITFN The internal file name (GSPINA GSPINB GSPINC)
9 EXITFC Function indicator that contains one of the following codes to tell your program the type of processing to perform
O Open the input or output file
R Read a record from the input file
W Write a record to the output file
C Close the input or output file
Generalized Selection Plus Userrsquos Guide - AS400 3-23
3 Defining Your Input
Parameter EXITP2
This parameter is a total of ten bytes and has two components as follows
Table 3-3 EXITP2 Parameter for EXITOP
Position Field Name Description
1-3 EXITRL If byte 9 of EXITP1 is ldquoOrdquo or ldquoRrdquo this field which is a packed three-byte field must be filled by the exit routine
When byte 9 of EXITP1 is ldquoRrdquo the input exit routine signals the end of the file by setting this byte to ldquoOrdquo
O Maximum record length
R Current record length for each read set to zero (0) at end-of-file
W NA
C NA
4-10 EXITRSV Reserved
Parameter EXITP3
This parameter has one component as follows
Table 3-4 EXITP3 Parameter for EXITOP
Position Field Name Description
1-xx (Depends on the length specified by EXITP2) Maximum 9999
EXITWK If byte 9 of EXITP1 is ldquoWrdquo this field contains the input record to be passed from Generalized Selection Plus to your program
If byte 9 of EXITP1 is ldquoRrdquo this field contains the input record to be passed from your program to Generalized Selection Plus
Parameter EXITP4
This parameter has one component as follows
Table 3-5 EXITP4 Parameter for EXITOP
Position Field Name Description
1-80 EXIITFD The image of your FILEDF parameter
3-24 621 - 102002
3 Input File Identification Details Screen (GSCPID05)
Input File Identification Details Screen (GSCPID05)
The Input File Identification Details screen shown below allows you to identify the name library and member of up to three input nameaddress files or any exit routines From this screen you can also indicate whether to clear the nameaddress work area (work area N) each time a record is processed and indicate whether to write a record immediately after each job or after all jobs are complete To access this screen choose the Define Input Files component from the DefineSubmit Generalized Selection Plus Job screen (GSCPDS01) or choose to submit a job from the Work with Jobs screen (GSCPMM03)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID05
Input File Definition Input File Identification Details
Specify input files andor exit routine details Press enter to calculate lengths IA File CMMSTP Library MECLIB Exit-routine Member FIRST
IB File Library Exit-routine Member FIRST
IC File Library Exit-routine Member FIRST [JOBCTL] Clear entire N work area N Y N (default) Write record immediately N Y N (default)More
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
When an input record is read into work area N it is read in by match code sequence For example if three input files are used the record with the lowest match code out of all three files is placed in work area N It is important that your input files are in match code sequence To sort your input files by match code refer to the Submit a Batch Jobrdquo and fill out the Sort Option screen
NOTE You do not have to sort your input files if you choose to ignore the sequence of your input files by selecting the Out-of-sequence handling field option I on the Input Files Details screen To access this screen page down from the first Input File Identification Details screen (GSCPID05)
Generalized Selection Plus Userrsquos Guide - AS400 3-25
3 Defining Your Input
Work Area N
When an input record is read into work area N an ldquoArdquo ldquoBrdquo or ldquoCrdquo is placed in position ldquo0 of work area N to indicate the input file from which the input record originated The input record is placed in work area N starting in position ldquo1rdquo You can reference this indicator in your job
Clearing the Entire N Work Area
One of the options on the Input File Identification Details screen is to clear the entire N work area after each record is processed When you clear the entire N work area the previous input record and any information added to the input record is cleared If you dont clear the entire N work area only the length of the input record is cleared If you added a field beyond the input records defined length such as a global value the added information is not cleared
Fields
There are fourteen fields on the Input File Identification Details screen The table below shows you a description of each field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-6 Fields on the Input File Identification Details Screen (GSCPID05) (Part 1 of 3)
Field Name Format Description Comments
IA File
IA File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the first input file that contains your nameaddress records
Required if you dont use an exit routine
Library 1 to 10 characters (A-Z 0-9 $ or _) First character must not be 0-9
The name of the library that holds your IA nameaddress file
Required if you dont use an exit routine
Member 1 to 10 characters (A-Z 0-9 $ or _) First character must not be 0-9
The member of the file that holds your IA names and addresses
Required if you dont use an exit routine
Exit Routine 1 to 10 characters (A-Z 0-9 $ or _) First character must not be 0-9
The name of the IA file exit routine that should be used to pass records to Generalized Selection
Required if you donrsquot define IA File
3-26 621 - 102002
3 Input File Identification Details Screen (GSCPID05)
Table 3-6 Fields on the Input File Identification Details Screen (GSCPID05) (Part 2 of 3)
Field Name Format Description Comments
IB File
IB File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the second input file that contains your nameaddress records
Optional
Library (for IB File) 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the library that holds your IB nameaddress file
Required if you define IB file
Member (for IB File) 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your IB names and addresses
Required if you define IB File
Exit Routine (for IB File)
1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the IB file exit routine that should be used to pass records to Generalized Selection Plus
Optional
IC File
IC File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the third input file that contains your nameaddress records
Optional
Library 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the library that holds the IC nameaddress file
Required if you define IC File
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your IC names and addresses
Required if you define IC file
Exit Routine (for IC File)
1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the IC file exit routine that should be used to pass records to Generalized Selection Plus
Optional
[JOBCTL]
Clear Entire N Work Area
1 character A 1-byte code indicating whether to clear the entire nameaddress work area (work area N) after each record is processed Type one of the following
Y Yes clear the entire name address work area
N No do not clear the name address work area (clears only record area)
If the N work area is not cleared any information beyond the defined length of the input record is not cleared If you clear the N work area the input record is cleared as well as any information you added beyond the defined length of the input record
Optional Default is N
Generalized Selection Plus Userrsquos Guide - AS400 3-27
3 Defining Your Input
Table 3-6 Fields on the Input File Identification Details Screen (GSCPID05) (Part 3 of 3)
Field Name Format Description Comments
Write Record Immediately
1 character A 1-byte code indicating whether to write a record immediately to an output file after it meets the criteria of the present job or write the record after all jobs complete Type one of the following
Y Yes write the record immediately after each job completes
N No write the record after all of the jobs complete
Optional Default is N
Function Keys
There are seven valid function keys on this screen The table below shows you a description of each keys function
Table 3-7 Function Keys on Input File Identification Details Screen (GSCPID05)
Function Key Name Description
F3 Exit Return to the Work With Jobs screen (GSCPDS01) without updating the screens information
F6 Update Save the data and return to the previous screen
F7 Match Code File Details Go to the Match Code File Details screen (GSCPID15)
F8 ZIP Code File Details Go to the ZIP Code File Details screen (GSCPID20)
F9 Kill File Details Go to the Kill File Details screen (GSCPID25)
F10 Seed Name Definitions Go to the Seed Name Definition screen (GSCPID41)
F11 Statistics File Go to the Statistics File Control Field (SMFILE) screen (GSCPID12)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
NOTE The Input Files Identification Details screen (GSCPID05) has ldquoMorerdquo at the bottom To display the next screen press ltPAGE UPgt To return to the Input File Identification Details screen press ltPAGE DOWNgt
3-28 621 - 102002
3 Input File Details Screen (GSCPID10)
Input File Details Screen (GSCPID10)
The Input File Details screen shown below allows you to define the following input file information
Location of the input record ZIP Code
Locations of the input record fields that you want compared to the auxiliary input files (match codes)
Handling of duplicates within the same input file
Handling of duplicates between two input files
Location for a field on your output record indicating that it is the first duplicate within a duplicate group
Handling of out-of-sequence input records
Location for a code on your output record indicating the input file from which the record originated
To access this screen page down from the first Input File Definition screen (GSCPID05)
181127 Generalized Selection System GSCPID00 12152000 Replace with screen heading desired GSCPID10
Input File Definition Input File Details
[ZIPIN] Posn Len Fmt ZIP Code location [MATCHI] Input file match code location(s) C (DFT)
[DUPCTL] P Specify input file duplicate handling Intra-file C E C = Countprocess Inter-file C E X E = Countprocess 1st
X = Countprocess none Duplicate indicator 1 Value [SEQERR] Out-of-sequence handling B = Bypass
C = ProcesscheckE = Terminate I = Processignore
[FLCODE] File indicator field position 3
F3=Exit F6=Update F7=Match Code File Details F8=ZIP Code File Details F9=Kill File Details F10=Seed Names F11=SMFILE Control F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 3-29
3 Defining Your Input
Fields
There are thirty-eight fields on this screen The table below shows you a description of each field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
NOTE The combination of Match Code file match code fields 1 through 10 can be no more than 99 bytes
Table 3-8 Fields on the Input File Details Screen (GSCPID10) (Part 1 of 3)
Field Name Format Description Comments
Specify Input File ZIP Code [ZIP IN]
Psn 4 digits The location of the ZIP Code in the input record
Required No default
Fmt 1 character A code indicating the format of the ZIP Code in the input record Type one of the following
C Character format
P Packed format
Optional Default is C
Specify Input File Match Code Location(s) - Ten Possible Fields [MATCHI]
Psn 4 digits The location of a match code field on the input record to be compared with any auxiliary input file match code You can define up to ten match code fields and the combination of all of them can be no more than 99 bytes
At least 1 required No default
Len 3 digits The length of a match code field that you want to define on the input record
Required No default
Fmt 1 character A code indicating the format of a match code field on the input record Type one of the following
C Character format
P Packed format
Optional Default is C
Specify Input File Duplicates [DUPCTL]
Intra-File Dupes 1 character A code indicating whether to process any duplicates found within the same input file Type one of the following
C Count and process all duplicates
E Count and process only the first duplicate of a group
Required No default
3-30 621 - 102002
3 Input File Details Screen (GSCPID10)
Table 3-8 Fields on the Input File Details Screen (GSCPID10) (Part 2 of 3)
Field Name Format Description Comments
Inter-File Dupes 1 character A code indicating whether to process any duplicates found between two input files Type one of the following
C Count and process all duplicate records
E Count and process only the first record from each set of duplicates
X Count but do not process any duplicate records
Required No default
Beg Posn 4 digits The location for the Duplicate Indicator field on the Duplicates File output record
If you type a location in this field a code is placed in the first of a group of duplicate records in the Duplicate File
Optional No default
Len 1 digit Length is always one (ldquo1rdquo) Automatic
Value 1 character The value that is placed in the Duplicate Indicator field on the Duplicates File output record each time the first record of a set of duplicates is processed
Required if you type a location for the Duplicate Indicator field
Out of Sequence Handling [SEQERR]
Out-of-Sequence Handling
1 character A code indicating how to process any input records that are out of sequence Type one of the following
B Bypass or drop the record
C Process the record out of sequence and continue sequence checking
E Terminate the job as if an end-of-file was reached for all input files
I Process the record out of sequence and ignore further sequence errors
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 3-31
3 Defining Your Input
Table 3-8 Fields on the Input File Details Screen (GSCPID10) (Part 3 of 3)
Field Name Format Description Comments
File Indicator Field [FLCODE]
Beg Posn 4 digits The location for the File Indicator field on the output record
If you type a location in this field a code is placed in each output records File Indicator field which indicates the file or files from which the matching records came Below is a list of the codes indicating where the records originated
NOTE ldquo^rdquo refers to a blank
For duplicated records AB^ Input files A amp B A^C Input files A amp C ^BC Input files B amp C ABC Input files A B amp C
For unduplicated records A^^ Input file A ^B^ Input file B ^^C Input file C
Optional No default
Len 1 digit Length is automatically typed as three Automatic
Function Keys
There are eight function keys on the Input File Details screen The table below describes the function of each key
Table 3-9 Function Keys on first Input File Details Screen (GSCPID10)
Function Key Name Description
F3 Exit Return to the Work With Jobs screen (GSCPDS01) without updating the screens information
F6 Update Save the data and return to the previous screen
F7 Match Code File Details Go to the Match Code File Details screen (GSCPID15)
F8 ZIP Code File Details Go to the ZIP Code File Details screen (GSCPID20)
F9 Kill File Details Go to the Kill File Identification screen (GSCPID25)
F10 Seed Names Go to the Seed Name Definitions screen (GSCPID41)
F11 Statistics File Go to the Statistics File Control Field (SMFILE) screen (GSCPID12)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
3-32 621 - 102002
3 Match Code File Details Screen (GSCPID15)
Match Code File Details Screen (GSCPID15)
The Match Code File Details screen shown below allows you to identify one Match Code file the Match Code File ZIP Code location and format and the location length and format of the match code fields You can then press ltF9gt to define eight more Match Code files To access this screen press ltF7gt from either the Input File Identification Details screen (GSCPID05) or the Input File Details screen (GSCPID10)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID15
Input File Definition Match Code File Details
Specify match code file details Press enter to calculate length Match File Library Exit-routine Member FIRST [ZIPINM] Posn Len Fmt Match file ZIP code position and format C (default) [MATCHx] P Match file match code field(s)
F6=Update F9=More Files F10=MDATA Record F12=Cancel F24=Field Search
NOTE When an input record match code corresponds with a Match Code File the Match Code File record is read into specific positions within work area M It is important that the Match Code file is in match code sequence for matching purposes To sort your Match Code File(s) by match code refer to the Submit a Batch Job component and fill out the Sort Option screen
Generalized Selection Plus Userrsquos Guide - AS400 3-33
3 Defining Your Input
Work Area M
When an input record match code corresponds with the Match Code File the Match Code File record is placed in work area M in a specific position You can define up to nine Match Code Files so Generalized Selection Plus can place up to nine matching records in work area M Generalized Selection Plus places these records at 1000-byte intervals
NOTE A ldquo1rdquo is placed in the matching indicator position to indicate that a match has occurred for the Match Code File record A ldquo0rdquo is placed in the matching indicator position if no match has occurred You can reference this indicator in your job or from any position in the record
Table 3-10 Where Match Code File Records are Placed in Work Area M
Match Code File 1 record placed here
M000 mdash Matching indicator M001-M1999 mdash First matching record
Match Code File 6 record placed here
M6000 mdash Matching indicator M6001-M6999 mdash First matching record
Match Code File 2 record placed here
M2000 mdash Matching indicator M2001-M2999 mdash First matching record
Match Code File 7 record placed here
M7000 mdash Matching indicator M7001-M7999 mdash First matching record
Match Code File 3 record placed here
M3000 mdash Matching indicator M3001-M3999 mdash First matching record
Match Code File 8 record placed here
M8000 mdash Matching indicator M8001-M8999 mdash First matching record
Match Code File 4 record placed here
M4000 mdash Matching indicator M4001-M4999 mdash First matching record
Match Code File 9 record placed here
M9000 mdash Matching indicator M9001-M9999 mdash First matching record
Match Code File 5 record placed here
M5000 mdash Matching indicator M5001-M5999 mdash First matching record
IMPORTANT If your records are larger than 1000 bytes then define your Match Code Files so that records are placed in work area M at larger intervals For example if you have three Match Code Files with record lengths of 2000 bytes define your files as Match Code File 1 Match Code File 3 and Match Code File 5 This arrangement allows for three 2000-byte records with no overlap
3-34 621 - 102002
3 Match Code File Details Screen (GSCPID15)
Fields
There are thirty-seven fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
NOTE The combination of Match Code file match code fields 1 through 10 can be no more than 99 bytes
Table 3-11 Fields on the Match Code File Details Screen (GSCPID15) (Part 1 of 2)
Field Name Format Description Comments
Match Code File
Match Code File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the file that contains your match code information
Optional No default
Library 1 to 10 characters (A-Z 0-9 $ or _) First character must not be 0-9
The name of the library that holds your Match Code File
Required if you use a Match Code File
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your Match Code File records
Required if you use a Match Code File
Exit Routine 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the Match Code File exit routine that should be used to pass records to Generalized Selection Plus
Optional
Match Code File ZIP Code [ZIPINM]
Psn 4 digits The location of the ZIP Code in the Match Code File If you dont have a ZIP Code in your Match File type 9999
Required if you identify a Match Code File
Fmt 1 character A code indicating the format of the ZIP Code in the Match Code File Type one of the following
C Character format
P Packed format
Optional Default is C
Match Code File Match Code Fields - Ten possible [MATCHx]
Psn 4 digits The location of the match code field in the Match Code File to compare to each input record match code You can define up to ten match code fields but the combination of the fields cannot exceed 99 bytes
At least 1 required if Match Code File defined No default
Len 2 digits The length of a match code field in the Match Code File
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 3-35
3 Defining Your Input
Table 3-11 Fields on the Match Code File Details Screen (GSCPID15) (Part 2 of 2)
Field Name Format Description Comments
Fmt 1 character A code indicating the format of a match code field in the Match Code File Type one of the following
C Character format
P Packed format
Optional Default is C
Function Keys
There are four valid function keys on this screen The table below shows you each key and a description of its function
Table 3-12 Function Keys on the Match Code File Details Screen (GSCPID15)
Function Key Name Description
F6 Update Save the data and return to the previous screen
F9 More Files Go to the Match Code File x Details screen (GSCPID30)
F10 MDATA Record Go to the Match Code File Default Record (MDATA) screen (GSCPID18)
F12 Cancel Cancel the operation and return to the Input File Identification screen (GSCPID05) or the Input File Details screen (GSCPID10)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
NOTE The Match Code File Details screen (GSCPID15) numbered two through nine have ldquoMorerdquo at the bottom To display the next screen press ltPAGE UPgt To return to the previous Match Code File x Details screen press ltPAGE DOWNgt
3-36 621 - 102002
3 MATCHx Files 2-9 (GSCPID30)
MATCHx Files 2-9 (GSCPID30)
There are eight of these screens numbered from 2 through 9 Each screen allows you to identify one Match Code file and the location length and format of the match code fields Note that you have to define the same type of match code field for each Match Code file but the fields do not have to be in the same position To access this screen press ltF9gt from either the Match Code File Details screen (GSCPID15) Page down to define more Match Code files
NOTE When an input record match code corresponds with a Match Code File the Match Code File record is read into specific positions within work area M It is important that you sort the Match Code file into match code sequence for matching purposes To sort your Match Code file(s) by match code refer to the Submit a Batch Job component and fill out the Sort Option screen
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID30
Input File Definition Match Code File Details
Specify match code file details Press enter to calculate length Match File 2 Library Exit-routine Member FIRST
[MATCHx] Posn Len Fmt Match file match code field(s) C (default)
P
More
F6=Update F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 3-37
3 Defining Your Input
Work Area M
When an input record match code corresponds with the Match Code file the Match Code file record is placed in work area M in a specific position You can define up to nine Match Code Files so Generalized Selection Plus can place up to nine matching records in work area M Generalized Selection Plus places these records at 1000-byte intervals
NOTE A ldquo1 is placed in the matching indicator position to indicate a match A rdquo0rdquo is placed in the matching indicator position if no match has occurred You can reference this indicator in your job or any position in the record
Table 3-13 Where Match Code File Records are Placed in Work Area M
Match Code File 1 record placed here
M000 mdash Matching indicator M001-M1999 mdash First matching record
Match Code File 6 record placed here
M6000 mdash Matching indicator M6001-M6999 mdash First matching record
Match Code File 2 record placed here
M2000 mdash Matching indicator M2001-Ms999 mdash First matching record
Match Code File 7 record placed here
M7000 mdash Matching indicator M7001-M7999 mdash First matching record
Match Code File 3 record placed here
M3000 mdash Matching indicator M3001-M3999 mdash First matching record
Match Code File 8 record placed here
M8000 mdash Matching indicator M8001-M8999 mdash First matching record
Match Code File 4 record placed here
M4000 mdash Matching indicator M4001-M4999 mdash First matching record
Match Code File 9 record placed here
M9000 mdash Matching indicator M9001-M9999 mdash First matching record
Match Code File 5 record placed here
M5000 mdash Matching indicator M5001-M5999 mdash First matching record
IMPORTANT If your records are larger than 1000 bytes define your Match Code Files so that records are placed in work area M at larger intervals For example if you have three Match Code files with record lengths of 2000 bytes define your files as Match Code File 1 Match Code File 3 and Match Code File 5 With this arrangement you can allow for three 2000-byte records with no overlap
3-38 621 - 102002
3 MATCHx Files 2-9 (GSCPID30)
Fields
There are thirty-seven fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-14 Fields on the Match Code File Details Screen (GSCPID30)
Field Name Format Description Comments
Match Code File
Match Code File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the file that contains your match code information
Optional No default
Library 1 to 10 characters (A-Z 0-9 $ or _) First character must not be 0-9
The name of the library that holds your Match Code File
Required if you use a Match Code File
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your Match Code File records
Required if you use a Match Code File
Exit Routine 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the Match Code File exit routine that should be used to pass records to Generalized Selection Plus
Optional
Match Code File Match Code Fields - Ten possible
Psn 4 digits The location of the match code field in the Match Code File to compare to each input record match code You can define up to ten match code fields but the combination of the fields cannot exceed 99 bytes
At least one required if Match Code File defined No default
Len 2 digits The length of a match code field in the Match Code File
Optional No default
Fmt 1 character A code indicating the format of a match code field in the Match Code File Type one of the following
C Character format
P Packed format
Optional Default is C
Generalized Selection Plus Userrsquos Guide - AS400 3-39
3 Defining Your Input
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-15 Function Keys on the Match Code File Details Screen (GSCPID30)
Function Key Name Description
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Match Code File Details screen (GSCPID15)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
NOTE The Match Code File x Details screens (GSCPID30) numbered two through nine have ldquoMorerdquo at the bottom To display the next screen press ltPAGE UPgt To return to the previous Match Code File x Details screen press ltPAGE DOWNgt
3-40 621 - 102002
3 Match Code File Default Record (MDATA) Screen (GSCPID18)
Match Code File Default Record (MDATA) Screen (GSCPID18)
The Match Code File Default Record screen shown below allows you to type values for a Match Code File default record If an input file record does not match a match code in the Match Code File the Match Code File default record will be placed in work area M To access this screen press ltF10gt from the Match Code File Identification Details screen (GSCPID15)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID18
Input File Definition Match Code File Default Record (MDATA)
[MDATA] Specify values for the field desired
Posn Match Code file default data +10+20+30+40+50
001-050 051-100 101-150 151-200 201-250 251-300 301-350 351-400 401-450 451-500
F5=Refresh F6=Update F12=Cancel
If you need to type more information for your default data scroll down to the next screen shown below
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID18
Input File Definition Match Code File Default Record (MDATA)
[MDATA]Specify values for the field desired
Posn Match Code file default data +10+20+30+40+50
501-550 551-600 601-650 651-700 701-750 751-800 801-850 851-900 901-950 951-999
Bottom F5=Refresh F6=Update F12=Cancel
Generalized Selection Plus Userrsquos Guide - AS400 3-41
3 Defining Your Input
Fields
There are twenty fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-16 Fields on the Match Code File Default Record (MDATA) Screen (GSCPID18) (Part 1 of 2)
Field Name Format Description Comments
001-050 50 characters Information for bytes 1-50 of the Match Code File default record
Optional
051-100 50 characters Information for bytes 51-100 of the Match Code File default record
Optional
101-150 50 characters Information for bytes 101-150 of the Match Code File default record
Optional
151-200 50 characters Information for bytes 151-200 of the Match Code File default record
Optional
201-250 50 characters Information for bytes 201-250 of the Match Code File default record
Optional
251-300 50 characters Information for bytes 251-300 of the Match Code File default record
Optional
301-350 50 characters Information for bytes 301-350 of the Match Code File default record
Optional
351-400 50 characters Information for bytes 351-400 of the Match Code File default record
Optional
401-450 50 characters Information for bytes 401-450 of the Match Code File default record
Optional
451-500 50 characters Information for bytes 451-500 of the Match Code File default record
Optional
501-550 50 characters Information for bytes 501-550 of the Match Code File default record
Optional
551-600 50 characters Information for bytes 551-600 of the Match Code File default record
Optional
601-650 50 characters Information for bytes 601-650 of the Match Code File default record
Optional
651-700 50 characters Information for bytes 651-700 of the Match Code File default record
Optional
701-750 50 characters Information for bytes 701-750 of the Match Code File default record
Optional
751-800 50 characters Information for bytes 751-800 of the Match Code File default record
Optional
801-850 50 characters Information for bytes 801-850 of the Match Code File default record
Optional
851-900 50 characters Information for bytes 851-900 of the Match Code File default record
Optional
3-42 621 - 102002
Match Code File Default Record (MDATA) Screen (GSCPID18) 3
Table 3-16 Fields on the Match Code File Default Record (MDATA) Screen (GSCPID18) (Part 2 of 2)
Field Name Format Description Comments
901-950 50 characters Information for bytes 901-950 of the Match Code File default record
Optional
951-999 49 characters Information for bytes 951-999 of the Match Code File default record
Optional
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-17 Function Keys on the Match Code File Default Record (MDATA) Screen (GSCPID18)
Function Key Name Description
F5 Refresh Restore the data to its original state
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Match Code File Details screen (GSCPID15)
NOTE The first Match Code File Default Record (MDATA) screen (GSCPID18) has ldquoMorerdquo at the bottom To display the next screen of default fields press ltPAGE UPgt To return to the first screen of default fields press ltPAGE DOWNgt
Generalized Selection Plus Userrsquos Guide - AS400 3-43
3 Defining Your Input
ZIP Code File Details Screen (GSCPID20)
The ZIP Code File Details screen shown below allows you to define the following ZIP Code File information
ZIP Code file name library and member or an exit routine
Location and format of the ZIP Code file ZIP Code
Five-digit ZIP Code or three-digit Sectional Center Facility (SCF) code matching
ZIP Code file duplicate handling
To access this screen press ltF8gt from either the Input File Identification Details screen (GSCPID05) or the Input File Details screen (GSCPID10)
NOTE When an input record ZIP Code matches against the ZIP Code file the ZIP Code file record is read into work area Z It is important that the ZIP Code file is in ZIP Code sequence for matching purposes To sort your ZIP Code file by ZIP Code refer to the Submit a Batch Job component and fill out the Sort Option screen
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID20
Input File DefinitionZIP Code File Details
Specify ZIP Code file details Press enter to calcutale length
ZIP Code File Library Exit-routine
Member FIRST [ZIPINZ]
Posn Fmt ZIP Code C P
[FILEZD] File IZ SCF Match S Blank
S = SCF (3-digit) match BLANK = 5-digit match (default)
File IZ Dupes X Blank X = Treat as sequence error
BLANK = Use first of set (default) Bottom
F6=Update F12=Cancel F10=ZDATA Record F24=Field Search
3-44 621 - 102002
3 ZIP Code File Details Screen (GSCPID20)
Work Area Z
Fields
When an input record ZIP Code matches against the ZIP Code file a ldquo1rdquo is placed in position ldquo0rdquo of work area Z and the matching ZIP Code file record is placed starting in position ldquo1rdquo of work area Z If no match occurs a ldquo0rdquo is placed in position ldquo0rdquo You can reference this indicator in your job or any position in the record
There are six fields on this screen The following table shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-18 Fields on the ZIP Code File Details Screen (GSCPID20) (Part 1 of 2)
Field Name Format Description Comments
ZIP Code File
ZIP Code File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the file that contains your ZIP Code information
Optional No default
Library 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the library that holds your ZIP Code File
Required if you define a ZIP Code File
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your ZIP Code File records
Required if you define a ZIP Code File
Exit Routine 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the ZIP Code File exit routine that should be used to pass records to Generalized Selection Plus
Optional No default
ZIP Code [ZIPINZ]
Psn 4 digits The location of the ZIP Code in the ZIP Code File to compare to the input record ZIP Code
Required if you define a ZIP Code File
Fmt 1 character A code indicating the format of a ZIP Code in the ZIP Code File Type one of the following
C Character format
P Packed format
Optional Default is C
Generalized Selection Plus Userrsquos Guide - AS400 3-45
3 Defining Your Input
Table 3-18 Fields on the ZIP Code File Details Screen (GSCPID20) (Part 2 of 2)
Field Name Format Description Comments
Duplicate and Matching Options [FILEZD]
File IZ SCF Match 1 character A code indicating the type of ZIP Code match between the input file and the ZIP Code File Type one of the following
blank five-digit ZIP Code match
S three-digit Sectional Center Facility (SCF) code match
Optional Default is blank
File IZ Dupes 1 character A code indicating how to handle any duplicate ZIP Codes found within the ZIP Code File Type one of the following
blank Use the first of a set
X Treat as a sequence error
Optional Default is blank
Function Keys
There are four valid function keys on this screen The table below shows you each key and a description of its function
Table 3-19 Function Keys on the ZIP Code File Details Screen (GSCPID20)
Function Key Name Description
F6 Update Save the data and return to the previous screen
F10 Default Record Definition
Go to the ZIP Code File Default Record (ZDATA) (GSCPID18)
F12 Cancel Cancel the operation and return to the Input File Identification screen (GSCPID05) or the Input File Details screen (GSCPID10)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library
3-46 621 - 102002
3 ZIP Code File Default Record (ZDATA) Screen (GSCPID18)
ZIP Code File Default Record (ZDATA) Screen (GSCPID18)
The ZIP Code File Default Record (ZDATA) screen shown below allows you to type values for a ZIP Code File default record If an input file record does not have a corresponding ZIP Code in the ZIP Code File the ZIP Code File default record will be placed in work area Z To access this screen press ltF10gt from the ZIP Code File Identification Details screen (GSCPID20)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID18
Input File Definition ZIP Code File Default Record (ZDATA)
[ZDATA] Specify values for the field desired
Posn ZIP Code file default data +10+20+30+40+50
001-050 051-100 101-150 151-200 201-250 251-300 301-350 351-400 401-450
451-500
More
F5=Refresh F6=Update F12=Cancel
Generalized Selection Plus Userrsquos Guide - AS400 3-47
3 Defining Your Input
If you need to type more information for your default data scroll down to the next screen shown below
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID18
Input File DefinitionZIP Code File Default Record (ZDATA)
[ZDATA] Specify values for the field desired
Posn ZIP Code file default data +10+20+30+40+50
501-550 551-600 601-650 651-700 701-750 751-800 801-850 851-900 901-950
951-999
Bottom
F5=Refresh F6=Update F12=Cancel
3-48 621 - 102002
3 ZIP Code File Default Record (ZDATA) Screen (GSCPID18)
Fields
There are twenty fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-20 Fields on the ZIP Code File Default Record Screen (GSCPID18) (Part 1 of 2)
Field Name Format Description Comments
001-050 50 characters Information for bytes 1-50 of the ZIP Code File default record
Optional
051-100 50 characters Information for bytes 51-100 of the ZIP Code File default record
Optional
101-150 50 characters Information for bytes 101-150 of the ZIP Code File default record
Optional
151-200 50 characters Information for bytes 151-200 of the ZIP Code File default record
Optional
201-250 50 characters Information for bytes 201-250 of the ZIP Code File default record
Optional
251-300 50 characters Information for bytes 251-300 of the ZIP Code File default record
Optional
301-350 50 characters Information for bytes 301-350 of the ZIP Code File default record
Optional
351-400 50 characters Information for bytes 351-400 of the ZIP Code File default record
Optional
401-450 50 characters Information for bytes 401-450 of the ZIP Code File default record
Optional
451-500 50 characters Information for bytes 451-500 of the ZIP Code File default record
Optional
501-550 50 characters Information for bytes 501-550 of the ZIP Code File default record
Optional
551-600 50 characters Information for bytes 551-600 of the ZIP Code File default record
Optional
601-650 50 characters Information for bytes 601-650 of the ZIP Code File default record
Optional
651-700 50 characters Information for bytes 651-700 of the ZIP Code File default record
Optional
701-750 50 characters Information for bytes 701-750 of the ZIP Code File default record
Optional
751-800 50 characters Information for bytes 751-800 of the ZIP Code File default record
Optional
801-850 50 characters Information for bytes 801-850 of the ZIP Code File default record
Optional
851-900 50 characters Information for bytes 851-900 of the ZIP Code File default record
Optional
901-950 50 characters Information for bytes 901-950 of the ZIP Code File default record
Optional
Generalized Selection Plus Userrsquos Guide - AS400 3-49
3 Defining Your Input
Table 3-20 Fields on the ZIP Code File Default Record Screen (GSCPID18) (Part 2 of 2)
Field Name Format Description Comments
951-999 49 characters Information for bytes 951-999 of the ZIP Code File default record
Optional
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-21 Function Keys on the ZIP Code File Default Record Screen (GSCPID18)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the ZIP Code File Details screen (GSCPID20)
NOTE The first ZIP Code File Default Record (ZDATA) screen (GSCPID18) has ldquoMorerdquo at the bottom To display the next screen of default fields press ltPAGE UPgt To return to the first screen of default fields press ltPAGE DOWNgt
3-50 621 - 102002
3 Kill File Identification Screen (GSCPID25)
Kill File Identification Screen (GSCPID25)
The Kill File Identification screen shown below allows you to identify the Kill File name library and member and an exit routine associated with the Kill File if any With the Kill File you do not have to define a match code because each Kill File record is considered a match code Whenever an input record match code matches a Kill File record that input record is automatically ignored To access this screen press ltF9gt from either the Input File Identification Details screen (GSCPID05) or the Input File Details screen (GSCPID10)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID25
Input File Definition Kill File Identification
Specify Kill File andor exit routine details
Kill File -or- Exit-routine Library
Member FIRST
F6=Update F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 3-51
3 Defining Your Input
Fields
There are four fields on the this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-22 Fields on the Kill File Identification Screen (GSCPID25)
Field Name Format Description Comments
Kill File 1 to 10 characters (A-Z 0-9 $ or ) First character must not be 0-9
The name of the file that contains your Kill File information
Optional No default
Exit Routine 1 to 10 characters (A-Z 0-9 $ or ) First character must not be 0-9
The name of the Kill File exit routine that should be used to pass records to Generalized Selection Plus
Optional if you dont define a Kill File
Library 1 to 10 characters (A-Z 0-9 $ or ) First character must not be 0-9
The name of the library that holds your Kill File
Required if you define a Kill File
Member 1 to 10 characters (A-Z 0-9 $ or ) First character must not be 0-9
The member of the file that holds your Kill File records
Required if you define a Kill File
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-23 Function Keys on the Kill File Identification Screen (GSCPID25)
Function Key Name Description
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Input File Identification screen (GSCPID05) or the Input Files Details screen (GSCPID10)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
3-52 621 - 102002
3 Seed Name Definition Screen (GSCPID41)
Seed Name Definition Screen (GSCPID41)
The Seed Name Definition screen shown below allows you to view the seed name records that you defined in Generalized Selection Plus The screen displays the type of data defined (seed name record seeded code or seeded mark) For a seed name record the first 50 bytes of the record are shown For seeded code or seeded mark replacement data ldquoSeeded Code Replacementrdquo or ldquoSeeded Mark Replacementrdquo is displayed To access this screen press ltF10gt from either the Input File Identification Details screen (GSCPID05) or the Input File Details screen (GSCPID10)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID41
Input File DefinitionSeed Name Definition
[SEEDED CODE] [SEEDED MARK] [SEEDED]Type options press Enter 4=Delete 5=Display 12=Work with
Opt Seed name rec Beginning of seed nameSeeded name record DA$$$ SMITH 6404 IVY LANE
Seeded Code replacement
NOTE You can define up to ten seed name records in Generalized Selection Plus
Generalized Selection Plus Userrsquos Guide - AS400 3-53
3 Defining Your Input
Fields
There are three fields on this screen Note that you can type data in only one of them The other two display data only The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-24 Fields on the Seed Name Definition Screen (GSCPID41)
Field Name Format Description Comments
Opt 1 character A code indicating whether to display edit or delete an existing seed name record Type one of the following
4 Display the appropriate seed name screen and delete the seed name information
5 Display the appropriate seed name screen
12 Display the appropriate seed name screen and change the seed name information
Optional
Seed name rec Up to 23 characters The name of the type of seeded record defined on that line Displays one of the following
Seed name record
Seeded Code Replacement
Seeded Mark Replacement
Display only
Beginning of Seed Name Up to 50 alphanumeric characters
The first 50 bytes of data that you defined as your seed name record
Display only
3-54 621 - 102002
Seed Name Definition Screen (GSCPID41) 3
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-25 Function Keys on the Seed Name Definition Screen (GSCPID41)
Function Key Name Description
F6 Update Save the data and return to the previous screen
F10 Add Seed Name Record
Go to the Add a Seed Name Definition screen (GSCPID50)
F12 Cancel Cancel the operation and return to the Input File Identification screen (GSCPID05) or the Input File Details screen (GSCPID10)
Generalized Selection Plus Userrsquos Guide - AS400 3-55
3 Defining Your Input
Add a Seed Name Definition Screen (GSCPID50)
The Add A Seed Name Definition screen shown below allows you to add a seed name record seeded code replacement data or seeded mark replacement data To access this screen press ltF10gt from the Seed Name Definition screen (GSCPID41)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID50
Input File Definition Add a Seed Name Definition
[SEEDED CODE] [SEEDED MARK] [SEEDED] Specify which type of seed name set to be added press Enter
Seed name type SC SM SR
SC = Seeded Code replacement SM = Seeded Mark replacement SR = Seeded name record
F12=Cancel
3-56 621 - 102002
Add a Seed Name Definition Screen (GSCPID50) 3
Fields
There is one field on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-26 Fields on the Add a Seed Name Definition Screen (GSCPID50)
Field Name Format Description Comments
Seed name type 2 characters A code indicating the type of seed name record information that you want to type Type one of the following
SC Seeded code replacement data that replaces up to three wild card characters ($$$) in the seed name record
SM Seeded mark replacement data that replaces up to nine wild card characters ($$$$$$$$$) in the seed name record
SR Define a seed name record
Optional No default
Function Keys
There is one valid function key on this screen The table below shows you the key and a description of its function
Table 3-27 Function Keys on the Add a Seed Name Definition Screen (GSCPID50)
Function Key Name Description
F12 Cancel Cancel the operation and return to the Seed Name Definition screen (GSCPID41)
Generalized Selection Plus Userrsquos Guide - AS400 3-57
3 Defining Your Input
SEEDED CODE Replacement Data Screen (GSCPID72)
The SEEDED CODE Replacement Data screen shown below allows you to replace up to three dollar signs in the seed name record with different data for each output file To access this screen type SC in the Add a Seed Name Definition screen (GSCPID50)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID72
Input File Definition SEEDED CODE Replacement Data
Specify values to replace the $ in the seed name records
Replacement data for output file A VID
Replacement data for output file B NNY
Replacement data for output file C NA
Replacement data for output file D ___
Replacement data for output file E ___
F5=Refresh F6=Update F12=Cancel F24=Field Search
3-58 621 - 102002
3 SEEDED CODE Replacement Data Screen (GSCPID72)
Fields
There are five fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-28 Fields on the SEEDED CODE Replacement Data Screen (GSCPID72)
Field Name Format Description Comments
Replacement data for output file A
3 characters or digits The data to replace the three $$$ for the seed name record to be placed in output file A
Optional No default
Replacement data for output file B
3 characters or digits The data to replace the three $$$ for the seed name record to be placed in output file B
Optional No default
Replacement data for output file C
3 characters or digits The data to replace the three $$$ for the seed name record to be placed in output file C
Optional No default
Replacement data for output file D
3 characters or digits The data to replace the three $$$ for the seed name record to be placed in output file D
Optional No default
Replacement data for output file E
3 characters or digits The data to replace the three $$$ for the seed name record to be placed in output file E
Optional N default
Function Keys
There are four valid function keys on the screen The table below shows you the key and a description of its function
Table 3-29 Function Keys on the SEEDED CODE Replacement Data Screen (GSCPID72)
Function Key Name Description
F5 Refresh Restore the data to its original state
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Seed Name Definition screen (GSCPID41)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
Generalized Selection Plus Userrsquos Guide - AS400 3-59
3 Defining Your Input
SEEDED MARK Replacement Data Screen (GSCPID71)
The SEEDED MARK Replacement Data screen shown below allows you to replace up to nine dollar signs with different data for each output file To access this screen type SM in the Add a Seed Name Definition screen (GSCPID50)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID71
Input File Definition SEEDED MARK Replacement Data
Specify values to replace the $ in the seeded records
Replacement data for output file A VID
Replacement data for output file B ANNA
Replacement data for output file C
Replacement data for output file D
Replacement data for output file E
F5=Refresh F6=Update F12=Cancel F24=Field Search
3-60 621 - 102002
3 SEEDED MARK Replacement Data Screen (GSCPID71)
Fields
There are five fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-30 Fields on the SEEDED MARK Replacement Data Screen (GSCPID71)
Field Name Format Description Comments
Replacement data for output file A
9 characters or digits
The data to replace the nine $$$$$$$$$ for the seed name record to be placed in output file A
Optional No default
Replacement data for output file B
9 characters or digits
The data to replace the nine $$$$$$$$$ for the seed name record to be placed in output file B
Optional No default
Replacement data for output file C
9 characters or digits
The data to replace the nine $$$$$$$$$ for the seed name record to be placed in output file C
Optional No default
Replacement data for output file D
9 characters or digits
The data to replace the nine $$$$$$$$$ for the seed name record to be placed in output file D
Optional No default
Replacement data for output file E
9 characters or digits
The data to replace the nine $$$$$$$$$ for the seed name record to be placed in output file E
Optional No default
Function Keys
There are four valid function keys on this screen The table below shows you the key and a description of its function
Table 3-31 Function Keys on the SEEDED MARK Replacement Data Screen (GSCPID71)
Function Key Name Description
F5 Refresh Restore the data to its original state
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Seed Name Definition screen (GSCPID41)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
Generalized Selection Plus Userrsquos Guide - AS400 3-61
3 Defining Your Input
Edit SEEDED Record Screen (GSCPID61)
The Edit SEEDED Record screen shown below allows you to edit the seed name records that you typed and define the match code value The match code value will be used to place the seed name records into the output file in match code order To access this screen type SR in the Add a Seed Name Definition screen (GSCPID50)
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID61
Input File Definition Edit SEEDED Record
Specify values for the field position desired
Match Code value 21113
Posn Seeded record value +10+20+30+40+50 001-050 051-100 101-150 151-200 201-250 251-300 301-350 351-400 401-450 451-500
More
F5=Refresh F6=Update F12=Cancel
If you need to type more information for your default data scroll down to the next screen
92243 Generalized Selection System GSCPID00 3312001 Replace with screen heading desired GSCPID61
Input File Definition Edit SEEDED Record
Specify values for the field position desired
Match Code value 21113
Posn Seeded record value +10+20+30+40+50
501-550 551-600 601-650 651-700 701-750 751-800 801-850 851-900 901-950 951-999
Bottom
F5=Refresh F6=Update F12=Cancel
3-62 621 - 102002
3 Edit SEEDED Record Screen (GSCPID61)
Fields
There are twenty-one fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
NOTE You can define up to ten different seed name records
Table 3-32 Fields on the Edit SEEDED Record Screen (GSCPID61) (Part 1 of 2)
Field Name Format Description Comments
Match Code Value 25 alphanumeric characters
Information that you are defining to be matched against up to the first 25 characters of the input record match code This option is used to place the seed records in correct sequence within the output file
For example if the first five characters of your match code consist of the ZIP Code type a ZIP Code When the same ZIP Code or higher is written in the output file Generalized Selection Plus will place the seed record in the output file in match code sequence
Required
1-50 50 characters Information for bytes 1-50 in the seed name record
Optional
51-100 50 characters Information for bytes 51-100 in the seed name record
Optional
101-150 50 characters Information for bytes 101-150 in the seed name record
Optional
151-200 50 characters Information for bytes 151-200 in the seed name record
Optional
201-250 50 characters Information for bytes 201-250 in the seed name record
Optional
251-300 50 characters Information for bytes 251-300 in the seed name record
Optional
301-350 50 characters Information for bytes 301-350 in the seed name record
Optional
351-400 50 characters Information for bytes 351-400 in the seed name record
Optional
401-450 50 characters Information for bytes 401-450 in the seed name record
Optional
451-500 50 characters Information for bytes 451-500 in the seed name record
Optional
501-550 50 characters Information for bytes 501-550 in the seed name record
Optional
Generalized Selection Plus Userrsquos Guide - AS400 3-63
3 Defining Your Input
Table 3-32 Fields on the Edit SEEDED Record Screen (GSCPID61) (Part 2 of 2)
Field Name Format Description Comments
551-600 50 characters Information for bytes 551-600 in the seed name record
Optional
601-650 50 characters Information for bytes 601-650 in the seed name record
Optional
651-700 50 characters Information for bytes 651-700 in the seed name record
Optional
701-750 50 characters Information for bytes 701-750 in the seed name record
Optional
751-800 50 characters Information for bytes 751-800 in the seeded name record
Optional
801-850 50 characters Information for bytes 801-850 in the seed name record
Optional
851-900 50 characters Information for bytes 851-900 in the seed name record
Optional
901-950 50 characters Information for bytes 901-950 in the seed name record
Optional
951-999 49 characters Information for bytes 951-999 in the seed name record
Optional
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-33 Function Keys on the Edit SEEDED Record Screen (GSCPID61)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Add a Seed Name Definition screen (GSCPID50)
NOTE The first Edit SEEDED Record screen (GSCPID61) has ldquoMorerdquo at the bottom To display the next screen press ltPAGE UPgt To return to the first screen of default fields press ltPAGE DOWNgt If your keyboard does not have ltPAGE UPgt or ltPAGE DOWNgt keys ask your system administrator which keys you should use
3-64 621 - 102002
3 Statistics File Control Field (SMFILE) Screen (GSCPID12)
Statistics File Control Field (SMFILE) Screen (GSCPID12)
The Statistics File Control Field (SMFILE) screen shown below allows you to define the following input file information
Length of the input file match code starting at the first position of the match code that you want defined as the break field for the Statistics File counter
Location for the contents of the match code break field on the Statistics file record if the break field length is less than five
If you type Statistics File counters in your job list using the Counts and Limits screen you will generate record counts per job andor instruction If you use this option you may want to type a control field length on this screen The control field length controls how much of your match code will be used as a break field and the length indicates where to place your enter break field on the Statistics File counter record Each time the control field length in the input record changes a new record will be generated in the Statistics File with new counts for the specified job andor instruction Note that the default break field length for the Statistics File is 5 For the layout of the Statistics File refer to Appendix D ldquoStatistics File Layoutrdquo
To access this screen press ltF11gt from the first Input File Definition screen (GSCPID05) or GSCPID10
112326 Generalized Selection System GSCPID00 01172001 Replace with screen heading desired GSCPID12 Job DEMO Input File Definition
Summary File Control Field (SMFILE)
[SMFILE] Specify details for summary file
Control field length (of input match code) 1-99
Control field output position (if len gt 5) 6-994
F5=Refresh F6=Save F12=Cancel
Generalized Selection Plus Userrsquos Guide - AS400 3-65
3 Defining Your Input
Fields
There are two fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 3-34 Fields on the Statistics File Control Field (SMFILE) Screen (GSCPID12)
Field Name Format Description Comments
Control field length (of input match code)
2 numeric digits The length of the input file match code starting at the first position that will be used as a break field in the Statistics File If you use this option you must sort your input files
Each time there is a change in this input record match code length a record will be generated for the Statistics File If the match code length doesnt change a counter is increased by one within the Statistics File record
NOTE If you want to count records by postal code type a control field length of six in this field
Optional Default is five (ZIP Code)
Control field output position (if len gt 5)
3 numeric digits The location on the S work area where the entire break field is placed If the length is less than five you can leave this field blank
Optional if length less than five No default
Function Keys
There are three valid function keys on this screen The table below shows you each key and a description of its function
Table 3-35 Function Keys on the Statistics File Control Field Screen (SMFILE) (GSCPID12)
Function Key Name Description
F5 Refresh Restore the data to its original
F6 Update Save the data and return to the previous screen
F12 Cancel Cancel the operation and return to the Input File Details screen (GSCPID10)
3-66 621 - 102002
Statistics File Control Field (SMFILE) Screen (GSCPID12) 3
Generalized Selection Plus Userrsquos Guide - AS400 3-67
3 Defining Your Input
3-68 621 - 102002
C H A P T E R 4
Processing Your Input Files
This chapter explains how Generalized Selection Plus processes your input files and auxiliary input files We also explain where Generalized Selection Plus stores data during processing
Input Files 4-2 Work Areas For Data 4-2 Input File Processing 4-3
Input Files 4-3 Auxiliary Input Files 4-4 Select an Input Record 4-5 Match with the Kill File 4-7 Match with the ZIP Code File 4-8
Sorting Your Input and Auxiliary Input Files 4-10 If You Use Match Code Files 4-11
Execute Your Job and Instruction Parameters 4-12
Generalized Selection Plus Userrsquos Guide - AS400 4-1
4 Processing Your Input Files
Input Files
For one job Generalized Selection Plus allows you to define up to three input files up to nine Match Code Files one ZIP Code File and one Kill File This chapter explains how Generalized Selection Plus processes the input files in conjunction with auxiliary input files and where Generalized Selection Plus stores input data during processing
Although the steps we describe occur automatically it is very important that you know how and where input data is stored so that you have access to the data when you define your job and instruction parameters Your job and instruction parameters define how you process the input data
Work Areas For Data
When input records are processed Generalized Selection Plus moves the data to work areas When data is in work areas you have access to it and you can manipulate the data to generate output files The most important Generalized Selection Plus work areas are described below
Work area N mdash Work area N holds each input record Work area N also holds any data you want sent to an output file
Work area M mdash Any time an input record matches one or more Match Code Files each matching Match Code File record is placed in specific positions within work area M
Work area Z mdash Any time an input record matches the ZIP Code File the matching ZIP Code File record is placed in work area Z
Work areas W X and Y mdash These work areas are reserved for any function such as holding data converting data testing data and performing mathematical functions
621 - 102002 4-2
4 Input File Processing
Input File Processing
To describe input file processing we present an example job For our example we will use three input files a Kill File and a ZIP Code File We show the contents of these files and then describe the processing steps taken by Generalized Selection Plus These steps include the following
1 Select the Input Record
2 Match with the Kill File
3 Match with the ZIP Code File
4 Execute your job and instruction parameters
Input Files
For our job we are processing three input files containing nameaddress records Our input record match code is the ZIP Code You can use the match code for auxiliary file comparison to sort your input files or to detect duplicate input records according to the match code
For our job the input record match codes will be matched against our auxiliary input files Below is a representation of the contents of our three input files Note that we are only displaying the ZIP Code of each input record the remaining input record information is presented using ldquo rdquo
Input File A Input File B Input File C
20814 20674 20674
20852 20714 20675
20879 20720 20676
Figure 4-1 Input File Contents
Generalized Selection Plus Userrsquos Guide - AS400 4-3
4 Processing Your Input Files
Auxiliary Input Files
The two auxiliary input files for our job include the Kill File and the ZIP Code File Below is a representation of the records in each auxiliary input file Note that we are only displaying the ZIP Code of each record the remaining record information is presented using ldquo rdquo
Figure 4-2 Auxiliary Input File Contents
Kill File ZIP Code File
20714 20673
20720 20674
20879
4-4 621 - 102002
Input File Processing 4
Select an Input Record
The first step that Generalized Selection Plus takes during processing is to place the input record with the lowest match code of all three input files in work area N Because the input file match code is the ZIP Code the input record with the lowest ZIP Code is placed in work area N The lowest ZIP Code in our job out of all three input files is ldquo20674rdquo The ZIP Code however appears in two input files Refer to Figure 4-3
Input File C
20674
20675
20676
Input File B
20674
20714
20720
This record is placed in work area N
Input File A
20814
20852
20879
Figure 4-3 Input Record for Work Area N
Because the first occurrence of 20674 is in input file B (B is at the beginning of the alphabet and is read first) the matching record from input file B is placed in work area N
Generalized Selection Plus places the input record from input file B in work area N starting in position 1 The file indicator for that input record ldquoBrdquo is placed in work area N at position 0 Refer to Figure 4-4
Generalized Selection Plus Userrsquos Guide - AS400 4-5
4 Processing Your Input Files
Input Record in Work Area N
0+1+2+3+
B 20674
Figure 4-4 Input Record Placed in Work A
621 - 102002 4-6
4 Input File Processing
Match with the Kill File
For the next step Generalized Selection Plus compares the input record match code from work area N to the auxiliary input file match code Generalized Selection Plus reads the Kill File first Our Kill File contains three ZIP Codes Refer to Figure 4-5
Kill File
20714
20720
20879
Input Record in Work Area N
20674
No match
Figure 4-5 Input Record Doesnrsquot match Kill File
None of the Kill File ZIP Codes match the input record stored in work area N so the input record is not automatically ignored If the input record had a ZIP Code of 20879 20720 or 20714 the input record would have been ignored and the next lowest input record would have been stored in work area N
Generalized Selection Plus Userrsquos Guide - AS400 4-7
4 Processing Your Input Files
Match with the ZIP Code File
After reading the Kill File Generalized Selection Plus reads our ZIP Code File which contains two ZIP Codes Generalized Selection Plus will read the ZIP Code File until the ZIP Code is greater than or equal to the input record ZIP Code Refer to Figure 4-6
ZIP Code File
20673
20674
Input Record in Work Area N
20674
A match
Figure 4-6 Input Record Matches ZIP Code
Since the input record matches the ZIP Code File the matching ZIP Code File record is placed in work area Z starting in position 1 then a 1 is placed in position 0 of work area Z (to indicate that a match has occurred) Refer to Figure 4-7
621 - 102002 4-8
4 Input File Processing
ZIP Code File Record in Work Area Z
0+1+2+3+
120674
Figure 4-7 ZIP Code File Record Placed in Work Area Z
If this record had not matched the ZIP Code File Generalized Selection Plus would have placed a 0 in position 0 of work area Z instead of a 1 You can also define a default ZIP Code File record to fill work area Z if an input record doesnt match the ZIP Code File To define a default record fill out the ZIP Code File Default Record (ZDATA) Screen (GSCPID18)
Generalized Selection Plus Userrsquos Guide - AS400 4-9
4 Processing Your Input Files
Sorting Your Input and Auxiliary Input Files
If you are matching input files against auxiliary input files or identifying duplicates in files you must sort your input files Match Code File(s) and the Kill File by match code and sort your ZIP Code File by ZIP Code
Sorting is essential because Generalized Selection Plus checks against an auxiliary input file sequentially If the auxiliary input match code is greater in value than the input match code Generalized Selection Plus stops matching against that file As a result Generalized Selection Plus may miss a match lower in the file Refer to Figure 4-8
ZIP Code File
First record 20879
Second record 20674
Input Record in Work Area N
20674
No match and larger
Figure 4-8 Why You Should Sort Files
For our example the ZIP Code File is not sorted so when Generalized Selection Plus reads the first ZIP Code in the ZIP Code File as higher than the input record ZIP Code Generalized Selection Plus assumes the ZIP Code File ZIP Codes can only become greater in value Thus the ZIP Code will never match with the lower input record ZIP Code To sort your input files fill in the Sort Option Screen within the Submit Job component
4-10 621 - 102002
Input File Processing 4
If You Use Match Code Files
If you use Match Code Files (nine available) in your job Generalized Selection Plus processes them differently than your ZIP Code File Note the following processing differences
Generalized Selection Plus can compare up to ten fields of data up to 99 bytes long (match code) for Match Code File processing but can compare ZIP Codes only for ZIP Code File processing
Generalized Selection Plus places matching Match Code File records in work area M but places ZIP Code File records in work area Z
Generalized Selection Plus can place up to nine matching records into work area M but can place only one matching record in work area Z
For example if records from both Match Code File 1 and Match Code File 2 match against the input record both matching records are placed in work area M Generalized Selection Plus places Match Code File 1s record in bytes M001-M1999 and places Match Code File 2s record in bytes M2001-M2999 Refer to the next page for a graphic representation of this process Generalized Selection Plus places additional matching Match Code File records in work area M at 1000 byte intervals
NOTE Positions M000 M2000 M3000 M4000 M5000 M6000 M7000 M8000 and M9000 contain a ldquo1 to indicate a match or a ldquo0 to indicate no match for each Match Code File This is similar to position Z000 in ZIP Code File processing
Generalized Selection Plus Userrsquos Guide - AS400 4-11
4 Processing Your Input Files
Below is work area M after Generalized Selection Plus places the matching records from Match Code Files 1 and 2 in work area M
Work Area M Match Code File 1 Record Placed in Positions 1-80
0+1+2+3+4+5+6+7+8
103985 Bill Robinson 18638 Blue Bird Lane Gaithersburg MD 20879
Match Code File 2 Record Placed in Positions 2001-2080
0+10+20+30+40+50+60+70+80
103985 Bill Robinson 301-939-9393
Figure 4-9 Match Code File Records in Work Area M
To define a default Match Code File record fill out the Match Code File Default Record Screen within the Define Input File component
Execute Your Job and Instruction Parameters
At this point the input record is in work area N and the matched ZIP Code File record is in work area Z Now Generalized Selection Plus will execute your sets of job and instruction parameters Refer to the next chapter for detailed instructions on defining job and instruction parameters to meet your processing needs
4-12 621 - 102002
C H A P T E R 5
What Are Jobs and Instructions
This chapter defines a job parameter and an instruction parameter and indicates what they look like and how they work Additionally this chapter provides a complete reference for the Define Jobs and Instructions component of Generalized Selection Plus Each screen is presented along with its fields options and function keys
What Are Job and Instruction Parameters 5-3 What Do They Look Like 5-3 How Do They Work 5-5 How Do I Define Jobs and Instructions 5-6 Step 1 Define a Job Parameter 5-6 Step 2 Define an Instruction Parameter 5-9 Step 3 Manage Your Job and Instruction List 5-12
Copy Parameters 5-13 Define Jobs and Instructions Reference Screens 5-17 Job and Instruction Definition Screen (GSCPJI11) 5-20
Fields 5-22 Function Keys 5-23
Screen GSCPIP10 (to Copy Existing Data) 5-24 View 1 5-24
Fields 5-25 View 2 5-26
Fields 5-26 View 3 5-27
Fields 5-28 Function Keys 5-28
Split-Screen Mode Screen 5-29 Fields 5-30 Function Keys 5-30
Function Menu Screen (GSCPJI45) 5-31 Fields 5-32 Function Keys 5-32
Job Card Parameters Screen (GSCPJI20) 5-33 Fields 5-34 Function Keys 5-35
Counts and Limits Screen (JOB) (GSCPJI21) 5-36 Fields 5-37 Function Keys 5-38
Instruction Card Parameters Screen (GSCPJI30) 5-39 What Are First and Second Operands 5-40
Generalized Selection Plus Userrsquos Guide - AS400 5-1
5 What Are Jobs and Instructions
Comparing Data 5-41 For NumericNon-Numeric Testing 5-42 For Mathematical Functions 5-43 For Converting Data 5-44 For Moving Data 5-45 For Branching to a Different Job 5-45
Connector Word Field 5-46 Left Parenthesis Field and Right Parenthesis Field 5-48 Fields 5-49 Function Keys 5-52
Instruction Code Options Screen (GSCPJI32) 5-53 Instruction Field 5-54
Comparing Data Function 5-55 Testing for Numeric and Non-Numeric Data 5-55 Performing Mathematical Functions 5-56 Converting Data 5-56 Moving Data 5-56 Branch to a Different Job 5-57 Fields 5-57 Function Keys 5-58
Counts and Limits (INSTRUCTION) Screen (GSCPJI31) 5-59 Fields 5-60 Function Keys 5-61
View Work Areas Screen (GSCPJI80) 5-62 Work Areas 5-63 Function Keys 5-64
Prompt Function 5-65 Fields 5-66 Function Keys 5-67
Insert Remark Screen (GSCPJI50) 5-68 Fields 5-68 Function Keys 5-69
External Reference (EXTREF) Screen (GSCPJI70) 5-70 Fields 5-71 Function Keys 5-72
View External Reference (GSCPVX11) 5-73 Fields 5-74 Function Keys 5-74
621 - 102002 5-2
5 What Are Job and Instruction Parameters
What Are Job and Instruction Parameters
Job and instruction parameters allow you to make selections on your input files to generate mailing lists (output files) that fulfill your specific marketing needs One important distinction to know before using Generalized Selection Plus is that one set of job and instruction parameters may be referred to as a job This is not the same as a job created in the Create New Job screen
A job parameter is the first parameter defined in a job The job parameter identifies the name of the job and what should occur if a record meets the criteria of this job Instruction parameters are defined after each job parameter and have the same name as the job parameter Instruction parameters define the criteria of the job (what steps to execute) You can define instructions to do the following
Compare character or packed data
Test for the presence or absence of numericnon-numeric data
Perform mathematical functions with character or packed data
Convert data to packed or unpacked data
Move data
Branch to another jobs
What Do They Look Like
Refer to the next page for an example job list appearing on the Job and Instruction Definition screen in Generalized Selection Plus Notice you can define multiple sets of job and instruction parameters to accomplish different tasks In this example there are three job and instruction parameter sets
Job FILECD selects only those input records that have a file code of 012 024 or 036 and if a record meets any of these criteria it is passed to the next job FEMALE
Job FEMALE tests for an input record gender code of ldquoFrdquo for female and an income level between $20000 and $40000 and if a record meets these criteria the record is sent to output file A
Job MINCST tests for an input record gender code of ldquoMrdquo for male and a state code of ldquoNYrdquo or ldquoCArdquo and if a record meets these criteria the record is sent to output file B
NOTE Each job parameter has ldquo01 next to it and all of its associated instruction parameters have a number between rdquo02 and ldquo99 next to them and the same name as the job parameter
Generalized Selection Plus Userrsquos Guide - AS400 5-3
5 What Are Jobs and Instructions
Job parameter for job FILECD
Job parameter for job FEMALE
Job parameter for job MINCST
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
_____ 1 FILECD 01 X _____ 2 FILECD 02 EQ N001 03-012 OR _____ 3 FILECD 02 EQ N001 03-024 OR _____ 4 FILECD 02 EQ N001 03-036 _____ 5 FEMALE 01 A _____ 6 FEMALE 02 EQ N078 01-F AND
7 FEMALE 02 GE N080 05-20000 AND _____ 8 FEMALE 02 LE N080 05-40000 _____ 9 MINCST 01 B _____ 10 MINCST 02 EQ N078 01-M AND
11 MINCST 02 (EQ N068 02-NY MA _____ 12 MINCST 02 EQ N080 02-CA )
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Figure 5-1 Job Parameters on the Job and Instruction Definition Screen
Set of instruction parameters for job
FILECD
Set of instruction parameters for job
Set of instruction parameters for job
MINCST
Figure 5-2 Instruction Parameters on the Job and Instruction Definition Screen
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
_____ 1 FILECD 01 X _____ 2 FILECD 02 EQ N001 03-012 OR _____ 3 FILECD 02 EQ N001 03-024 OR _____ 4 FILECD 02 EQ N001 03-036 _____ 5 FEMALE 01 A _____ 6 FEMALE 02 EQ N078 01-F AND
7 FEMALE 02 GE N080 05-20000 AND _____ 8 FEMALE 02 LE N080 05-40000 _____ 9 MINCST 01 B _____ 10 MINCST 02 EQ N078 01-M AND
11 MINCST 02 (EQ N068 02-NY MA _____ 12 MINCST 02 EQ N080 02-CA )
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
621 - 102002 5-4
How Do They Work 5
How Do They Work
Its important to understand how job and instruction parameters work before defining a job For example you define a set of job and instruction parameters to send an input record to output file A if the record has
A gender code of M and
An income level greater than or equal to $20000 and
An income level less than or equal to $40000 and
A state code of NY NJ or CA
Each of the above bullets represent an instruction parameter in this job All instruction parameter criteria must be met for the input record to be sent to output file A because all of the instruction parameters are connected by ldquoANDrdquo Note that you can also use ldquoORrdquo and parentheses to group instructions in which case only one of the criterion must be true Below is an input record that will not be sent to output file A based on our example job
John Smith 2300 Bellwood Dr Trenton PA 15237 M 35000
Although it does test true for the gender code criteria (M) and for the income level criteria (between $20000 and $40000) it does not test true for the state code criteria
Below is another input record that will not be sent to output file A based on this job
Paul Morton 6250 Monty Avenue Williamsburg CA 70362 M 50000
Although it does test true for the gender code criteria (M) and the state code of CA it does not test true for the income criteria All criteria have to be true because of the ldquoANDrdquo connector words
Generalized Selection Plus Userrsquos Guide - AS400 5-5
5 What Are Jobs and Instructions
How Do I Define Jobs and Instructions
The remainder of this chapter describes how to use the following screens to define your jobs and instructions
Job Card Parameters screen (GSCPJI20)
Instruction Card Parameters screen (GSCPJI30)
Job and Instruction Definition screen (GSCPJI11)
To define example parameters refer to the next chapter
Step 1 Define a Job Parameter
When you define a job parameter you can type a parameter in the Job and Instruction Definition screen (GSCPJI11) or you can fill out the Job Card Parameters screen (GSCPJI20) which will automatically generate the parameter We will define our job parameter by filling out the screen The job that we will define will check for an input record gender code of ldquoFrdquo for female If the input record gender code is ldquoFrdquo the input record will be sent to output file A Follow the instructions below
1 Go to the Define andor Submit a Job screen (GSCPDS01) This is where you have access to all of the Generalized Selection Plus components
92243 Generalized Selection System GSCPDS00 1212001 Replace with screen heading desired GSCPDS01
Define andor Submit a Job
Type options press Enter2=Edit 6=Create
- - - - -Last Activity- - - - -Opt Function Date Time User
Defaults for Print Output 03181998 105014 D1DEF Define Input Files 03181998 110225 D1DEF
2 Define Jobs and Instructions
Define Statistical Reports
Submit Batch Job
F3=Exit F12=PrevScrn
2 Enter 2 in the Opt field next to the Define Jobs and Instructions function Then press ltENTERgt
621 - 102002 5-6
5 Step 1 Define a Job Parameter
The Job and Instruction Definition screen (GSCPJI20) appears
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option+1+2+3+4+5+6+
Beginning of data End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
3 Press ltF10gt to add a job parameter
The Function Menu screen (GSCPJI45) appears
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI45
Job and Instruction Definition Function Menu
Specify the number of the Generalized Selection screen desired press enter
1 JOB Definition - Start a new job 2 Instruction Definition - Add an instruction to current job 3 REMARK - User-specified commentary 4 EXTREF - Import functions from an external file or job
Function 1
F12=Cancel
4 Enter 1 in the Function field then press ltENTERgt
Generalized Selection Plus Userrsquos Guide - AS400 5-7
5 What Are Jobs and Instructions
Generalized Selection Plus displays the Job Card Parameters screen (GSCPJI20) When you fill out the Job Card Parameters screen the parameter produced appears at the top of the screen in the form of an 80-byte parameter This automatically generated 80-byte parameter also appears on the Job and Instruction Definition screen
80-byte parameter automatically displayed
on the Job and Instruction Definition
Screen
Information entered on the screen
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI20
Job and Instruction Definition Job Card Parameters
Specify parameters for the JOB card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + FGENDR 01 AN
Job name FGENDR Card number 01 Job action A A-E = Output file
Q = Simulate end-of-file X = No additional action Z = End execution for the record
Skip following jobs N N = Process normally (default) Y = Perform action then end
End of data job BLANK = Process normally (default) E = Execute after end-of-file(s)
Job description
F5=Refresh F6=Update F9=Work Areas F15=LimitReports F12=Cancel F24=Field Search
5 Fill in the screen as displayed above
6 Press ltF6gt to save your information
The Job name field names this set of job and instruction parameters FGENDR The Job action field indicates what will happen if an input record meets the criteria of this job For this job contents of work area N will be sent to output file A
621 - 102002 5-8
5 Step 2 Define an Instruction Parameter
Step 2 Define an Instruction Parameter
Now that you have defined the job parameter for job FGENDR we will define the instruction parameter to test for an input record gender code of ldquoFrdquo
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI45
Job and Instruction Definition Function Menu
Specify the number of the Generalized Selection screen desired press enter
1 JOB Definition - Start a new job 2 Instruction Definition - Add an instruction to current job 3 REMARK - User-specified commentary 4 EXTREF - Import functions from an external file or job
Function 2
F12=Cancel
1 Enter 2 in the Function field and press ltENTERgt
You will see the Instruction Card Parameters screen (GSCPJI30) When you fill out the Instruction Card Parameters screen the parameter produced appears at the top of the screen in the form of an 80-byte parameter This automatically generated 80-byte parameter also appears on the Job and Instruction Definition screen
Generalized Selection Plus Userrsquos Guide - AS400 5-9
5 What Are Jobs and Instructions
80-byte parameter
automatically displayed on the Job and
Instruction Definition Screen
Information entered on the
screen
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + FGENDR 02 EQ N078 01-F
Job name FGENDR Card number 02 Left Work Beg Par Inst Area Posn Len(s)First operand ( EQ N 78 1 Press F4 for Instruction
optionsRight
Second operand Par OR Constant F )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
2 Fill in the screen as displayed above
The First Operand field defines the location of the input record gender code which is located in work area N at position 78 for a length of 1
The Second Operand - OR Constant field defines the value that we want compared to the input record gender code (F) A ldquo-rdquo is automatically placed in position 42 of the parameter at the top of the screen to indicate that you are using a constant value
The Instruction field defines the EQ (Equal to) instruction code which tests whether the input record gender code (First Operand) is equal to ldquoFrdquo (Second Operand - OR Constant)
3 Press ltF6gt to save your information
5-10 621 - 102002
Step 2 Define an Instruction Parameter 5
The Function Menu screen (GSCPJI45) appears
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI45
Job and Instruction Definition Function Menu
Specify the number of the Generalized Selection screen desired press enter
1 JOB Definition - Start a new job 2 Instruction Definition - Add an instruction to current job 3 REMARK - User-specified commentary 4 EXTREF - Import functions from an external file or job
Function
F12=Cancel
4 Press ltF12gt
The Job and Instruction Definition screen (GSCPJI11) appears with the parameters generated from filling out the Job Card Parameters screen (GSCPJI20) and the Instruction Card Parameters screen (GSCPJI30)
Job parameter for job FGENDR
Instruction parameter for job FGENDR
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
_____ 1 FGENDR 01 A _____ 2 FGENDR 02 EQ N073 01-F
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Generalized Selection Plus Userrsquos Guide - AS400 5-11
5 What Are Jobs and Instructions
Step 3 Manage Your Job and Instruction List
Now that you have defined a set of job and instruction parameters by filling out screens we are going to define a set of instructions using the Job and Instruction Definition screen (GSCPJI11) At this screen you can edit the list of parameters generated from the Job Card Parameters screen (GSCPJI20) and Instruction Card Parameters screen (GSCPJI30) or type parameters directly onto this screen This screens functions are very flexible allowing you to do the following
Move to a parameter
Place a parameter in the list after a move or copy
Copy a parameter
Delete a parameter
Move a parameter
Correct a parameter
Edit a parameter
Insert a parameter
Insert a remark
Copy from an external file
To perform these tasks refer to the Job Management Guide a separate publication
For our example we will define a job that sends all input records with a gender code of ldquoMrdquo for male to output file B
5-12 621 - 102002
Step 3 Manage Your Job and Instruction List 5
Copy Parameters
Our first step is to make a copy of FGENDR because it is very similar to the first part of our second job To do this we will use the CC Editing option to copy the FGENDR parameters
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
CC 1 FGENDR 01 A CC 2 FGENDR 02 EQ N073 01-F
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
1 Type CC in the Option field across from line 1
2 Type CC in the Option field across from line 2 and press ltENTERgt
The instructions to be copied appear highlighted and the word ldquoPendingrdquo appears in the upper left corner of the screen followed by CC
Generalized Selection Plus Userrsquos Guide - AS400 5-13
5 What Are Jobs and Instructions
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
CC 1 FGENDR 01 A CC 2 FGENDR 02 EQ N073 01-F
B End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
3 Type B in the Option field across from the End of Data line and press ltENTERgt
A copy of FGENDRs job parameter and instruction parameter are placed on lines 3 and 4 of the job list
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
1 FGENDR 01 A 2 FGENDR 02 EQ N073 01-F 3 MALINC 01 A 4 MALINC 02 EQ N073 01-F
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
5-14 621 - 102002
5 Step 3 Manage Your Job and Instruction List
4 Press arrow keys to move the cursor to change the job name from FGENDR to MALINC the second job name
Now you can change the job parameter so that all records meeting this jobs criteria are sent to output file B
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
1 FGENDR 01 A 2 FGENDR 02 EQ N073 01-F 3 MALINC 01 B 4 MALINC 02 EQ N073 01-F End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
5 Press the arrow keys to move to line 3 position 31
6 Change A to B
NOTE If you are not sure about the positions press ltF4gt
Generalized Selection Plus Userrsquos Guide - AS400 5-15
5 What Are Jobs and Instructions
Now you can change the gender code to test for ldquoMrdquo for male instead of ldquoFrdquo for female
92243 Generalized Selection System GSCPJI00 1212001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
1 FGENDR 01 A 2 FGENDR 02 EQ N073 01-F 3 MALINC 01 B 4 MALINC 02 EQ N073 01-M End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
7 Press the arrow keys to move to line 4 position 43
8 Change F to M
9 Press ltF6gt
You have defined two sets of job and instruction parameters Refer to Chapter 6 ldquoDefining Jobs and Instructionsrdquo for other example parameters
5-16 621 - 102002
5 Define Jobs and Instructions Reference Screens
Define Jobs and Instructions Reference Screens
The Job and Instruction Definition component allows you to
Define multiple jobs to manipulate your records
Define instructions for each job
Import job instructions from an external file or job
Insert remarks in your job to clarify instructions
You will define these items from the screens described below Note that the relationship between these screens is displayed on the next page
Job and Instruction Definition screen mdash Displays a listing of the parameters generated by the Generalized Selection screens you used to define your job (GSCPJI11)
JobInstruction Definition Screen (to copy existing data) mdash Copies existing data into your job from another job or from an external file (GSCPIP10)
Function Menu screen mdash Allows you to select an option to define a job name define instructions for a job define remarks that you want in your job or import instructions from an external file or job (GSCPJI45)
Job Card Parameters screen mdash Defines the name of a job and standard job options such as what to do with records that meet this jobs criteria (GSCPJI20)
Counts and Limits (JOB) screen mdash Defines how many records to process for the current job and whether to generate a StateProvince Count Report or Statistics File counters (GSCPJI21)
Instruction Card Parameters screen mdash Defines the instructions you want in your current job (GSCPJI30)
Instruction Code Options screen mdash Defines whether to compare data test for numeric data move data pack or unpack data or perform mathematical functions (GSCPJI32)
Counts and Limits (INSTRUCTION) screen mdash Defines how many records to process for the current instruction and whether to generate a StateProvince Count Report or Statistics File counters (GSCPJI31)
View Work Areas screen mdash Displays the size and description of all work areas used in the Generalized Selection System (GSCPJI80)
Insert Remark screen mdash Defines any remarks to include in the job listing that will be ignored during processing (GSCPJI50)
External Reference (EXTREF) screen mdash Imports a job andor instructions from an external job or file (GSCPJI70)
View External Reference screen mdash Allows you to view the external job or file that you selected with the External Reference (EXTREF) screen (GSCPVX11)
Generalized Selection Plus Userrsquos Guide - AS400 5-17
5 What Are Jobs and Instructions
ltF3gt
Function Menu
GSCPJ145
Job Card Parameters
GSCPJ120
Insert Remark (REMARK)
GSCPJI50
ltF12gt ltF12gt1 ltF6gt 2 ltF6gt ltF6gt3 ltF12gt ltF6gtltF12gt4
The following figure shows the relationship between the Function Menu screens The screens used to copy existing job information are displayed on the next page
Job and Instruction Definition
Job and Instruction Definition
GSCPJI11
Prompt Function
Any Job amp Instruction Screen
ltF6gtltF12gt ltF4gt ltF12gt
ltF10gt
ltF12gt ltF15gt
Counts and Limits
(GSCPID21) (GSCPID31)
Instruction Card Parameters
GSCPJI30ltF12gt
ltF6gt
External Reference (EXTREF)
GSCPJI70
ltF4gt ltF12gtltF6gtltF6gt
Instruction Code Options
GSCPJI32
ltF10gtltF12gtltF6gt
ltF9gt
ltF15gt
View Work Areas
GSCPJI80
View External Reference
GSCPVX11
Figure 5-10 Job and Instruction Definition Screens
5-18 621 - 102002
5 Define Jobs and Instructions Reference Screens
ltF12gt
The figure below shows the relationship between remaining Jobs and Instructions screens
Job and Instruction Definition
Job and Instruction Definition
GSCPJI11
ltF3gt
ltF15gt ltF6gt
(To copy existing data) View 1
GSCPIP10
ltF6gtltF12gt3ltF6gtltF12gt2
(To copy existing data) View 2
GSCPIP10
(To copy existing data) View 3
GSCPIP10
Figure 5-11 Job and Instruction Definition Screens
Generalized Selection Plus Userrsquos Guide - AS400 5-19
5 What Are Jobs and Instructions
Job and Instruction Definition Screen (GSCPJI11)
The Job and Instruction Definition screen shown below allows you to view the parameters generated by the Job and Instruction Definition screens as you fill them out to define your job This enables you to edit the parameters on this screen or move directly to the screen that you want to edit To access this screen choose the Define Jobs and Instructions component from the DefineSubmit Generalized Selection Job screen (GSCPDS01)
NOTE For instructions describing how to use all the editing options for the Job and Instruction Definition screen (GSCPJI11) refer to the Generalized Selection Users Guide
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI11 Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ _____ Beginning of data _____ End of data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Each screen you fill out in the Job and Instruction component generates a parameter on the Job and Instruction Definition screen This allows you to view your entire job list and make changes directly to the parameters
5-20 621 - 102002
5 Job and Instruction Definition Screen (GSCPJI11)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI11 Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ _____ Beginning of data _____ 1 JOB001 01 A _____ 2 JOB001 02 LT N080 05-50000 _____ 3 JOB004 01 C _____ 4 JOB004 02 MV X050 02 N044 AND _____ 5 JOB004 02 MV Y111 02 X050 AND _____ 6 JOB004 02 MV W254 02 N001 AND _____ 7 JOB004 02 NM W254 _____ 8 JOB005 01 D _____ 9 JOB005 02 NNM X050 _____ 10 JOB006 01 B _____ 11 JOB006 02 ADE N036 53-100 _____ End of data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Generalized Selection Plus Userrsquos Guide - AS400 5-21
5 What Are Jobs and Instructions
Fields
There is one type of field on this screen The number of fields depends on how many parameters are in your jobThe table below shows you a description of each field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-1 Fields on the Job and Instruction Definition Screen (GSCPJI11)
FIeld Name Format Description Comments
Option Up to 4 alpha or numeric characters
A code indicating what editing option you want to use For more detailed instructions refer to the Generalized Selection Userrsquos Guide Type one of the following
1-9999 Line number of the job where you want to move the cursor
I Insert a blank line so you can type a parameter
IP Insert instructions with a prompt This takes you to the Function menu to select a function The definition that you add is inserted after the function where the IP option was placed
IR Insert a remark for your own use
C or M Block a single instruction (parameter) to be moved or copied
CC or MM Block a group of instructions to be moved or copied
D Delete a single instructions
DD Delete a block of instructions This must be paired with a second DD to finish the block
A Place an instruction or set of instructions after the current line
B Place an instruction or set of instructions before the current line
Optional
5-22 621 - 102002
5 Job and Instruction Definition Screen (GSCPJI11)
Function Keys
There are ten valid function keys on this screen The table below shows you a description of each keys function
Table 5-2 Function Keys on Job and Instruction Definition Screen (GSCPJI11)
Function Key Name Description
F3 Exit Return to the Work With Jobs screen (GSCPDS01) without updating the screens information
F4 Prompt Function Place the cursor at the line of an instruction you want to edit When you press ltF4gt the instructions corresponding screen is displayed for you to modify
F5 Refresh Cancel a selected option For example if you block a function and change your mind refresh cancels the block option
F6 Update Save the definitions and if you specified external file details in the External Reference (EXTREF) screen (GSCPJI70) saves the definitions to the external file
F10 Add Function Go to the Function Menu (GSCPJI45) screen to add an instruction to your job
F24 More Keys Display additional function keys
NOTE If the Job and Instruction Definition screen (GSCPJI11) has ldquoMorerdquo at the bottom press ltPAGE UPgt to display the next screen of the job listing To return to the previous screen of the job listing press ltPAGE DOWNgt
Generalized Selection Plus Userrsquos Guide - AS400 5-23
5 What Are Jobs and Instructions
Screen GSCPIP10 (to Copy Existing Data)
The GSCPIP10 screen is used to copy existing data into your job from another job or from an external file There are three views of this screen each with separate fields To access these screens press ltF15gt at the Job and Instruction Definition screen
View 1
The first view of screen GSCPIP10 is shown below
92243 Generalized Selection System GSCPIP00 3312001 Replace with screen heading desired GSCPIP10
Job and Instruction Definition
Select one of the following
You are about to provide information for this function There are three possible choices for the information source as shown
1 Use existing information for this job if any2 Copy existing information from another job3 Copy information stored in an external file
Selection __
F5=Refresh F12=Cancel
5-24 621 - 102002
Screen GSCPIP10 (to Copy Existing Data) 5
Fields
There is one field on this view The table below shows you a description of the field including the fieldrsquos format values you can type the default (if any) and any other special information you may need to know about the field There is no default for this field
Table 5-3 Fields on View 1 of Screen GSCPIP10
Field Name Format Description Comments
Selection 1 numeric digit The number of the option you want to invoke Type one of the following functions
1 Copy or view the information that existed for this job when it was typed (if no information has been previously defined you will be presented with blank or default fields)
2 Copy or view information from a job that has previously been defined When you type this option View 2 of this screen will be displayed
3 Copy or view information that has previously been stored in an external file When you type this option View 3 of this screen will be displayed
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 5-25
5 What Are Jobs and Instructions
View 2
View 2 used to copy data from another job is shown below
92243 Generalized Selection System GSCPIP00 3312001 Replace with screen heading desired GSCPIP10
Job and Instruction Definition
Type source Job ID press Type
Copy existing information from another job Job ID _____
F5=Refresh F12=Cancel
Fields
There is one field on this view The table below shows you a description of the fields format and the values you can type This field has no default
Table 5-4 Fields on View 2 of Screen GSCPIP10
Field Name Format Description Comments
Job ID 1 to 5 characters (A-Z 0-9 $ _ or )
The job ID for the job from which you want to copy data (The job must already exist in the system)
Required No default
5-26 621 - 102002
Screen GSCPIP10 (to Copy Existing Data) 5
View 3
View 3 used to copy data from an external file is shown below
114403 Generalized Selection System GSCPIP00 Replace with screen heading desired GSCPIP10
Job DEMO Job and Instruction Defn
Specify external file press Enter
Copy information stored in an external file File Library
Member
F5=Refresh F12=Cancel
114403 Generalized Selection System GSCPIP00 Replace with screen heading desired GSCPIP10
Job DEMO Job and Instruction Defn
Specify external file press Enter
Copy information stored in an external file File Library
Member
F5=Refresh F12=Cancel
Generalized Selection Plus Userrsquos Guide - AS400 5-27
5 What Are Jobs and Instructions
Fields
There are three fields on this view The table below shows you a description of each field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-5 Fields on View 3 of Screen GSCPIP10
Field Name Format Description Comments
File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the external file that contains the data that you want to use for this job
Required No default
Library 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The library in which the external file resides
Required No default
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the external file that contains the data you want to use Type either the member name or a variable (such as FIRST) that indicates which member of the file is to be used
Required Default is FIRST
Function Keys
There are two valid function keys on screen GSCPIP10 (the function keys are the same for all three views) The table below shows you a description of each keys function
Table 5-6 Function Keys on Screen GSCPIP10
Function Key Name Description
F5 Refresh Clear all data from the fields on the screen and return to View 1
F12 Cancel Cancel the operation and return to the Work with Jobs screen (GSCPMM03)
5-28 621 - 102002
5 Screen GSCPIP10 (to Copy Existing Data)
Split-Screen Mode Screen
The split-screen mode screen appears on the Job and Instruction Definition screen (GSCPJI11) after you define an external file or job from which to copy information The external file is displayed in the bottom half of the Job and Instruction Definition screen while the top half of the screen displays your current Generalized Selection Job
NOTE You can only view and copy instructions from the displayed external file or job
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI11 Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ _____ Beginning of data _____ 1 JOB001 01 A _____ 2 JOB001 02 LT N080 05-50000 _____ 3 JOB004 01 B _____ 4 JOB004 02 MV X050 02 N044 AND _____ 5 JOB004 02 MV Y111 02 X050 AND _____ 6 JOB004 02 MV W254 02 N001 _____ End of data
________________________________________________________________________ _____ Beginning of data _____ 1 JOB005 01 A _____ 2 JOB005 02 NNM X050 02 N001 _____ 3 JOB006 01 B _____ 4 JOB006 02 ADE N036 53-100
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Generalized Selection Plus Userrsquos Guide - AS400 5-29
5 What Are Jobs and Instructions
Fields
This screen has all of the functionality of the normal Job and Instruction Definition screen (GSCPJI11) but in the external instructions area you have limited capabilities There is one field for each record on this screen The table below shows you a description of the field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-7 Fields on the Split-Screen Mode Screen
Field Name Format Description Comments
External Instruction Option Field
1 character Option indicating what you can do where the external instructions are listed Type one of the following
1-9999 Line number of the job where you want to move the cursor
C Block a single instruction (parameter) to be copied
CC Block a group of instructions to be copied
Required No default
Function Keys
There is one valid function key on this screen The table below shows you a description of the keys function
Table 5-8 Function Key on Function Menu Screen (GSCPJI4)
Function Key Name Description
F3 Exit
F4 Prompt function
F5 Refresh Clear all data from the fields on the screen and return to View 1
F6 Update Save the data and return to the previous screen
F10 Add function
F12 Cancel Cancel the operation split screen mode
F24 More keys Allows you to see additional function keys
5-30 621 - 102002
5 Function Menu Screen (GSCPJI45)
Function Menu Screen (GSCPJI45)
The Function Menu screen shown below allows you to select from four options used to type definitions for your job To access this screen press ltF10gt from the Job and Instruction Definition screen (GSCPJI11) to add to the bottom or type IP in the Option field where you want to type a new instruction in your job listing
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI45 Job and Instruction Definition
Function Menu
Select the number of the Generalized Selection screen desired press type
1 JOB Definition - Start a new job2 Instruction definition - Add an instruction to current job3 REMARK - User-specified commentary4 EXTREF - Import functions from an external file or job
Function __
Generalized Selection Plus Userrsquos Guide - AS400 5-31
5 What Are Jobs and Instructions
Fields
There is one field on this screen The table below shows you a description of the field including the fields format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-9 Fields on the Function Menu Screen (GSCPJI45)
Field Name Format Description Comments
Function 1 character Option indicating what function you want to type in your job Type one of the following
1 Defines the job name and job details
2 Adds an instruction to the current job
3 Adds a remark to the current job
4 Imports instructions from an external file or job
Required No default
Function Keys
There are no function keys on this screen
5-32 621 - 102002
5 Job Card Parameters Screen (GSCPJI20)
Job Card Parameters Screen (GSCPJI20)
The Job Card Parameters screen shown below allows you to define the job parameter that starts a set of instruction parameters A job parameter defines the following information about the job
Job name
The action you want to take if a record meets the criteria of this job
Whether to skip the remaining jobs if any records meet the criteria for this job
Whether this job should be run only after an end of file on all input files
Job description
To access this screen type 1 at the Function Menu screen (GSCPJI45)
92243 Generalized Selection System GSCPJI00 3311999 Replace with screen heading desired GSCPJI20
Job and Instruction Definition Job Card Parameters
Specify parameters for the JOB card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 +
Job name JOB1 Card number 01 Job action A A-E = Output file
Q = Simulate end-of-file X = No additional action Z = End execution for the record
Skip following jobs N N = Process normally (default) Y = Perform action then end
End of data job BLANK = Process normally (default) E = Execute after end-of-file(s)
Job description
F5=Refresh F6=Update F9=Work Areas F15=LimitReports F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 5-33
5 What Are Jobs and Instructions
Fields
There are six fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-10 Fields on the Job Card Parameters Screen (GSCPJI20)
Field Name Format Description Comments
Job name 1 to 6 alpha numeric or blank characters
The name of the job All instructions associated with this job must have the same name as this JOB parameter
Required Default is the name of the JOB parameter
Card number 2 digits The card number for a JOB parameter is always 01
Default is 01
Job action 1 alpha character A code indicating what to do with any records that meet the criteria of this job If you are generating only statistics and not producing output files select option Z Type one of the following
A-E Write the record to output file OA OB OC OD or OE
Q Simulate end-of-file for all input files
X Perform no additional action
Z Perform no additional job or instructions are to be performed for this record
Optional No default
Skip following jobs 1 character A code indicating whether to skip any of the remaining jobs after performing the action specified in the previous field Type one of the following
Y Skip the following jobs
N Process the following jobs normally
Optional Default is N
End of data job 1 character A code indicating whether to perform the current job normally or perform the job after an end-of-file is detected on all input files Type one of the following
blank Process the job normally
E Process only after an end-of-file on all input files
Optional Default is N
Job description 25 characters A description that you want printed on the state count report
Optional No default
5-34 621 - 102002
5 Job Card Parameters Screen (GSCPJI20)
Function Keys
There are six valid function keys on this screen The table below shows you each key and a description of its function
Table 5-11 Function Keys on the Job Card Parameters Screen (GSCPJI20)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Function Menu screen (GSCPJI45) or the Job and Instruction Definition screen
F15 LimitReports Go to the Counts and Limits screen (GSCPJI21) too limit the number of records processed for the job
F24 Field Search Allows you to display the location and lengths of the fields in an external file Type file name and library of external file
Generalized Selection Plus Userrsquos Guide - AS400 5-35
5 What Are Jobs and Instructions
Counts and Limits Screen (JOB) (GSCPJI21)
The Counts and Limits screen shown on the next page allows you to conduct sampling for the current job
Nth record selection mdash Includes or excludes every Nth record that meets the criteria of the job
Fraction of records mdash Includes a fraction of the records that meet the criteria of the job
Limit the number of records mdash Limits the number of records that meet the criteria of a job
NOTE When a job reaches its record limit any following records that meet the jobs criteria will still not continue to the next processing step Generalized Selection will treat them as if they didnt meet the jobs criteria
This screen allows you to generate a StateProvince Counts report for an instruction This report generates a count by state or province of records that meet the criteria of the job The stateprovince counts are determined according to the first three digits of the ZIP Code (Section Center Facility or ldquoSCFrdquo code) or the first 3 characters of the postal code To specify province counts refer to Chapter 4 ldquoDefine Input Filesrdquo under the heading ldquoStatistics File Control Field (SMFILE) screen (GSCPID12)rdquo and change the Control field length to 6
You can also generate a Statistics file With this option you generate a file of counters per job You can use the Statistics file as input to the Define Statistical Report component to produce a custom report This report can contain break level totals
NOTE Both stateprovince and statistic file counts can be generated at the same time
5-36 621 - 102002
5 Counts and Limits Screen (JOB) (GSCPJI21)
To access this screen press ltF15gt at the Job Card Parameters screen (GSCPJI20)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI21
Job and Instruction Definition Counts and Limits (JOB)
Specify parameters for the JOB card
+1+2+3+4+5+6++7+
Counts by state or ZIP Code ___ S = State Counts for records selected Z = ZIP counter in summary record B = Both state and ZIP counts
Nth record select _____ _ I = Include every Nth selection-OR- E = Exclude every Nth selection
Fraction of record _____
Limit records _____
F5=Refresh F6=Update F9=Work Areas F12=Cancel F24=Field Search
Fields
There are five fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-12 Fields on the Counts and Limits (JOB) Screen (GSCPJI21) (Part 1 of 2)
Field Name Format Description Comments
Counts by state or ZIP Code 1 character A code indicating whether to generate record counts by state or province andor Statistics File counts for the records that meet the criteria of the job Type one of the following
S Generate state or province counts
Z Generate Statistics File counts
NOTE If you want to keep counts by Canadian postal code refer to Chapter 4 under the heading ldquoStatistics File Control Field (SMFILE) screen (GSCPID12)rdquo
B Generate both state or province counts and Statistics File counts
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 5-37
5 What Are Jobs and Instructions
Table 5-12 Fields on the Counts and Limits (JOB) Screen (GSCPJI21) (Part 2 of 2)
Field Name Format Description Comments
Nth Record Select 3 digits
1 character
A number greater than one that indicates that every nth record selected will be included in or excluded from processing depending on the next parameter
A code indicating whether to include or exclude the nth records processed during the job Type one of the following
I Include every nth record
E Exclude every nth record
Optional No default
Optional No default
Fraction of Records 7 digits If you do not define an nth record in the Nth Record Select field you can type a number here to select a fraction of the total records
For example if you type 5 in the field 5000000 in positions 15-21 of the instruction or job parameter
Optional No default
Limit Records 7 digits The maximum number of records to process during this job
Optional No default
Function Keys
There are five valid function keys on this screen The table below shows you each key and a description of its function
Table 5-13 Function Keys on the Counts and Limits (JOB) Screen (GSCPJI21)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Job Card Parameters screen (GSCPJI20)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
5-38 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
Instruction Card Parameters Screen (GSCPJI30)
With the Instruction Card Parameters screen shown below you can define the data you want to manipulate in this job and what to do with the manipulated data if anything Below is a list of the following functions you can use to develop your jobs define your criteria and manipulate the data
Compare input data to other data or a constant value using greater than less than or equal to instructions
Test for the presence or absence of numeric and non-numeric data
Use mathematical functions to add to and subtract from an input value or multiply and divide by an input value
Convert input data to packed or unpacked data
Move data to a different work area to conduct further testing
Skip to a different job
You can also use ldquoANDrdquo and ldquoORrdquo instructions to group instructions or use parentheses to control execution of instructions Note that all instructions except the last must have an ldquoANDrdquo or ldquoORrdquo at the end
To access this screen type 2 at the Function Menu screen (GSCPJI45)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 +
Job name Card number 00 Left Work Beg Par Inst Area Posn Len(s)
First operand ( 0 Press F4 for Instruction optionsRight
Second operand Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 5-39
5 What Are Jobs and Instructions
What Are First and Second Operands
The First and Second Operand fields define a data location or the constant value to be used in the following functions
Comparing data
Testing data for the presence or absence of numeric data
Performing mathematical functions
Converting data to packed or unpacked data
Moving data from one location to another
When you define a first or second operand location use the following fields
Work Area mdash A letter identifying the work area where the data resides
Beginning Position mdash The starting position of where the data resides on the work area
Length mdash The length of the first or second operand data being defined
If you want to define a constant value in the Second Operand field type the constant value in the OR Constant field
NOTE A constant value can be up to 20 characters and when you define a constant value Generalized Selection places a dash automatically in column 42 of the parameter
The following headings indicate the description valid work areas and valid lengths for first and second operands
Comparing data
NumericNon-numeric testing
Mathematical functions
Converting data
Moving data
Skipping jobs
5-40 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
Comparing Data
When you compare two fields of data the first operand is the location of the data to be compared and the second operand is the comparison value which can be a field location or a constant You can also compare the current system date to a date in a specific location or a constant value To do this type a D in the Work Area field
For a list of the instruction codes to use for comparing data refer to the Instruction Code Options screen (GSCPJI32) later in this chapter Below is a table that presents a description of the first and second operand the work areas for first and second operands and the lengths to type when you are using comparison instructions
Table 5-14 Comparing Data with First and Second Operands
Operand Description Work Areas Lengths
First Operand The location of the data you want tested or compared to
or
the D to represent the system date
You have access to first operand field data in any of the following work areas
D Current system date
N nameaddress work area
M Match Code File work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
For character comparisons type up to 2 digits
For packed comparisons type 1 digit (actual length in file)
For system date comparison 6 compares the year month and date 4 compares the year and month and 2 compares the year only
Second Operand The location of the data or the constant value you want to compare to the first operand
or
the D to represent the system date
You have access to second operand field data in any of the following work areas
D Current system date
N nameaddress work area
M Match Code File work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
For character comparisons you dont have to define a second operand length
For packed comparisons type 1 digit (actual length in file)
OR Constant Constant value You can type any type of value Type up to 20 characters
Generalized Selection Plus Userrsquos Guide - AS400 5-41
5 What Are Jobs and Instructions
For NumericNon-Numeric Testing
If you want to test for the presence or absence of numeric or non-numeric data the first operand is the location of the data you want tested You do not define a second operand For a list of the instruction codes to use for numeric testing refer to the Instruction Code Options screen (GSCPJI32) later in this chapter Below is a table that presents a description of the first operand the work areas for the first operand and the length to type
NOTE This function does not use a second operand
Table 5-15 NumericNon-Numeric Testing with First Operands
Operand Description Work Areas Lengths
First Operand The location of the data you want to test
You have access to first operand data in any of the following work areas
N Nameaddress work area
M Match Code File work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
For all testing type up to 2 digits
5-42 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
For Mathematical Functions
When you perform a mathematical function the first operand and second operand fields can be a location of the data you want used in the mathematical function or a value to be used in the mathematical function For a list of the instruction codes to use for mathematical functions refer to the Instruction Code Options screen (GSCPJI32) later in this chapter Below is a table that presents a description of the first and second operand the work areas for first and second operands and the lengths to type when you are using the mathematical instructions
Table 5-16 Mathematical Functions with First and Second Operands
Operand Description Work Areas Lengths
First Operand The location of the data you want to use in the mathematical function
You have access to first operand field data in any of the following work areas
N nameaddress work area
S Statistics File record work area
W User work area
X User work area
Y User work area
Type 1 digit (actual length in file)
Second Operand The location of the value you want to add to subtract from divide by or multiply by the first operand or a constant value
You have access to second operand field data in any of the following work areas
N nameaddress work area
M Match Code File work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
Type 1 digit
OR Constant Constant value Must be numeric value Type up to 20 digits
Generalized Selection Plus Userrsquos Guide - AS400 5-43
5 What Are Jobs and Instructions
For Converting Data
When you convert data the second operand is the location of the data before it has been converted (source) while the first operand is the location for the data after it has been converted (target) For a list of the instruction codes to use for converting data refer to Instruction Code Options screen (GSCPJI32) later in this chapter
Below is a table that presents a description of the first and second operand the work areas for first and second operands and the lengths to type when you are using the data conversion instructions
Table 5-17 Converting Data with First and Second Operands
Operand Description Work Areas Lengths
First Operand The location for the data after it is converted
You have access to first operand field data in any of the following work areas
N Nameaddress work area
S Statistics File record work area
W User work area
X User work area
Y User work area
Type 1 digit (actual length in file)
Second Operand The location of the data you want to convert
You have access to second operand field data in any of the following work areas
N nameaddress work area
M Match Code File work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
Type 1 digit
OR Constant For constant packed value Must be numeric value Type up to 20 digits
5-44 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
For Moving Data
When you move data the First Operand field is the location for the data to be moved to while the Second Operand field is the location of the data you want moved ldquoMVrdquo is the instruction code used to move data Below is a table that presents a description of the first and second operand the work areas for first and second operands and the lengths to type when you are using the data conversion instruction
Table 5-18 Moving Data with First and Second Operands
Operand Description Word Areas Lengths
First Operand The location for the data after it has been moved
You have access to first operand field data in any of the following work areas
N Nameaddress work area
S Statistics File record work area
W User work area
X User work area
Y User work area
Type up to 3 digits
Second Operand The location of the data you want to move
You have access to second operand field data in any of the following work areas
M Match Code File work area
N nameaddress work area
W User work area
X User work area
Y User work area
Z ZIP Code File work area
You dont have to type a length because it is the same as the first operand
OR Constant For constant value You can type any type of value Type up to 20 characters
For Branching to a Different Job
When you want to skip to a different job you type GO in the Instruction field and the Job name field is displayed Type the name of the job you want to skip to and the rest of the fields will be blanked out If you type a job name that doesnt exist and you update your parameters you will receive an error message
Generalized Selection Plus Userrsquos Guide - AS400 5-45
5 What Are Jobs and Instructions
Connector Word Field
In the Connector Word field you can use AND OR or MA to control the execution of the job For example you can test for only those records that have a ZIP Code greater than or equal to 20709 and less than or equal to 20714
NOTE All instructions in a job except the last instruction must have a connector word
For this example we define two instructions For the first instruction we define the location of the ZIP Code in the First Operand field in the Instruction field we indicate to use the Greater Than or Equal To (GE) instruction for the ZIP Code comparison and in the Second Operand field we define the ZIP Code comparison value of 20709 In the Connector Word field we indicate AND
Below is an example of how to fill out the Instruction Card Parameters screen for this instruction
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
SSpecify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + JOB001 02 GE N080 05-20709 AND
Job name JOB001 Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( GE N 80 5 Press F4 for Instruction optionsRight
Second operand Par OR Constant 20709 )
Connector word A A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
For the second instruction we define the location of the ZIP Code in the First Operand field in the Instruction field we indicate to use the Less Than or Equal To (LE) instruction for the ZIP Code comparison and in the Second Operand field we define the ZIP Code comparison value of 20714
5-46 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
Below is an example of how to fill out the Instruction Card Parameters screen for this instruction
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card
+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + JOB001 02 LE N080 05-20714
Job name JOB001 Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( LE N 80 5 Press F4 for Instruction optionsRight
Second operand Par OR Constant 20714 )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Now only the input records with ZIP Codes greater than or equal to 20709 (first instruction) and less than or equal to 20714 will cause the action to be performed This is how both instructions appear on the Job and Instruction Definition screen (GSCPJI11)
Generalized Selection Plus Userrsquos Guide - AS400 5-47
5 What Are Jobs and Instructions
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ _____ Beginning of data _____ 1 DKDKDD 01 GE N080 05-20709 AND _____ 2 DKDKDD 02 LE N080 05-20714 _____ End of data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Left Parenthesis Field and Right Parenthesis Field
With the Left and Right Parenthesis fields you can control execution of more than one instruction by grouping them with parentheses When you use the left and right parentheses you must use the same number of left parentheses as right parentheses
5-48 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
Fields
There are fourteen fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-19 Fields on the Instruction Card Parameters Screen (GSCPJI30) (Part 1 of 3)
Field Name Format Description Comments
Job Number 1 to 6 alpha numeric or blank characters
The name of the job All definitions associated with this job must have the same name as the preceding JOB parameter
Required No default
Card Number 2 digits The card number for INSTRUCTION parameters is any number larger than 01 but must be greater than or equal value in the preceding instruction
Optional
Left Parenthesis 1 character If you need parentheses to group instruction parameters type a parenthesis here NOTE You must use an equal number of left and right parentheses
Optional No default
First Operand
Work Area 1 character The work areas that you have access to when you define the location of the first operand field data
NOTE To use the current system date as a first operand in a character comparison type D in this field
Below is a list of the work area identification codes
For data comparisons and numeric non-numeric testing
N Nameaddress (input record) work area
W X Y Work areas for data
S Statistics File record work area
M Match Code work area
Z ZIP Code work area
For mathematical functions data conversions and data moves
N Nameaddress (input record)
W X Y Work areas for data
S Statistics File record work area
Optional No default
Beg Posn 4 digits The location on the work area identified in the previous field of the first operand field data
Required for all but the Null instruction
Generalized Selection Plus Userrsquos Guide - AS400 5-49
5 What Are Jobs and Instructions
Table 5-19 Fields on the Instruction Card Parameters Screen (GSCPJI30) (Part 2 of 3)
Field Name Format Description Comments
Length Up to 3 digits The length of the first operand field of data
For character comparisons and numeric tests type up to 2 digits for the first operand length
For packed comparisons mathematical functions and data conversions type 1 digit for the first operand length (actual length in file)
For data moves type up to three digits for the first operand length
Required No default
Default is 8 if the first operand is the current system date
Second Operand
Work Area 1 character The work areas that you have access to when you define the location of the second operand field data Below is a list of the work area identification codes
M Match Code work area
N Nameaddress (input record) work area
W X Y Work areas for data
Z ZIP Code work area
Required when prompted No default
Beg Posn 4 digits The location on the work area identified in the previous field of the second operand field data
Required No default
Length Up to 2 digits The length of the second operand field of data
For packed comparisons mathematical functions and data conversions type 1 digit for the second operand length (actual length in file)
Required for packed and character comparisons converting data or using mathematical functions
Constant 20 alpha numeric characters
A constant you can use to define the second operand
NOTE Leave this field blank if you want the second operand to be the number of blanks specified by the Length field
Optional No default
5-50 621 - 102002
5 Instruction Card Parameters Screen (GSCPJI30)
Table 5-19 Fields on the Instruction Card Parameters Screen (GSCPJI30) (Part 3 of 3)
Field Name Format Description Comments
Instruction Up to 3 characters A code indicating what operation to perform on the data specified in the First and Second Operand fields For a more detailed explanation refer to the beginning of this screens section Type one of the following
Comparing Data Character Data EQ NE LT LE GT or GE
Packed Data EQP NEP LTP LEP GTP or GEP
Testing for Numeric and Non-Numeric Data
NM or NNM
Performing Mathematical Functions With Non-Packed Data ADE SUE MPE or DVE
With Packed Data ADP SUP MPP or DVP
Converting Data PK or UP
Branch Job GO
Moving Data MV
Null Operation NOP (Does nothing)
Required No default
Job name 6 alpha-numeric characters
This field is displayed only if you type GO in the Instruction field
Required if you type GO in the Instruction field
Right Parenthesis 1 right parenthesis
If you need parentheses to group instruction parameters together type parenthesis here
NOTE You must use an equal number of left and right parentheses
OptionalNo default
Connector Word 1 character A code indicating the connector word you want to use to connect this instruction to the next instruction Type one of the following
A For AND
M For MA
O For OR
Required except for the last instruction parameter of the job
Instruction Description 9 characters A description of this instruction that you want printed on the state count report if you select to have the state count report generated
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 5-51
5 What Are Jobs and Instructions
Function Keys
There are five valid function keys on this screen The table below shows you each key and a description of its function
Table 5-20 Function Keys on the Instruction Card Parameters Screen (GSCPJI30)
Function Key Name Description
F5 Refresh Restore the data to its original state
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Function Menu screen (GSCPJI45)
F15 LimitReports Specify to limit the number of records processed for the job
F24 Field Search Display the locations and lengths of the fields in an external file Type file name and library of external file
5-52 621 - 102002
5 Instruction Code Options Screen (GSCPJI32)
Instruction Code Options Screen (GSCPJI32)
The Instruction Code Options screen shown below allows you to select what code you want to use to define your instruction You can use instruction codes to compare data test for the presence or absence of numeric data move data to a different work area perform an arithmetic function or pack or unpack data To access this screen press ltF4gt at the Instruction Parameters Card screen (GSCPJI30)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI50
Job and Instruction Definition Instruction Code Options
Specify parameters for the Instruction card
Character comparisons Character Math EQ NE LT LE GT GE ADE SUE MPE DVE
Packed field comparisons Packed Math EQP NEP LTP LEP GTP GEP ADP SUP MPP DVP Instruction LT
Numeric test comparisons Pack and UnpackNM NNM PK UP
Null operation Move OperationNOP MV
Branch to another jobGO
F5=Refresh F6=Update F9=Work Areas F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 5-53
5 What Are Jobs and Instructions
Instruction Field
In the Instruction field you define a two- and three-character code used in conjunction with the data defined in the First and Second Operand fields The functions and their descriptions are listed below
Comparing Data mdash Used to compare the Second Operand field data with the First Operand field data and test for a match
Testing for Numeric and Non-Numeric Data mdash Used to test the First Operand field data for the presence or absence of numbers
Performing Mathematical Functions with Data mdash The Second Operand field value adds to subtracts from multiplies by or divides by the value in the First Operand field
Converting Data mdash Used to convert the Second Operand field data and move the converted data to the location defined in the First Operand field
Moving Data mdash Used to move the Second Operand field data to the location defined in the First Operand field
Branching to a Different Job mdash Used to skip to a job later in the job list
5-54 621 - 102002
5 Instruction Field
Comparing Data Function
When you compare two fields of data (defined in the operand fields) you can use the instructions listed under this heading to compare character or packed data To compare character data type one of the following codes in the Instruction field
EQ mdash Equal to comparison
NE mdash Not equal to comparison
LT mdash Less than comparison
LE mdash Less than or equal to comparison
GT mdash Greater than comparison
GE mdash Greater than or equal to comparison
To compare packed data type one of the following codes in the Instruction field
EQP mdash Equal to comparison
NEP mdash Not equal to comparison
LTP mdash Less than comparison
LEP mdash Less than or equal to comparison
GTP mdash Greater than comparison
GEP mdash Greater than or equal to comparison
Testing for Numeric and Non-Numeric Data
You can use the instructions listed under this heading to test fields for the presence or absence of numeric data To test for numeric data type one of the following codes in the Instruction field
NM mdash Numeric test
NNM mdash Non-numeric test
Generalized Selection Plus Userrsquos Guide - AS400 5-55
5 What Are Jobs and Instructions
Performing Mathematical Functions
You can use the instructions listed under this heading to manipulate character data by performing mathematical functions This gives you the flexibility to add the second operand value to the first operand value subtract the second operand value from the first operand value multiply the second operand value by the first operand value or divide the first operand value by the second operand value
To manipulate non-packed data by using mathematical functions type one of the following codes in the Instruction field
ADE mdash Add character data
SUE mdash Subtract character data
MPE mdash Multiply character data
DVE mdash Divide character data
To manipulate packed data by using mathematical functions type one of the following codes in the Instruction field
ADP mdash Add packed data
SUP mdash Subtract packed data
MPP mdash Multiply packed data
DVP mdash Divide packed data
Converting Data
You can use the instructions listed under this heading to convert data to unpacked data or packed data To convert data type one of the following codes in the Instruction field
PK mdash Convert to packed from unpacked
UP mdash Convert to unpacked from packed
Moving Data
You can use the MV (Move) instruction to move data to different work areas within Generalized Selection
5-56 621 - 102002
5 Instruction Field
Branch to a Different Job
You can use the GO instruction to skip to a different job in the job list
Fields
There is one field on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-21 Field on the Instruction Code Options Screen (GSCPJI32)
Field Name Format Description Comments
Instruction Up to 3 characters A code indicating what operation to perform on the data specified in the First and Second Operand fields For a more detailed explanation refer to the beginning of this screens section Type one of the following
Comparing Data Character Data EQ NE LT LE GT or GE
Packed Data EQP NEP LPT LEP GTP or GEP
Testing for Numeric and Non-Numeric Data NM or NNM
Performing Mathematical Functions With Non-Packed Data ADE SUE MPE or DVE
With Packed Data ADP SUP MPP or DVP
Converting Data PK or UP
Moving Data MV
Branching to a Job GO
Null Operation NOP (Does nothing)
Required No default
Generalized Selection Plus Userrsquos Guide - AS400 5-57
5 What Are Jobs and Instructions
Function Keys
There are five valid function keys on this screen The table below shows you each key and a description of its function
Table 5-22 Function Keys on the Instruction Code Options Screen (GSCPJI32)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Job and Instructions Card screen (GSCPJI30)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
5-58 621 - 102002
Counts and Limits (INSTRUCTION) Screen (GSCPJI31) 5
Counts and Limits (INSTRUCTION) Screen (GSCPJI31)
The Counts and Limits screen shown below allows you to conduct sampling for the current instruction
Nth record selection mdash Includes or excludes every Nth record that meets the criteria of the instruction
Fraction of records mdash Includes a fraction of the records that meet the criteria of the instruction
Limit the number of records mdash Limits the number of records that meet the criteria of an instruction
NOTE When an instruction reaches its record limit any following records that meet the instructions criteria will not continue to the next processing step Generalized Selection will treat them as if those following records didnt meet the instructions criteria
This screen allows you to generate a StateProvince Counts report for an instruction This report generates a count by state or province of records that meet the criteria of the instruction The stateprovince counts are determined according to the first three digits of the ZIP Code (Section Center Facility or ldquoSCFrdquo code) or the first 3 characters of the postal code To specify province counts refer to Chapter 4 ldquoProcessing Your Input Filesrdquo
You can also generate a Statistics file With this option you generate a file of counters per instruction You can use the Statistics file as input to the Define Statistical Report component to produce a custom report This report can contain break level totals
Generalized Selection Plus Userrsquos Guide - AS400 5-59
5 What Are Jobs and Instructions
To access this screen press ltF15gt at the Instruction Card Parameters screen (GSCPJI30)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI31
Job and Instruction Definition Counts and Limits (INSTRUCTION)
Specify parameters for the JOB card
+1+2+3+4+5+6++7+
Counts by state or ZIP Code ___ S = State Counts for records selectedZ = ZIP counter in summary recordB = Both state and ZIP counts
Nth record select _____ _ I = Include every Nth selection-OR- E = Exclude every Nth selection
Fraction of record _____
Limit records _____
F5=Refresh F6=UpdateF9=Work Areas F12=Cancel F24=Field Search
Fields
There are five fields on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 10-23 Fields on the Counts and Limits (INSTRUCTION) Screen (GSCPJI31) (Part 1 of 2)
Field Name Format Description Comments
Counts by state or ZIP Code 1 character A code indicating whether to generate record counts by state or province andor Statistics File counts for the records that meet the criteria of the instruction Type one of the following
S Generate state or province counts
Z Generate Statistics File counts
NOTE If you want to keep counts by Canadian postal code refer to Chapter 4 under the heading ldquoStatistics File Control Field (SMFILE) screen (GSCPID12)rdquo
B Generate both state or province and Statistics File counts
Optional No default
5-60 621 - 102002
5 Counts and Limits (INSTRUCTION) Screen (GSCPJI31)
Table 10-23 Fields on the Counts and Limits (INSTRUCTION) Screen (GSCPJI31) (Part 2 of 2)
Field Name Format Description Comments
Nth Record Select 3 digits
1 character
A number greater than one that indicates that every Nth record selected will be included in or excluded from processing depending on the next parameter
A code indicating whether to include or exclude the Nth records processed during the job Type one of the following
I Include every Nth record
E Exclude every Nth record
Optional No default
Fraction of records 7 digits If you do not define an Nth record in the Nth Record Select field you can type a number here to select a fraction of the total records
For example if you type 5 in the field 5000000 in positions 15-21 of the instruction or job parameter
Optional No default
Limit Records 7 digits The maximum number of records to process during this job
Optional No default
Function Keys
There are five valid function keys on this screen The table below shows you each key and a description of its function
Table 5-24 Function Keys on the Counts and Limits (INSTRUCTION) Screen (GSCPJI31)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Instruction Card Parameters screen (GSCPJI30)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
Generalized Selection Plus Userrsquos Guide - AS400 5-61
5 What Are Jobs and Instructions
View Work Areas Screen (GSCPJI80)
The View Work Areas screen shown below allows you to view information about each of the Generalized Selection work areas To access this screen press ltF9gt from the Job Card Parameters screen (GSCPJI20) Instruction Job Parameters screen (GSCPJI30) Insert Remark (REMARK) screen (GSCPJI50) or the External Reference (EXTREF) screen (GSCPJI70)
NOTE Work area names are pre-defined in Generalized Selection Plus
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI80
Job and Instruction Definition View Work Areas
Available Work Areas
N000 Input file origination (A B or C) N001-N9999 Input file position
M000 Match file match flag (0 or 1) Press HELP for positions M001-M9999 Match file position for multiple Match files
Z000 ZIP Code File match flag (0 or 1) Z001-Z999 ZIP Code file position
S001-S999 ZIP summary file position
D Specifies DATE as an operand (current date in format CCYYMMDD)
W001-W999 One work area (W) of 999 contiguous positions (001-999) X001-X999 One work area (X) of 999 contiguous positions (001-999) Y001-Y999 One work area (Y) of 999 contiguous positions (001-999)
F12=Cancel
5-62 621 - 102002
5 View Work Areas Screen (GSCPJI80)
Work Areas
This screen is for informational purposes only and does not have any fields for you to type data For detailed information about each work area refer to the table below For the definition and purpose of a work area refer to the Generalized Selection Plus Userrsquos Guide
Table 5-25 Information on View Work Areas Screen (GSCPJI80) (Part 1 of 2)
Work Area Size Description
D Not a work area
Specifies to use the current system date for a character comparison
N 10000 bytes Work area N contains the input record and a code indicating from what input file (IA IB and IC) the input record originated This work area is also the source of the records written to the output file(s) OA OB OC OD and OE
N000 Contains an A B or C indicating the input file (IA IB or IC) where the input record originated
N001-N9999 Contains the input record being processed
M 10000 bytes If an input record match code matches with a Match Code File record that Match Code File record is stored in work area M Up to nine Match Code File records can be placed in work area M
If an input record match code does not match any Match Code File record the default record defined in the Match Code File Default Record screen (GSCPID18) is stored in work area M
You can reference this area but you cannot change the values within the area Note that a ldquo1rdquo in the matching indicator position indicates a match and a ldquo0rdquo indicates that no match has occurred
M000 mdash Matching indicator M001-M1999 mdash Match Code File 1 record M2000 mdash Matching indicator M2001-M2999 mdash Match Code File 2 record M3000 mdash Matching indicator M3001-M3999 mdash Match Code File 3 record M4000 mdash Matching indicator M4001-M4999 mdash Match Code File 4 record M5000 mdash Matching indicator M5001-M5999 mdash Match Code File 5 record M6000 mdash Matching indicator M6001-M6999 mdash Match Code File 6 record M7000 mdash Matching indicator M7001-M7999 mdash Match Code File 7 record M8000 mdash Matching indicator M8001-M8999 mdash Match Code File 8 record M9000 mdash Matching indicator M9001-M9999 mdash Match Code File 9 record
Generalized Selection Plus Userrsquos Guide - AS400 5-63
5 What Are Jobs and Instructions
Table 5-25 Information on View Work Areas Screen (GSCPJI80) (Part 2 of 2)
Work Area Size Description
Z 1000 bytes If an input records ZIP Code matches a ZIP Code File record that ZIP Code File record is stored in work area Z
If an input records ZIP Code does not match any ZIP Code File record the default record defined in the ZIP Code File Default Record screen (GSCPID18) is stored in work area Z
You can reference this area but you cannot change the values within the area
Z000 For a matching record Z000 contains a ldquo1rdquo and for no match Z000 contains a ldquo0rdquo
Z001-Z999 For a matching record this area contains the ZIP Code File record and for no match this area contains the ZIP Code File Default Record
S 999 bytes Work area S is where each Statistics File record is generated before it is written to the Statistics File
S001-S005 mdash First five bytes of your break field S006-S009 mdash First counter S010-S013 mdash Second counter S015-S017 mdash Third counter S018-S021 mdash Fourth counter S022-S025 mdash Fifth counter S402-S999 mdash User area where you can move your own data
Each record can have up to 99 counters For the layout of counters 6 through 99 refer to Appendix D ldquoRecord Layoutrdquo
W X Y 999 bytes You can use work areas W X and Y for any function such as moving converting comparing and calculating data
Function Keys
There is one valid function key on this screen The table below shows you the key and a description of its function
Table 5-26 Function Keys on the View Work Areas Screen (GSCPJI80)
Function Key Name Description
F12 Cancel Cancel the operation and return to the Job Card Parameters screen (GSCPJI20) Instruction Card Parameters screen (GSCPJI30) Insert Remark screen (GSCPJI50) or External Reference (EXTREF) screen (GSCPJI70)
5-64 621 - 102002
5 Prompt Function
Prompt Function
The Prompt Function allows you to edit existing job instructions directly from the screen where you typed the instruction To access this screen you have to be at the Job and Instruction Definition screen (GSCPJI11) Place the cursor in the field beside the instruction you want to edit as shown below and press ltF4gt
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ _____ Beginning of data _____ 1 JOB001 01 A _____ 2 JOB001 02 LT N080 05-50000 _____ 3 JOB004 01 C _____ 4 JOB004 02 MV X050 02 N044 AND _____ 5 JOB004 02 MV Y111 02 X050 AND _____ 6 JOB004 02 MV W254 02 N001 _____ 7 JOB005 01 D _____ 8 JOB005 02 NNM X050 _____ 9 JOB006 01 B _____ 10 JOB006 02 ADE N036 53-100 _____ End of data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
Generalized Selection Plus Userrsquos Guide - AS400 5-65
5 What Are Jobs and Instructions
The Instruction Parameter Card screen (GSCPJI30) is displayed because that is where that lines information was defined
92243 Generalized Selection System GSCPJI00 3311999 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + EXMPLE 02 LT N080 05-50000
Job name EXMPLE Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( LT N 80 5 Press F4 for Instruction optionsRight
Second operand Par OR Constant 50000 )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Fields
The only field that is specific to the prompt function is the Specify parameters for instruction card field This field is 80 characters and is filled in automatically or can be edited directly on the screen when you type values into the Generalized Selection Job and Instruction Definition screens Refer to Appendices A and B for more information about each parameter listed in your job
5-66 621 - 102002
Prompt Function 5
Function Keys
There is one valid function key on this screen The table below shows you a description of the keys function
Table 5-27 Function Key on Prompt Function
Function Key Name Description
F5 Refresh
F6 Update
F9 Work Areas
F12 Cancel Cancel the operation
F15 LimitReports
F24 Field Search
Generalized Selection Plus Userrsquos Guide - AS400 5-67
5 What Are Jobs and Instructions
Insert Remark Screen (GSCPJI50)
The Insert Remark screen shown below allows you to type remarkscomments in your job list that will not be processed during the job To access this screen type 3 at the Function Menu screen (GSCPJI45)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI50
Job and Instruction Definition Insert Remark (REMARK)
Specify the remark press F6
_________________________________________________________________________________
F5=Refresh F6=UpdateF9=Work Areas F12=Cancel F24=Field Search
Fields
There is one field on this screen The table below shows you a description of the field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-28 Fields on the Insert Remark Screen (GSCPJI50)
Field Name Format Description Comments
Specify the Remark press F6
70 characters Text that you can type as a comment in your job
Optional No default
5-68 621 - 102002
5 Insert Remark Screen (GSCPJI50)
Function Keys
There are five valid function keys on this screen The table below shows you each key and a description of its function
Table 5-29 Function Keys on the Insert Remark Screen (GSCPJI50)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F12 Cancel Cancel the operation and return to the Function Menu screen (GSCPJI45)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type file name and library of external file
Generalized Selection Plus Userrsquos Guide - AS400 5-69
5 What Are Jobs and Instructions
External Reference (EXTREF) Screen (GSCPJI70)
The External Reference (EXTREF) screen shown below allows you to include entire job lists from external files or other jobs into your current Generalized Selection job list The external parameters are brought into the job at submission time You can also copy parameters that are performed in more than one job (such as house-format manipulation) and view the functions within the external file before processing To access this screen type 4 at the Function Menu screen (GSCPJI45)
92243 Generalized Selection System GSCPJI00 3312001 Replace with screen heading desired GSCPJI70 Job and Instruction Definition
Specify either external file or job to import functions
External File _______ Library _______ or JobID _____
Member _______
F5=Refresh F6=Update F9=Work Areas F10=View External Reference F12=Cancel F24=Field Search
5-70 621 - 102002
5 External Reference (EXTREF) Screen (GSCPJI70)
Fields
There are four fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-30 Fields on the External Reference (EXTREF) Screen (GSCPJI70)
Field Name Format Description Comments
External File 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the file that contains your external file information
Optional No default
Library 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the library that holds your external file
Optional No default
Member 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The member of the file that holds your external file information
Optional No default
Job ID 1 to 10 characters (A-Z 0-9 $ or __) First character must not be 0-9
The name of the job ID that contains the functions you want to include
Optional No default
Generalized Selection Plus Userrsquos Guide - AS400 5-71
5 What Are Jobs and Instructions
Function Keys
There are six valid function keys on this screen The table below shows you each key and a description of its function
Table 5-31 Function Keys on the External Reference (EXTREF) Screen (GSCPJI70)
Function Key Name Description
F5 Refresh Restore the data to the state it was in when you accessed the screen
F6 Update Save the data and return to the previous screen
F9 Work Areas Go to the View Work Areas screen (GSCPJI80)
F10 View External Reference
Go to the View External Reference screen (GSCPVX11)
F12 Cancel Cancel the operation and return to the Function Menu screen (GSCPJI45)
F24 Field Search Allows you to display the locations and lengths of the fields in an external file Type the file name and the library of the external file
5-72 621 - 102002
5 View External Reference (GSCPVX11)
View External Reference (GSCPVX11)
The View External Reference screen shown below allows you to view the external job or file that you defined in the External Reference (EXTREF) screen (GSCPJI70) To access this screen press ltF10gt at the External Reference (EXTREF) screen (GSCPJI70)
NOTE You can not use this screen to edit an external file or job If you need to edit an external file place the file into a new job and edit it
92243 Generalized Selection System GSCPVX00 3311999 Replace with screen heading desired GSCPVX11
Job and Instruction Definition View External Reference
JobID File Option + 1 + 2 + 3 + 4 + 5 + 6 + 7
Beginning of data 1 JOB001 01 A 2 JOB001 02 LT N080 05-50000 3 JOB004 01 B 4 JOB004 02 MV X050 02 N044 5 JOB004 02 MV Y111 02 X050 6 JOB004 0 MV W254 02 N001 7 JOB01 C 8 JOB005 02 NNM X050 02 N001 9 JOB006 01 D
10 JOB006 02 ADE N036 53-100 Beginning of data
F12=PrevScrn F17=Top F18=Bottom F20=Scroll Right
Generalized Selection Plus Userrsquos Guide - AS400 5-73
5 What Are Jobs and Instructions
Fields
There are two fields on this screen The table below shows you a description of each field including its format values you can type the default (if any) and any other special information you may need to know about that field
Table 5-32 Fields on the External Reference (EXTREF) Screen (GSCPJI70)
Field Name Format Description Comments
File Automatic Lists the library name and member of the external file
Optional No default
Option Up to 4 alpha or numeric characters
Since editing is not allowed on this screen this field is used only to position the instruction on the screen rather than advancing a screen at a time Type one of the following
1-9999 Line number of the job where you want to move
Optional
Function Keys
There are six valid function keys on this screen The table below shows you each key and a description of its function
Table 5-33 Function Keys on the External Reference (EXTREF) Screen (GSCPJI70)
Function Key Name Description
F12 PrevScrn Restore the data to the state it was in when you accessed the screen
F17 Top Move to the top of the external files list of instructions
F18 Bottom Move to the bottom of the external files list of instructions
F20 Scroll Right Displays the right side of the external files instructions
5-74 621 - 102002
C H A P T E R 6
Defining Jobs and Instructions
This chapter will provide instructions on using the Define Jobs and Instructions component to define your job list After reviewing this chapter you will know how to define parameters to compare data test for numeric and non-numeric data perform mathematical functions convert data and move data We will also show you how to generate state or province counts and perform record sampling for a job or instruction
Defining Your Jobs and Instructions 6-2 Comparing Data 6-3
Character Data 6-3 Packed Data 6-4 Data Comparison Example 6-4 Current System Date Comparison Example 6-6
Testing for Numeric and Non-Numeric Data 6-8 Performing Mathematical Functions 6-10
Non-packed 6-10 Packed 6-10
Converting Data 6-13 Moving Data 6-15 Branching to a Job 6-17 Grouping Your Instructions 6-20 Sampling Records 6-23
For a Job Parameter 6-23 For an Instruction Parameter 6-25
Producing Job and Instruction Counts 6-27 Statistics File Processing 6-28 For a Job Parameter 6-30 For an Instruction Parameter 6-32
Generalized Selection Plus Userrsquos Guide - AS400 6-1
6 Defining Jobs and Instructions
Defining Your Jobs and Instructions
In this chapter we will show you how to use the Define Jobs and Instructions component We will present example instructions to
Compare character or packed data
Test for the presence or absence of numericnon-numeric data
Perform mathematical functions with character or packed data
Convert data to packed or unpacked data
Move data
Branch to jobs
Group instructions (using AND OR or MA)
We will also show you how to produce StateProvince Count Reports and Statistics File counts and how to conduct record sampling by job and instruction
NOTE When you define an instruction you must type an AND OR or MA as a connector word at the end of each instruction except for the last instruction in a job
621 - 102002 6-2
Comparing Data 6
Comparing Data
The following lists shows you the possible comparisons you can perform
Two fields of character data (can be a constant value)
Two fields of packed data (can be a constant value)
Current system date (CCYYMMDD) with a field (can be a constant value)
NOTE You can compare just the year the year and the month or the year month and day
For this instruction the first operand defines the location of the data to be compared to and the second operand defines the location of the data or a constant value to be compared to the first operand Note that the length is the actual length of the packed data For a comparison instruction
The first operand data must be located in work areas N M W X Y or Z unless you are comparing against the current system date
The second operand data must be located in work area N M W X Y or Z (If you dont define a constant value as the second operand)
Character Data
To compare character data type one of the following instruction codes in the Instruction field
EQ mdash Equal to comparison
NE mdash Not equal to comparison
LT mdash Less than comparison
LE mdash Less than or equal to comparison
GT mdash Greater than comparison
GE mdash Greater than or equal to comparison
NOTE When you compare two character fields you enter only a first operand length because the second operand is assumed to be the same length
Generalized Selection Plus Userrsquos Guide - AS400 6-3
6 Defining Jobs and Instructions
Packed Data
To compare packed data type one of the following instruction codes in the Instruction field
EQP mdash Equal to comparison
NEP mdash Not equal to comparison
LTP mdash Less than comparison
LEP mdash Less than or equal to comparison
GTP mdash Greater than comparison
GEP mdash Greater than or equal to comparison
NOTE When you compare two packed data fields type a 1-digit first operand length (actual length in file) and a 1-digit second operand length
You can compare a packed field with a constant value (in character format)
Data Comparison Example
For our data comparison example we will compare the input records ZIP Code to the ZIP Code stored in work area Y Refer to Figure 6-1
Contents of Work Area N
+1+2+3+4+5+6+7
MR JOHN SMITH 6404 IVY LANE GREENBELT MD 20770
ZIP Code to be compared Contents of Work Area Y
+1+2+3+4+5+6+7
20770
Value to be compared to input ZIP Code
Figure 6-1 Comparing Data
621 - 102002 6-4
6 Comparing Data
The example below shows you how to fill out the Instruction Card Parameters screen (GSCPJI30) for this comparison instruction The first operand which is the input record ZIP Code is located in work area N at position 60 for a length of 5 It is being tested to see if it equals the second operand which is located in work area Y at position 001 In our example the values are equal so the record will be passed to the next processing step
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + COMPAR 02 EQ N060 05 Y001
Job name COMPAR Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( EQ N 60 5 Press F4 for Instruction options Right
Second operand Y 1 Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 6-5
6 Defining Jobs and Instructions
Current System Date Comparison Example
For our date comparison example we will compare the input records date which is stored in work area N to the current system date Refer to Figure 6-2
Current System Date
+1+2+3+4+5+6+7
930215
Current system date
Work Area N Contents
+1+2+3+4+5+6+7
MR JOHN SMITH 6404 IVY LANE GREENBELT MD 20770 20020910
Date to be compared to current system date
Figure 6-2 Comparing Dates
The example below shows you how to fill out the Instruction Card Parameters screen (GSCPJI30) for this date comparison instruction The first operand is the current system date To compare the system date enter a D in the First Operand Work Area field and in the Length field type the number of digits in the date you want to compare
NOTE If you type 4 only the year is compared if you enter 6 the year and the month are compared and if you type 8 the year month and date are compared
621 - 102002 6-6
6 Comparing Data
For our example the entire date is compared to a date located in work area N at position 66 In our example the values are equal so the record will be passed to the next processing step
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + COMPAR 02 EQ DATE 08 N066
Job name COMPAR Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( EQ D 0 8 Press F4 for Instruction options Right
Second operand N 66 Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 6-7
6 Defining Jobs and Instructions
Testing for Numeric and Non-Numeric Data
You can use the instructions listed under this heading to test fields for the presence or absence of numeric data To test for numeric data type one of the following codes in the Instruction field
NM mdash Numeric test
NNM mdash Non-numeric test
For this instruction the first operand defines the location of the data to be tested for the presence or absence of numeric data The first operand data must be located in work areas N M W X Y or Z and you must type a 1- or 2-digit first operand length You do not define a second operand for this instruction
For our example we want to test the first four positions of the street address in work area X for the presence of numbers Refer to Figure 6-3
Contents of Work Area X
+1+2+3
2370 Bellwood Drive
Numbers in first four positions tested for Numeric data
Figure 6-3 Testing for Numeric and Non-Numeric Data
621 - 102002 6-8
6 Testing for Numeric and Non-Numeric Data
The example below shows you how to fill out the Instruction Card Parameters screen (GSCPJI30) for this numeric test instruction The first operand is the Street Address field which is located in work area X at position 1 for a length of 4 It is being tested for the presence of numeric digits (NM) Because numeric digits are present in our example the record will be passed to the next processing step
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + NUMBER 02 NM X001 04
Job name NUMBER Card number 02 Left Work Beg
Par Inst Area Posn Len(s) First operand ( NM X 1 4 Press F4 for Instruction
optionsRight
Second operand Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 6-9
6 Defining Jobs and Instructions
Performing Mathematical Functions
You can use the instructions listed under this heading to perform mathematical functions You can add the second operand value to the first operand value subtract the second operand value from the first operand value divide the first operand value by the second operand value and multiply the second operand value by the first operand value For a mathematical instruction
The first operand data must be located in work areas N M S W X or Y
Second operand data must be located in work areas N M W X Y or Z (If you dont define a constant value as the second operand)
Non-packed
To perform mathematical functions using non-packed data type one of the following codes in the Instruction field
ADE mdash Add non-packed data
SUE mdash Subtract non-packed data
MPE mdash Multiply non-packed data
DVE mdash Divide non-packed data
NOTE When you use two non-packed data fields for a mathematical function type a 1-digit first operand length and a 1-digit second operand length
Packed
To perform mathematical functions using packed data type one of the following codes in the Instruction field
ADP mdash Add packed data
SUP mdash Subtract packed data
MPP mdash Multiply packed data
DVP mdash Divide packed data
6-10 621 - 102002
6 Performing Mathematical Functions
NOTE When you use two packed data fields for a mathematical function type a 1-digit first operand length (actual length in file) and a 1-digit second operand length (actual length in file)
For our example we will multiply a selected field value in the input record by the value 1000 which is stored in work area W Refer to Figure 6-4
Contents of Work Area N
Contents of Work Area W After Calculation
+1+2+3+4+5+6+7
MR JOHN SMITH 6404 IVY LANE GREENBELT MD 20879 1
+1+2+3+4+5+6+7
1000
Value to be multiplied by 1000
Selected value multiplied by 1000
Figure 6-4 Performing Mathematical Functions
Generalized Selection Plus Userrsquos Guide - AS400 6-11
6 Defining Jobs and Instructions
The example below shows you how to fill out the Instruction Card Parameters screen for this mathematical instruction The first operand which is an input record value located in work area N at position 70 for a length of 1 is being multiplied by (instruction code MPE) the second operand which is located in work area W at position 001 for a length of 4
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + MATHEM 02 MPE N070 14 W001
Job name MATHEM Card number 02 Left Work Beg
Par Inst Area Posn Len(s) First operand ( MPE N 70 1 Press F4 for Instruction
optionsRight
Second operand W 1 4 Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
6-12 621 - 102002
Converting Data 6
Converting Data
You can use the instructions listed under this heading to convert data to unpacked data or packed data To convert data type one of the following codes in the Instruction field
PK mdash Convert to packed from unpacked
UP mdash Convert to unpacked from packed
When you convert data the first operand is the location after the data is converted (target) and the second operand is the location of the data before it is converted (source) For a conversion instruction
The first operand data must be located in work areas N M S W X or Y
Second operand data must be located in work area N M W X Y or Z (If you dont define a constant value as the second operand)
NOTE When you convert data fields type a 1-digit first operand length (length after conversion) and a 1-digit second operand length (length before conversion)
For our example we will pack the input record ZIP Code from work area N and move the converted version to work area W where the ZIP Code may be used in further data manipulation Refer to Figure 6-5
Generalized Selection Plus Userrsquos Guide - AS400 6-13
6 Defining Jobs and Instructions
The example below shows you how to fill out the Instruction Card Parameters screen for
Contents of Work Area N
Contents of Work Area W After Conversion
+1+2+3+4+5+6+7
MR JOHN SMITH 6404 IVY LANE GREENBELT MD 20770
+1+2+3+4+5+6+7
270 07F
ZIP Code field selected to be packed
ZIP Code packed
Figure 6-5 Converting Data
this conversion instruction The second operand which is the input record ZIP Code located in work area N at position 60 for a length of 5 is being converted to packed data (instruction code PK) and placed in the first operand location which is work area W starting in position 1 for a length of 3 (the length after it has been packed)
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + PACKNG 02 PK W001 35 N060
Job name PACKNG Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( PK W 1 3 Press F4 for Instruction options Right
Second operand N 60 5 Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
6-14 621 - 102002
6 Moving Data
Moving Data
You can use the MV (Move) instruction to move data to different work areas or to different positions within the same work area When you move data the first operand defines the location where the data will be moved (target) and the second operand defines the location of the data to be moved (source) For a move instruction
The first operand data must be located in work area N M S W X or Y
Second operand data must be located in work areas N M W X Y or Z (If you dont define a constant value as the second operand)
NOTE When you move data type up to three digits as a first operand length You dont have to type a length for the second operand
For our example we will move the input record ZIP Code from work area N to work area W where the ZIP Code may be used in further data manipulation Refer to Figure 6-6
Contents of Work Area N
Contents of Work Area W
+1+2+3+4+5+6+7
MR JOHN SMITH 6404 IVY LANE GREENBELT MD 20879
+1+2+3+4+5+6+7
20879
ZIP Code to move
Where ZIP Code is moved to
Figure 6-6 Moving Data Between Work Area
Generalized Selection Plus Userrsquos Guide - AS400 6-15
6 Defining Jobs and Instructions
The example below shows you how to fill out the Instruction Card Parameters screen for this moving instruction The second operand which is the input record ZIP Code located in work area N at position 60 is being moved (instruction code MV) to the first operand location which is work area W starting in position 1 for a length of 5
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + MOVING 02 MV W001 05 N060
Job name MOVING Card number 02 Left Work Beg
Par Inst Area Posn Len(s) First operand ( MV W 1 5 Press F4 for Instruction
optionsRight
Second operand N 60 Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
6-16 621 - 102002
Branching to a Job 6
Branching to a Job
You can use the GO instruction to branch to a different job in the middle of the current job For this instruction you do not type operand information You type only the name of the job parameter to which you want to skip
For our example our first job FGENDR will test the input record for a gender code of ldquoFrdquo If it tests true we will branch to job INCLEV to test that same input record for an annual income level between $25000 and $50000
Skip to job INCLEV
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option + 1 + 2 + 3 + 4 + 5 + 6 + Beginning of data
1 FGENDR 01 X 2 FGENDR 02 EQ N073 01-F AND 3 FGENDR 02 GO INCLEV 4 5 MGENDR 01 XN 6 MGENDR 02 EQ N073 01-M 7 8 INCLEV 01 AY 9 INCLEV 02 GE N080 07-2500000 AND
10 INCLEV 02 LE N080 07-5000000 End of data
F3=Exit F4=Prompt Function F5=Refresh F6=Update F10=Add Function F24=More Keys
To skip to job INCLEV we need to type a GO instruction for job FGENDR after line 2 of the job list above
The example below shows you how to fill out the Instruction Card Parameters screen (GSCPJI31) for this GO instruction When you type GO in the Instruction field Generalized Selection Plus prompts you to type the job name to which to skip and all other fields on the screen are blanked out
Generalized Selection Plus Userrsquos Guide - AS400 6-17
6 Defining Jobs and Instructions
NOTE The job name must exist and be located after the current job when you press ltF6gt to update your information
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + FGENDR 02 GO
Job name FGENDR Card number 02 Left Work Beg Job name Par Inst Area Posn Len(s)
First operand ( GO 0 Press F4 for Instruction options Right
Second operand Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
After you type the job name to skip to the generated parameter is displayed at the top
NOTE The GO instruction will only occur if the preceding instructions criteria are met
6-18 621 - 102002
Branching to a Job 6
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + FGENDR 02 GO INCLEV
Job name FGENDR Card number 02 Left Work Beg Job name INCLEV Par Inst Area Posn Len(s)
First operand ( GO 0 Press F4 for Instruction options Right
Second operand Par OR Constant )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
Generalized Selection Plus Userrsquos Guide - AS400 6-19
6 Defining Jobs and Instructions
Grouping Your Instructions
Once you start defining instructions you will want to develop more and more complicated sets of job and instruction parameters To do this you can use parentheses and connector words (AND OR or MA) to group your instructions By grouping your instructions you can define very specific criteria Below is a simple example of how to use these tools to control the execution of your instructions For this example you want to send the input record to output file A only if the input record tests true for
(Instruction 1 AND Instruction 2) OR (Instruction 3 AND Instruction 4)
For this instruction grouping if instruction 1 and instruction 2 test true the rest of the job is skipped and the record is sent to output file A If instructions 1 and 2 do not test true the next parenthesis group is executed If instructions 3 and 4 test true the criteria of the job is met
Below is an example of how these four instructions could appear on the Job and Instruction Definition screen (GSCPJI11) Notice how the parentheses and connector words are entered
Instructions 1 2 3 and 4
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
_____ 1 MATCHS 01 A _____ 2 MATCHS 02 (EQ N001 03-012 AND _____ 3 MATCHS 02 EQ N020 01-3 )OR_____ 4 MATCHS 02 (EQ N001 03-024 AND _____ 5 MATCHS 02 EQ N020 01-5 )
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
6-20 621 - 102002
6 Grouping Your Instructions
Below is another example of grouping techniques using parentheses and connector words
These have to be true (OR) these have to be true
( 1 and 2 ) OR ( 3 and 4 ) AND ( 5 or 6 )
Figure 6-7 Job Groupings and Job Levels
For this job if instructions 1 and 2 test true the rest of the job is skipped because the criteria of the job have been met
If instructions 1 and 2 do not test true the record is passed to the next set of parentheses If instructions 3 and 4 test true and instruction 5 or 6 tests true the criteria of the job has been met If instructions 3 and 4 and 5 or 6 do not test true the criteria of the job have not been met and the next set of job and instruction parameters is executed
Below is an example of how the instruction grouping on the previous page could appear on the Job and Instruction Definition screen (GSCPJI11) Notice how the parentheses and connector words are entered
Generalized Selection Plus Userrsquos Guide - AS400 6-21
6 Defining Jobs and Instructions
Instructions 1 2 3 4 5 and 6
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI11
Job and Instruction Definition
Specify Gen Sel job and instruction details
Option +1+2+3+4+5+6+ Beginning of data
_____ 1 MATCHS 01 A _____ 2 MATCHS 02 (EQ N001 03-012 AND _____ 3 MATCHS 02 EQ N020 01-3 )OR_____ 4 MATCHS 02 (EQ N001 03-024 AND _____ 5 MATCHS 02 EQ N020 01-5 )AND _____ 6 MATCHS 02 (EQ N010 01-B MA _____ 7 MATCHS 02 EQ N010 01-C )
End of Data
F3=Exit F4=Prompt function F5=Refresh F6=Update F10=Add function F24=More Keys
6-22 621 - 102002
Sampling Records 6
Sampling Records
For each job and instruction parameter you can sample the number of records that meet the job or instructions criteria There are three types of sampling techniques you can use
Nth record selection (include or exclude)
Fraction sampling
Record limit sampling
NOTE You may use record limit sampling in conjunction with nth record sampling
For a Job Parameter
The following section will show you how to perform record sampling for a job parameter First display the Job Card Parameters screen
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI20
Job and Instruction Definition Job Card Parameters
Specify parameters for the JOB card + 1 + 2 + 3 + 4 + 5 + 6 + 7 +
Job name GENDER Card number 01 Job action A A-E = Output file
Q = Simulate end-of-file X = No additional action Z = End execution for the record
Skip following jobs N N = Process normally (default) Y = Perform action then end
End of data job BLANK = Process normally (default) E = Execute after end-of-file(s)
Job description
F5=Refresh F6=Update F9=Work Areas F15=LimitReports F12=Cancel F24=Field Search
1 Press ltF15gt
Generalized Selection Plus Userrsquos Guide - AS400 6-23
6 Defining Jobs and Instructions
The Counts and Limits (JOB) screen will appear
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI21
Job and Instruction Definition Counts and Limits (JOB)
Specify parameters for the JOB card+1+2+3+4+5+6+7+ NTHREC 01 005 I A
Counts by state or ZIP Code S = State Counts for records selected Z = ZIP counter in summary record B = Both state and ZIP counts
Nth record select 005 I I = Include every Nth selection-OR- E = Exclude every Nth selection
Fraction of record
Limit records
F5=Refresh F6=Update F9=Work Areas F12=Cancel F24=Field Search
2 Type 005 and I in the Nth record select fields
For our example Nth record sampling sends (includes) every fifth record that meets the criteria of the job NTHREC to output file A Generalized Selection Plus enters the nth value in columns 15-17 and ldquoINCrdquo in columns 19-21 automatically
+1+2+3+4+5+6+7 NTHREC 01 005 INC A
Fraction sampling selects a fraction of the records that meet the criteria of the instruction For example if 66 records meet the criteria of job FRACTN only 22 records will be sent to output file A The fraction number is entered automatically in columns 15-21
+1+2+3+4+5+6+7 FRACTN 01 3333333 A
Record limit sampling limits the number of records that can meet the criteria of a job For example if you define a limit of 100 and 200 records meet the criteria of job GENDER records 101-200 will be passed to the next job for processing The limit number is entered automatically in columns 23-29
+1+2+3+4+5+6+7 GENDER 01 0000100 A
6-24 621 - 102002
6 Sampling Records
For an Instruction Parameter
The following section will show you how to perform record sampling for an individual instruction parameter First display the Instruction Card Parameters screen
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + GENDER 02 EQ N065 01-F
Job name GENDER Card number 02 Left Work Beg Par Inst Area Posn Len(s)
First operand ( EQ N 65 1 Press F4 for Instruction options Right
Second operand Par OR Constant F )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
1 Press ltF15gt
Generalized Selection Plus Userrsquos Guide - AS400 6-25
6 Defining Jobs and Instructions
The Counts and Limits (INSTRUCTION) screen will appear
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI21
Job and Instruction Definition Counts and Limits (INSTRUCTION)
Specify parameters for the JOB card+1+2+3+4+5+6+7+ NTHREC 01 010 E A
Counts by state or ZIP Code S = State Counts for records selected Z = ZIP counter in summary record B = Both state and ZIP counts
Nth record select 010 E I = Include every Nth selection -OR- E = Exclude every Nth selection
Fraction of record
Limit records
F5=Refresh F6=UpdateF9=Work Areas F12=Cancel F24=Field Search
2 Type 010 and E in the Nth record select field
For our example Nth Record Sampling will exclude every tenth record that meets the NTHREC 02 instruction criteria Generalized Selection Plus enters 010 in columns 15-17 and ldquoErdquo in columns 19 automatically
+1+2+3+4+5+6+7 NTHREC 02 010 E EQ N050 01-F
Fraction sampling selects a fraction of the records that meet the criteria of the instruction For example if we define a sampling fraction of 50 or 12 and 2000 records meet the SALARY 02 instruction criteria only 1000 records will be passed to the next instruction for processing The fraction is entered automatically in columns 15-21
+1+2+3+4+5+6+7 SALARY 02 5000000 GE N075 03-030
Record limit sampling limits the number of records that can meet the criteria of an instruction For example if we define a record limit of 60 and 70 records meet the MARRIED 02 instruction criteria only 60 records will be passed to the next instruction The limit number is entered automatically in columns 23-29
+1+2+3+4+5+6+7 MARIED 02 0000060 EQ N080 01-M
6-26 621 - 102002
Producing Job and Instruction Counts 6
Producing Job and Instruction Counts
For each job and instruction parameter in your job list you can generate a StateProvince Counts Report andor a counter record in the Statistics File Each counter record contains the first nth characters (control field value) of your match code and any counts (number of records that met the criteria for the job or instruction) accumulated for that control field value To define the control field length refer to Chapter 3 ldquo Defining Your Inputrdquo You define the counts to accumulate using the Counts and Limits screens described in this section
For example you could accumulate ZIP Code counts (control field length of 5) for records sent to an output file (at the job level) or counts for records that meet the criteria of a single instruction
NOTE The maximum number of stateprovince counters you can define in a job list is 50 You can type up to 99 Statistics File counters in an entire job list For more information on the Statistics File refer to Chapter 3 ldquoDefining Your Inputrdquo
Before you generate counts in the Statistics File we will provide detailed information about the Statistics File Note that this is an advanced function so you must understand fully how job and instruction parameters work and where data is moved during processing
Generalized Selection Plus Userrsquos Guide - AS400 6-27
6 Defining Jobs and Instructions
Statistics File Processing
If you use the Counts and Limits screens to accumulate job andor instruction counts these counts will be sent to the Statistics File Note that Generalized Selection Plus uses the Statistics File as input for the Define Statistical Report component
For example in the following job list we have defined three jobs to send records to three output files Note that the instructions for these jobs are represented as ldquo rdquo
INCOME 01 ZIP A GENDER 01 ZIP B STATUS 01 ZIP C
Job GENDER sends records to output file A job INCOME sends records to output file B and job STATUS sends records to output file C ldquoZIPrdquo indicates that Generalized Selection Plus will generate counts for the job cards Our control field length is 5 and the value is a ZIP Code
1 When a record meets job INCOMEs criteria and goes to output file A Generalized Selection Plus increments a counter record in work area S for the current input record ZIP Code in work area S
The ZIP Code counter record will contain a counter for job INCOME GENDER and STATUS
2 As long as Generalized Selection Plus processes the same control field value (ZIP Code) the counters in work area S will be incremented
3 As soon as Generalized Selection Plus processes a different control field value the current counter record in work area S goes to the Statistics File and Generalized Selection Plus sets the count to zero
4 Generalized Selection Plus generates a new counter record in work area S to accumulate counts for the new control field value
NOTE You can move any input record data to work area S before the counter record is sent to the Statistics File
6-28 621 - 102002
6 Producing Job and Instruction Counts
The following figure presents an example of how our Statistics File records could appear when our jobs INCOME GENDER and STATUS complete
+1+2+3+4+5+6+7+ 20706 FFFFF000000010001000000000000000000000000000000000000000000000000000FFFFFCCCCC 20706000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F490082222
20714 FFFFF000100010001000000000000000000000000000000000000000000000000000FFFFFCCCCC 20714000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F490082222
20852 FFFFF00010000000100000000000000000000000000000000000000000000000000FFFFFCCCCC 20852000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F490082222
20879 FFFFF000100010000000000000000000000000000000000000000000000000000000FFFFFCCCCC 20879000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F490082222
First five bytes of the Control field (ZIP Code)
4-byte packed counter for the third job STATUS
4-byte packed counter for the first job INCOME
4-byte packed counter for the second job GENDER
Figure 6-8 Statistics File Record Example
A counter record is generated for each ZIP Code (break field value) Within each ZIP Code counter record there are three counter fields the first is for the GENDER job (positions 6-9) the second is for the INCOME job (positions 10-13) and the third is for the STATUS job (positions 14-17) You cannot have more than 99 counters in your job list
Generalized Selection Plus Userrsquos Guide - AS400 6-29
6 Defining Jobs and Instructions
For a Job Parameter
The following section will show you how to specify StateProvince Count Reports andor Statistics File counts for a job parameter First display the Job Card Parameters screen
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI20
Job and Instruction Definition Job Card Parameters
Specify parameters for the JOB card + 1 + 2 + 3 + 4 + 5 + 6 + 7 +
Job name GENDER Card number 01 Job action A A-E = Output file
Q = Simulate end-of-file X = No additional action Z = End execution for the record
Skip following jobs N N = Process normally (default) Y = Perform action then end
End of data job BLANK = Process normally (default) E = Execute after end-of-file(s)
Job description
F5=Refresh F6=Update F9=Work Areas F15=LimitReports F12=Cancel F24=Field Search
1 Press ltF15gt
6-30 621 - 102002
6 Producing Job and Instruction Counts
The Counts and Limits (JOB) screen will appear
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI21
Job and Instruction Definition Counts and Limits (JOB)
Specify parameters for the JOB card+1+2+3+4+5+6+7+ GENDER 01 STE A
Counts by state or ZIP Code S S = State Counts for records selected Z = ZIP counter in summary record B = Both state and ZIP counts
Nth record select I = Include every Nth selection -OR- E = Exclude every Nth selection
Fraction of record
Limit records
F5=Refresh F6=UpdateF9=Work Areas F12=Cancel F24=Field Search
2 Type S in the Counts by state or ZIP Code field
For our example we will generate only a StateProvince Count Report for job parameter GENDER Generalized Selection Plus will enter ldquoSTErdquo automatically in columns 11-13 of the job parameter
+1+2+3+4+5+6+7 GENDER 01 STE A
To generate Statistics File counts only for job ldquoGENDERrdquo type Z in the Counts by state or ZIP Code field If you are going to generate a Statistical Report a Statistics File is required Generalized Selection Plus will enter ldquoZIPrdquo automatically in columns 11-13
+1+2+3+4+5+6+7 GENDER 01 ZIP A
To generate state or province counts and Statistics File counts for job ldquoGENDERrdquo type B in the Counts by state or ZIP Code field Generalized Selection Plus will enter ldquoZSTrdquo automatically in columns 11-13
+1+2+3+4+5+6+7 GENDER 01 ZST A
Generalized Selection Plus Userrsquos Guide - AS400 6-31
6 Defining Jobs and Instructions
For an Instruction Parameter
The following section will show you how to specify StateProvince Count Reports andor Statistics File counts for an individual instruction parameter First display the Instruction Card Parameters screen (GSCPJI31)
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI30
Job and Instruction Definition Instruction Card Parameters
Specify parameters for the Instruction card + 1 + 2 + 3 + 4 + 5 + 6 + 7 + GENDER 02 EQ N065 01-F
Job name GENDER Card number 02 Left Work Beg
Par Inst Area Posn Len(s) First operand ( EQ N 65 1 Press F4 for Instruction
optionsRight
Second operand Par OR Constant F )
Connector word A=And O=Or M=Ma
Instruction description
F5=Refresh F6=Update F9=Work Areas F15=LimitReport F12=Cancel F24=Field Search
1 Press ltF15gt
6-32 621 - 102002
6 Producing Job and Instruction Counts
The Counts and Limits (INSTRUCTION) screen will appear
92243 Generalized Selection System GSCPJI00 12012001 Replace with screen heading desired GSCPJI31
Job and Instruction Definition Counts and Limits (INSTRUCTION)
Specify parameters for the JOB card+1+2+3+4+5+6+7+ GENDER 02 ZST EQ N065 01-F
Counts by state or ZIP Code B S = State Counts for records selected Z = ZIP counter in summary record B = Both state and ZIP counts
Nth record select I = Include every Nth selection -OR- E = Exclude every Nth selection
Fraction of record
Limit records
F5=Refresh F6=UpdateF9=Work Areas F12=Cancel F24=Field Search
2 Type B in the Counts by state or ZIP Code field
For our example we will generate a StateProvince Count Report and a Statistics File counter for instruction parameter GENDER 02 Generalized Selection Plus will enter ldquoZSTrdquo automatically in columns 11-13
+1+2+3+4+5+6+7 GENDER 02 ZST EQ N065 01-F
To generate state counts only for the ldquoGENDERrdquo instruction type S in the Counts by state or ZIP Code field Generalized Selection Plus will enter ldquoSTErdquo automatically in columns 11-13
+1+2+3+4+5+6+7 GENDER 02 STE EQ N065 01-F
To generate Statistics File counts only for the ldquoGENDERrdquo instruction type Z in the Counts by state or ZIP Code field Generalized Selection Plus will enter ldquoZIPrdquo automatically in columns 11-13
+1+2+3+4+5+6+7 GENDER 02 ZIP EQ N065 01-F
Generalized Selection Plus Userrsquos Guide - AS400 6-33
6 Defining Jobs and Instructions
6-34 621 - 102002
C H A P T E R 7
Defining a Statistical Report
This chapter provides instructions on defining a Statistical Report Note that when you define your Statistical Report you must have a complete understanding of job and instruction parameters and Generalized Selection Plus processing Additionally this chapter provides complete reference for the Define Statistical Report component of Generalized Selection Plus Each screen is presented along with its fields options and function keys
Defining Your Statistical Report 7-3 Step 1 Select Define Statistical Report Component 7-4 Step 2 Define Report Headers 7-6 Step 3 Define Constant Value(s) 7-9 Step 4 Define Break Levels 7-11 Step 5 Define Information to Move 7-14 Step 6 Define Print Columns 7-17 Step 7 Re-calculate Print Column 7-20 Step 8 Select Statistical Report Output File 7-22 Step 9 Review Statistical Report Layout 7-25 Define Statistical Report Screen Reference 7-27
Component Overview 7-27 Statistical Report Files 7-29
Work Library Files 7-29 Report Functions Menu Screen (GSCPRP05) 7-30
Fields 7-31 Function Keys 7-32
Define Headers for Columns Screen (GSCPRP10) 7-33 Fields 7-34 Function Keys 7-35
Constant Value Definition (CONSTn) Screen (GSCPRP15) 7-36 Fields 7-37 Function Keys 7-37
Break Level Definition (BREAKn) Screen (GSCPRP20) 7-38 Fields 7-39 Function Keys 7-41
Move Data to Print Line (MOVE) Screen (GSCPRP25) 7-42 Fields 7-43 Function Keys 7-45
Column Selection (PRINTn) Screen (GSCPRP30) 7-46 Fields 7-47 Function Keys 7-48
Generalized Selection Plus Userrsquos Guide - AS400 7-1
7 Defining a Statistical Report
Column Definition (PRINTn) Screen (GSCPRP31) 7-49 Fields 7-50 Function Keys 7-51
Column Re-definition (RECALn) Screen (GSCPRP35) 7-52 Fields 7-53 Function Keys 7-53
Detail File Field Selection (DETLnn) Screen (GSCPRP45) 7-54 Fields 7-55 Function Keys 7-55
Detail File Field Definition (DETLnn) Screen (GSCPRP46) 7-56 Fields 7-57 Function Keys 7-58
Report Layout Screen (GSCPRP65) 7-59 Function Keys 7-60
621 - 102002 7-2
Defining Your Statistical Report 7
Defining Your Statistical Report
In this chapter we will show you how to use all options within the Define Statistical Report component A Statistical Report uses the Statistics File as input and based on the Statistics File records generates break totals Note that when you define your Statistical Report you dont have to use all the options We explain the following steps in detail
1 Select Define Statistical Report component
2 Define report headers
3 Define constant value(s)
4 Define break levels
5 Define information to move
6 Define the print columns
7 Recalculate print column for break levels
8 Select Statistical Report output file
9 Review Statistical Report layout
Generalized Selection Plus Userrsquos Guide - AS400 7-3
7 Defining a Statistical Report
Step 1 Select Define Statistical Report Component
To define our Statistical Report we will use the Define Statistical Report component To access the Define Statistical Report component display the Define andor Submit a Job screen (GSCPDS01)
92243 Generalized Selection System GSCPDS00 12012001 Replace with screen heading desired GSCPDS01
Define andor Submit a Job
Type options press Enter 2=Edit 6=Create
- - - - -Last Activity- - - - -Opt Function Date Time User
Defaults for Print OutputDefine Input FilesDefine Jobs and Instructions
2 Define Statistical Report
Submit Batch Job
F3=Exit F12=PrevScrn
1 Type 2 in the Opt field next to Define Statistical Report then press ltENTERgt
621 - 102002 7-4
Step 1 Select Define Statistical Report Component 7
The Report Functions screen (GSCPRP05) will appear
92243 Generalized Selection System GSCPRP00 12012001 Replace with screen heading desired GSCPRP05
Statistical Report Definition Report Functions Menu
Type options press enter2=Edit
Opt Definition Column Headings
Constant Values
Break Level and MOVE Definitions
PRINTn - Column Definitions
Statistical Output File (Detail or Summary)
F3=Exit F6=Update F13=Layout (24 x 132) F14=Layout (24 x 80)
First we will define the headings for the Statistical Report
Generalized Selection Plus Userrsquos Guide - AS400 7-5
7 Defining a Statistical Report
Step 2 Define Report Headers
In this step we will define the main report header the line description the column headers and where to place the page number on the print line
92243 Generalized Selection System GSCPRP00 12012001 Replace with screen heading desired GSCPRP05
Statistical Report Definition Report Functions Menu
Type options press enter2=Edit
Opt Definition 2 Column Headings
Constant Values
Break Level and MOVE Definitions
PRINTn - Column Definitions
Statistical Output File (Detail or Summary)
F3=Exit F6=Update F13=Layout (24 x 132) F14=Layout (24 x 80)
1 Type 2 in the Opt field next to Column Headings then press ltENTERgt
621 - 102002 7-6