Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance...

766
Reference Guide r7 A dvantage VISION: Excel for z/OS

Transcript of Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance...

Page 1: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Reference Guide r7

Advantage™ VISION: Excel™ for z/OS

Page 2: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

This documentation and any related computer software help programs (hereinafter referred to as the “Documentation”) is for the end user’s informational purposes only and is subject to change or withdrawal by CA at any time.

This Documentation may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, without the prior written consent of CA. This Documentation is confidential and proprietary information of CA and protected by the copyright laws of the United States and international treaties.

Notwithstanding the foregoing, licensed users may print a reasonable number of copies of the documentation for their own internal use, and may make one copy of the related software as reasonably required for back-up and disaster recovery purposes, provided that all CA copyright notices and legends are affixed to each reproduced copy. Only authorized employees, consultants, or agents of the user who are bound by the provisions of the license for the product are permitted to have access to such copies.

The right to print copies of the documentation and to make a copy of the related software is limited to the period during which the applicable license for the Product remains in full force and effect. Should the license terminate for any reason, it shall be the user’s responsibility to certify in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed.

EXCEPT AS OTHERWISE STATED IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION “AS IS” WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.

The use of any product referenced in the Documentation is governed by the end user’s applicable license agreement.

The manufacturer of this Documentation is CA.

Provided with “Restricted Rights.” Use, duplication or disclosure by the United States Government is subject to the restrictions set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)(3), as applicable, or their successors.

All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.

Copyright © 2007 CA. All rights reserved.

Page 3: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents iii

Contents

Chapter 1: Introduction

Advantage VISION:Results Features ................................................... 1-1 Advantage VISION:Excel Features ..................................................... 1-1 Advantage VISION:Excel Goals ........................................................ 1-2 Functional Components ............................................................... 1-3

Free-Form Keywords .............................................................. 1-4 Advantage VISION:Excel Output....................................................... 1-4 Manual Structure and Conventions..................................................... 1-5 Program Format and Conventions...................................................... 1-5 Terminology.......................................................................... 1-6 Program Fixes Applied ................................................................ 1-7

Chapter 2: Aging Analysis and Reporting

Aging Analysis Concept ............................................................... 2-1 Advantage VISION:Excel Aging Analysis Input ...................................... 2-2

Methods of Aging Analysis............................................................. 2-6 Aging Analysis Using Advantage VISION:Excel.......................................... 2-8

Aging Analysis and Reporting ...................................................... 2-8 Advantage VISION:Excel Processing ............................................... 2-9 Aging Analysis Input Statements.................................................. 2-10 Aging Analysis Output............................................................ 2-11

Aging Examples ..................................................................... 2-14 Example 1....................................................................... 2-14 Example 2....................................................................... 2-23 Example 3....................................................................... 2-29 Aging Date Specified in a Field.................................................... 2-32

The LISTAG Command ............................................................... 2-33 Aging Report in HTML Format ........................................................ 2-34

HTML Related Additions .......................................................... 2-35 HTML Aging Report Example...................................................... 2-35

Page 4: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

iv Reference Guide

Chapter 3: Letter Writing

Uses of the Letter Writing Function .................................................... 3-1 Implementing Letter Writing .......................................................... 3-2

Document Definition Statements................................................... 3-3 LTH Statements and Keywords ........................................................ 3-4

LTD Statements and Keywords .................................................... 3-8 Additional LTD Statement Information............................................. 3-13

Valid Edit Codes ..................................................................... 3-14 LETTER Command ............................................................... 3-18 Laser JCL (MVS) ................................................................. 3-18 Letter Writing Considerations ..................................................... 3-19 Channel Skipping with Two-up Letter Processing ................................... 3-21 Optimize and Nooptimize......................................................... 3-21

Letter Writing Examples.............................................................. 3-23 Example 1: Specifying a Letter ....................................................... 3-24

Input for Example 1.............................................................. 3-25 Output for Example 1 ............................................................ 3-26

Example 2: Selecting Records and Generating Reports ................................. 3-27 Input for Example 2.............................................................. 3-28 Output for Example 2 ............................................................ 3-29

Example 3: Generating Address Labels................................................ 3-30 Input for Example 3.............................................................. 3-30 Output for Example 3 ............................................................ 3-31

Example 4: Specifying a Print Length for Edited Data Names ........................... 3-32 Input for Example 4.............................................................. 3-32 Output for Example 4 ............................................................ 3-34

Example 5: Printing a Range of Letter Lines ........................................... 3-34 Input for Example 5.............................................................. 3-35 Output for Example 5 ............................................................ 3-37

Example 6: Printing Using the Laser Option ........................................... 3-38 Input for Example 6.............................................................. 3-38 Output for Example 6 ............................................................ 3-39

Example 7: Generating Two-Up Letters Using the Defaults ............................. 3-39 Input for Example 7.............................................................. 3-40 Output for Example 7 ............................................................ 3-41

Example 8: Generating Two-Up Letters Using DYLCNxxSW ............................. 3-42 Side-By-Side Printing Without Using Switch........................................ 3-43 Input for Example 8.............................................................. 3-43 Side–By-Side Printing Using Switch ............................................... 3-45

Example 9: Writing Letters to an Output File .......................................... 3-46 Input for Example 9.............................................................. 3-47

Page 5: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents v

Chapter 4: Frequency Distribution Reporting

Frequency Distribution Definition and Uses ............................................. 4-1 Properties of Frequency Distributions .................................................. 4-3

Central Tendency ................................................................. 4-4 Dispersion........................................................................ 4-5 Kurtosis .......................................................................... 4-7

Frequency Distribution with Advantage VISION:Excel ................................... 4-9 Equal Interval ................................................................... 4-10 Logarithmic Interval ............................................................. 4-11 Alphanumeric Itemization ........................................................ 4-12

Additional Advantage VISION:Excel Options ........................................... 4-13 General Options ................................................................. 4-13 Calculations ..................................................................... 4-13 Entire Population ................................................................ 4-14 Histograms ...................................................................... 4-14 Reporting Option ................................................................ 4-17

Logical Flow of Frequency Distribution ................................................ 4-17 Input to Advantage VISION:Excel................................................. 4-18 Frequency Distribution Statement................................................. 4-19 Output from Advantage VISION:Excel............................................. 4-27 Table Space Requirements ....................................................... 4-30 The DYLFQxx Frequency Distribution Output File ................................... 4-32

Frequency Distribution Examples ..................................................... 4-36 Specifying an Equal Interval Frequency Distribution ................................ 4-36 Specifying a Logarithmic Frequency Distribution ................................... 4-39 Specifying an Alphanumeric Frequency Distribution ................................ 4-42 Specifying COUNT and VALUE Histograms ......................................... 4-44 Specifying the DYLFQxx Output File ............................................... 4-49

Chapter 5: Non-Stratified Sampling Overview

Sampling Theory ..................................................................... 5-2 Advantage VISION:Excel Sampling Capabilities ......................................... 5-4

Step 1: Deciding on the Objectives of the Sampling Plan ............................ 5-5 Step 2: Selecting the Sampling Technique that Best Suits Your Sampling Objectives .. 5-5 Step 3: Identifying and Specifying Judgmental Information .......................... 5-7 Step 4: Identifying and Collecting Information Needed to Determine the Sample Size . 5-7 Step 5: Determining the Sampling Size............................................. 5-7 Step 6: Selecting the Random Sample ............................................. 5-7 Step 7: Examining and Evaluating the Sample ...................................... 5-8

Page 6: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

vi Reference Guide

How to Sample Using Advantage VISION:Excel ......................................... 5-8 Non-Stratified Sampling Techniques................................................ 5-9 Input to Advantage VISION:Excel................................................. 5-11 Output from Advantage VISION:Excel............................................. 5-14

Chapter 6: Simple Interval Sampling

Definition and Uses of Simple Interval Sampling ........................................ 6-1 Implementing Simple Interval Sampling with Advantage VISION:Excel................... 6-3

Input Statements for Interval Sampling ............................................ 6-3 Simple Interval Example .............................................................. 6-4

Flowchart for Simple Interval Sampling............................................. 6-4 Input Statement to Advantage VISION: Excel....................................... 6-5 Output from Advantage VISION: Excel ............................................. 6-6

Chapter 7: Simple Random Sampling

Definition of Simple Random Sampling ................................................. 7-1 Types of Random Selection............................................................ 7-1

Simple Selection:Known Universe.................................................. 7-2 Random Selection: Unknown Universe ............................................. 7-3

Simple Random Sampling Example: Known Universe.................................... 7-6 Flowchart for Simple Random Sampling: Known Universe............................ 7-6 Input Statements for Known Universe.............................................. 7-7 Output from Advantage VISION:Excel for Known Universe........................... 7-8

Simple Random Sampling Example: Unknown Universe ................................ 7-11 Flowchart for Simple Random Sampling: Unknown Universe ........................ 7-11 Input Statements for Unknown Universe .......................................... 7-12 Output from Advantage VISION:Excel for Unknown Universe ....................... 7-13

Chapter 8: Attribute Estimation Sampling

Definition of Attribute Estimation Sampling............................................. 8-1 Implementation of Attribute Estimation Sampling ....................................... 8-3

Advantage VISION:Excel Attribute Estimation Sampling Input ....................... 8-4 User-Supplied Judgmental Information ............................................. 8-6 Advantage VISION:Results Program .............................................. 8-11 Advantage VISION:Excel Output .................................................. 8-11

Page 7: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents vii

Examining and Evaluating the Sample ................................................ 8-12 Two-Sided Attribute Estimation Sampling Worksheet ............................... 8-13 One-Sided Attribute Estimation Sampling Worksheet ............................... 8-14 Using the Guidelines ............................................................. 8-15

Attribute Estimation Sampling Example ............................................... 8-15 Background Information.......................................................... 8-15 Coding the Program.............................................................. 8-16 Advantage VISION:Excel Output .................................................. 8-19

Chapter 9: Discovery Sampling Definition of Discovery Sampling....................................................... 9-1

Uses of Discovery Sampling ....................................................... 9-1 Discovery Sampling Inferences ........................................................ 9-3

Inference 1....................................................................... 9-3 Inference 2....................................................................... 9-3 Relationships between Occurrence and Probability .................................. 9-4 Strong Inferences................................................................. 9-7 Weak Inferences.................................................................. 9-8 Sample Size and Probability ....................................................... 9-8

Advantage VISION:Excel Implementation of Discovery Sampling ....................... 9-10 Advantage VISION:Excel Discovery Sampling Input Statements..................... 9-10 Evaluating an Attribute Estimation Sample ........................................ 9-12 Advantage VISION: Results Program .............................................. 9-14 Advantage VISION:Excel Output .................................................. 9-14 Examining and Evaluating the Sample............................................. 9-15 Using the Guidelines ............................................................. 9-16

Discovery Sampling Example ......................................................... 9-16 Background Information.......................................................... 9-16 Advantage VISION:Excel Output .................................................. 9-20

Chapter 10: Acceptance Sampling Definition of Acceptance Sampling .................................................... 10-1

Objectives....................................................................... 10-1 Acceptance versus Attribute and Discovery Sampling .................................. 10-2

Inference 1: ..................................................................... 10-3 Inference 2a:.................................................................... 10-3 Inference 2b:.................................................................... 10-5 Relationship of Sample Size to Acceptance Number ................................ 10-7

Page 8: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

viii Reference Guide

Implementation of Acceptance Sampling .............................................. 10-9 Advantage VISION:Excel Acceptance Sampling Statement.......................... 10-9 Advantage VISION: Results Program ............................................. 10-11 Advantage VISION:Excel Output ................................................. 10-12 Examining and Evaluating the Sample............................................ 10-13 Using the Guidelines ............................................................ 10-13

Acceptance Sampling Example ...................................................... 10-14 Background Information......................................................... 10-14 Coding the Program............................................................. 10-16 Advantage VISION:Excel Generated Output ...................................... 10-18

Chapter 11: Proportional Sampling

Definition of Proportional Sampling ................................................... 11-1 Objectives....................................................................... 11-1

Implementation of Proportional Sampling ............................................. 11-7 Determining Values .............................................................. 11-7 Deciding between Compliance or Substantive Reliability Level ...................... 11-8 Advantage VISION:Results Program ............................................. 11-11 Advantage VISION:Excel Output ................................................. 11-12 Examining and Evaluating the Sample............................................ 11-17

Proportional Sampling Example...................................................... 11-19 Background Information......................................................... 11-19 Determine Values for the Example ............................................... 11-20 Choosing between Compliance and Substantive Reliability Level ................... 11-21 Advantage VISION:Results Program for the Example .............................. 11-21 Advantage VISION:Excel Generated Output ...................................... 11-24

Chapter 12: Estimation Sampling of Values Definition of Estimation Sampling Of Values ........................................... 12-1 Estimation Sampling Using Advantage VISION:Excel ................................... 12-7

Advantage VISION:Excel Frequency Distribution Report ............................ 12-7 Syntax of Estimation Sampling of Values .......................................... 12-8 Syntax for Advantage VISION:Results IF SAMPLING Command .................... 12-11 Advantage VISION:Excel Output ................................................. 12-11

Examining and Evaluating the Sample ............................................... 12-13 Audited Sample Values.......................................................... 12-13 Frequency Distribution Report ................................................... 12-14 Non-Stratified Summary Report.................................................. 12-15 Estimating Total Value of Population ............................................. 12-16 Adjusting the Monetary Unit Precision ............................................ 12-16

Page 9: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents ix

Conclusions .................................................................... 12-16 Using the Guidelines ............................................................ 12-17

Estimation Sampling Example ....................................................... 12-18 Background Information......................................................... 12-18 Evaluating the Sample .......................................................... 12-19 Coding the Program............................................................. 12-20 Advantage VISION:Excel Output for the Example ................................. 12-25

Chapter 13: Dollar Unit Sampling

Definition of Dollar Unit Sampling..................................................... 13-1 Calculating the Cell Width ........................................................ 13-4

Advantage VISION:Excel Implementation ............................................. 13-7 Required Information ............................................................ 13-7 Advantage VISION:Excel Output ................................................. 13-11 Sample Examination and Evaluation.............................................. 13-13 Using the Guidelines ............................................................ 13-17

Dollar Unit Sampling Examples ...................................................... 13-18 Example 1: Determining the Amount of Error in a Population ...................... 13-18 Example 2: Using Zero and Small Value Options .................................. 13-28 Example 3: Using the Key Record Flag ........................................... 13-31

Chapter 14: Stratified Sampling Overview Definition of Stratified Sampling ...................................................... 14-1 Reasons for Using Stratified Sampling................................................. 14-2 Stratified Sampling Techniques Supported by Advantage VISION:Excel ................. 14-2 Statistical Considerations for Using Stratified Sampling................................. 14-3

Example 1: Non-stratified Estimation Sampling of Values Method ................... 14-3 Example 2: Stratified Mean Estimation Method..................................... 14-4

Determining Statistical Stratification for a Population .................................. 14-6 Frequency Distribution Report for Example 1 ...................................... 14-7 Frequency Distribution Report for Example 2 ...................................... 14-8 Defining the Strata............................................................... 14-9

Advantage VISION:Excel Implementation of Stratified Sampling ....................... 14-12 Stratified Sampling Output Flowchart............................................. 14-12 Stratified Sampling Input Statements ............................................ 14-13 Output from Advantage VISION:Excel............................................ 14-15

Page 10: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

x Reference Guide

Chapter 15: Stratified Simple Random Sampling

Definition of Stratified Simple Random Sampling....................................... 15-1 Implementation of Stratified Simple Random Sampling................................. 15-2

Input to Advantage VISION:Excel................................................. 15-2 Advantage VISION:Excel Output .................................................. 15-4

Stratified Simple Random Sampling Example .......................................... 15-5 Background Information.......................................................... 15-5 Generated Output for the Example ................................................ 15-9

Chapter 16: Stratified Simple Percentage Sampling

Definition Stratified Simple Percentage Sampling ...................................... 16-1 Implementation of Stratified Simple Percentage Sampling.............................. 16-2

Input to Advantage VISION:Excel................................................. 16-2 Advantage VISION:Excel Output .................................................. 16-4

Stratified Simple Percentage Sampling Example ....................................... 16-5 Background Information.......................................................... 16-5 Generated Output for the Example ................................................ 16-8

Chapter 17: Stratified Mean Estimation Sampling

Definition of Stratified Mean Estimation Sampling...................................... 17-1 Implementing Stratified Mean Estimation Sampling .................................... 17-3

Required Input to Advantage VISION:Excel........................................ 17-3 Using the Guidelines ............................................................. 17-5

Stratified Mean Estimation Sampling Example ......................................... 17-7 Background Information.......................................................... 17-7 Determining the Proper Sampling Method to Use................................... 17-8 Stratifying the Population ....................................................... 17-11 Coding the Program for Part 1 ................................................... 17-21 Output for Part 1 ............................................................... 17-32 Examining the Samples ......................................................... 17-46 Obtaining Additional Information ................................................ 17-48 Coding the Program for Part 2 ................................................... 17-49 Output for Part 2 ............................................................... 17-54 Completing Forms .............................................................. 17-58 Conclusions .................................................................... 17-68

Page 11: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents xi

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses

Definition of Various Methods of Analyses ............................................. 18-1 Scatter Diagram ................................................................. 18-2 Linear Regression Analyses ....................................................... 18-3 Trend Line Analyses.............................................................. 18-5 Further Sources of Information ................................................... 18-5

Input Requirements for Advantage VISION:Excel ...................................... 18-5 Syntax for SCATTER Statement ................................................... 18-5 Syntax for LINEAR Statement..................................................... 18-5 Syntax for TREND Statement ..................................................... 18-6

Regression Analysis.................................................................. 18-9 Implementing Regression Analysis ................................................ 18-9

Output from Advantage VISION:Excel................................................ 18-11 Linear Regression Analysis without Scatter Diagram............................... 18-11 Linear Regression Analysis with Scatter Diagram.................................. 18-12 Evaluation of Output ............................................................ 18-15

Linear Regression Analysis Example ................................................. 18-15 Linear Regression Analysis Input Statements ..................................... 18-15 Linear Regression Analysis ...................................................... 18-16 Scatter Diagram for the Example ................................................ 18-17

Trend Line Analysis Example ........................................................ 18-17 Trend Line Analysis Input Statements ............................................ 18-17 Trend Line Linear Regression Analysis ............................................ 18-18

Appendix A: Reserved Words

Universal Reserved Word.............................................................. A-1 DYLxxyyCB ....................................................................... A-1

Aging Reserved words ................................................................ A-3 DYLxTRNDAT ..................................................................... A-3 DYLxTRNDT4 ..................................................................... A-3 DYLxyyyzzz ...................................................................... A-3 DYLxUDRyyy ..................................................................... A-3 DYLxOVRyyy ..................................................................... A-4 DYLxORPyyy...................................................................... A-4 DYLxNONE ....................................................................... A-4 DYLxERROR ...................................................................... A-5 DYLxDYSBET ..................................................................... A-5

Page 12: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

xii Reference Guide

Aging Reserved Word Examples ....................................................... A-5 Letter Writing Reserved Words ........................................................ A-7

DYLCNxxID....................................................................... A-7 DYLCNxxCHN..................................................................... A-7 DYLCNxxFRM ..................................................................... A-7 DYLCNxxLNC ..................................................................... A-7 DYLCNxxPAG ..................................................................... A-7 DYLCNxxTO ...................................................................... A-7 DYLEXTxx ........................................................................ A-8 DYLTRxx ......................................................................... A-8 DYLCNxxSW...................................................................... A-8

Sampling Reserved Words............................................................. A-9 DYLSPxxFLG...................................................................... A-9 DYLSPxxACN ..................................................................... A-9 DYLSPxxSTN ..................................................................... A-9 DYLSPxxRNO ..................................................................... A-9 Non-Stratified Sampling: ......................................................... A-10 Stratified Sampling:.............................................................. A-10 DYLSPxxCNT .................................................................... A-10 DYLSPxxPOP .................................................................... A-10 DYLSPxxSSZ .................................................................... A-10 Summary of Sampling Reserved Words ........................................... A-11

Dollar Unit Sampling Reserved Words ................................................. A-12 DYLSPxxTYP..................................................................... A-12 DYLSPxxCCT .................................................................... A-12 DYLSPxxBV...................................................................... A-12 DYLSPxxCD1 .................................................................... A-12 DYLSPxxPD1 .................................................................... A-12 DYLSPxxRD1 .................................................................... A-13 DYLSPxxRN1 .................................................................... A-13 DYLSPxxCD2 .................................................................... A-13 DYLSPxxPD2 .................................................................... A-13 DYLSPxxRD2 .................................................................... A-13 DYLSPxxRN2 .................................................................... A-13 DYLSPxxKYF..................................................................... A-14 DYLSPxxDPF..................................................................... A-14 DYLSPxxSML .................................................................... A-14 DYLSPxxZRO .................................................................... A-14

Frequency Reserved Words........................................................... A-15 DYLFQxx ........................................................................ A-15

Additional Reserved word ............................................................ A-15 Misc............................................................................. A-15

Page 13: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents xiii

Appendix B: Formulas and Equations

Mean ................................................................................ B-1 Standard Deviation ................................................................... B-1 Coefficient of Variation................................................................ B-2 Acceptance Sampling ................................................................. B-2 Attribute Estimation Sampling ......................................................... B-4

Lower Limit:...................................................................... B-5 Higher Limit: ..................................................................... B-6

Discovery Sampling................................................................... B-7 Estimation Sampling of Values......................................................... B-8 Proportional Sampling ............................................................... B-10 Stratified Sampling — Mean Estimation Method........................................ B-10 Linear Regression Formulas .......................................................... B-12

Linear Regression Line: .......................................................... B-12 Standard Error of Estimate: ...................................................... B-12 Correlation Coefficient:........................................................... B-12 Coefficient of Determination: ..................................................... B-12 Coefficient of Non- Determination: ................................................ B-12

Appendix C: Fixed Form Parameters Acceptance Sampling ................................................................. C-1 Aging Analysis and Reporting.......................................................... C-3

Statement 1...................................................................... C-4 Statement 2...................................................................... C-8 Statement 3..................................................................... C-10

Attribute Estimation Sampling ........................................................ C-11 Letter Writing and Confirmation Notice................................................ C-13

Statement 1..................................................................... C-14 Statement 2 —CNH Header is Blank............................................... C-17 Statement 2 — CNH Header is Y .................................................. C-18 Variable Information ............................................................. C-19

Linear Regression and Scatter Diagram ............................................... C-23 Statement 1..................................................................... C-24 Statement 2..................................................................... C-25

Discovery Sampling.................................................................. C-27 Dollar Unit Sampling................................................................. C-31 Estimation Sampling of Values........................................................ C-33

Page 14: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

xiv Reference Guide

Frequency Distribution Reporting ..................................................... C-36 Interval ......................................................................... C-36 Logarithmic ..................................................................... C-39 Alphanumeric.................................................................... C-43

Proportional Sampling ............................................................... C-45 Random Number Seed Table — Non-Stratified ......................................... C-49 Simple Interval Sampling ............................................................ C-50 Simple Random Sampling ............................................................ C-53

Known Universe ................................................................. C-53 Unknown Universe ............................................................... C-55

Stratified Sampling — Basic Information .............................................. C-55 Statement 1..................................................................... C-55 Statement 2..................................................................... C-58

Stratified Sampling — Mean Estimation Method........................................ C-59 Statement 1..................................................................... C-59 Statement 2..................................................................... C-61 Statement 3..................................................................... C-63 Statement 4..................................................................... C-64

Stratified Sampling — Simple Percentage Method ...................................... C-65 Stratified Sampling — Simple Random Method......................................... C-67

Statement 1..................................................................... C-67 Statement 2..................................................................... C-69

Stratified Sampling — Random Number Seed Table .................................... C-70

Appendix D: Summary of Advantage VISION:Excel Features Advantage VISION:Excel Subsystems.................................................. D-1

Aging Analysis and Reporting ...................................................... D-1 Letter Writing..................................................................... D-2 Frequency Distribution —Interval .................................................. D-2 Frequency Distribution —Logarithmic............................................... D-2 Frequency Distribution —Alphanumeric............................................. D-3 Simple Interval Sampling.......................................................... D-3 Simple Random Sampling (Non-Stratified) Known Population ........................ D-3 Simple Random Sampling (Non-Stratified) Unknown Population...................... D-4 Stop or Go Sampling (Non-Stratified) .............................................. D-4 Attribute Estimation Sampling ..................................................... D-4 Discovery Sampling ............................................................... D-5 Acceptance Sampling ............................................................. D-5 Proportional Sampling............................................................. D-5 Estimation Sampling of Values..................................................... D-6 Dollar Unit Sampling .............................................................. D-6

Page 15: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents xv

Simple Percentage (Stratified Sampling) ........................................... D-7 Simple Random (Stratified Sampling) .............................................. D-7 Mean Estimation (Stratified Sampling) ............................................. D-7 Regression Analysis – Linear Regression, Trend Line Analysis, and Scatter Diagrams .. D-8

Copy Function ........................................................................ D-9 SMF/RMF Reporting System .......................................................... D-10

DYRMF70........................................................................ D-10 DYRMF71........................................................................ D-10 DYRMF72........................................................................ D-11 DYRMF73........................................................................ D-11 DYRMF74........................................................................ D-12 DYRMF75........................................................................ D-12 DYRMF76........................................................................ D-13 DYSMF0......................................................................... D-13 DYSMF2......................................................................... D-14 DYSMF3......................................................................... D-14 DYSMF4......................................................................... D-15 DYSMF5......................................................................... D-15 DYSMF6......................................................................... D-16 DYSMF7......................................................................... D-17 DYSMF14........................................................................ D-17 DYSMF15........................................................................ D-18 DYSMF17........................................................................ D-19 DYSMF18........................................................................ D-19 DYSMF19........................................................................ D-20 DYSMF20........................................................................ D-20 DYSMF21........................................................................ D-21 DYSMF26........................................................................ D-22 DYSMF30........................................................................ D-22 DYSMF32........................................................................ D-23 DYSMF34........................................................................ D-23 DYSMF35........................................................................ D-24 DYSMF40........................................................................ D-25 DYSMF43........................................................................ D-25 DYSMF45........................................................................ D-26 DYSMF47........................................................................ D-27 DYSMF48........................................................................ D-28 DYSMF49........................................................................ D-28 DYSMF52........................................................................ D-29 DYSMF53........................................................................ D-30 DYSMF54........................................................................ D-31 DYSMF55........................................................................ D-31 DYSMF56........................................................................ D-32

Page 16: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

xvi Reference Guide

DYSMF58........................................................................ D-33 DYSMF60........................................................................ D-34 DYSMF61........................................................................ D-34 DYSMF62........................................................................ D-35 DYSMF63........................................................................ D-36 DYSMF64........................................................................ D-36 DYSMF65........................................................................ D-37 DYSMF66........................................................................ D-38 DYSMF67........................................................................ D-38 DYSMF68........................................................................ D-39 DYSMF70........................................................................ D-40 DYSMF71........................................................................ D-40 DYSMF72........................................................................ D-41 DYSMF73........................................................................ D-41 DYSMF74........................................................................ D-42 DYSMF75........................................................................ D-42 DYSMF76........................................................................ D-43 DYSMF80........................................................................ D-43 DYSMF81........................................................................ D-44 DYSMF90........................................................................ D-44 DYSMF101 ...................................................................... D-45

Generalized Advantage VISION:Excel Routines ........................................ D-45 DYCHANEL ...................................................................... D-45 DYLABEL ........................................................................ D-46 DYLAGEDT ...................................................................... D-47 DYLBRCTG ...................................................................... D-47 DYLCOMP ....................................................................... D-48 DYLDATDF ...................................................................... D-48 DYLGENFL....................................................................... D-49 DYLNEGAN ...................................................................... D-49 DYLPOSAC ...................................................................... D-50 DYLPSLPC-DYLPSEVC ............................................................ D-50 DYLPSLPS- DYLPSEVS............................................................ D-51 DYLRAND ....................................................................... D-52 DYLRNSEQ ...................................................................... D-53 DYLSEQCK ...................................................................... D-53 DYLSNDCD ...................................................................... D-54 DYLSQRT........................................................................ D-54 DYLSTMDY ...................................................................... D-54 DYLTRIAL ....................................................................... D-55 DYLTSORT ...................................................................... D-56

Advantage VISION:Excel Subroutines ................................................. D-56 Additional Subroutines Used by the SMF and RMF Reporting System .................... D-57

Page 17: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Contents xvii

Appendix E: Fixed Form and Positional Free-Form Summary

Advantage VISION:Excel/Advantage VISION:Results Considerations ..................... E-1 Valid Application Numbers......................................................... E-2 Sampling Decision Table .......................................................... E-2 Statement Sequence .............................................................. E-3 Commands ....................................................................... E-4 Valid Function Combinations....................................................... E-4 MVS Procedure ................................................................... E-5 Execution of Procedure............................................................ E-8 MVS ddnames/File Definitions ..................................................... E-8 MVS PARM in the EXEC Statement ................................................. E-9 VSE System Numbers and File Definitions ......................................... E-10 VSE PARM Statement ............................................................ E-12

Advantage VISION:Excel/Advantage VISION:Sixty Considerations ...................... E-14 Valid Application Numbers........................................................ E-14 Sampling Decision Table ......................................................... E-15 Parameter Sequence ............................................................. E-16 Macro Operation Codes........................................................... E-16 Valid Function Combinations...................................................... E-17 MVS Procedure .................................................................. E-17 Execution of Procedure........................................................... E-20 Preprocessor ddnames/File Definitions ............................................ E-21 Post Processor ddnames/File Definitions ........................................... E-21 MVS PARM in the EXEC Statement ................................................ E-22 VSE Job Control Language Requirements — Example............................... E-23 VSE System Numbers and File Definitions ......................................... E-24 VSE PARM Statement ............................................................ E-26

Advantage VISION:Excel Positional Free-form Requirements ........................... E-28

Appendix F: Proportional Sampling Manual Method Evaluation

Sample Examination and Evaluation ....................................................F-1 Reliability Factors and Related Precision Adjustment Factors Table ....................F-2 Proportional Sampling Evaluation Worksheet ........................................F-4

Compliance Evaluation .................................................................F-7 Proportional Sampling Evaluation Worksheet: Step 1.................................F-8 Proportional Sampling Evaluation Worksheet: Step 2.................................F-9 Proportional Sampling Evaluation Worksheet: Step 3............................... F-10

Page 18: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

xviii Reference Guide

Substantive Evaluation............................................................... F-11 Proportional Sampling Evaluation Worksheet: Step 4............................... F-12 Proportional Sampling Evaluation Worksheet: Step 5............................... F-13 Proportional Sampling Evaluation Worksheet: Step 6............................... F-14

Proportional Sampling Evaluation Example ............................................ F-16 Advantage VISION: Excel Sampling List ........................................... F-17

Monetary Overstatements............................................................ F-23 Monetary Understatements........................................................... F-26

Appendix G: Bibliography

Index

Page 19: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 1: Introduction 1–1

Chapter 1: Introduction

Advantage™ VISION:Excel™ enhances and extends the Advantage™VISION:Results™ file management, information handling, and report generating facilities. In a free-form manner, it integrates directly into Advantage VISION:Results without negating or diminishing any of its capabilities.

Advantage VISION:Results Features The majority of the auditing needs of a computerized nature are currently handled by Advantage VISION: Results, as listed below:

Extraction and selection of data

File handling (sequential, indexed sequential, VSAM, and so on)

Computations

Totaling and footing

Report writing

User exit capabilities

Database interfacing facilities

Advantage VISION:Excel Features Although many auditors use Advantage VISION:Results to gain access to information while maintaining their independence, they still have a need for Advantage VISION:Excel. In an easy-to-use manner, Advantage VISION:Excel facilitates the implementation of the more difficult auditing techniques that are applicable to the computer. The system includes the following functions and features:

Sampling

Aging analysis and reporting

Letter writing (confirmation notices and dunning letters)

Frequency distribution reporting

Linear regressions, scatter diagrams, and trend line analysis

Miscellaneous subroutines

Page 20: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Goals

1–2 Reference Guide

Specialized COPY macro routines

SMF Reporting

RMF reporting

Advantage VISION:Excel Goals The goals of VISION: Excel are:

Ease-of-use

Flexibility

Facilitation of complex auditing tasks

Advantage VISION:Excel achieves these goals by assisting auditors in each of the following steps of the auditing process:

1. You can select, at your discretion, the application or applications that best suit the objectives you want to achieve.

2. You can code the information necessary for the applications using the easy-to-use Advantage VISION:Excel free-form statements. Although much of this information can appear to be extraneous, the data is necessary for proper statistical calculations.

3. You code the Advantage VISION: Results program to control the flow and data management of the input and output files. Use the following Advantage VISION:Excel commands to control the sequence in which the Advantage VISION:Excel applications are executed:

Command Description

AGING Aging analysis and reporting

LETTER Letter writing

FREQUENCY Frequency distribution reporting

IF SAMPLING Sampling

REGRESSION Linear regression, scatter diagrams, trend line analysis

Note: Each of the above commands is described later in this guide.

4. You input the Advantage VISION: Results program into the Advantage VISION:Excel automated system.

Page 21: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Functional Components

Chapter 1: Introduction 1–3

Advantage VISION:Excel is composed of two sets of statements: those that have been designated as Advantage VISION:Excel statements and those that are designated as Advantage VISION: Results statements. When Advantage VISION:Excel statements are mentioned, they are considered as both sets of statements. Otherwise, they are denoted individually as above.

Functional Components Advantage VISION:Excel is composed of the following functional components:

DYLAUDIT — a program that reads, validates, and processes the Advantage VISION:Excel input statements, plus calculates statistical values such as sample size and sampling intervals for statistically oriented applications. It performs all of the major auditing logic with regard to the input data being processed.

DYLAUDIT starts the random number generator at the appropriate time and determines when a record is to be randomly selected from the input data.

For sampling, it calculates such values as standard deviation, mean, coefficient of variation, and the like. This subroutine also prints confirmation notices, handles the bucketing of aging amounts for aging analysis, saves frequency distribution data for the printing of frequency reports, when requested, and holds linear regression data for the printing of the regression analysis and the scatter diagram.

Advantage VISION:Results — a free-form file management, information handling, and report generating system. Advantage VISION:Results is the controlling component of Advantage VISION:Excel. It determines the appropriate moments when Advantage VISION:Excel should do its functions. The two functional components work as one entity. The user is normally aware of only Advantage VISION:Results, while DYLAUDIT is invisible within the system.

Page 22: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Output

1–4 Reference Guide

Free-Form Keywords

Advantage VISION:Excel can be executed with free-form keywords active or inactive. If your default is with free-form active and you run Advantage VISION:Excel or Advantage VISION:Results programs that have data names the same as the free-form keywords, contention errors occur. In this case, you can override the system default by specifying OPTION NOEXCEL in your program.

If your system default is to disallow free-form keywords and you run Advantage VISION:Excel programs using the free-form format syntax, you can override this by specifying OPTION EXCEL. For more information about the fixed-form format, see the appendix “Fixed Form Parameters” and the chapter “OPTION Statements” in the Advantage VISION:Results Reference Guide.

Advantage VISION:Excel Output Advantage VISION:Excel generates the following output to keep you informed of your input data, errors that it has detected, and any values (statistical or otherwise) calculated by the system:

SYSPRINT/SYSLST — all statements submitted to the system, indicating errors and including file statistics.

Sampling list of all valid sampling applications submitted to the system.

Statistical audit reports — either the Advantage VISION:Excel Non-Stratified Summary List or Advantage VISION:Excel Stratified Summary List. These reports are generated only if sampling applications are submitted.

The following user reports:

– User-generated reports, if specified.

– Frequency distribution reporting, if requested.

– Aging analysis reporting, if requested.

– Letters and notices, if requested.

– Advantage VISION:Results statements.

– Linear regression analysis and scatter diagrams, if requested.

Page 23: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Manual Structure and Conventions

Chapter 1: Introduction 1–5

Manual Structure and Conventions Most of the chapters in this guide have a structure that includes some of the following sections:

Introduction — describes the structure and content of the chapter.

Definition — defines the auditing type.

Advantage VISION:Excel Implementation — describes how to use Advantage VISION:Excel to perform auditing tasks.

– Input to Advantage VISION:Excel — describes how to enter the necessary commands to perform auditing tasks.

– Output from Advantage VISION:Excel — describes the reports that Advantage VISION:Excel generates when auditing tasks run successfully.

– Output Evaluation — describes how to interpret the output.

– Using the Guidelines — describes the guidelines that must be adhered to for successful completion of auditing tasks.

Sampling Example — walks you through a real-life example of how to use Advantage VISION:Excel on auditing tasks.

Note: The sample reports in this guide demonstrate the report format that Advantage VISION:Excel produces when the sample program runs. The data displayed in the sample report may not reflect your actual report.

Program Format and Conventions The programs and commands used in the figures throughout this guide adhere to the following conventions:

All text appearing in uppercase letters is entered exactly as it appears in the figures sample.

All text appearing in brackets ([]) is not required; all other text is required.

n is used to represent entry of numbers, where the number of ns represents the total number of characters to enter, including digits before and after the decimal point, the decimal point, and commas.

All text appearing in lowercase letters represents a variable that you must enter, for example, nnnnnnnnnnnnnn or data name.

Page 24: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Terminology

1–6 Reference Guide

For example, to demonstrate the three items listed above, if a command contained the statement POPULATION [TOTAL] nnnnnnnnnnnnnn (14 n’s), you would have to enter the following information as part of your Advantage VISION:Excel input statement:

POPULATION, because POPULATION is in uppercase letters.

[Optionally, Total], because it is in brackets.

A number between .01 and 999,999,999.99 (nine digits before the decimal point + two commas + the decimal point + two digits after the decimal point = 14 characters).

Terminology There are five types of Advantage VISION:Excel statements. They are divided into the following groupings:

Sampling

Aging analysis

Frequency distribution

Letter writing

Linear regression, trend line analysis, and scatter diagrams

The application type is identified by the following commands, where the first word is the keyword, nn is the application number (01, 02, 03, and so on), and the third word (for frequency distribution and sampling) is the function or technique:

Sampling

– SAMPLE nn INTERVAL

– SAMPLE nn RANDOM

– SAMPLE nn ATTRIBUTE

– SAMPLE nn DISCOVERY

– SAMPLE nn ACCEPTANCE

– SAMPLE nn PROPORTIONAL

– SAMPLE nn ESTIMATION

– SAMPLE nn DOLLAR

– SAMPLE nn STRATIFIED MEAN

– SAMPLE nn STRATIFIED PERCENTAGE

– SAMPLE nn STRATIFIED RANDOM

Page 25: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Program Fixes Applied

Chapter 1: Introduction 1–7

Aging analysis

– AGE n

Frequency distribution

– FREQ nn LOGARITHMIC

– FREQ nn EQUAL

– FREQ nn ALPHANUMERIC

Letter writing

– LTH nn

Linear regression, trend line analysis, and scatter diagrams

– LINEAR nn

– TREND nn

– SCATTER nn

Application numbers must be unique numeric values from 01–99. No application number can be repeated within a given Advantage VISION:Excel application type. For example, if multiple AGE (Aging Analysis) codes are submitted within a given run, each application number must be unique.

Program Fixes Applied The EXCELPAT option enables a listing of program fixes applied to your Advantage VISION:Excel system. A list of patch numbers along with the copyright information will appear in the AUDPRINT or SYS009 output file. The converse option to EXCELPAT is NOEXCELPAT. The presence of NOEXCELPAT on an option statement will suppress the listing of fixes applied to your Advantage VISION:Excel system.

An installation default for the Advantage VISION:Excel patch listing can be specified using the Advantage VISION:Results DYLINSTL macro. You can set EXCLPAT=Y or EXCLPAT=N. The default is EXCLPAT=N.

For more information on the DYLINSTL macro, see the appendix "DYLINSTL Macro" in the Advantage VISION:Results Installation Guide.

Note: Programs containing only regression functions, Letter Writing or Sampling will not produce an EXCELPAT listing. These features are loaded from Advantage VISION:Results and not Advantage VISION:Excel.

Page 26: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 27: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 2: Aging Analysis and Reporting 2–1

Chapter 2: Aging Analysis and Reporting

This chapter describes aging analysis as it applies to Advantage VISION:Excel and is divided into the following sections:

Aging analysis concepts

Methods of aging analysis

Aging analysis using Advantage VISION:Excel

Aging examples

The LISTAG command

Aging Analysis Concept Aging analysis can be performed upon many systems, such as:

Inventory

Payroll

Accounts Payable

General Ledger

Fixed Assets

Accounts Receivable

Because the most commonly used application of Aging Analysis is Accounts Receivable, the subsequent explanation of aging deals with this accounting system.

One objective of aging analysis is to analyze accounts for ascertaining the probable recoverability or no recoverability of any or all accounts. The longer the account is past due, the more likely the account is not recoverable.

Another objective of aging analysis is to analyze accounts due in the future for ascertaining the cash flow over a specific timeframe.

Aging is accomplished by classifying or segregating the unpaid accounts receivable by age or length of period past due or future due. This is accomplished by preparing an aging schedule.

Page 28: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Concept

2–2 Reference Guide

For example, you want to take a portion of your population (accounts to be analyzed) and decide that you only want those accounts whose dollar values are $5,000 or more and past due from 31–120 days of billing date. You could segregate the past due accounts into groups of 30 days. You could then separate the aging schedule into the following categories:

Category Days Past Due

Category 1 31–60

Category 2 61–90

Category 3 91–120

All accounts $5,000 or more and 31–60 days past due would be placed into Category 1, those 61–90 days past due would fall into Category 2, and those 91 to 120 days past due would fall into Category 3. All accounts not meeting the established criteria ($5,000 minimum and 31–120 days past due) would be ignored.

As another example, you can also take only a portion of your population and, from this portion, select only those accounts whose dollar values are $5,000 or more and due from 31–120 days in the future (from the aging date).

Advantage VISION:Excel Aging Analysis Input

You must supply the following information for the Advantage VISION:Excel aging function:

An application number.

An aging date (the date the system uses as day zero).

The name of the field containing the billing or transaction date and its format.

The aging process wanted (aging in the past or future).

The name of the field containing the amount (dollar value) due.

The age groups wanted, such as from 1–30 days, from 31–60 days, and so on.

Additional information is required if you use Advantage VISION:Excel Standard Report options.

Page 29: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Concept

Chapter 2: Aging Analysis and Reporting 2–3

Aging Analysis Syntax

The format of the Aging Analysis syntax is as follows:

AGE n AGEDATE {mmddyy | mmddyyyy | dataname} DATEFIELD dataname

DATEFORMAT '{MMDDYY | DDMMYY | YYMMDD | MM/DD/YY |

DD/MM/YY | YY/MM/DD | YYDDD | MMDDYYYY |

DDMMYYYY | YYYYMMDD | MM/DD/YYYY |

DD/MM/YYYY | YYYY/MM/DD | YYYYDDD}'

[PAST | FUTURE] AMOUNTFIELD dataname

[STDREPT {NO {| DETAIL | SUMMARY} CTLBRK dataname}]

[ACCTITLE dataname] [REPTITLE dataname]

GROUP1 From_days To_days

GROUP2 From_days To_days

GROUP3 From_days To_days]

.

.

[GROUP10 From_days To_days]

[HTML ddname [COUNT nnnn] [STYLE nn][ HTMLTITL tttttttttt]]

The following table explains the various options of Aging Analysis syntax:

Options Description

AGE Required. Describes the application as Aging Analysis.

n Required. A unique application number; a value from 1–9.

AGEDATE Required. An aging date (can also be a data name) must be supplied in the format of MMDDYY or MMDDYYYY, regardless of the format of the billing or transaction date in the input record.

Advantage VISION:Excel automatically converts the MMDDYY (or MMDDYYYY) to the format of the billing or transaction record date. The aging date can also be supplied as a field (data name) that contains the aging date in the MMDDYY (or MMDDYYYY) format.

DATEFIELD Required. The data name of the field containing the transaction date. This data name must be defined in an Advantage VISION:Results field definition.

DATEFORMAT Required. Advantage VISION:Excel accepts any of the 14 different date formats in single quotation marks (see the program code in the section Aging Analysis Syntax).

Page 30: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Concept

2–4 Reference Guide

Options Description

PAST | FUTURE Specifies the aging process wanted. Enter PAST if the transaction date is to be subtracted from the aging date in determining the number of days between the two dates; the transaction date is assumed to be in the past relative to the aging date.

Enter FUTURE if the aging date is to be subtracted from the transaction date in determining the number of days between the two dates; the transaction date is assumed to be in the future relative to the aging date.

AMOUNTFIELD Required. The data name of the field containing the amount. This field contains the dollar amount that is to be placed into its appropriate age group. This data name must be previously defined in an Advantage VISION:Results field definition.

STDREPT NO is the default. If you elect to have a Standard Report printed, you can select either a summary (SUMMARY) or a detailed report (DETAIL).

CTLBRK If you selected a Standard Report, you are required to supply the data name of the field containing the account number. This field can be an account number, invoice number, transaction number, or account code within the input record.

Advantage VISION:Excel uses this data name to cause a control break or footing line to occur on account number. This data name must be previously defined in an Advantage VISION:Results field definition statement.

The changing of an account number determines when a control break or footing line is to occur. Advantage VISION:Excel assumes that the input file is in sequence by the account number, transaction number, or invoice number, as specified by the data name of the field containing the account number.

ACCTITLE You can also supply Advantage VISION:Excel with the data name of the field containing the account title. The data name field should be within the input record that you want to print on your report. The data name must be previously defined in an Advantage VISION:Results field definition statement.

REPTITLE You can also supply Advantage VISION:Excel with the data name of the field containing the report title. For example, if you want to print the name of the company on the report, you can do so by supplying the data name of a field containing a literal or value (for example, the company name). The data name must be previously defined in an Advantage VISION:Results field definition statement.

Page 31: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Concept

Chapter 2: Aging Analysis and Reporting 2–5

Options Description

GROUPn Required. Enter the Age Groups, at least GROUP1 and GROUP2. They are called From-To days. Advantage VISION:Excel can automatically handle up to ten From-To days for each individual aging procedure against an input file.

For example, when aging, you want to group all accounts into just two categories: those that are 1–30 days overdue in one group and all accounts that are 31–60 days overdue into another group. You can enter GROUP1, 001 in the From_Days field, and 030 in the To_Days field; then you can enter GROUP2, 031 in the From_Days field, and 060 in the To_Days field.

The From_Days and To_Days values can range from 0–999 days, and the To_Days value must be greater than or equal to the From_Days value.

HTML Ddname — Required if HTML is specified. Identifies the DDname for the z/OS PDS or HFS path that will contain the created HTML Aging Analysis report.

COUNT nnnn — Specifies the number of lines in an HTML segment in the document. This can be used to improve the efficiency of the browser when retrieving the document. The default value is 500.

STYLE nn — Identifies the suffix of the template member in the HTML library supplied with Advantage Advantage VISION:Results. The default is 00.

HTMLTITL tttttttttt — Identifies the name of the data field that will contain the text to appear in the title bar for the HTML document. The data field can be a maximum of 10 characters. The title text can be a maximum of 80 characters.

Page 32: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Methods of Aging Analysis

2–6 Reference Guide

Methods of Aging Analysis After you enter the information, Advantage VISION:Excel compares the billing or transaction date of each record against the aging date you supplied. Advantage VISION:Excel then performs one of the following methods of aging analyses:

If the difference (measured in days) between the aging date and the billing date falls in the range of one of the age groups designated, Advantage VISION:Excel indicates this by placing the amount in the appropriate age group area. When you specify your age groups, Advantage VISION:Excel establishes an area for each age group, as well as for those special groups that are mentioned in the text that follows. Each aging area can be addressed as a field name (for example, DYLxyyyyyy, where x is the application number and yyyyyy is the area name).

For example, if the age groups were 1–30, 31–60, and 61–90 for aging application 1, Advantage VISION:Excel would establish the areas 001030, 031060, and 061090 as addressable using the automatically provided field names DYL1001030, DYL1031060, and DYL1061090.

If past aging process is specified and the billing/transaction date is later than the aging date specified, the account is considered not past due, and the amount is placed in an area designated as UNDER, abbreviated UDR.

For example, if the aging date is December 31, 1996 (123196), the age groups are 1–30 and 31–60 days, and the billing date in the record is January 2, 1997 (010297), the amount would be placed in the area UDR.

Beware of the special circumstances created when gaps or breaks exist in the age groups.

For example, suppose you specified age groups 1–30, 61–90, and 91–120; age group 31–60 was not specified. If the transaction/billing date was prior to the aging date and happened to be 35 days past due, Advantage VISION:Excel would have encountered a null age group. This is due to the fact that an age group encompassing those transactions that are 31–60 days past due was not specified. In this case, Advantage VISION:Excel would place the amount in the Advantage VISION:Excel reserved word, DYLxNONE. This would also be true for future aging.

If the aging process is for the future and the billing/transaction date is prior to the aging date specified, the account is considered not in the future and the amount is placed in an area designated as UNDER, abbreviated UDR. For example, if the aging date is December 31, 1996 (123196), the age groups are 1–30 and 31–60 days in the future, and the billing date in the record is December 30, 1996 (123096), the amount is placed in the area UDR.

Page 33: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Methods of Aging Analysis

Chapter 2: Aging Analysis and Reporting 2–7

If the difference (measured in days) between the aging date and the billing date falls beyond the highest “to” age group, the account would be past due and the amount is placed in an area designated as OVER, abbreviated OVR.

For example, for past aging, if the aging date is 123196, the age groups are 1-30 and 31–60 days, and the billing date in the record is 101096, the account would be past due (that is, more than 60 days). The OVR is generated as OVR060, because the last designated “to” age group was 60. If you had specified age groups 1–30, 31–60, and 61–90, the generated OVR would be OVR090.

Another OVER area, abbreviated ORP, is generated when an Advantage VISION:Excel Standard Report is to be printed. You can specify up to ten age groups (From-To days), each having its own unique area. However, for standardized default reporting, a maximum of three user-defined age groups are printed plus one additional group called ORP.

For example, if the age groups were 1–30, 31–60, 61–90, and 91–120 days and you are using Advantage VISION:Excel's Standard Report option, the following would appear on the report: an aging-group column for 1–30 days, 31–60 days, 61–90 days, and ORP090 (over 90 days). Advantage VISION:Excel does not print the information for the 91–120 day category because there is not enough room on the report. However, the information is available for inspection.

Advantage VISION:Excel adheres to the following guidelines when generating the ORP area:

– If the number of age groups is greater than three, Advantage VISION:Excel generates an ORP using the third To-Date specified. For example, 1–30, 31–90, 91–120, 121–999 age groups would cause Advantage VISION:Excel to generate an ORP120.

– If the number of age groups is three or less, Advantage VISION:Excel generates an ORP using the last To-Date specified. For example, 1–30 and 31–90 age groups would cause the generation of an ORP090.

The transaction/billing date in each record is converted to MMDDYY format and is placed into the dynamically generated reserved word, DYLxTRNDAT (where x is the application number). If the DATEFORMAT field indicates a 4-digit year, the transaction date is also compacted to MMDDYYYY format and placed into the reserve word DYLXTRNDT4. If the transaction/billing date is not numeric or does not contain a valid Julian or Gregorian date, Advantage VISION:Excel places blanks into DYLxTRNDAT. Valid comparisons are necessary to determine which age group an account belongs to. The amount for an invalid transaction is also placed in a reserved word, called DYLxERROR.

Page 34: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

2–8 Reference Guide

The following transaction/billing dates would be invalid:

Date Description

022997 1997 was not a leap year

113196 November has only 30 days

x32896 Invalid numeric

132196 Invalid month

1997366 1997 is not a leap year

Advantage VISION:Excel also provides a reserved word, DYLxDYSBET, that contains the calculated number of days between the aging date and the transaction date (where x is the application number).

Aging Analysis Using Advantage VISION:Excel This section describes the attributes of Advantage VISION:Excel's aging analysis in action, as well as the flow of both the Advantage VISION:Excel and Advantage VISION:Results portions of processing.

Aging Analysis and Reporting

The discussion of Advantage VISION:Excel thus far has been concerned with the aging analysis function. An actual operation, however, includes the reporting function, as well as the results of the aging analysis. Attributes of both aging analyses and reporting functions are given below:

As many as nine aging analyses (future or past) can be performed with up to ten ‘From-To age’ groups being specified for each analysis during one pass of Advantage VISION:Excel.

With Advantage VISION:Excel's standardized reporting option, you can request either a summary or a detail report.

Both of these types of standard reports have the following control breaks or footings (minor/major):

– Account number

– Grand or final total

Because all of the reporting logic, including control breaking (footing), is generated dynamically by Advantage VISION:Excel, only one aging report per pass can be generated.

If you do not choose to use the Standard Report, you can still perform aging analysis and produce an auditor-defined report.

Page 35: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

Chapter 2: Aging Analysis and Reporting 2–9

With Advantage VISION:Excel, you can generate your own report using the Advantage VISION:Results LIST command. You have the option of either specifying exact field positions (locations) on the printed report or letting the Advantage VISION:Results automatic composition feature do the job. You also have the option of writing the information to an output file.

Advantage VISION:Excel Processing

This section describes the Advantage VISION:Excel process flow, from the Advantage VISION:Excel and Advantage VISION:Results input statements, to output generated, as shown in the following flowchart.

Page 36: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

2–10 Reference Guide

Aging Analysis Input Statements

The following code is an example of both Advantage VISION:Excel and Advantage VISION:Results statements for aging analysis. The Standard Report option is chosen, so Advantage VISION:Excel handles all reporting statements. This example includes an aging analysis with user-specified reporting statements as follows:

FILE ARFILE INPUT FB 352 5280

BILLNGDATE 6 44 NU BALANCE 5 170 PD 2 ACCTCODE 2 182

AGE 4

AGEDATE 061592

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY'

PAST

AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 90

GROUP3 91 999

AGING 4

These statements can be divided into following parts:

FILE Statement (Advantage VISION:Results)

Field Definition Statements (Advantage VISION:Results)

Aging Analysis Statements (Advantage VISION:Excel)

Procedure and Selection Statements (Advantage VISION:Results)

For more information about the FILE and field definition statements in the Advantage VISION:Results statements, see the Advantage VISION: Results Reference Guide. Only the main points are described in this reference guide.

FILE Statement

The FILE statement defines the input file. A file is identified by the command FILE, and immediately followed by the file name (ARFILE). INPUT is a keyword and is the default value for any FILE, if not specified. The FB 352 5280 defines the attributes of the file as fixed block, record length 352, and block size 5280. For more information on free-form keywords, see the chapter “Introduction.”

Page 37: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

Chapter 2: Aging Analysis and Reporting 2–11

Field Definition Statements

The fields of the input file identify the locations of the fields specified in the AGE statement. The field definition statements tell you how large each field is, where it begins in the record, and its data name (field name). Every time you use a data name in an Aging Analysis statement, you must define it in an Advantage VISION: Results field definition.

Aging Analysis Statements

In the Aging Analysis Input Statements, AGE 4 defines this statement as an aging analysis, application number 4. The aging date (AGEDATE), June 15, 1992, is the date the billing date is compared against; this must be entered in the required MMDDYY format. BILLNGDATE is listed as the label of the field in the input file containing the billing date (DATEFIELD).

The date format of BILLNGDATE as it appears in the input file is in the form MMDDYY. As shown, PAST aging is chosen. The data name of the amount field in the input file (AMOUNTFIELD) is listed as BALANCE. A standard summary report is selected.

The data name of the field that contains the account number is ACCTCODE. The three aging groups are specified: 1–30, 31–90, and 91–999.

Procedure/ Selection Statements

The Aging Analysis Input Statements, also demonstrates the technique for starting the aging analysis. The AGING 4 command specifies the application number. The AGING command and the application number, 4, are directly associated with the AGE 4 Aging Analysis statements.

This is how Advantage VISION:Excel identifies the aging analysis application requested and the criteria (aging from and to dates, field to be aged) as set forth in each aging analysis application. This is why each application number must be unique for aging analysis.

Aging Analysis Output

The following output and reports are generated by Advantage VISION:Excel at the end of processing:

Aging Analysis Statement Listing

Aging Analysis Advantage VISION:Excel File Statistics

Aging Summary Report

Page 38: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

2–12 Reference Guide

Aging Analysis Statement Listing

Advantage VISION:Excel generates a listing of all statements entered by you and validated by Advantage VISION:Excel. An example of this listing is shown as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ARFILE INPUT FB 352 5280

BILLNGDATE 6 44 NU BALANCE 5 170 PD 2 ACCTCODE 2 182

AGE 4

AGEDATE 061592

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY'

PAST

AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 90

GROUP3 91 999

AGING 4

The LISTAG command, not shown in the example, can also be used to pass a record to the aging report processor. For a description of this command, see the section The LISTAG Command.

Advantage VISION:Excel has extensive error analysis capabilities that are evident during the validation and execution of this system. The system transmits this information to the auditor on the SYSPRINT/SYSLST listing. For examples and complete details, refer to the Advantage VISION:Excel Messages and Codes Guide.

Advantage VISION:Excel also generates an additional report, the Advantage VISION:Excel File Statistics report, which contains a summary total of statements read and number of records written.

Page 39: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis Using Advantage VISION:Excel

Chapter 2: Aging Analysis and Reporting 2–13

Aging Analysis Advantage VISION:Excel File Statistics

The Aging Analysis Advantage VISION:Excel File Statistics report is as follows:

1/20/07 VISION:EXCEL 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 28

NUMBER OF PARAMETER CARDS READ 27

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 65

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 65

NUMBER OF RECORDS WRITTEN TO COMPILER PARAMETER FILE 66

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 2

NUMBER OF LINES PRINTED 10

Note: Comments are not considered statements (they have an asterisk or semicolon in column 1).

Aging Summary Report

The Aging Summary Report is automatically printed whenever an aging function is started. The total of each aging accumulator is listed in the report. The day groupings are dependent on the From-To information supplied in the Aging Parameters. The Aging Summary Report is as follows:

1/20/07 VISION:EXCEL AGING SUMMARY REPORT PAGE 1

APPLICATION 4

AUDIT DATE 06/15/02

LABEL OF FIELD CONTAINING TRANSACTION DATE BILLNGDATE

FORMAT OF TRANSACTION DATE MMDDYY

PAST AGING OR FUTURE AGING PAST AGING

LABEL OF FIELD CONTAINING AMOUNT BALANCE

ERROR ACCUMULATOR TOTAL 1,984.92

NONE ACCUMULATOR TOTAL 0.00

1 - 30 DAYS ACCUMULATOR TOTAL 0.00

31 - 90 DAYS ACCUMULATOR TOTAL 57.52

91 - 999 DAYS ACCUMULATOR TOTAL 595.31

UNDER 1 DAYS ACCUMULATOR TOTAL 16,385.35

OVER 999 DAYS ACCUMULATOR TOTAL 0.00

TOTAL OF ALL ACCUMULATORS 19,023.10

Page 40: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–14 Reference Guide

Aging Examples The following examples demonstrate two Advantage VISION:Excel standardized reports (past and future aging) and a user-generated report.

Example 1

The accounts receivable file of Little Santa Maria Hospital is to be audited to verify the recoverability or no recoverability of its accounts up to and including 06/15/92. To accomplish this, the auditors want the following information:

A determination of how long accounts have been outstanding.

An aging analysis done on the file.

The amounts for each account totaled for the following periods:

– 1–30 days

– 31–90 days

– 91–999 days

– Over 999 days

A total figure for each account (that is, a total of amounts due in each of the four categories).

The following report gives a portion of the type of report envisioned by the auditors.

ACCOUNT 1-30 31-90 91-999 OVER 999 TOTAL CODE DAYS DAYS DAYS DAYS AMOUNT

XX .00 44.99 .00 .00 44.99

XY 32.00 .00 20.00 .00 52.00

YY 221.70 75.24 3.80 .00 300.74

GRAND

TOTAL 253.70 120.23 23.80 .00 397.73

Little Santa Maria Hospital could use Advantage VISION:Excel to perform an aging analysis and, using its Standard Report option, produce a report without entering any statements concerning report format.

Page 41: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–15

Input for Example 1

To generate an aging analysis report, Little Santa Maria Hospital needs the following types of input:

The input file with the necessary information concerning accounts receivable, contains fixed length records. An example of the accounts receivable file of the hospital appears as follows:

FIELD POSITION SIZE FORMAT DECIMALS

DISCHARGE(BILLING) 44 6 N ('MMDDYY') DATE

BALANCE OWED 170 5 P 2

ACCOUNT CODE 182 2 C

Aging analysis statements (as shown in Aging Analysis Input Statements for Example 1).

Advantage VISION:Results processing statements ( shown in Aging Analysis Input Statements for Example 1).

Aging Analysis Input Statements for Example 1

FILE ARFILE INPUT FB 352 5280

DISCHDATE 6 44 NU

BALOWED 5 170 PD 2

ACCTCODE 2 182

WORKAREA

DYLCOUNT1 2 E

AGE 4 AGEDATE 061592

DATEFIELD DISCHDATE

DATEFORMAT 'MMDDYY' AMOUNTFIELD BALOWED

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 90

GROUP3 91 999

AGING 4

IF DYL4TRNDAT EQ SPACES

DYLCOUNT1=DYL4ERROR+DYLCOUNT1

ENDIF

Page 42: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–16 Reference Guide

FILE Statement for Example 1

The FILE statement defines the input file as being fixed block with a record size of 352 and a block size of 5280.

The field definition statements define the data names employed in the aging analysis input. The field definition statements define the fields for each data name used in the aging analysis program. The data name, the field size, and the starting position of that field in the record are defined. Data type and number of decimal positions, if any, must also be specified. DISCHDATE, for example, is a numeric (NU) 6-byte field beginning at position 44 in the record.

Aging Analysis Statements for Example 1

AGE 4 defines this statement as aging analysis, application number 4 (any number from 1–9 can be used). The user entered the aging date 06/15/92 in one of the required formats—MMDDYY. This date is considered day zero in determining the length of time since billing. The field name (or data name) of the DATEFIELD is the field containing the billing date on the input file. Here, the data name entered is DISCHDATE. DATEFORMAT is defined as MMDDYY. PAST is selected by default for past aging; FUTURE would have specified future aging. The data name of the AMOUNTFIELD is the field containing the balance owed (BALOWED).

The Standard Report (STDREPT) contains a provision for three user-defined aging groups, plus one further group covering the period beyond the last day that the user specified. The Standard Report can be either a summary report (in which case, only the total amounts due for each account appear on the printed report) or a detail report (in which case, each amount owed by an account appears separately on the final printed output).

Page 43: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–17

Aging Analysis Summary Report for Example 1

The Aging Analysis Summary Report is shown as follows:

AGING DATE 06/15/02 SUMMARY AGED REPORT PAGE 1

FOR AMOUNT LABELED BALOWED

ACCOUNT NUMBER 1-30 31-90 91-999 OVER 999 TOTAL DAYS DAYS DAYS DAYS AMOUNT

BO .00 44.99 .00 .00 44.99

EO 32.00 .00 20.00 .00 52.00

FO 221.70 75.24 3.80 .00 300.74

IO 197.72 428.58 .00 .00 626.30

KO 70.25 632.56 3,048.11 .00 3,750.92

LO .00 .00 .00 .00 .00

MA 617.73 1,701.64 2,262.90 .00 4,582.27

MF .00 .00 1,836.67 .00 1,836.67

MI .00 .00 276.23 .00 276.23

MN .00 158.29 .00 .00 158.29

MO 15.00 .00 245.14 .00 260.14

MR 43.00 .00 .00 .00 43.00

MT 36.96 64.17 .00 .00 101.13

MU 46.59 .00 406.46 .00 453.05

NA 19.54 99.96 310.75 .00 430.25

PO .00 93.54 346.56 .00 440.10

RO 65.00 .00 .00 .00 65.00

TO .00 1,484.06 20.00 .00 1,504.06

VO .00 41.91 .00 .00 41.91

WE .00 .00 11.20 .00 11.20

WO 365.84 47.80 1,240.01 225.50 1,879.15

**GRAND TOTAL 1,731.33 4,872.74 10,027.83 225.50 16,857.40

Page 44: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–18 Reference Guide

Aging Analysis Detail Report for Example 1

The Aging Analysis Detail Report is shown as follows:

AGING DATE 06/15/92 DETAIL AGED REPORT PAGE 1

FOR AMOUNT LABELED BALOWED

ACCOUNT TRAN 1-30 31-90 91-999 OVER 999 TOTAL NUMBER DATE DAYS DAYS DAYS DAYS AMOUNT

BO 10/24/97 .00 44.99 .00 .00 44.99

*ACCOUNT TOTAL .00 44.99 .00 .00 44.99

EO 12/12/97 32.00 .00 .00 .00 32.00

11/30/96 .00 .00 5.00 .00 5.00

09/02/97 .00 .00 15.0 0.00 15.00

*ACCOUNT TOTAL 32.00 .00 20.00 .00 52.00

FO 12/05/97 43.00 .00 .00 .00 43.00

11/21/97 .00 45.24 .00 .00 45.24

11/04/97 .00 15.00 .00 .00 15.00

10/06/97 .00 15.00 .00 .00 15.00

08/26/97 .00 .00 3.80 .00 3.80

12/08/97 178.70 .00 .00 .00 178.70

*ACCOUNT TOTAL 221.70 75.24 3.80 .00 300.74

IO 11/11/97 .00 413.58 .00 .00 413.58

.00 .00 .00 .00 .00

11/21/97 .00 15.00 .00 .00 15.00

12/16/97 89.28 .00 .00 .00 89.28

12/15/97 108.44 .00 .00 .00 108.44

*ACCOUNT TOTAL 197.72 428.58 .00 .00 626.30

The user wants a standard summary report.

The data name for the account number (CTLBRK entry) is defined as ACCTCODE because, the field designated ACCTCODE guides control breaks on the report, and this data name is required when a Standard Report has been specified. That way, when the account code changes, the system knows to total amounts for the former account code or number.

The aging groups are specified as 1–30, 31–90, and 91–999. Advantage VISION:Excel automatically generates a fourth category, Over 999, because this is a Standard Report.

Note: Because changing account codes determines a control break, ensure that the input file is in sequence according to the account code or number. If it is not, sort the file before performing the aging analysis.

Page 45: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–19

Procedure and Selection Logic Statements for Example 1

The Advantage VISION:Excel command, AGING, is needed to control the passing of information to Advantage VISION: Results for processing. With this single statement, Advantage VISION:Excel’s internal aging analysis logic places the BALOWED amount from each record into its proper aging group. Notice that this statement is tied to the Aging Analysis statements that the hospital entered because "4", the application number on their aging analysis input, appears after the command AGING.

Additional statements are added to this program to illustrate the usage of the reserved word fields, DYL4TRNDAT and DYL4ERROR. Because the Advantage VISION:Excel program functions by comparing the DISCHDATE field (that is, the billing date) on each record with the aging date and placing the contents of the balance field (BALOWED) into the appropriate aging group, the program hits a snag if the billing date field is empty. This indicates that the transaction date was invalid. For example, the billing date field on several records is left blank — perhaps because patients are not discharged yet. When the blank DISCHDATE field and the aging date field are compared, the system adds zeros to each of the aging group columns for that record. In effect, each record with a blank billing date is skipped.

If a Detail Report is being run, the problem is apparent, because each record is printed on the final report. A portion of such a report is shown as follows. Note, by the missing date and zeros in each aging group, that a record has been skipped.

*ACCOUNT TOTAL 221.70 75.24 3.80 .00 300.74

IO 11/11/97 .00 413.58 .00 .00 413.58

.00 .00 .00 .00 .00

11/21/97 .00 15.00 .00 .00 15.00

12/16/97 89.28 .00 .00 .00 89.28

12/15/97 108.44 .00 .00 .00 108.44

*ACCOUNT TOTAL 197.72 428.58 .00 .00 626.30

With a Summary Report, however, only totals for each account are printed. If records have been skipped because of a faulty billing date, there is no way to know from just inspecting the final report that the date in the transaction was invalid. However, if the transaction date is invalid, the reserved word DYL4ERROR that contains the amount of the invalid transaction, is added to a 10-byte Advantage VISION:Results reserved word field called DYLCOUNT1. The total amount for all records with invalid billing/transaction dates is kept in DYLCOUNT1. This total is printed out on the final Advantage VISION:Results file statistics listing as TOTAL NUMBER 01. The total is also automatically printed in the Advantage VISION:Excel Aging Summary Report (see ERROR ACCUMULATOR TOTAL).

Page 46: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–20 Reference Guide

This completes all statements that the hospital entered to implement the aging analysis. Both aging analysis and standardized summary reporting automatically occurred.

Output for Example 1

The outputs received from Advantage VISION:Excel are as follows:

1. Aging Analysis Statement Listing

The first output received from Advantage VISION:Excel is a listing of all input statements, shown as follows:

1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ARFILE INPUT FB 352 5280 DISCHDATE 6 44 NU BALOWED 5 170 PD 2 ACCTCODE 2 182

WORKAREA DYLCOUNT1 2 E

AGE 4 AGEDATE 061592 DATEFIELD DISCHDATE DATEFORMAT 'MMDDYY' AMOUNTFIELD BALOWED STDREPT SUMMARY CTLBRK ACCTCODE GROUP1 1 30 GROUP2 31 90 GROUP3 91 999 AGING 4 IF DYL4TRNDAT EQ SPACES DYLCOUNT1=DYL4ERROR+DYLCOUNT1 ENDIF

2. Aging Analysis Advantage VISION:Results File Statistics Report

The next type of output from Advantage VISION:Excel is the Advantage VISION:Results File Statistics Listing, shown as follows:

Page 47: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–21

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ARFILE 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 1

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

TOTAL NUMBER 01 1,643.66

Notice that the totals for accounts not included on the summary report (TOTAL NUMBER 01) have been printed out.

3. Aging Analysis Summary Aged Report

The Aging Analysis Summary Aged Report appears as follows:

Page 48: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–22 Reference Guide

AGING DATE 06/15/92 SUMMARY AGED REPORT PAGE 1

FOR AMOUNT LABELED BALOWED

ACCOUNT NUMBER 1-30 31-90 91-999 OVER 999 TOTAL

DAYS DAYS DAYS DAYS AMOUNT

BO .00 44.99 .00 .00 44.99

EO 32.00 .00 20.00 .00 52.00

FO 221.70 75.24 3.80 .00 300.74

IO 197.72 428.58 .00 .00 626.30

KO 70.25 632.56 3,048.11 .00 3,750.92

LO .00 .00 .00 .00 .00

MA 617.73 1,701.64 2,262.90 .00 4,582.27

MF .00 .00 1,836.67 .00 1,836.67

MI .00 .00 276.23 .00 276.23

MN .00 158.29 .00 .00 158.29

MO 15.00 .00 245.14 .00 260.14

MR 43.00 .00 .00 .00 43.00

MT 36.96 64.17 .00 .00 101.13

MU 46.59 .00 406.46 .00 453.05

NA 19.54 99.96 310.75 .00 430.25

PO .00 93.54 346.56 .00 440.10

RO 65.00 .00 .00 .00 65.00

TO .00 1,484.06 20.00 .00 1,504.06

VO .00 41.91 .00 .00 41.91

WE .00 .00 11.20 .00 11.20

WO 365.84 47.80 1,240.01 225.50 1,879.15

**GRAND TOTAL 1,731.33 4,872.74 10,027.83 225.50 16,857.40

4. Aging Analysis Aging Summary Report

This is the final piece of output that Advantage VISION:Excel produces for this example is the Aging Summary Report:

Page 49: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–23

1/06/98 VISION:EXCEL AGING SUMMARY REPORT PAGE 1

APPLICATION 4

AUDIT DATE 06/15/92

LABEL OF FIELD CONTAINING TRANSACTION DATE DISCHDATE

FORMAT OF TRANSACTION DATE MMDDYY

PAST AGING OR FUTURE AGING PAST AGING

LABEL OF FIELD CONTAINING AMOUNT BALOWED

ERROR ACCUMULATOR TOTAL 1,643.66

NONE ACCUMULATOR TOTAL 0.00

1 - 30 DAYS ACCUMULATOR TOTAL 1,731.33

31 - 90 DAYS ACCUMULATOR TOTAL 4,872.74

91 - 999 DAYS ACCUMULATOR TOTAL 10,027.83

UNDER 1 DAYS ACCUMULATOR TOTAL 522.04

OVER 999 DAYS ACCUMULATOR TOTAL 225.50

TOTAL OF ALL ACCUMULATORS 19,023.10

Example 2

Little Santa Maria Hospital examined the standard summary report and decided that more specific information was required concerning those accounts that had fallen in the 91–999 days aging group. The hospital decided to do a second aging analysis with the following aging groups: 1–30, 31–90, 91–180, 181–360, and 361–999 days.

Because the standard report only accommodates four aging groups (three user-entered groups plus one group over the last day of the highest entered category), it was necessary for the hospital to design its report. The hospital also decided that it wanted a detail report. This time, the contents of every record would be printed out for each account.

Input for Example 2

The following input is required for this user-designed report:

Aging analysis statements

Advantage VISION: Results statements, including:

– FILE Statement

– Field Definition Statements

– Procedure and Selection Logic

– LIST Statement

Page 50: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–24 Reference Guide

The same input file is used in this example. See the section Input for Example 1, for the relevant fields in the file. The requisite Aging Analysis and Advantage VISION:Results statements are discussed next.

Aging Analysis Input Statements for Example 2

The required Aging Analysis Input Statements are shown as follows:

REPORT 180 WIDE

FILE ARFILE INPUT FB 352 5280

DISCHDATE 6 44 NU

BALOWED 5 170 PD 2

ACCTCODE 2 182

WORKAREA

TOT 5 PD 2 E (TOTAL'NUMBER)

*

CONTROL ACCTCODE

AGE 1 AGEDATE 061592

DATEFIELD DISCHDATE

DATEFORMAT 'MMDDYY' AMOUNTFIELD BALOWED

STDREPT NO

GROUP1 1 30

GROUP2 31 90

GROUP3 91 180

GROUP4 181 360

GROUP5 361 999

AGING 1

TOT = DYL1001030 + DYL1031090 + DYL1091180 +

DYL1181360 + DYL1361999 + DYL1OVR999

LIST SUPPRESS ACCTCODE (ACCOUNT'NUMBER) DYL1TRNDAT (TRAN'DATE)

DYL1DYSBET (DAYS'OLD) DYL1001030 (1-30'DAYS)

DYL1031090 (31-90'DAYS) DYL1091180 (91-180'DAYS)

DYL1181360 (181-360'DAYS) DYL1361999 (361-999'DAYS)

DYL1OVR999 (OVER 999'DAYS) TOT (TOTAL'AMOUNT)

ON CHANGE IN ACCTCODE

LIST '*ACCOUNT TOTAL ' AT ACCTCODE SUM DYL1001030

SUM DYL1031090 SUM DYL1091180

SUM DYL1181360 SUM DYL1361999

SUM DYL1OVR999 SUM TOT WITH 2 AFTER

ON FINAL

LIST '**GRAND TOTAL' AT ACCTCODE SUM DYL1001030

SUM DYL1031090 SUM DYL1091180

SUM DYL1181360 SUM DYL1361999

SUM DYL1OVR999 SUM TOT

T1

T1+2 'AUDIT DATE '

T1+15 '06/15/92'

Page 51: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–25

T1+118 DYLPAGE

T2 'DETAIL AGING REPORT' WITH 2 AFTER

FILE and Field Definition Statements for Example 2

The FILE and field definition statements are identical with those in Example 1. For more information, see, the report “Aging Analysis Statement Listing” in the section Output for Example 1.

Aging Analysis Statements for Example 2

If you see the code in the section Input for the Aging Analysis statements for Example 2, you will observe that these statements differ from those in Example 1 in the following ways:

In this example, the application number is 1.

The aging date is June 15, 1992, entered in one of the required formats—MMDDYY.

STDREPT NO has been entered, so a user-defined report can be produced instead of a standard report.

Five aging groups have been entered.

Procedure and Selection Logic Statements for Example 2

See the Aging Analysis Input Statements for Example 2 and observe the following:

In the AGING command, the application number 1 links this instruction to the Aging Analysis statements described above.

After the AGING command executes, one of the reserved word fields (DYL1001030, DYL1031090, DYL1091180, DYL1181360, DYL1361999, or DYL1OVR999) contains the amount being aged; the other fields are zero. Because the report contains a column cross sum, the above-mentioned reserved word fields are summed into the field TOT.

The detail LIST statement lists the necessary fields with the column headings defined within the LIST statement.

When the account code changes, the literal *ACCOUNT TOTAL is printed along with the sum of the DYL1001030 through DYL1OVR999 reserved word fields. Similarly, at the end of the report, the literal **GRAND TOTAL is printed along with the sum of the DYL1001030 through DYL1OVR999 reserved word fields.

The T1–T2 statements define the report title lines.

Page 52: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–26 Reference Guide

Output for Example 2

The output received from Advantage VISION:Excel is as follows:

1. Aging Analysis Statement Listing Report

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

REPORT 180 WIDE

FILE ARFILE INPUT FB 352 5280

DISCHDATE 6 44 NU

BALOWED 5 170 PD 2

ACCTCODE 2 182

WORKAREA

TOT 5 PD 2 E (TOTAL'NUMBER)

*

CONTROL ACCTCODE

AGE 1 AGEDATE 061592

DATEFIELD DISCHDATE

DATEFORMAT 'MMDDYY'

AMOUNTFIELD BALOWED

STDREPT NO

GROUP1 1 30

GROUP2 31 90

GROUP3 91 180

GROUP4 181 360

GROUP5 361 999

AGING 1

TOT = DYL1001030 + DYL1031090 + DYL1091180 + DYL1181360 + DYL1361999 + DYL1OVR999

LIST SUPPRESS ACCTCODE (ACCOUNT'NUMBER) DYL1TRNDAT (TRAN'DATE)

DYL1DYSBET (DAYS'OLD) DYL1001030 (1-30'DAYS)

DYL1031090 (31-90'DAYS) DYL1091180 (91-180'DAYS)

DYL1181360 (181-360'DAYS) DYL1361999 (361-999'DAYS)

DYL1OVR999 (OVER 999'DAYS) TOT (TOTAL'AMOUNT)

ON CHANGE IN ACCTCODE

LIST '*ACCOUNT TOTAL ' AT ACCTCODE SUM DYL1001030

SUM DYL1031090 SUM DYL1091180

SUM DYL1181360 SUM DYL1361999

SUM DYL1OVR999 SUM TOT WITH 2 AFTER

ON FINAL

LIST '**GRAND TOTAL' AT ACCTCODE SUM DYL1001030

SUM DYL1031090 SUM DYL1091180

SUM DYL1181360 SUM DYL1361999

Page 53: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–27

SUM DYL1OVR999 SUM TOT

T1

DYL1181360 + DYL1361999 + DYL1OVR999

T1+15 '06/15/92'

T1+118 DYLPAGE

T2 'DETAIL AGING REPORT' WITH 2 AFTER

2. Aging Analysis Advantage VISION:Results File Statistics Report.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ARFILE 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 5

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

3. Aging Analysis User-Designed Detail Report

The Aging Analysis User-Designed Detail Report appears as follows:

AUDIT DATE 06/15/92 PAGE 1

DETAIL AGING REPORT

ACCOUNT TRAN DAYS 1-30 31-90 91-180 181-360 361-999 OVER 999 TOTAL NUMBER DATE OLD DAYS DAYS DAYS DAYS DAYS DAYS AMOUNT

BO 10/24/97 83 .00 44.99 .00 .00 .00 .00 44.99

*ACCOUNT TOTAL .00 44.99 .00 .00 .00 .00 44.99

EO 12/12/97 34 .00 32.00 .00 .00 .00 .00 32.00

11/30/96 411 .00 .00 .00 .00 5.00 .00 5.00

09/02/97 135 .00 .00 15.00 .00 .00 .00 15.00

*ACCOUNT TOTAL .00 32.00 15.00 .00 5.00 .00 52.00

FO 12/05/97 41 .00 43.00 .00 .00 .00 .00 43.00

11/21/97 55 .00 45.24 .00 .00 .00 .00 45.24

.00 .00 .00 .00 .00 .00

11/04/97 72 .00 15.00 .00 .00 .00 .00 15.00

10/06/97 101 .00 .00 15.00 .00 .00 .00 15.00

08/26/97 142 .00 .00 3.80 .00 .00 .00 3.80

12/08/97 38 .00 178.70 .00 .00 .00 .00 178.70

Page 54: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–28 Reference Guide

*ACCOUNT TOTAL .00 281.94 18.80 .00 .00 .00 300.74

IO 11/11/97 65 .00 413.58 .00 .00 .00 .00 413.58

.00 .00 .00 .00 .00 .00

01/01/98 14 55.00 .00 .00 .00 .00 .00 55.00

11/21/97 55 .00 15.00 .00 .00 .00 .00 15.00

12/16/97 30 89.28 .00 .00 .00 .00 .00 89.28

12/15/97 31 .00 108.44 .00 .00 .00 .00 108.44

*ACCOUNT TOTAL 144.28 537.02 .00 .00 .00 .00 681.30

KO 09/06/97 131 .00 .00 32.02 .00 .00 .00 32.02

09/15/97 122 .00 .00 40.76 .00 .00 .00 40.76

09/19/97 118 .00 .00 848.71 .00 .00 .00 848.71

11/10/97 66 .00 24.24 .00 .00 .00 .00 24.24

11/15/97 61 .00 305.64 .00 .00 .00 .00 305.64

06/17/97 212 .00 .00 .00 1,702.42 .00 .00 1,702.42

10/06/97 101 .00 .00 34.24 .00 .00 .00 34.24

10/05/97 102 .00 .00 15.00 .00 .00 .00 15.00

11/01/97 75 .00 21.25 .00 .00 .00 .00 21.25

10/31/97 76 .00 80.24 .00 .00 .00 .00 80.24

10/26/97 81 .00 77.00 .00 .00 .00 .00 77.00

11/30/97 46 .00 25.00 .00 .00 .00 .00 25.00

11/30/97 46 .00 35.00 .00 .00 .00 .00 35.00

.00 .00 .00 .00 .00 .00

06/15/97 214 .00 .00 .00 224.00 .00 .00 224.00

06/15/97 214 .00 .00 .00 106.74 .00 .00 106.74

06/28/97 201 .00 .00 .00 20.44 .00 .00 20.44

12/13/97 33 .00 55.25 .00 .00 .00 .00 55.25

12/20/97 26 15.00 .00 .00 .00 .00 .00 15.00

08/31/97 137 .00 .00 50.62 .00 .00 .00 50.62

05/31/97 229 .00 .00 .00 22.40 .00 .00 22.40

11/19/97 57 .00 14.95 .00 .00 .00 .00 14.95

*ACCOUNT TOTAL 15.00 638.57 1,021.35 2,076.00 .00 .00 3,750.92

In this example, Little Santa Maria Hospital was able to design its own report. With a minimum of input from the user, Advantage VISION:Excel performed the aging analysis and produced the requested detail report.

Page 55: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–29

Example 3 The auditors of Little Santa Maria Hospital are interested in determining the cash flow of the accounts receivable file. They want a future aging analysis done on the file and the amount for each account totaled for four periods:

1–30 days

31–90 days

91–999 days

Over 999 days

Input for Example 3

The input file used in this example was also used in the two previous problems. The relevant fields in the file are shown in Example 1 Input. The required Aging Analysis Input statements are as follows:

FILE ARFILE INPUT FB 352 5280

BILLNGDATE 6 44 NU

BALANCE 5 170 PD 2

ACCTCODE 2 182

AGE 3 AGEDATE 033092 FUTURE

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY'

AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 90

GROUP3 91 999

AGING 3

The FILE and field definition statements are nearly identical with those in Example 1. However, there is one difference: the data names (field definitions) for the fields used inthe aging analysis are different, even though the location is the same.

The aging analysis statements differ from those in Example 1 in the following ways:

The aging date is March 30, 1992, entered in the MMDDYY (033092) format.

The FUTURE indicates future aging.

The additional procedure logic statements have been left out in this example.

Page 56: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–30 Reference Guide

Output for Example 3

The output received from Advantage VISION:Excel are as follows:

1. Aging Analysis Statement Listing Report

The Aging Analysis Statement Listing Report appears as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ARFILE INPUT FB 352 5280

BILLNGDATE 6 44 NU

BALANCE 5 170 PD 2

ACCTCODE 2 182

AGE 3 AGEDATE 033092 FUTURE

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY'

AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 90

GROUP3 91 999

AGING 3

2. Aging Analysis Advantage VISION:Results File Statistics

The Aging Analysis Advantage VISION:Results File Statistics appears as follows:

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ARFILE 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 1

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

3. Aging Analysis Summary Aged Report

The Aging Analysis Summary Aged Report appears as follows:

Page 57: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

Chapter 2: Aging Analysis and Reporting 2–31

AGING DATE 03/30/92 SUMMARY AGED REPORT PAGE 1

FOR AMOUNT LABELED BALANCE

FUTURE AGING

ACCOUNT NUMBER 1-30 31-90 91-999 OVER 999 TOTAL DAYS DAYS DAYS DAYS AMOUNT

BO .00 .00 .00 .00 .00

EO 32.00 .00 .00 .00 32.00

FO 221.70 .00 .00 .00 221.70

IO 197.72 55.00 .00 .00 252.72

KO 70.25 .00 .00 .00 70.25

LO .00 45.24 .00 .00 45.24

MA 617.73 26.20 .00 .00 643.93

MF .00 .00 .00 .00 .00

MI .00 .00 .00 .00 .00

MN .00 .00 .00 .00 .00

MO 15.00 .00 .00 .00 15.00

MR 43.00 .00 .00 .00 43.00

MT 36.96 .00 .00 .00 36.96

MU 46.59 176.00 .00 .00 222.59

NA 19.54 .00 .00 .00 19.54

PO .00 .00 .00 .00 .00

RO 65.00 .00 .00 .00 65.00

TO .00 79.60 .00 .00 79.60

VO .00 .00 .00 .00 .00

WE .00 .00 .00 .00 .00

WO 365.84 140.00 .00 .00 505.84

**GRAND TOTAL 1,731.33 522.04 .00 .00 2,253.37

Page 58: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Examples

2–32 Reference Guide

Aging Date Specified in a Field

The aging date can be specified in a field defined within the Advantage VISION: Results program.Within the Aging Parameter, the name of the field is specified in the Aging Date field. The content of the field must be a date in MMDDYY or MMDDYYYY format. Initialize the field before the AGING function is started. If the content of the field is changed during the running of the program, Advantage VISION:Excel ages from the date that is currently in that field.

Consider the program shown in the Aging Analysis Summary Aged Report as follows:

FILE SYSIN CARDS

INDATE 6 1

FILE ARFILE INPUT FB 352 5280 STATUS ENDFLAG

BILLNGDATE 6 44 NU

BALANCE 5 170 PD 2

ACCTCODE 2 182

WORKAREA

AGDATE 6 1

ON ONE

READ SYSIN

MOVE INDATE TO AGDATE

ENDONE

IF ENDFLAG EQ 'E'

STOP

ENDIF

AGE 1 AGEDATE AGDATE

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY' AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 1 30

GROUP2 31 91

GROUP3 91 999

AGING 1

ACCEPT

FIN

063092

Page 59: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

The LISTAG Command

Chapter 2: Aging Analysis and Reporting 2–33

The program demonstrates how, if the aging date is specified as the field AGDATE, the aging date can be read from a file (the Advantage VISION:Results program illustrates the use of this technique). First, the date is read into the INDATE field. The content of INDATE is moved to the AGDATE field before the Aging function is started. The date read in is 063092 in MMDDYY format.

The LISTAG Command The LISTAG command is used to submit the aging information to the Report Writer. Unlike the ACCEPT or REJECT command, the LISTAG command does not force Advantage VISION:Results to return to the top of its cycle. Instead, the LISTAG command has no effect on the cycle. Consequently, the LISTAG command is used to convey aging information to the Report Writer whenever the ACCEPT or REJECT command is not applicable within the framework of the logic.

In the following example, records are read from an accounts receivable file. Each record contains a multiple number of trailers, and each trailer contains a date and a balance. Each trailer is to be aged into 1–31, 32–61, and 62–92 categories, and a standard detail report is to be printed.

In the LISTAG command, within the logic of looping through the trailers within each record, neither the ACCEPT nor the REJECT command would suffice in passing the aging information to the Report Writer.

OPTION PRINTERROR

FILE SMGFILE VB 818 4936

OSMASTER41 818 1 ; A/R OBLIGATION SUMMARY

OSACCT_NO 13 1 NU ; ACCOUNT NUMBER

OSRECODE41 2 14 NU ; RECORD CODE 41

OSNO_TRLS 2 77 PD E ; NUMBER OF TRAILERS

OSTRANAREA 740 79 ; OCCURS 20 TIMES

REDEFINE AT OSTRANAREA ; TRAILER LENGTH = 37 BYTES

OSOBLGAMT 5 90 PD 2 E ; OBLIGATION OF AMOUNT

OSDUE_DATE 4 105 PD D ; DUE DATE

WORKAREA

CNT 2 PD

WK_AMT 5 PD 2

WK_DUE_DT 7 21

WK_DUE_DT2 6 22

WK_YY_MM 4 22

WK_DD 2 26

WKACCT_NO 15 31

AGE 1

Page 60: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Report in HTML Format

2–34 Reference Guide

AGEDATE 053197

DATEFIELD WK_DUE_DT2

DATEFORMAT 'YYMMDD'

PAST

AMOUNTFIELD WK_AMT

STDREPT SUMMARY

ACCTNO WKACCT_NO

GROUP1 1 31

GROUP2 32 61

GROUP3 62 92

IF OSRECODE41 NE 41 REJECT ENDIF

MOVE OSNO_TRLS TO CNT

MOVE 0 TO INW

LOOP1:

IF CNT LE 0 REJECT ENDIF

MOVE OSDUE_DATE(INW) TO WK_DUE_DT

MOVE OSOBLGAMT(INW) TO WK_AMT

EDIT OSACCT_NO INTO WKACCT_NO USING B

AGING 1

LISTAG

INW = INW + 37

CNT = CNT - 1

GOTO LOOP1

Aging Report in HTML Format The Advantage VISION:Excel HTML keyword provides the option to create an Aging analysis report in the HyperText Markup Language (HTML) format. This report can be viewed with a web browser or any other tool that can decode HTML.

To use the HTML function, you require the following additions to your standard Advantage VISION:Excel JCL.

Advantage VISION:Results HTML library, identified by DDname VRHTMLIB.

An HTML work file, identified by DDname VRHTMWRK.

The Aging HTML formatted report is written to a z/OS PDS or a HFS PATH name. A DDname pointing to the PDS or HFS PATH is required to identify this output dataset. The DDname chosen for the output dataset will also be the name coded on the HTML keyword as the required DDname identifier.

The DCB characteristics for your HTML output dataset will be supplied automatically.

Page 61: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Report in HTML Format

Chapter 2: Aging Analysis and Reporting 2–35

Note: For more information on the Advantage VISION:Results HTML Library and related requirements, see Advantage VISION:Results Reference Guide.

HTML Related Additions

This example shows the required HTML related additions to your standard Advantage VISION:Excel JCL.

//VRHTMLIB DD DSN=your.RESULTS.HTMLLIB,DISP=SHR

//VRHTMWRK DD UNIT=SYSDA,SPACE=(TRK,(10,5))

//HTMLOUT1 DD DSN=your.HTML.PDS,DISP=(,CATLG),

// UNIT=SYSDA,SPACE=(TRK,(5,2,5))

HTML Aging Report Example

This section describes an Aging example and shows its HTML output.

Aging Analysis Input Statements

Immediately following the HTML keyword is the identifier for the output dataset DDname. In this case the DDname is HTMLOUT1. Following the DDname parameter are a few optional parameters. HTMLTITL identifies the data name that contains the string that will appear as the title in the HTML document title bar. In this example the title data name is TITLEBAR. The next parameter, STYLE identifies the HTML style template in the Advantage VISION:Results HTML library. The default style template is 00. COUNT specifies the lines per segment in the created HTML document.

FILE ARFILE

COPY ARFIELDS

WORKAREA

TITLEBAR 20 CH VALUE 'AGE HTML EXAMPLE'

AGE 1 AGEDATE 1207

DATEFIELD BILLNGDATE

DATEFORMAT 'MMDDYY'

PAST

AMOUNTFIELD BALANCE

STDREPT SUMMARY

CTLBRK ACCTCODE

GROUP1 01 30

GROUP2 31 60

GROUP3 61 99

HTML HTMLOUT1

HTMLTITL TITLEBAR

STYLE 00

COUNT 0100

AGING 1

Page 62: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Report in HTML Format

2–36 Reference Guide

Aging Analysis HTML Output

The following is the HTML output as displayed in a web browser.

Page 63: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 3: Letter Writing 3–1

Chapter 3: Letter Writing

This chapter describes the Advantage VISION:Excel letter writing capabilities for standard impact and laser printers. Several examples using the letter writing function are presented in actual use.

Uses of the Letter Writing Function Advantage VISION:Excel produces documents that can contain variable information, such as the names and addresses of the various recipients. Some of the items you can generate include:

Form letters

Confirmation notices

Inquiries

Contract and lease agreements

Control lists

Summaries

Memoranda

Two-up letters

Address labels

The letter writing function is useful with systems such as accounts payable, accounts receivable, bank accounts, mortgages, securities, and contract administration.

Some of the features include:

Generation of letters in two-up format is supported.

The letters can be directed to specific letter files.

Each letter's print line can be routed through an exit subroutine.

Letters can be up to 260 characters in width.

ASA carriage control characters can be specified for additional print control.

The first line of a paragraph can be indented.

An entire paragraph can be indented.

Page 64: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Letter Writing

3–2 Reference Guide

Implementing Letter Writing This is a sample letter that you can produce using Advantage VISION:Excel and the statements required to generate it.

NOVEMBER 30, 1997

ERNESTO TORRES 23444 PARK LANE LOS ANGELES, CA

DEAR ERNESTO TORRES:

YOUR INTEREST IN VISITING OUR STATE IS AS IMPORTANT TO US AS IT IS TO YOU.

OPPORTUNITIES FOR TRAVEL AND TOURISM TO AND WITHIN AMERICA'S SUNSHINE STATE ARE GREAT BUT WE WANT THEM TO BE EVEN BETTER AND MORE AVAILABLE TO OUR VISITORS. INFORMATION ABOUT YOUR TRAVEL HELPS US TO PLAN AN EVEN MORE EXCITING STAY THE NEXT TIME YOU VISIT OUR STATE.

VERY TRULY YOURS,

FLORIDA STATE DEPARTMENT OF TOURISM

ENCLOSURES: TRAVEL BROCHURES

The Input statements required to generate the sample letter is as follows:

1 FILE ARFILE FB

2 LASTNAME 15 11

3 FIRSTNAME 10 26

4 ADD1 25 110

5 ADD2 25 135

6 LTH 10 75 WIDE

7 LTD @(ASIS)NOVEMBER 30, 1997

8 LTD @(SP3) @FIRSTNAME @LASTNAME

9 LTD @(ASIS) @ADD1

10 LTD @(ASIS)@ADD2

11 LTD @(SP3 NEWPARA) DEAR @FIRSTNAME @LASTNAME:

12 LTD @(SP2) YOUR INTEREST IN VISITING OUR

13 LTD STATE IS AS IMPORTANT TO US AS IT IS TO YOU.

14 LTD @(SP2 NEWPARA) OPPORTUNITIES FOR TRAVEL AND TOURISM TO

15 LTD AND WITHIN “AMERICA'S” SUNSHINE STATE ARE GREAT BUT

16 LTD WE WANT THEM TO BE EVEN BETTER AND MORE AVAILABLE

17 LTD TO OUR VISITORS. INFORMATION ABOUT YOUR TRAVEL HELPS

18 LTD US TO PLAN AN EVEN MORE EXCITING STAY THE NEXT TIME

19 LTD YOU VISIT OUR STATE.

20 LTD @(SP2) VERY TRULY YOURS,

21 LTD @(SP4) FLORIDA STATE DEPARTMENT OF TOURISM

22 LTD @(SP3) ENCLOSURES: TRAVEL BROCHURES

23 ENDLTD

Page 65: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Letter Writing

Chapter 3: Letter Writing 3–3

24 LETTER 10

The numbers on the left are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

The FILE and field definition statements must precede the statements defining your letter. Next is the LTH header (statement 6), where you assign a unique application number and define the letter width and length among other options. For a detailed explanation of various letter generation statements, see, Document Definition Statements. The letter body follows, each text line preceded by the keyword LTD. The keyword ENDLTD (statement 23) must immediately follow the last detail text line.

The command LETTER, followed by an application number that ties it to the LTH statement, actually starts the printing of your letters (statement 24). Although you can define a letter and specify all its detail text in your program, no letters are printed unless you include the LETTER command in your procedure logic.

The examples that follow show you how to generate various types of letters, including insertion of variable data, use of the from-To option, how to produce address labels, and how to use the laser option.

Document Definition Statements

Advantage VISION:Excel uses the following types of document definition statements:

LTH (header) — only one LTH header can be submitted per document. Here you can define the width and length of the letter.

LTD (detail) — the actual text of the document is coded in the detail statements. You also enter instruction codes that determine line spacing of the document and other editing features with this statement.

ENDLTH (end letter) — this statement marks the end of a unique letter; it must follow the last LTD detail statement and must precede the LTH header defining another unique letter.

Your FILE and field definition statements (defining all of the variable fields to be used in the letter) must precede your letter definition statements.

Page 66: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

3–4 Reference Guide

LTH Statements and Keywords Use the LTH header statement to specify the general layout of your letter as shown in the following example.

LTH nn [nnn WIDE] [nn LONG]

[NOEJECT] [LASERn]

[INDENT nnn] [DYLEXTxx nnnK [WRITEALL]]

[IDLENGTH nn] [DYLTRxx [BY yyy] {DISK xxxx|TAPE}SYSxxx]

[ASA] [TWOUP [xxx BETWEEN] [SWITCH] [LEFTSAVE nnnK]]

[OPTIMIZE | NOOPTIMIZE]

Note: The parameter DISK xxxx|TAPE}SYSxxx] applies to VSE only.

The LTH statement keywords are described in the following table.

Note: For any single application, the sum of the WIDE, INDENT, and IDLENGTH values must not exceed 132 characters (131 if LASERn is specified). If DYLEXTxx with WRITEALL is not used, the maximum is 260.

Keyword Description

LTH Required. Describes the application as letter writing and denotes this as a header statement. Always enter LTH as the first parameter on the header statement. Must be preceded by the FILE and field definition statements.

nn Required. A unique application number must be assigned to each letter generated in the same program. This number must be an integer with a value from 1 to 99.

nnn WIDE An integer value from 1 to 260. Specifies the number of characters per line (line width) in the printed letter. If omitted, this value defaults to 80.

If this value is greater than 132 (131 if LASERnn is specified), DYLTRxx and/or DYLEXTxx must be specified. If DYLEXTxx is specified but DYLTRxx is not specified and nnn is greater than 132 (or 131), the WRITEALL option must be specified.

nn LONG An integer value from 0 to 99. Specifies the number of lines per page requested for each letter. If zero, no line counter is maintained. 0 LONG plus the NOEJECT keyword are typically coded on the LTH statement when you want to produce address labels on continuous forms (gummed or Cheshire). If omitted, this value defaults to 56.

Page 67: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

Chapter 3: Letter Writing 3–5

Keyword Description

NOEJECT Overrides automatic page ejection at the beginning of each letter. This feature is useful when using preprinted forms with pre-posted numbers.

LASERn Sets an indicator to determine the maximum number (n) of character sets per letter. A maximum number of 4 can be coded. If, for example, a value of 4 is specified, Advantage VISION:Excel allows you to use four separate/unique character sets within your letter. If no value is specified, n defaults to 4.

INDENT nnn Specifies the number of spaces to indent the letter. If, for example, a value of 4 is specified following INDENT, every line of the entire letter is indented four spaces before printing. In this way, the print line is actually spaced over to the right, to better position your letter on the output page. A numeric value between 1 and 100.

DYLEXTxx The name of the subroutine that is loaded once and called each time a line is written to the output letter file (AUDPRINT/ SYS009 or DYLTRxx), where xx is alphanumeric (AA-ZZ, 00-99).

When the subroutine is called, Register 1 contains the address of a parameter list as follows:

Parameter 1 has the address of the print record.

Parameter 2 has the address of a work area defined as follows:

– One-byte flag (normally blank) — contains an E when this is the last time the EXIT is called.

– Three-byte packed decimal field — contains the record length of the print record.

Parameter 3 has the address of DYLPARM, which is a 38-byte character field that can be manipulated from Advantage VISION:Excel.

nnnk Specifies the size of the subroutine in K, for VSE only.

WRITEALL Specifies that the EXIT subroutine handles the writing of all the print records. No records are written to AUDPRINT/SYS009.

Page 68: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

3–6 Reference Guide

Keyword Description

IDLENGTH nn Contains the length of the identification field. If a value is specified, Advantage VISION:Excel automatically generates the reserved word DYLCNxxID, where xx is the unique application number specified following LTH. The length of DYLCNxxID is dependent upon the length specified after IDLENGTH.

A value of your choice can be moved to this reserved word to identify and sequence each letter. This value would be placed in the rightmost position of each record line. A 132-byte fixed length record is used. If an IDLENGTH of five were specified, the identification field value (DYLCNxxID) would be placed in positions 128 to 132 of each line. This feature is useful when you are generating many different letters or labels that are interspersed. A numeric value from 1 to 99.

DYLTRxx The ddname or DLBL name of the output letter file to which each output line of the letter is written, where xx is alphanumeric (AA-ZZ, 00-99). If this keyword is not specified, each line of the letter is written to AUDPRINT/SYS009; in this case, the length of the print line must not exceed 132 characters.

BY yyy This is the optional blocking factor for the output letter file defined by DYLTRxx. If not specified, a blocking factor of ten is assumed.

DISK xxxx VSE only. Required if DYLTRxx is used and the output letter file is to be written to disk. It specifies the type of disk for the output letter file. Valid entries for xxxx are 2311, 2314, 3330, 3340, 3350, 3375, 3380, and FBA.

TAPE VSE only. Required if DYLTRxx is used and the output letter file is to be written to tape. It specifies that the output letter file is to be written to tape.

SYSxxx VSE only. Required if DYLTRxx is used. The SYS number for the output letter file. Valid entries for xxx are 000-240.

ASA Specifies that ASA carriage control characters are to be used for the output letter file instead of the default (machine coded carriage control characters). This entry can only be used if the DYLTRxx keyword is used or when DYLEXTxx is used with the WRITEALL option. No ASA print records can be written to AUDPRINT/SYS009.

TWOUP Use this to specify two-up letters (letters are printed two to a page; the first letter on the left, the second on the right).

Page 69: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

Chapter 3: Letter Writing 3–7

Keyword Description

xxx BETWEEN If used, TWOUP must be specified. Specifies the number of bytes to leave between the leftside letter and the rightside letter. The length of the print line is twice the width of the letter, plus the number of bytes between the letters, plus the length of the ID field, plus the length of the indent field on the LTH statement.

Specify xxx so that the length of the print line does not exceed 260 (132 if AUDPRINT/SYS009 is used or 131 if LASERn is specified using AUDPRINT/SYS009). The default value for xxx is 5.

SWITCH If used, TWOUP must be specified. Produces a 1-byte field DYLCNxxSW, where xx is the application number. This field can be set by you to control when (based on the logic for the letter) and where (left side or right side of the page) the next letter command is executed.

If DYLCNxxSW is set to Y, the next letter command starts executing with reference to the other side (the left side if the current side was right or the right side if the current side was left) of the page. DYLCNxxSW is automatically reset to blank after each LETTER xx command is executed. If SWITCH is not used, the next letter command starts executing with reference to the other side of the letter, automatically, whenever a page eject occurs.

LEFTSAVE nnnK If used, TWOUP must be specified. Specifies the amount of memory in K, for holding the letter on the left side of the page.

Set nnnK to at least the width of the letter times the maximum number of lines before switching to the letter on the right side of the page. The default value for nnnK is 10K.

OPTIMIZE OPTIMIZE on the LTH statement causes Advantage VISION:Excel to attempt to write out as few lines as possible, yet achieve the requested printed letter. OPTIMIZE also causes space zero printing, @(SP0), to space zero lines and print the line.

For more information about OPTIMIZE, see Optimize and NOOPTIMIZE.

NOOPTIMIZE NOOPTIMIZE causes Advantage VISION:Excel not to try to optimize the letter writing process. NOOPTIMIZE is the default.

Page 70: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

3–8 Reference Guide

LTD Statements and Keywords

The actual text of your letter immediately follows your LTH header statement. Each line of your text must begin with the LTD keyword, except when you are continuing a fixed print position line, as shown in the LTD Input Statements.

LTD Input Statements

The following LTD input statements demonstrate the layout of the LTD text detail lines, edit commands, line spacing, and carriage control features available to you.

FILE PRODFILE FB 352 5280

NAME 25 85

ADD1 25 110

ADD2 25 135

ACCOUNT 7 4

EXPDATE 6 44

PRODTYPE 12 50

LTH 01 80 WIDE 50 LONG NOEJECT INDENT 4

LTD1 @30 GEORGE & CO.

LTD @26 17418 MAIN STREET

LTD @22 LOS ANGELES, CALIF. 91344

LTD @(SP3 ASIS)@NAME @53 @ACCOUNT(B)

LTD @(ASIS)@ADD1

LTD @(ASIS)@ADD2

LTD @(SP2 ASIS)DEAR CUSTOMER:

LTD2 @(SP2) THIS LETTER IS BEING SENT TO YOU TO ENABLE OUR CONTRACT

LTD ADMINISTRATION DEPT. TO CONFIRM THE CORRECTNESS OF OUR RECORDS.

LTD ON NOVEMBER 30, 1996 OUR RECORDS OF YOUR ACCOUNT #@ACCOUNT(Z)

LTD SHOWED YOU ARE CURRENTLY LEASING @PRODTYPE, AND THAT YOUR

LTD LEASE IS DUE TO EXPIRE ON @EXPDATE(D).

LTD3 @(SP2 NEWPARA) SINCE YOUR LEASE WILL EXPIRE BEFORE JULY 31, 1997,

LTD YOU MAY AVOID OUR ANTICIPATED 10% PRICE INCREASE FOR FISCAL YEAR

LTD 1997/98 BY RENEWING NOW FOR A TWO-YEAR PERIOD. TO EXTEND YOUR

LTD LEASE, SIMPLY SIGN BELOW AND RETURN THIS LETTER TO OUR OFFICES,

LTD4 @(SP2) @45 SINCERELY,

LTD @(SP4) @45 GEORGE & CO.

LTD @45 CONTRACT ADMINISTRATION

LTD @(SP6 ASIS)YES, PLEASE RENEW OUR LEASE FOR A TWO-YEAR PERIOD.

LTD @(SP4)@5 COMPANY NAME: _________________________________

LTD @(SP3)@5 BY: _________________________________

ENDLTD

LETTER 01

STOP

Page 71: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

Chapter 3: Letter Writing 3–9

Syntax of LTD Statement

LTDnn [@(NEWPARA [Lnn|Inn]) | @(ASIS)]

[@(SPn) | @(CHnn) | @(EJECT)]

[@nnn] [@(CSnn)]

[@dataname[(editcode[,printsize])]]

ENDLTD

The Keywords associated with the LTD are explained in the following table:

Note: The (SPn), (CHnn), and (EJECT) keywords are mutually exclusive. If you use more than one of them together, the last one coded is the option performed.

Keyword Description

LTDnn Describes the application as letter writing and denotes this as a detail text statement. Always enter LTD as the first command on all text lines, except when you want to continue a fixed print position line. For example:

LTD @10 LEASE START DATE @30 LEASE PAYMENT

@70 PRODUCT TYPE @85 CUSTOMER NO.

Page 72: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

3–10 Reference Guide

Keyword Description

@dataname All variable information to be inserted into your text must be prefixed with an @ (at) sign, followed by any valid data name.

If you want to edit the numeric variable information you are inserting (such as suppressing leading zeros and inserting commas), the data name must be immediately followed by an edit code, as shown in LTD Input Statements: @ACCOUNT(Z), @EXPDATE(D). For more information, See Valid Edit Codes.

The default edit format is P; leading zeros in numeric data are not automatically suppressed.

A print length can be specified for edited data names. For example, @ACCOUNT(Z,10) means that the data in the field ACCOUNT is printed in Z format within ten print positions and it is right-aligned in those ten positions. If necessary, high order digits are truncated. The length option cannot be used for non-numeric, non-edited fields. For more information about edited data names, see Example 4. Specifying a Print Length for Edited Data Names.

Do not use the print length specification in conjunction with edit code G, J, K, or L, because it can cause truncation of the leading minus sign and alignment problems.

You can also place a character in front of @dataname. For example, #@ACCOUNT. The character placed in front of @dataname immediately precedes your variable information with no intervening spaces (for example, #203345).

@(SPn) The line spacing keyword, enclosed within parentheses, must be preceded by the @ (at) sign. SP is followed by a numeric value from zero to nine; SP0 allows for zero line spacing and is used for boldface printing on impact printers.

Specifies to space “n” number of lines, up to a maximum of nine, before printing the line on which this keyword is specified. The code appearing in the Input Statements demonstrates double-spacing occurs before the line containing DEAR CUSTOMER: is printed.

If you want more line spacing than can be performed with the nine maximum allowed, you can code as many @(SPn) lines as necessary. For example:

LTD @(SP9)

LTD @(SP4)

Page 73: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

Chapter 3: Letter Writing 3–11

Keyword Description

The example above would generate 13 blank lines. The (SPn) keyword need not be followed by text.

Automatic editing is assumed for any text preceded by @(SP1) unless @(SP1 ASIS) is coded. @(NEWPARA) is assumed for any text preceded by @(SP2) through @(SP9), inclusive.

@(CHnn) Specifies channel control spacing. CH1–CH12 handle channels 1–12, respectively. @(CH1) causes page ejection and is identical to @(EJECT).

Use the COPY DYCHANEL statement when performing channel skipping with two-up processing. For more information, see Channel Skipping With Two-up Letter Processing. If the COPY DYCHANEL statement is missing, error message DYL-807E DATA NAME OF DY01CHANEL NOT DEFINED may occur.

@(EJECT) Specifies page ejection to occur prior to printing the current or next line. Identical to @(CH1).

@(CSn) Specifies the character set that is used for the text that follows this keyword. This allows you to change character sets within the same line of text. For example:

LTD @(CS1) DANGER @(CS2) @25 HIGH EXPLOSIVES @(CS1) DANGER

A number from 1 to 4 can be coded for “n”; it represents the character sets defined in your JCL. For more information, see Laser JCL (MVS).

If you use this command, you must use LASERnn in the LTH statement. Do not exceed the LTH LASERnn limit.

@(ASIS) Specifies that no editing (removal of unnecessary blanks) is to be done to the text that follows this keyword (that is, the text is to be left as is). This is useful, for example, if you want to print columns across your letter page. You can precede the text with the @(ASIS) keyword and leave spaces between the columnar material, as shown in the example below:

LTD @(ASIS) 1991 1996 1997

1991 would start in print position 1, because there are no spaces preceding it. Four spaces would follow 1991. 1996 and 1997 would print, also separated by four spaces. If the @(ASIS) were omitted here (that is, no edit command was specified for this text line), automatic text compression would be assumed: 1991 would start in print position 1, and 1996 and 1997 would follow, each separated by only one space.

Page 74: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

3–12 Reference Guide

Keyword Description

@nnn The @ (at) sign must precede the numeric value you specify when you want the text, following it to be printed in that assigned print location. In the code given in LTD Input Statements, 17418 MAINSTREET is printed starting in position 26. When an @nnn is placed in any line, which line automatically becomes an ASIS line. For example, you could specify the following:

LTD @5 1991 @15 1996 @25 1997

This example would print 1991 in position 5, 1996 in position 15, and 1997 in position 25.

If @nnn is immediately followed by @dataname, the firstnon-blank character in the data name prints in position nnn.

If you specify text to print at a location that causes your line width (characters per line WIDE) value to be exceeded, the system generates an error message.

@(NEWPARA

[Lnn | Inn])

@(NEWPARA) specifies a new paragraph, so the preceding text line is left unfilled if it contains fewer characters than the number WIDE specified in your header statement.

Double-spacing does not automatically occur before printing the new paragraph; you must specify, for example, @(SP2 NEWPARA) if you want a blank line before the first line of the new paragraph. All text on the statement line following @(NEWPARA) is compressed (that is, automatic word wrap-around and removal of extraneous blanks occurs).

The ASIS and NEWPARA keywords are mutually exclusive. IF they are used together, the last keyword coded is the option performed.

Lnn specifies that a paragraph starts with the first word of the paragraph indented “nn” spaces. Inn specifies that all the lines in the paragraph are indented “nn” spaces. “nn” cannot exceed 20.

ENDLTD Enter ENDLTD as the final command after the last detail text line (LTD statement). It must precede an LTH header defining another unique letter. The system generates an error message if you do not include this statement.

Page 75: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

LTH Statements and Keywords

Chapter 3: Letter Writing 3–13

Additional LTD Statement Information

Adhere to the following additional guidelines when entering LTD statements in Advantage VISION:Excel:

If you do not specify @(SPn), @(CHnn), or @(EJECT) on a detail text line (LTD statement), Advantage VISION:Excel defaults to single-spacing. If you do not specify @(ASIS) or @nnn on a detail text line, Advantage VISION:Excel defaults to automatic text compression. All words are separated by exactly one blank, and as many words as will fit into the maximum line width (the WIDE value specified in your LTH statement) are placed into the printed line.

Never break or hyphenate words at the end of your LTD statements. If you do so, Advantage VISION:Excel reads each of the two word parts as a full word and prints the two parts separated by a single space. Advantage VISION:Excel does not perform word hyphenation.

You can specify more than one text edit option keyword following your LTD command. They can be in any order, but they must be coded together within one set of parentheses (except @nnn, which should not be enclosed in parentheses) and separated by at least one space. For example:

– Valid: @(SP2 NEWPARA)

– Invalid: @(SP2) (NEWPARA)

Unless you precede your text with an @nnn, all text begins in position 1 of the print line.

If you want text to be enclosed in double quotation marks in your letter, you must enclose that text in single quotation marks (in addition to the double quotation marks) on the LTD statement. For example, LTD '"Restaurants of Southern California”' prints “Restaurants of Southern California” in your letters.

Conversely, if you want text to be enclosed in single quotation marks in your letter, you must enclose that text in double quotation marks (in addition to the single quotation marks) on the LTD statement. For example: LTD “'Restaurants of Southern California'” prints 'Restaurants of Southern California' in your letters.

All edit, line spacing, and carriage control keywords must be specified at the beginning of your text line, with the exception of the @nnn and variable information (@ followed by a data name), both of which can be coded anywhere.

To use the @ sign or any character string that also is a command (LTH, LTD, ENDLTD) or keyword within the letter body, enclose them within either single or double quotation marks (for example, 'LTD' or “LTD”).

Page 76: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

3–14 Reference Guide

Program FILE and field definition statements must be specified before letter definition statements.

In program procedure logic, the LETTER nn command starts the printing of letters. If you omit this invoking command, no letters print, even though one is fully defined. For more information, see LETTER Command.

Valid Edit Codes The valid edit codes and their values are as follows:

Edit

Code

Description Examples Prints As

E Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Blank if zero.

001234.56

000000.00

1,234.56

(blank)

Y Leading -. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the number. Blank if zero.

-00123456

000000.00

-1,234.56

(blank)

F Leading $. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Float a currency sign to the left of the field. Blank if zero.

-00123456

000000.00

$ 1,234.56

(blank)

G Leading -$. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Float a currency sign to the direct left of the field. Blank if zero.

00123456

000000.00

-$1,234.56

(blank)

Page 77: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

Chapter 3: Letter Writing 3–15

Edit

Code

Description Examples Prints As

K Leading $-. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the direct left of the field. Float a currency sign to the left of the negative sign. Blank if zero.

00123456

00000000

$-1,234.56

(blank)

A Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Print decimal point and zeros to the right of decimal. If field has no decimal positions and has a zero value, nothing prints.

001234.56

000000.00

00000000000

1,234.56.00

(blank)

X Leading -. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Print decimal point and zeros to the right of decimal. If field has no decimal positions and has a zero value, nothing prints.

001234.56

001234.56

0000000.00

00000000000

1,234.56

-1,234.56

.00

(blank)

H Leading $. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Float a currency sign (the default is $) to the left of the most significant digit. Blank if zero.

001234.56

-001234.56

0000000.00

00000000000

$1,234.56

$1,234.56-

.00

(blank)

J Leading -$. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Float a currency sign to the direct left of the field. Blank if zero.

001234.56

001234.56

0000000.00

00000000000

$1,234.56

-$1,234.56

.00

(blank)

Page 78: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

3–16 Reference Guide

Edit

Code

Description Examples Prints As

L Leading $. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, commas, decimal insertion, and negative sign to the direct left of the field. Float a currency sign to the left of the negative sign. Blank if zero.

001234.56

001234.56

0000000.00

00000000000

$1,234.56

$-1,234.56

.00

(blank)

Z Edit with zero suppression, decimal insertion, negative sign to the right of the field, but no commas. Blank if zero.

001234.56

000000.00

1234.56

(blank)

U Leading -. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, decimal insertion, negative sign to the left of the field, but no commas. Blank if zero.

00123456

00123456

000000.00

1234.56

-1234.56

(blank)

B Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Blank if zero. If zero value, print decimal point and zeros to the right of the decimal. If field has no decimal positions and has a zero value, nothing prints.

001234.56

000000.00

1,234.56

(blank)

Q Leading -. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with zero suppression, decimal insertion, negative sign to the left of the field, but no commas. Blank if zero. If zero value, print decimal point and zeros to the right of decimal. If field has no decimal positions and has a zero value, nothing prints.

001234.56

001234.56

000000.00

000000000

1234.56

-1234.56

.00

(blank)

P Default edit code. Edit with decimal insertion, negative sign to the right of the field, but no commas. If the field has no decimal positions and has a zero value, zeros print.

001234.56

0000000.00

000000000

001234.56

0000000.00

000000000

Page 79: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

Chapter 3: Letter Writing 3–17

Edit

Code

Description Examples Prints As

W Leading -. For use in data name definitions, LIST, LTD, and EDIT statements. Edit with decimal insertion, negative sign to the left of the field, but no commas. If the field has no decimal positions and has a zero value, zeros print.

-001234.56

0000000.00

000000000

-001234.56

0000000.00

000000000

D Date edit of a 6-byte zoned decimal or 4-byte packed field.

011596 01/15/1996

V For use in data name definitions, LIST, LTD, and EDIT statements. Edit a date field containing a 4-digit year.

01151997 01/15/1997

S Edit a social security number from a 9-byte numeric or 5-byte packed field.

9999999999 999-99-9999

The following example illustrates the use of five edit codes. Assume that the field balance stored on the input file was 0002965370. Note the format of the printed balance for each edit code in the following table.

Edit Code Printed Result

E 29,653.70

A 29,653.70

Z 29653.70

B 29653.70

P 00029653.70

Page 80: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

3–18 Reference Guide

LETTER Command

The LETTER command, followed by the application number, starts the Advantage VISION:Excel letter writing function in your procedure logic. The unique application number ties this command to your LTH header statement and uses the criteria specified in that statement (such as page width and length) to format your letter.

VISION:RESULTS FILE statement

and field definition statements

.

.

LTH 01 75 WIDE 66 LONG

LTD

. (Body of letter)

.

ENDLTD

LETTER 01

This LTH statement specifies a letter length of 66 lines and width of 75 characters. No IDLENGTH or INDENT has been specified; it defaults to a page eject before each letter.

The LETTER command starts the printing of these letters. Without this invoking command, no letters are printed, even though a letter has been fully defined in your program.

The LETTER command and application number can be followed by From-To line numbers to print a range of letter lines. For a description of this option, see the sections Letter Writing Examples, and Printing a Range of Letter Lines.

Laser JCL (MVS)

When using the laser option, an additional JCL DD statement is required. The following is an explanation of the DD parameters:

//AUDPRINT DD SYSOUT=(1,,DYL1),FCB=DYL1,

// CHARS=(GP12,SB12),BURST=N,

// DCB=(BLKSIZE=80,RECFM=FA,OPTCD=J)

The ddname AUDPRINT is required and must be coded this way.

Page 81: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

Chapter 3: Letter Writing 3–19

The DD parameters are described in the following table:

DD Parameter Description

SYSOUT=(class,program,form) The SYSOUT= parameter routes the print to the system output device. This is determined by installation standards.

Class — output class

Program — name of the program in SYS1.LINKLIB

Form — request to the operator to mount special forms

FCB=image-id The FCB parameter specifies the forms control image for printers and controls the movement of forms on a printer.

CHARS=(table, ..., table) Specifies which character sets are available in this run. When multiple character sets are specified, the OPTCD=J parameter must be coded.

BURST=Y or N This parameter specifies whether the output will be burst into separate sheets (Y) or be printed in a continuous fanfold mode (N).

DCB=(..., OPTCD=J) When multiple character sets are specified, this parameter specifies the byte that selects the table used to print a line.

Letter Writing Considerations If the letter is using a data name in the buffer area of a VSAM file and the

letter command is started after the end of file, the job aborts with a system 731 ABEND message. To avoid this condition, move either the fields or the entire record in the buffer to a work area. The data names used are defined by your work area, not your buffer area.

Nothing can follow the keyword ENDLTD — this command must stand alone on the statement line.

If From and To are used with the LETTER invoking command and there are no corresponding lines in the letter definition to match this range, no letter is generated.

Page 82: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

3–20 Reference Guide

If data within a variable extends beyond a line's width in an @(ASIS) line, the variable data is continued on the next line of print, forcing an extra line into the letter.

Literals (including phrases enclosed within quotation marks) and data names cannot be continued onto a second line.

If any letter keywords or commands are included in the text of a letter, they must be enclosed in single or double quotation marks.

The @ sign cannot be used as a constant in the text of a letter. If @ is required in your print line, it must be contained in a field, and the data name of the field must be referenced in your letter text.

If an apostrophe is used in a string, that string must be in quotation marks. For example:

– Specify: IS THIS MY “BROTHER'S” SHOE?

To produce the output: IS THIS MY BROTHER'S SHOE?

– Specify: “'IS THIS MY BROTHER'S SHOE?'”

To produce the output: 'IS THIS MY BROTHER'S SHOE?'

If a packed decimal field is printed without zero suppression and it is zero in value, it is printed with the first position blank. This blank position is the significant start character in the edit mask.

If an LTD statement has a quotation-marked data string and there are commas in the statement, the comma is placed inside the outer quotation marks. For example:

THE FOUR BOOKS “'EXODUS',” “'MILA-18',” “'TRINITY'” AND “'QB-VII'.”

not: THE FOUR BOOKS “'EXODUS'”, “'MILA-18'”, “'TRINITY'” AND “'QB-VII'.”

If you are using @nnn to specify exact positioning of your text, any blanks between the @nnn and the first non-blank character are ignored. In the example:

LTD @10 1991 1996 @27 1997

1991 starts in position 10, and 1997 starts in position 27 — the spaces between @10 and 1991, and @27 and 1997, are dropped. However, all other extraneous blanks in the line (for example, between 1991 and 1996) are not removed.

If you specify @(ASIS) on your LTD statement, blanks following @(ASIS) and the first non-blank character are not removed. In the example:

LTD @(ASIS) 1991 1996

1991 and 1996 are preceded by five blanks.

Letters cannot be copied into a Advantage VISION:Excel program using the COPY, COPYP, COPYL, or COPYC command.

Page 83: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

Chapter 3: Letter Writing 3–21

Channel Skipping with Two-up Letter Processing

When you want channel skipping with two-up letter processing, you should specify the physical location of channels on the printed page to Advantage VISION:Excel. The COPY member DYCHANEL has been provided to help with the channel specification. Specify the application number and the line number, relative to the top of the page, associated with each channel.

The format of the DYCHANEL COPY statement is as follows, where #N= is the application number of the associated letter (00 to 99) and #1= through #C= are the line numbers for channels 1–12, respectively:

COPY DYCHANEL #N= #1= #2= #3= #4= #5= #6= #7=

#8= #9= #A= #B= #C=

Only the channels that are used need be specified. Make the line numbers progressively larger as the channels increase. For example, the line number for channel 6 must be greater than the line number for channel 5. If channel 1 is not specified, it defaults to 1, the first line on the page.

The COPY DYCHANEL statement is coded before the LTH statement for the associated letter. For example, if you wanted to use channel skips 2, 4, and 7 in a two-up letter where channel 2 is line 5, channel 4 is line 15, and channel 7 is line 32 on the page, you would code:

COPY DYCHANEL #N=01 #2=5 #4=15 #7=32

LTH 1 TWOUP

LTD @(CH2) @1 THIS IS THE FIRST LINE.

LTD @(CH4) @1 THIS IS THE SECOND LINE.

LTD @(CH7) @1 THIS IS THE THIRD LINE.

ENDLTD

Optimize and Nooptimize

Placing the keyword OPTIMIZE on the LTH statement causes Advantage VISION:Excel to attempt to write as few lines as possible, yet achieve the requested printed letter. NOOPTIMIZE causes Advantage VISION:Excel not to try to optimize the letter writing process. NOOPTIMIZE is the default.

When channel skipping is performed with OPTIMIZE, the line numbers of the channels to be used must be specified using the COPY DYCHANEL statement. For a description of this procedure, see Channel Skipping with Two-up Letter Processing. Advantage VISION:Excel channel skips when this results in fewer lines being generated. DYCHANEL is only activated if the letter detail contains at least one @(CHnn) command.

Page 84: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Valid Edit Codes

3–22 Reference Guide

OPTIMIZE also causes space zero printing to work differently. Normally, @(SP0) meansprint the line and space zero lines; while @(SPn) (where n is greater than zero) means space n lines and print the line. The OPTIMIZE keyword makes @(SP0) consistent with@(SPn); the spacing operation becomes, in all cases, space before and write the print line.

The following example demonstrates the effect of not using OPTIMIZE:

COPY DYCHANEL #N=01 #1=1 #3=4 #4=10 #7=20 #8=40

LTH 1 ASA DYLTRAB

LTD @(EJECT) @1 THIS IS LINE 1 - CHANNEL 1.

LTD @(SP3) @1 THIS IS LINE 4 - CHANNEL 3.

LTD @(SP7) @1 THIS IS LINE 11.

LTD @(CH8) @1 THIS IS LINE 40 - CHANNEL 8.

ENDLTD

This code generates the following nine lines for each letter:

1THIS IS LINE 1 — CHANNEL 1.

0THIS IS LINE 4 — CHANNEL 3.

-

-THIS IS LINE 11.

8THIS IS LINE 40 — CHANNEL 8.

Line number

1

2

3

4

5

6

7

8

9

The following example demonstrates the effect of using the keyword OPTIMIZE on the LTH statement:

LTH 1 ASA DYLTRAB OPTIMIZE

This code generates the following five lines for each letter:

Page 85: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing Examples

Chapter 3: Letter Writing 3–23

1THIS IS LINE 1 — CHANNEL 1.

-THIS IS LINE 4 — CHANNEL 3.

4

THIS IS LINE 11.

8THIS IS LINE 40 — CHANNEL 8.

Line number

1

2

3

4

5

Note: The first position of each line is the ASA carriage control character.

You can observe that without specifying OPTIMIZE, nine lines per letter are generated; while with OPTIMIZE, only five lines per letter are generated. The printed letter is identical in either case, assuming that channel 4 is line 10 of the page.

Letter Writing Examples This section explains how to generate various types of letters with the help of suitable examples. The examples are as follows:

1. Specifying a letter

2. Selecting records and generating reports

3. Generating address labels

4. Specifying a print length for edited data names

5. Printing a range of letter lines

6. Printing using the laser option

7. Generating two-up letters using the defaults

8. Generating two-up letters using DYLCNxxSW

9. Writing letters to an output file

Page 86: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 1: Specifying a Letter

3–24 Reference Guide

Example 1: Specifying a Letter George and Company, a wholesale distributor, wants to send a letter to each of its customers announcing a price increase on merchandise. The company's input file, stored on tape, contains numerous records, one for each account. The fields defined in the following table illustrate some of the information stored concerning each customer. The information on this tape provides the variable data needed for insertion in each letter.

File characteristics: format = blocked, record size = 352, block size = 5280

Field Size

Field Position

Description Data Type

Decimal Data Name Used

7 4 ACCOUNT NUMBER NU ACCTNO

6 44 BILLING DATE CH BILLNGDATE

25 85 ACCOUNT NAME CH NAME

25 110 STREET ADDRESS CH ADD1

25 135 CITY,STATE,ZIP CH ADD2

5 170 BALANCE AMOUNT PD 2 BALANCE

2 182 ACCOUNT CODE CH

ACCTCODE

Note: Key: NU = numeric, CH = character, PD = packed decimal

Page 87: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 1: Specifying a Letter

Chapter 3: Letter Writing 3–25

Input for Example 1

The following code shows the letter writing statements and Advantage VISION:Excel program required to generate the letter described above.

1 FILE ARIEL INPUT FBA 352 5280

2 NAME 25 85

3 ADD1 25 110

4 ADD2 25 135

5 ACTON 7 4 NO

6 LTH 01 60 WIDE 30 LONG

7 LTD @20 GEORGE & CO.

8 LTD @20 16255 VENTURA BLVD.

9 LTD @20 ENCINO, CALIFORNIA

10 LTD @(SP2) @42 @DYLDATE

11 LTD @(SP2 ASIS)@NAME

12 LTD @(ASIS)@ADD1

13 LTD @(ASIS)@ADD2

14 LTD @(SP2 ASIS)DEAR CUSTOMER:

15 LTD @(SP2) ON DECEMBER 6, 1997, OUR PRICES MUST BE RAISED 15% ON

16 LTD STEREO EQUIPMENT, TAPE DECKS AND OTHER ITEMS. WE URGE YOU

17 LTD TO PLACE HOLIDAY SEASON ORDERS NOW TO AVOID THESE INCREASES.

18 LTD @(SP2) @42 YOURS TRULY,

19 LTD @(SP4) @42 SALES MANAGER.

20 ENDLTD

21 LETTER 01

The numbers at the left of these statements are used to discuss the various features of the letter and how they are invoked.

Statement 1 is the FILE statement that defines the input file, ARFILE, containing the variable information to insert in each letter.

Statements 2–5 are the field definition statements, where data names are assigned to the fields that contain the variable information needed in the letters.

In statement 6, the LTH header, a 60-character line width and 30-line page length is specified. Advantage VISION:Excel defaults to a page eject at the beginning of each letter. No INDENT or IDLENGTH values have been specified.

LTD statements 7–9 specify that the company name, street address, and city/state are to be printed starting in position 20. No line spacing has been specified, so these three lines are single-spaced.

Following the company name and address, LTD statement 10 specifies that double-spacing is to occur; the current date is printed at position 42. The prefix @ precedes the reserved word, DYLDATE, the current date.

Page 88: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 1: Specifying a Letter

3–26 Reference Guide

LTD statement 11 specifies that double-spacing is to occur after the current date, and the variable information contained in the field NAME is printed, starting at line position 1. On the next two lines, the variable information in the fields ADD1 and ADD2 is printed, each beginning at position 1. @(ASIS) is specified on each of the address lines so that text compression does not occur. If @(ASIS) were omitted here, ADD2 would follow ADD1 on the same line.

After double-spacing, the letter salutation DEAR CUSTOMER: (LTD statement 14) is printed. Statements 15–17 contain the body of the letter. Note that statements 16 and 17 contain no edit options; therefore, automatic text compression of the letter body occurs. The text wraps around within the 60-character print line specified in the header. The ENDLTD command terminates the letter statements.

Statement 21 is the procedure logic. The command LETTER 01 means that processing of a letter is to take place on each record in the input file. After processing, each letter is to be printed. The 01 application number that appears in the header statement and the LETTER command links these statements together. If two unique letters were coded in this program (the second defined by the application number 02), the LETTER 01 command, would start processing for letter 01 only. If the LETTER command is not present, printing of letters is never invoked.

Output for Example 1

One of the letters generated by this program is as follows:

GEORGE & CO. 16255 VENTURA BLVD ENCINO, CALIFORNIA

11/02/97

ANDREWS, CHARLES 1310 LOMA DR. CAMBRIA PINES, CA

DEAR CUSTOMER:

ON DECEMBER 6, 1997, OUR PRICES MUST BE RAISED 15% ON STEREO EQUIPMENT, TAPE DECKS, AND OTHER ITEMS. WE URGE YOU TO PLACE HOLIDAY SEASON ORDERS NOW TO AVOID THESE INCREASES.

YOURS TRULY, SALES MANAGER.

Page 89: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 2: Selecting Records and Generating Reports

Chapter 3: Letter Writing 3–27

Example 2: Selecting Records and Generating Reports George and Company's marketing department has prepared a catalog of special items that they want to make available to their best customers. These customers all have an account code of MO on the accounts receivable file. The marketing manager wants a cover letter sent to all MO accounts, offering the catalog and a copy of the “Restaurants of Southern California” guide to all who respond by August fifteenth.

This example differs from the Example 1 Specifying a Letter in that record selection is being performed using procedure logic, so that only MO accounts receive letters, rather than all accounts on the file. In addition, a report is generated, listing accounts eligible to receive the special catalog.

Page 90: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 2: Selecting Records and Generating Reports

3–28 Reference Guide

Input for Example 2

The required letter writing statements and Advantage VISION:Excel program are as follows:

1 COPY DYAUDREC

2 LTH 01 66 WIDE

3 LTD @23 GEORGE & CO.

4 LTD @23 16255 VENTURA BLVD.

5 LTD @23 ENCINO, CALIFORNIA

6 LTD @(SP2) @50 @DYLDATE

7 LTD @(SP2)@NAME @50 @ACCTNO

8 LTD @(ASIS)@ADD1

9 LTD @(ASIS)@ADD2

10 LTD @(SP2 ASIS)DEAR CUSTOMER:

11 LTD @(SP2) AS A VALUED CUSTOMER, YOU CAN RECEIVE OUR SPECIAL PURCHASE

12 LTD CATALOG IF YOU RESPOND BY AUGUST 15. JUST RETURN THE FORM BELOW

13 LTD AND THE CATALOG WILL BE ON ITS WAY, TOGETHER WITH A FREE COPY OF

14 LTD '"RESTAURANTS OF SOUTHERN CALIFORNIA."'

15 LTD @(SP2) @50 SINCERELY,

16 LTD @(SP4) @50 GEORGE & CO.

17 LTD @(SP2) @23 --------------------

18 LTD @(SP2 ASIS)PLEASE SEND MY CATALOG AND BONUS GIFT TO:

19 LTD @(SP2 ASIS)NAME: _______________________________________________

20 LTD @(SP2 ASIS)ADDRESS: ____________________________________________

21 LTD @(SP2 ASIS)CITY: _______________________STATE:_______ZIP:_______

22 ENDLTD

23 IF ACCTCODE EQ 'MO'

24 LETTER 01

25 LIST ACCTNO (ACCOUNT'NUMBER) NAME ADD1 (STREET) ADD2 (CITY'STATE)

26 BALANCE

27 ELSE REJECT ENDIF

28 ON FINAL

29 LIST SUM BALANCE WITH 2 BEFORE

30 T1 'CUSTOMERS ELIGIBLE FOR SPECIAL CATALOG' WITH 2 AFTER

The numbers at the left are for reference purposes only.

In statements 18–21, note the use of the edit options @(SP2 ASIS), indicating to double-space between each of these lines and to omit automatic text compression.

The IF statement coded at lines 23–27 selects only those accounts with the MO code to receive the letter. The printing of the letters is started by the LETTER 01 command, statement 24. The LIST statement (statement 25) generates a report of all accounts receiving the letter.

Page 91: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 2: Selecting Records and Generating Reports

Chapter 3: Letter Writing 3–29

Output for Example 2

The following letter is one of the letters generated by the Advantage VISION:Excel Program. This letter is followed by the report of customers eligible for the special catalog.

GEORGE & CO. 16255 VENTURA BLVD. ENCINO, CALIFORNIA

08/01/97

MORENO, ELIZABETH 6039804 208 1/2 INEZ ST NORWALK CA 90605

DEAR CUSTOMER:

AS A VALUED CUSTOMER, YOU CAN RECEIVE OUR SPECIAL PURCHASE CATALOG IF YOU RESPOND BY AUGUST 15. JUST RETURN THE FORM BELOW AND THE CATALOG WILL BE ON ITS WAY, TOGETHER WITH A FREE COPY OF “RESTAURANTS OF SOUTHERN CALIFORNIA”.

SINCERELY,

GEORGE & CO.

---------------------

PLEASE SEND MY CATALOG AND BONUS GIFT TO:

NAME:__________________________________________________________________

ADDRESS:_______________________________________________________________

CITY:______________________ STATE:____________________ ZIP:____________

CUSTOMERS ELIGIBLE FOR SPECIAL CATALOG

ACCOUNT

NUMBER NAME STREET CITY BALANCE STATE

6039804 MORENO,ELIZABETH 208 1/2 INEZ ST NORWALK CA 90605 .00

6007724 HARRINGTON,RUTH 222 MAPLE AVEL LOS ANGELES 37.60

6017479 BERSON,ANNA 4159 FANCHO AVE SP9 LOS ANGELES CA 3.00

6012132 ZENZOLA,MICHAEL 9729 MOTOR AVE BELLFLOWER CA 90706 30.20

2002922 FLOWERS,ETHEL 4420 ARKANSAS LOS ANGELES CA 90048 2,541.70

6204384 FREDRICK,EMERY 573 VAN HORNE AVE LOS ANGELES CA 15.00

6001327 CARLON,MR MARIANO 3417 CEDAR LOS ANGELES CA 118.00

8002053 JENNINGS,WILL 9560 N HAYWORTH 210 LOS ANGELES CA 56.35

2,801.84

Page 92: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 3: Generating Address Labels

3–30 Reference Guide

Example 3: Generating Address Labels George and Company's sales department has some special literature on upcoming merchandise. They want address labels generated for all records on the accounts receivable file and plan to use these labels for their mailing.

Input for Example 3

The following letter writing and Advantage VISION:Excel program statements are needed to generate the address labels.

1 FILE ARFILE INPUT FB 352 5280

2 NAME 25 85 CH ADD1 25 110 CH

3 ADD2 25 135 CH NAMEADDR 75 85

4 WORKAREA

5 NAMEADDR1 75 VALUE ' ' REINIT NAME1 25 1 ADD1A 25 26 ADD1B 25 51

6 NAMEADDR2 75 VALUE ' ' REINIT NAME2 25 76 ADD2A 25 101 ADD2B 25 126

7 NAMEADDR3 75 VALUE ' ' REINIT NAME3 25 151 ADD3A 25 176 ADD3B 25 201

8 FLAG 1

9 LTH 01 100 WIDE 0 LONG NOEJECT

10 LTD @1 @NAME1 @29 @NAME2 @57 @NAME3

11 LTD @1 @ADD1A @29 @ADD2A @57 @ADD3A

12 LTD @1 @ADD1B @29 @ADD2B @57 @ADD3B

13 LTD @(SP1)

14 ENDLTD

15 RD1:

16 READ ARFILE

17 FLAG = 1

18 MOVE NAMEADDR TO NAMEADDR1

19 RD2:

20 READ ARFILE

21 MOVE NAMEADDR TO NAMEADDR2

22 RD3:

23 READ ARFILE

24 FLAG = 0

25 MOVE NAMEADDR TO NAMEADDR3

26 LETTER 01

27 ACCEPT

28 ON END OF INPUT

29 IF FLAG NE 0

30 LETTER 01

31 ENDIF

32 STOP

The numbers at the left are for reference purposes only.

Page 93: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 3: Generating Address Labels

Chapter 3: Letter Writing 3–31

Statement 1 is the FILE statement that identifies the input file to be used and defines its attributes.

Statements 2 and 3 are field definitions (data names) of the name and address fields in the input file.

Statements 4–8 are field definitions of WORKAREAs used by the program during processing.

Statements 9–14 are the letter writing statements required to generate three-up labels for all records on the accounts receivable file. In the LTH statement, the lines-per-page has been set to zero, and the NOEJECT keyword is coded so that the default page eject at 56 lines is not taken. (Continuous forms such as labels generally use 0 LONG.)

Statements 15–32 make up the procedure logic. Statements 15–27 read three records and move the address information for each record to the WORKAREA (NAMEADDR1, NAMEADDR2, NAMEADDR3). When invoked, the LETTER 01 command (statement 26) generates three-up labels, each consisting of three lines (the name and two address lines). A flag is set to “1” when the information to be printed in the leftmost label is read; a flag is set to “0” when the information to be printed in the rightmost label is read.

ON END OF INPUT logic is coded in statements 28–32. The LETTER 01 command is invoked if the FLAG does not equal to "0". This ensures that every record on the file has an address label printed for it. Without this logic, printing of the last one or two labels would be skipped if the total number of records on the file was not divisible by three. Program processing is terminated.

Output for Example 3

The following report shows three address labels produced by this letter writing program.

TORRES,ERNESTO CHO PYUNG,SUH S.F.MEM.HOSP.

23444 PARK LANE 33333 PALL MALL 6789 OLD MAN RD

LOS ANGELES CA GLENDALE CA 91206 L.A. CA 90023

Page 94: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 4: Specifying a Print Length for Edited Data Names

3–32 Reference Guide

Example 4: Specifying a Print Length for Edited Data Names The section LTD Statements and Keywords in this chapter describes how to specify a print length for edited data names, such as @AMOUNT(E,10), where the contents of the field AMOUNT are printed in E format, right-aligned, and within ten print positions. The print size is especially useful when printing numeric data in columns.

Input for Example 4

For example, the program shown below demonstrates the printing of different size numeric fields in a column. Note that in statements 25–29, each numeric field is to begin printing in position 45. By specifying the same print length (14) for each data name, the decimals align when the five fields are printed. The result of this program is shown following the program code.

Page 95: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 4: Specifying a Print Length for Edited Data Names

Chapter 3: Letter Writing 3–33

1 FILE ARFILE INPUT FB 352 5280

2 ACCTNO 7 4 ; ACCOUNT NUMBER

3 NAME 25 85

4 ADD1 25 110 ; STREET

5 ADD2 25 135 ; STATE ZIP

6 INSTLBAL 6 191 PD 2 A ; INSTALLMENT BALANCE

7 INSTPAY 5 197 PD 2 A ; INSTALLMENT PAYMENT

8 BALPART 4 202 PD 2 A ; BALANCE PARTIAL PAYMENT

9 INTPART 3 206 PD 2 A ; INTEREST PARTIAL PAYMENT

10 NUMPY 2 209 PD A ; NUMBER PAYMENT

11 LTH 01 66 WIDE

12 LTD @(SP2)

13 LTD @23 GEORGE & CO.

14 LTD @23 16255 VENTURA BLVD.

15 LTD @23 ENCINO, CALIFORNIA

16 LTD @(SP2) @50 @DYLDATE

17 LTD @(SP2)@NAME @50 @ACCTNO

18 LTD @(ASIS)@ADD1

19 LTD @(ASIS)@ADD2

20 LTD @(SP2 ASIS)DEAR CUSTOMER:

21 LTD @(SP2) YOU NOW HAVE THE OPTION OF PAYING YOUR BALANCE IN EASY

22 LTD MONTHLY INSTALLMENTS BY USING OUR REVOLVING CREDIT PLAN. IF

23 LTD YOU WISH TO DO SO PLEASE SIGN BELOW AND RETURN IN THE ENCLOSED

24 LTD ENVELOPE.

25 LTD @(SP2) @11 BALANCE @45 @INSTLBAL(A,14)

26 LTD @11 NO. OF MONTHLY INSTALLMENTS @45 @NUMPY(A,14)

27 LTD @11 MONTHLY PAYMENT @45 @INSTPAY(A,14)

28 LTD @11 PORTION APPLIED TO BALANCE @45 @BALPART(A,14)

29 LTD @11 INTEREST @45 @INTPART(A,14)

30 LTD @(SP2) @50 SINCERELY,

31 LTD @(SP4) @50 GEORGE & CO.

32 LTD @(SP4) @25 --------------------

33 LTD @(SP3 ASIS)YES, I WOULD LIKE TO USE YOUR REVOLVING CREDIT PLAN.

34 LTD @(SP3 ASIS)YOUR SIGNATURE _____________________ DATE _____________

35 ENDLTD

36 ;

37 IF NUMPY LE 0 REJECT ENDIF

38 LETTER 1

39 ACCEPT

Page 96: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 5: Printing a Range of Letter Lines

3–34 Reference Guide

Output for Example 4

GEORGE & CO. 16255 VENTURA BLVD. ENCINO, CALIFORNIA

11/18/97

SANTA FE HOSP ASSN 6002587 1212 WISCONSIN DRIVE LOS ANGELES CA 90023

DEAR CUSTOMER:

YOU NOW HAVE THE OPTION OF PAYING YOUR BALANCE IN EASY MONTHLY INSTALLMENTS BY USING OUR REVOLVING CREDIT PLAN. IF YOU WISH TO DO SO, PLEASE SIGN BELOW AND RETURN IN THE ENCLOSED ENVELOPE.

BALANCE 2,230.17 NO. OF MONTHLY INSTALLMENTS 24 MONTHLY PAYMENT 102.40 PORTION APPLIED TO BALANCE 92.92 INTEREST 9.48

SINCERELY,

GEORGE & CO.

--------------------

YES, I WOULD LIKE TO USE YOUR REVOLVING CREDIT PLAN.

YOUR SIGNATURE ________________________ DATE _____________

Example 5: Printing a Range of Letter Lines The LTD command can be followed by a number, to associate a letter text statement with a specific line number. For more information, see Document Definition Statements. A line number can range from 1 to 99 in value. The same line number can be placed on multiple letter detail lines (LTDs) that are not necessarily consecutive. When a line number is placed on a letter detail line that line number is propagated to all letter detail lines below it until the next letter detail line that contains a line number.

The range of letter lines to be printed is determined by placing a range of lines on the invoking LETTER statement. The format of that statement is:

LETTER nn [{FROM ff TO tt | FROM ff}]

Page 97: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 5: Printing a Range of Letter Lines

Chapter 3: Letter Writing 3–35

The arguments for the commands are explained in the following table:

Argument Description

nn The application number

ff The From range line number

tt The To range line number

An example of this format is as follows:

LETTER 1 FROM 2 TO 5

The statement in this example starts LETTER 1 and prints all detail lines that have a line number of 2, 3, 4, or 5 following the LTD keyword.

If all text lines started have the same line number associated with the LTD command, the statement is:

LETTER 1 FROM 2 TO 2

This LETTER command format invokes the text (one or more lines) associated with line number 2 only.

When printing a range of pages, page ejection occurs automatically when the first physical line of the letter is printed. The automatic page ejection can be eliminated by specifying NOEJECT in the header (LTH) statement. Advantage VISION:Excel generates and can dynamically alter a special reserved word field (DYLCNxxLNC), which is the letter writing function's line counter for letter writing application xx. When DYLCNxxLNC becomes larger than the maximum lines per page, Advantage VISION:Excel forces page ejection. Consequently, if the program dynamically changes DYLCNxxLNC to a value that is greater than the maximum lines per page, page ejection occurs at the next starting of LETTER xx.

Input for Example 5

The From-To Line Range technique makes the printing of repetitive information formats easy to handle. The program shown in this section demonstrates how repetitive billing information can be printed using the letter writing function.

Line number 1 encompasses letter statements 24–35. Line number 2 is letter statement 36, and line number 3 encompasses letter statements 37 and 38. For each letter, line number 1 is started once using program statement 41; line number 2 is started multiple times using statement 49; and line number 3 is started once using statement 55. One of the letters generated by this program is shown in Output for Example 5.

Page 98: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 5: Printing a Range of Letter Lines

3–36 Reference Guide

1 FILE SMGFILE VB 1000 6000

2 OSMASTER41 1000 1 ; A/R OBLIGATION SUMMARY

3 OSNAME 29 1 ; NAME

4 OSADR1 22 30 ; ADDRESS 1.

5 OSADR2 22 96 ; CITY, STATE AND ZIP

6 OSBALANCE 6 118 PD 2

7 OSMASTER 818 124

8 OSACCT_NO 13 124 ; ACCOUNT NUMBER

9 OSNO_TRLS 2 200 PD E ; NUMBER OF TRAILERS

10 OSTRANAREA 740 202 ; OCCURS 20 TIMES

11 REDEFINE AT OSTRANAREA ; TRAILER LENGTH = 37 BYTES

12 OSOBLGAMT 5 213 PD 2 E ; OBLIGATION AMOUNT

13 OSDUE_DATE 4 228 PD D ; DUE DATE

14 ;

15 WORKAREA

16 CNT 2 PD

17 WK_AMT 5 PD 2

18 WK_DUE_DT 7 21

19 WK_DUE_DT2 6 22

20 WK_YY_MM 4 22

21 WK_DD 2 26

22 ;

23 LTH 01 66 WIDE

24 LTD1 @23 GEORGE & CO.

25 LTD @23 17418 CHATSWORTH ST.

26 LTD @23 GRANADA HILLS, CALIFORNIA 91344

27 LTD @(SP2) @50 @DYLDATE

28 LTD @(SP2)@OSNAME @47 @OSACCT_NO(B)

29 LTD @(ASIS)@OSADR1

30 LTD @(ASIS)@OSADR2

31 LTD @(SP2 ASIS)DEAR CUSTOMER:

32 LTD @(SP2) THE BALANCE OF YOUR ACCOUNT IS DUE. PLEASE REMIT

33 LTD $@OSBALANCE(A) BEFORE DECEMBER 20, 1997.

34 LTD @(SP2) @8 DUE DATE @55 AMOUNT

35 LTD @(SP2)

36 LTD2 @9 @WK_DUE_DT2(D) @49 @WK_AMT(A)

37 LTD3 @(SP2) @50 SINCERELY,

38 LTD @(SP4) @50 GEORGE & CO.

39 ENDLTD

40 MAIN:

41 LETTER 1 FROM 1 TO 1

42 MOVE OSNO_TRLS TO CNT

43 MOVE 0 TO INW

44 ;

45 LOOP1:

46 IF CNT LE 0 GOTO LOOP9 ENDIF

47 MOVE OSDUE_DATE(INW) TO WK_DUE_DT

48 MOVE OSOBLGAMT(INW) TO WK_AMT

49 LETTER 1 FROM 2 TO 2

50 INW = INW + 37

Page 99: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 5: Printing a Range of Letter Lines

Chapter 3: Letter Writing 3–37

51 CNT = CNT - 1

52 GOTO LOOP1

53 ;

54 LOOP9:

55 LETTER 1 FROM 3 TO 3

56 ACCEPT

Output for Example 5

GEORGE & CO. 17418 CHATSWORTH ST. GRANADA HILLS, CALIFORNIA 91344

11/18/97

MARY ANNE BLACK 1013454541 BOX 404 MOUNTAIN RD GREENWICH NY 12834

DEAR CUSTOMER:

THE BALANCE OF YOUR ACCOUNT IS DUE. PLEASE REMIT $89.09 BEFORE DECEMBER 20, 1997.

DUE DATE AMOUNT

05/04/97 21.09 04/28/97 18.00 03/31/97 27.96 02/27/97 22.04

SINCERELY,

GEORGE & CO.

Page 100: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 6: Printing Using the Laser Option

3–38 Reference Guide

Example 6: Printing Using the Laser Option George and Company's marketing department has prepared a catalog of special items that they want to make available to their best customers. These customers all have an account code of MO on the accounts receivable file. The marketing manager wants a cover letter sent to all MO accounts, offering the catalog and a copy of the Restaurants of Southern California guide to all who respond by September sixteenth.

Input for Example 6

This example differs from previous examples in that the character sets are changed within the letter and the output is laser-printed.

1 COPY DYAUDREC

2 LTH 01 66 WIDE LASER

3 LTD @23 GEORGE & CO.

4 LTD @23 16255 VENTURA BLVD.

5 LTD @23 ENCINO, CALIFORNIA

6 LTD @(SP2) @50 @DYLDATE

7 LTD @(SP2)@NAME @50 @ACCTNO

8 LTD @(ASIS)@ADD1

9 LTD @(ASIS)@ADD2

10 LTD @(SP2 ASIS)DEAR CUSTOMER:

11 LTD @(SP2 ASIS) @25 @(CS2) FREE OFFER

12 LTD LTD @(SP2 CS1)AS A VALUED CUSTOMER, YOU CAN RECEIVE OUR SPECIAL

13 LTD PURCHASE CATALOG IF YOU RESPOND BY SEPTEMBER 16. JUST

14 LTD RETURN THE FORM BELOW AND THE CATALOG WILL BE ON ITS WAY.

15 LTD TOGETHER WITH A FREE COPY OF

16 LTD @(CS2) '"RESTAURANTS OF SOUTHERN CALIFORNIA."'

17 LTD @(SP2 CS1) @50 SINCERELY,

18 LTD @(SP4) @50 GEORGE & CO.

19 LTD @(SP2) @23 -------------------------

20 LTD @(SP2 ASIS)PLEASE SEND MY CATALOG AND BONUS GIFT TO:

21 LTD @(SP2 ASIS)NAME: __________________________________________________

22 LTD @(SP2 ASIS)ADDRESS: _______________________________________________

23 LTD @(SP2 ASIS)CITY: _____________________STATE:_________ZIP:__________

24 ENDLTD

25 IF ACCTCODE EQ 'MO'

26 LETTER 01

27 ELSE REJECT

28 ENDIF

As part of the LTH header in statement 2, the laser option has been specified that sets an indicator to determine the maximum number (nn) of character sets per letter. Because there is no (nn) coded, the default is four separate or unique character sets within one letter.

Page 101: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 7: Generating Two-Up Letters Using the Defaults

Chapter 3: Letter Writing 3–39

The (CSnn) keywords on LTD statements 11, 12, 16, and 17 are used to specify which character set is to be printed. LTD statements 11 and 16 use the (CS2) keyword which specifies that the second character set specified in the JCL is to be used. The (CS1) keywords on LTD statements 12 and 17 reset the character set to their original position.

Output for Example 6

The following letter is generated as a result of the letter writing Input statements.

GEORGE & CO. 16255 VENTURA BLVD. ENCINO, CALIFORNIA

07/07/97

MORENO, ELIZABETH 6039804 208 1/2 INEZ ST NORWALK CA 90605

DEAR CUSTOMER: FREE OFFER

AS A VALUED CUSTOMER, YOU CAN RECEIVE OUR SPECIAL PURCHASE CATALOG IF YOU RESPOND BY SEPTEMBER 16. JUST RETURN THE FORM ELOW AND THE CATALOG WILL BE ON ITS WAY, TOGETHER WITH A FREE COPY OF “RESTAURANTS OF SOUTHERN CALIFORNIA”.

SINCERELY,

GEORGE & CO.

-------------------

PLEASE SEND MY CATALOG AND BONUS GIFT TO:

NAME:_______________________________________________________________________________

ADDRESS:____________________________________________________________________________

CITY:__________________________ STATE:_____________________ ZIP:____________________

Example 7: Generating Two-Up Letters Using the Defaults This example shows how to produce two-up letters using some of the default values. The phrase two-up means that two letters are produced side-by-side on a page (one on the left, one on the right).

To produce two-up letters, the keyword TWOUP is used in the LTH statement. The keyword BETWEEN (for spaces between letters) is not used, so the default is five. This means that there are five blank spaces between the left-side letter and the right-side letter on the page. The keyword LEFTSAVE (for the amount of space to hold the left-side letter) is not used, so that the default is 10K.

Page 102: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 7: Generating Two-Up Letters Using the Defaults

3–40 Reference Guide

The width of each letter is specified as 60 using the keyword WIDE. The number of lines per page has been specified as 56 using the keyword LONG. The NEWPARA I5 parameter in the LTD statement after DEAR CUSTOMER: causes the entire paragraph to be indented five spaces. The NEWPARA L3 parameter in the LTD statement for the second paragraph causes the first line of the paragraph to be indented three spaces.

Input for Example 7

The generated letters are shown following the source statements. COPY DYAUDREC

LTH 1 60 WIDE 56 LONG TWOUP

LTD @(SP2) @25 GEORGE & CO.

LTD @25 16255 VENTURA BLVD.

LTD @25 ENCINO, CALIFORNIA

LTD @(SP2) @50 @DYLDATE

LTD @(SP2) @1 @NAME @50 @ACCTNO(Z)

LTD @1 @ADD1

LTD @1 @ADD2

LTD @(SP2) @1 DEAR CUSTOMER:

LTD @(SP2 NEWPARA I5) THIS

LTD FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT AUDITORS

LTD CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. THIS IS NOT A

LTD REQUEST FOR PAYMENT. OUR RECORDS ON @TRANDATE(D), SHOWED

LTD A BALANCE OF $@BALANCE(A).

LTD @(SP2 NEWPARA L3) PLEASE

LTD CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON THAT DATE

LTD BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, RYAN,

LTD RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS ANGELES,

LTD CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS ENCLOSED FOR THIS

LTD PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO

LTD THE AUDITORS.

LTD @(SP2) @40 VERY TRULY YOURS,

LTD @(SP3) @40 CONTROLLER

LTD @40 GEORGE & CO.

LTD @(SP5) @25 C O N F I R M A T I O N

LTD @25 - - - - - - - - - - - -

LTD @(SP2) @1 RYAN, RYAN AND COMPANY

LTD @1 201 SOUTH HOPE STREET

LTD @1 LOS ANGELES, CA 90071

LTD @(SP2) @1 THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

LTD @(SP2) @1 __________________________________________________________

LTD @(SP2) @1 __________________________________________________________

LTD @(SP2) @1 BY: __________________________ DATE: _____________________

ENDLTD

LETTER 1

Page 103: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 7: Generating Two-Up Letters Using the Defaults

Chapter 3: Letter Writing 3–41

Output for Example 7

GEORGE & CO. GEORGE & CO. GEORGE & CO. GEORGE & CO. 16255 VENTURA BLVD. 16255 VENTURA BLVD. ENCINO, CA ENCINO, CA

3/24/97 3/24/97

8006547 8006547

TORRES, ERNESTO CHO PYUNG, SUM 23444 PARK LANE 33333 PALL MALL LOS ANGELES CA GLENDALE CA

DEAR CUSTOMER: DEAR CUSTOMER:

THIS FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT THIS FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT AUDITORS CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. AUDITORS CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. THIS IS NOT A REQUEST FOR PAYMENT. OUR RECORDS ON 2/15/92, THIS IS NOT A REQUEST FOR PAYMENT. OUR RECORDS ON 2/15/92,SHOWED A BALANCE OF $44.99 2/17/92,SHOWED A BALANCE OF $32.99

PLEASE CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON PLEASE CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON THAT DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, THAT DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS AUDITORS, RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS ANGELES, CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS LOS ANGELES, CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS ENCLOSED FOR THIS PURPOSE. IF YOU FIND ANY DIFFERENCES, ENCLOSED FOR THIS PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO THE AUDITORS. PLEASE REPORT THEM TO THE AUDITORS.

VERY TRULY YOURS, VERY TRULY YOURS,

CONTROLLER CONTROLLER

GEORGE & CO. GEORGE & CO.

C O N F I R M A T I O N C O N F I R M A T I O N

- - - - - - - - - - - - - - - - - - - - - - - -

RYAN, RYAN AND COMPANY RYAN, RYAN AND COMPANY 201 SOUTH HOPE 201 SOUTH HOPE LOS ANGELES, CA 90071 LOS ANGELES, CA 90071

THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW: THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

______________________________________________________ _____________________________________________________

______________________________________________________ _____________________________________________________

______________________________________________________ _____________________________________________________

BY: _________________________ DATE: __________________ BY: _________________________ DATE: _________________

Page 104: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 8: Generating Two-Up Letters Using DYLCNxxSW

3–42 Reference Guide

Example 8: Generating Two-Up Letters Using DYLCNxxSW This example uses a two-page letter. By using the switching field DYLCNxxSW, the first page of the letter for a record and the first page of the letter for the next record are printed side-by-side on a single page; the second page of the letter for the first record and the second page for the next record are printed side-by-side on the following page, as shown in the section Side–by-Side Printing Using Switch. Without using the switch, the two pages of the letter would be printed side-by-side for each record, as shown in the section Side-by-Side Printing without Using Switch.

Notice the use of the keyword TWO UP appearing in the program code following the letter. The keyword TWO UP specifies two-up letters. The keyword SWITCH specifies page switching. The @EJECT parameter in the first LTD statement of the second letter specifies a page eject. The logic statements specify using only the first ten records of the file (for this example).

The other logic statements specify page switching by moving a Y into DYLCNxxSW before the next letter is executed. In other words, left-to-right page switching occurs only after the next record (for a pair) is read. The letter records for this next record are printed on the right side of the page. This example uses the default value of 10K to hold the letter records of the left side of the page. You can specify your own value for this parameter by using the keyword LEFTSAVE.

Page 105: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 8: Generating Two-Up Letters Using DYLCNxxSW

Chapter 3: Letter Writing 3–43

Side-By-Side Printing Without Using Switch

PAGE 1 GEORGE & CO. PAGE 2 6255 VENTURA BLVD. GEORGE & CO. ENCINO, CA

3/24/97 3/24/97

8006547 8006547

TORRES, ERNESTO TORRES, ERNESTO 23444 PARK LANE 23444 PARK LANE LOS ANGELES CA LOS ANGELES CA

DEAR CUSTOMER:

THIS FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT IF YOUR RECORDS DO NOT AGREE WITH OURS, AUDITORS CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. PLEASE NOTE THE DISCREPANCIES, SIGN AND RETURN THE FOR IS NOT A REQUEST FOR PAYMENT. OUR RECORDS ON 215/92, BELOW. SHOWED A BALANCE OF $44.99. VERY TRULY YOURS,

CONTROLLER PLEASE CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON GEORGE & CO. THAT DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS D E S C R I P A N C I E S ANGELES, CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS - - - - - - - - - - - - - ENCLOSED FOR THIS PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO THE AUDITORS. RYAN, RYAN AND COMPANY 201 SOUTH HOPE C O N F I R M A T I O N LOS ANGELES, CA 90071

- - - - - - - - - - - - THE ABOVE INFORMATION IS INACCURATE AS NOTED BELOW: RYAN, RYAN AND COMPANY ___________________________________________________

201 SOUTH HOPE ___________________________________________________

LOS ANGELES, CA 90071 ________________________________DATE:______________

THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

_______________________________________________________

_______________________________________________________

BY: ______________________________ DATE: ______________

Input for Example 8

The code for example 8 is as follows: COPY DYAUDREC

LTH 1 60 WIDE 56 LONG TWOUP

4 BETWEEN SWITCH

LTD @1 PAGE 1

LTD @30 GEORGE & CO.

LTD @30 16255 VENTURA BLVD.

LTD @30 ENCINO, CALIFORNIA

LTD @(SP2) @50 @DYLDATE

LTD @(SP2) @1 @NAME @50 @ACCTNO(Z)

LTD @1 @ADD1

LTD @1 @ADD2

LTD @(SP2) @1 DEAR CUSTOMER:

LTD @(SP2 NEWPARA L3) THIS

Page 106: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 8: Generating Two-Up Letters Using DYLCNxxSW

3–44 Reference Guide

LTD FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT AUDITORS

LTD CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. THIS IS NOT A

LTD REQUEST FOR PAYMENT. OUR RECORDS ON @TRANDATE(D), SHOWED

LTD A BALANCE OF $@BALANCE(A).

LTD @(SP2 NEWPARA L3) PLEASE

LTD CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON THAT

LTD DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS

LTD RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS ANGELES,

LTD CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS ENCLOSED FOR THIS

LTD PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO

LTD THE AUDITORS.

LTD @(SP5) @25 C O N F I R M A T I O N

LTD @25 - - - - - - - - - - - -

LTD @(SP2) @1 RYAN, RYAN AND COMPANY

LTD @1 201 SOUTH HOPE STREET

LTD @1 LOS ANGELES, CA 90071

LTD @(SP2) @1 THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

LTD @(SP2) @1 _____________________________________________________

LTD @(SP2) @1 _____________________________________________________

LTD @(SP2) @1 _________________________ DATE: _____________________

LTD @(EJECT)

LTD @1 PAGE 2

LTD @30 GEORGE & CO.

LTD @(SP2) @50 @DYLDATE

LTD @(SP2) @1 @NAME @50 @ACCTNO(Z)

LTD @1 @ADD1

LTD @1 @ADD2

LTD @(SP2 NEWPARA I5) IF

LTD YOUR RECORDS DO NOT AGREE WITH OURS, PLEASE NOTE THE

LTD DISCREPANCIES, SIGN AND RETURN THE FORM BELOW.

LTD @(SP2) @40 VERY TRULY YOURS,

LTD @(SP3) @40 CONTROLLER

LTD @40 GEORGE & CO.

LTD @(SP5) @25 D I S C R E P A N C I E S

LTD @25 - - - - - - - - - - - - -

LTD @(SP2) @1 RYAN, RYAN AND COMPANY

LTD @1 201 SOUTH HOPE STREET

LTD @1 LOS ANGELES, CA 90071

LTD @(SP2) @1 THE ABOVE INFORMATION IS INACCURATE AS NOTED BELOW:

LTD @(SP2) @1 ______________________________________________________

LTD @(SP2) @1 ______________________________________________________

LTD @(SP2) @1 _________________________ DATE: ______________________

ENDLTD

DYLCOUNT1 = DYLCOUNT1 + 1

IF DYLCOUNT1 LE 10

MOVE 'Y' TO DYLCN01SW

LETTER 01

ENDIF

Page 107: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 8: Generating Two-Up Letters Using DYLCNxxSW

Chapter 3: Letter Writing 3–45

Side–By-Side Printing Using Switch

PAGE 1 GEORGE & CO. PAGE 1 GEORGE & CO. 16255 VENTURA BLVD. 16255 VENTURA BLVD. ENCINO, CA ENCINO, CA

3/24/97 3/24/97

8006547 6208657

TORRES, ERNESTO CHO PYUNG, SUM 23444 PARK LANE 33333 PALL MALL LOS ANGELES CA GLENDALE CA

DEAR CUSTOMER: DEAR CUSTOMER:

THIS FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT THIS FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT AUDITORS CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. THIS AUDITORS CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. IS NOT A REQUEST FOR PAYMENT OUR RECORDS ON 2/15/92, THIS IS NOT A REQUEST FOR PAYMENT. OUR RECORDS ON SHOWED A BALANCE OF $44.99. 2/17/92, SHOWED A BALANCE OF $32.00.

PLEASE CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON PLEASE CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON THAT DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, THAT DATE BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET, RYAN, RYAN AND COMPANY, 201 SOUTH HOPE STREET,LOS LOS ANGELES, CALIFORNIA 90071.AN ADDRESSED ENVELOPE IS ENCLOSED ANGELES, CALIFORNIA 90071.AN ADDRESSED ENVELOPE IS FOR FOR THIS PURPOSE. IF YOU FIND ANY DIFFERENCES, ENCLOSED FOR THIS PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO THE AUDITORS. PLEASE REPORT THEM TO THE AUDITORS.

C O N F I R M A T I O N C O N F I R M A T I O N - - - - - - - - - - - - - - - - - - - - - - - -

RYAN, RYAN AND COMPANY RYAN, RYAN AND COMPANY 201 SOUTH HOPE 201 SOUTH HOPE LOS ANGELES, CA 90071 LOS ANGELES, CA 90071

THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW: THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

_______________________________________________________ ___________________________________________________________

_______________________________________________________ ___________________________________________________________

_______________________________ DATE: _________________ ____________________________ DATE: ________________________

PAGE 2 PAGE 2

GEORGE & CO. GEORGE & CO.

3/24/97 3/24/97

8006547 6208657

TORRES, ERNESTO CHO PYUNG, SUM 23444 PARK LANE 33333 PALL MALL LOS ANGELES CA GLENDALE CA

IF YOUR RECORDS DO NOT AGREE WITH OURS, PLEASE NOTE THE IF YOUR RECORDS DO NOT AGREE WITH OURS, PLEASE NOTE THE DISCREPANCIES, SIGN AND RETURN THE FORM BELOW. DISCREPANCIES, SIGN AND RETURN THE FORM BELOW.

VERY TRULY YOURS, VERY TRULY YOURS,

CONTROLLER CONTROLLER GEORGE & CO. GEORGE & CO.

Page 108: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 9: Writing Letters to an Output File

3–46 Reference Guide

D I S C R E P A N C I E S D I S C R E P A N C I E S

- - - - - - - - - - - - - - - - - - - - - - - - - -

RYAN, RYAN AND COMPANY RYAN, RYAN AND COMPANY 201 SOUTH HOPE 201 SOUTH HOPE LOS ANGELES, CA 90071 LOS ANGELES, CA 90071

THE ABOVE INFORMATION IS INACCURATE AS NOTED BELOW: THE ABOVE INFORMATION IS INACCURATE AS NOTED BELOW:

____________________________________________________ ___________________________________________________________

____________________________________________________ ___________________________________________________________

___________________________ DATE: __________________ __________________________________ DATE: __________________

Example 9: Writing Letters to an Output File Letter records (lines of a letter) can be written to an output file of your own choosing. If no output file is specified, the default file is AUDPRINT/SYS009. There are several reasons for using your own output file. Some of these are:

If your letters are longer than 131 characters, you cannot use AUDPRINT/SYS009.

If your letters require using ASA carriage control characters, rather than machine code, you cannot use AUDPRINT/SYS009.

If you want to manipulate the letter records independently of other records for audit functions such as linear regression, make sure to have the letter records independent from AUDPRINT/SYS009.

In this example, the first two items listed above are the reason for writing letter records to an output file. The letter is 200 characters wide and requires ASA carriage control. The number of lines per page is 56. The output letter records are written to the file with the DD/DLBL name of DYLTRAB. The default blocking factor for the output file is 10. The keyword ASA specifies ASA control characters for the output letter records.

Page 109: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Example 9: Writing Letters to an Output File

Chapter 3: Letter Writing 3–47

Input for Example 9

The program code is as follows:

COPY DYAUDREC

LTH 1 200 WIDE 56 LONG DYLTRAB ASA

LTD @(SP2) @25 GEORGE & CO.

LTD @25 16255 VENTURA BLVD.

LTD @25 ENCINO, CALIFORNIA

LTD @(SP2) @50 @DYLDATE

LTD @(SP2) @1 @NAME @50 @ACCTNO(Z)

LTD @1 @ADD1

LTD @1 @ADD2

LTD @(SP2) @1 DEAR CUSTOMER:

LTD @(SP2 NEWPARA L3) THIS

LTD FORM IS BEING SENT TO YOU SO THAT OUR INDEPENDENT AUDITORS

LTD CAN CONFIRM THE CORRECTNESS OF OUR RECORDS. THIS IS NOT A

LTD REQUEST FOR PAYMENT. OUR RECORDS ON @TRANDATE(D), SHOWED

LTD A BALANCE OF $@BALANCE(A).

LTD @(SP2 NEWPARA L3) PLEASE

LTD CONFIRM WHETHER THIS AGREES WITH YOUR RECORDS ON THAT DATE

LTD BY SIGNING AND RETURNING THIS FORM TO OUR AUDITORS, RYAN,

LTD RYAN AND COMPANY, 201 SOUTH HOPE STREET, LOS ANGELES,

LTD CALIFORNIA 90071. AN ADDRESSED ENVELOPE IS ENCLOSED FOR THIS

LTD PURPOSE. IF YOU FIND ANY DIFFERENCES, PLEASE REPORT THEM TO

LTD THE AUDITORS.

LTD @(SP2) @40 VERY TRULY YOURS,

LTD @40 CONTROLLER

LTD @40 GEORGE & CO.

LTD @(SP5) @25 C O N F I R M A T I O N

LTD @25 - - - - - - - - - - - -

LTD @(SP2) @1 RYAN, RYAN AND COMPANY

LTD @1 201 SOUTH HOPE STREET

LTD @1 LOS ANGELES, CA 90071

LTD @(SP2) @1 THE ABOVE INFORMATION IS CORRECT EXCEPT AS NOTED BELOW:

LTD @(SP2) @1 ----------------------------------------------------------

LTD @(SP2) @1 ----------------------------------------------------------

LTD @(SP2) @1 BY: -------------------------- DATE: ---------------------

ENDLTD

LETTER 1

Page 110: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 111: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 4: Frequency Distribution Reporting 4–1

Chapter 4: Frequency Distribution Reporting

This chapter describes the frequency distribution reporting function and covers the following main points:

Frequency distribution definition and uses

Properties of frequency distributions

Frequency distribution with Advantage VISION:Excel

Additional Advantage VISION:Excel options

Logical flow of frequency distribution

Frequency distribution examples

This chapter also contains examples of each frequency distribution option available with Advantage VISION:Excel, including the following:

Frequency distribution with equal interval ranges.

Distribution with logarithmically based intervals.

Alphanumeric itemized group intervals frequency distribution.

Histogram feature available with each of the three frequency distributions.

Frequency Distribution Definition and Uses A frequency distribution can best be described as an arrangement of numerical data in terms of graduated categories or value groupings. These categories are called ranges or, more commonly, intervals.

The frequency distribution can be represented in table form, as shown below.

IQ Range Frequency

120-125 3

115-119 4

110-114 21

100-109 35

Page 112: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Definition and Uses

4–2 Reference Guide

The frequency distribution can also be represented graphically, as follows:

This frequency distribution states that 35 individuals in the population have IQs in the 100-109 range, 21 individuals in the 110-114 range, and so on.

The size of the interval is dependent upon the number of values to be included in the frequency distribution.

The most efficient number of intervals is considered to be between 10 and 20, but make this decision yourself weighing all other factors. When you are including a limited number of values in the frequency distribution, use only a few intervals. When you are generating a frequency distribution for many values, use a larger number of intervals.

Frequency distribution provides the following benefits:

An overview of the information within the population.

Information to help you decide whether to stratify your population before sampling. The purpose of stratifying a population is to narrow the sampling precision of the estimate. This is done by dividing the population into homogeneous segments (called strata) and by sampling from each stratum. Doing this can often eliminate extreme variability among ranges.

The Frequency Distribution Report aids in deciding whether or not to stratify. It also provides you with a means of establishing the interval size of the strata.

Information to help you decide whether to use estimation of value or stratified mean estimation sampling.

For information on how to evaluate Frequency Distribution Report output, see the chapter “Stratified Sampling Overview.”

Page 113: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

Chapter 4: Frequency Distribution Reporting 4–3

Properties of Frequency Distributions The results that you obtain in doing a frequency distribution are not always identical. The value distributions can vary greatly:

In some cases, most values cluster in just a few intervals.

In other cases, the population can be evenly distributed over all the intervals.

There are four important properties of frequency distributions, each of which can be represented in either table or graphic form:

Central tendency or location

Dispersion or variation

Skewness

Kurtosis

The mean and the standard deviation of a frequency distribution are also important concepts that are related to these properties.

Page 114: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

4–4 Reference Guide

Central Tendency

Central tendency (or central location) refers to a value near the center of the frequency distribution (that is, the middle point or average). The measure of central tendency in a population is the mean (that is, the total of values divided by the number of values).

Frequency distributions can vary with respect to central tendency. The following graph shows two frequency distributions identical in shape, but with different Means (Measure of Central Tendency).

Even if the means for two populations are identical, the populations can still vary greatly. In a population of three items with values 9, 50, and 100, the mean is 53. In a population with values 49, 50, and 60, the mean is also 53.

Page 115: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

Chapter 4: Frequency Distribution Reporting 4–5

Dispersion

Dispersion (or the variation) is the extent of clustering around the central tendency. The following graph illustrates three frequency distributions, having the same central tendency (Mean), but with different degrees of variation or dispersion.

Deviation

The deviation of a distribution defines the amount of dispersion in the population. If the standard deviation value is large, the values in the population are widely distributed; if it is small, the values are closer to the central tendency.

Non-Symmetrical Patterns of Dispersion

Distributions can also vary in the pattern of dispersion: they can be symmetrical or non-symmetrical. All of the examples used so far are symmetrical; however, if the larger frequencies tend to be concentrated toward the low end of the variable and the smaller frequencies toward the high end, the distribution is positively skewed, or skewed to the right.

Page 116: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

4–6 Reference Guide

If the large frequencies are concentrated toward the high end of the variable and the smaller frequencies toward the low end, the distribution is negatively skewed, or skewed to the left. In either case, the distribution is non-symmetrical. The graphs appearing in the sections, Positively Skewed Distribution, and Negatively Skewed Distribution demonstrate the left and right tails of a skewed distribution.

Positively Skewed Distribution

An example of positively skewed (skewed to the right) distribution is shown in the following diagram.

Page 117: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

Chapter 4: Frequency Distribution Reporting 4–7

Negatively Skewed Distribution

An example of negatively skewed (skewed to the left) distribution is shown in the following diagram.

Kurtosis

Kurtosis refers to the flatness or peakedness of one distribution in relation to another. A distribution can be of following three types:

Leptokurtic— if it is more peaked than the normal distribution.

Platykurtic— if it is less peaked than the normal distribution.

Mesokurtic— if it falls between leptokurtic and platykurtic distributions.

The graphs shown in the sections Mesokurtic (Normal) Distributions, Leptokurtic Distribution, and Platykurtic Distribution demonstrate examples of each of these distributions.

Page 118: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Properties of Frequency Distributions

4–8 Reference Guide

Mesokurtic (Normal) Distributions

The following graph is an example of Mesokurtic (Normal) distribution.

Leptokurtic Distribution

The following graph is an example of Leptokurtic distribution.

Page 119: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution with Advantage VISION:Excel

Chapter 4: Frequency Distribution Reporting 4–9

Platykurtic Distribution

The following graph is an example of Platykurtic distribution.

Frequency Distribution with Advantage VISION:Excel So far, this chapter has only discussed the definition and attributes of a frequency distribution (for example, manually prepared bar graphs, tables, and graphically displayed curves that represent frequency distributions). However, Advantage VISION:Excel deals with computerized files.

Note: Frequency distributions with histograms are also available. For more information, see Specifying COUNT and VALUE Histograms.

Each file is automatically analyzed and displayed as, a Frequency Distribution Report. This provides more detailed information than a graphic representation, as shown in the section, Equal Interval.

In executing the frequency distribution, Advantage VISION:Excel provides the following options:

Equal Interval

Logarithmic Interval

Alphanumeric Itemization

Page 120: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution with Advantage VISION:Excel

4–10 Reference Guide

Equal Interval

A Frequency Distribution Report appears as follows:

9/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

LESS THAN 10.00 42 21.00 10472.14- 55.05- 249.34- 1536.90 651.16

10.00 14.99 15 7.50 181.49 0.95 12.10 1.58 659.81

15.00 19.99 28 14.00 434.66 2.28 15.52 1.20 671.63

20.00 24.99 11 5.50 236.53 1.24 21.50 1.47 679.04

25.00 29.99 7 3.50 184.72 0.97 26.39 1.31 684.95

30.00 34.99 9 4.50 287.19 1.51 31.91 1.41 691.65

35.00 39.99 8 4.00 293.19 1.54 36.65 1.11 697.97

40.00 44.99 9 4.50 383.68 2.02 42.63 1.75 704.67

45.00 49.99 4 2.00 185.07 0.97 46.27 1.14 709.14

50.00 54.99 6 3.00 309.58 1.63 51.60 1.43 714.61

55.00 59.99 6 3.00 339.33 1.78 56.56 1.16 720.08

60.00 64.99 2 1.00 124.96 0.66 62.48 2.48 723.24

65.00 69.99 3 1.50 198.15 1.04 66.05 0.88 727.11

70.00 74.99 1 0.50 72.50 0.38 72.50 0.00 729.34

75.00 79.99 1 0.50 77.00 0.40 77.00 0.00 731.57

80.00 84.99 3 1.50 244.06 1.28 81.35 0.95 735.44

85.00 89.99 2 1.00 178.88 0.94 89.44 0.16 738.60

90.00 94.99 0 0.00 0.00 0.00 0.00 0.00 738.60

95.00 99.99 0 0.00 0.00 0.00 0.00 0.00 738.60

100.00 104.99 2 1.00 201.40 1.06 100.70 0.50 741.76

105.00 109.99 3 1.50 323.43 1.70 107.81 0.76 745.63

MORE THAN 109.99 38 19.00 25239.42 132.68 664.20 1074.62 1189.39

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS 10

Page 121: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution with Advantage VISION:Excel

Chapter 4: Frequency Distribution Reporting 4–11

Logarithmic Interval

The logarithmic approach establishes intervals with small ranges where dollar values are low and, consequently, where many values tend to occur; and provides large ranges at higher dollar amounts, where fewer values occur. A logarithmic Frequency Distribution Report is shown as follows:

9/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 2

APPLICATION 02

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

9.00 9.99 0 0.00 0.00 0.00 0.00 0.00 139.62

10.00 19.99 43 21.50 616.15 3.24 14.33 2.11 160.35

20.00 29.99 18 9.00 421.25 2.21 23.40 2.77 173.76

30.00 39.99 17 8.50 580.38 3.05 34.14 2.69 186.79

40.00 49.99 13 6.50 568.75 2.99 43.75 2.31 198.19

50.00 59.99 12 6.00 648.91 3.41 54.08 2.80 209.14

60.00 69.99 5 2.50 323.11 1.70 64.62 2.45 216.21

70.00 79.99 2 1.00 149.50 0.79 74.75 2.25 220.68

80.00 89.99 5 2.50 422.94 2.22 84.59 4.03 227.75

90.00 99.99 0 0.00 0.00 0.00 0.00 0.00 227.75

100.00 199.99 23 11.50 3004.54 15.79 130.63 25.50 275.71

200.00 299.99 4 2.00 950.58 5.00 237.65 25.50 295.71

300.00 399.99 4 2.00 1306.89 6.87 326.72 19.37 315.71

400.00 499.99 2 1.00 820.04 4.31 410.02 3.56 329.85

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 329.85

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 329.85

700.00 799.99 0 0.00 0.00 0.00 0.00 0.00 329.85

800.00 899.99 3 1.50 2547.67 13.39 849.22 4.70 347.17

900.00 999.99 0 0.00 0.00 0.00 0.00 0.00 347.17

1000.00 1999.99 4 2.00 5414.26 28.46 1353.57 243.74 410.42

2000.00 2999.99 1 0.50 2541.70 13.36 2541.70 0.00 442.04

3000.00 3999.99 1 0.50 3886.33 20.43 3886.33 0.00 473.66

4000.00 4999.99 0 0.00 0.00 0.00 0.00 0.00 473.66

5000.00 5999.99 1 0.50 5292.24 27.82 5292.24 0.00 505.28

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS 10

Page 122: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution with Advantage VISION:Excel

4–12 Reference Guide

Note that the number of items between $10.00 and $19.99, when all the intervals in that range are added, is 43, while the number of items between $100.00 and $199.99 is only 23, and that between $300.00 and $399.99 is 4.

Alphanumeric Itemization

The alphanumeric approach establishes itemized groups or classifications on alphanumeric values. Both non-quantitative and quantitative values can be distributed (for example, division, branch, and account number). The following report demonstrates the alphanumeric frequency distribution using an alphabetic branch code.

9/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

---- I T E M S --------- COUNT % OF TOTAL % OF STANDARD OF ITEMS ITEMS OF ITEMS TOTAL MEAN DEVIATION

BO 1 0.50 44.99 0.24 44.99 0.00

EO 3 1.50 52.00 0.27 17.33 11.15

FO 7 3.50 300.74 1.58 42.96 57.78

IO 6 3.00 681.30 3.58 113.55 139.44

KO 22 11.00 3765.92 19.80 171.18 378.72

LO 1 0.50 45.24 0.24 45.24 0.00

MA 61 30.50 8524.80 44.81 139.75 524.20

MF 8 4.00 1836.67 9.65 229.58 360.83

MI 2 1.00 276.23 1.45 138.12 1.89

MN 4 2.00 158.29 0.83 39.57 50.23

MO 8 4.00 2801.84 14.73 350.23 829.05

MR 1 0.50 43.00 0.23 43.00 0.00

MT 5 2.50 359.13 1.89 71.83 93.46

MU 3 1.50 629.05 3.31 209.68 148.83

NA 12 6.00 9964.36- 52.38- 830.36- 2793.05

PO 18 9.00 440.10 2.31 24.45 58.28

RO 1 0.50 65.00 0.34 65.00 0.00

TO 7 3.50 6875.90 36.15 982.27 1828.01

VO 1 0.50 41.91 0.22 41.91 0.00

WE 1 0.50 11.20 0.06 11.20 0.00

WO 28 14.00 2034.15 10.69 72.65 78.12

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

Page 123: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Advantage VISION:Excel Options

Chapter 4: Frequency Distribution Reporting 4–13

Additional Advantage VISION:Excel Options This section describes some of the additional Frequency Distribution options of Advantage VISION:Excel.

General Options

Advantage VISION:Excel provides the following additional options:

Default for logarithmic interval frequency distribution.

Acceptance of negative intervals (for example, from –100.00 to –90.01, from –200.00 to –100.01).

Acceptance of up to 147 numeric intervals (the logarithmic default automatically establishes 147).

Acceptance of up to 999 numeric intervals (equal interval frequency distribution).

Acceptance of up to 999 alphanumeric itemized groups (alphanumeric frequency distribution).

Establishment of over and under intervals for all values falling above the maximum amount defined and below the minimum amount, respectively (equal interval or logarithmic).

Suppression of high and low intervals in which no values occur (yielding a much smaller report).

Isolation of zero interval with logarithmic interval option.

Note: Equal interval always means a range (for example, from $10.00 - $20.00, and so on), but the logarithmic option allows one interval that is $00.00 to $00.00.

Calculations

Advantage VISION:Excel performs the following calculations:

Calculates the percentage of total items that fall within each interval.

Lists the total dollar amount for all items within each interval and calculates the percentage of each such amount in relation to the total amount on the file.

Calculates the mean, or average, dollar amount in each interval.

Calculates the standard deviation of dollar amounts in each interval.

Page 124: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Advantage VISION:Excel Options

4–14 Reference Guide

Calculates a cum F-number for each interval that can be used in determining interval size when stratifying. The first cum F is calculated by multiplying the square root of the first range by the item count; the second cum F value is calculated by multiplying the square root of the second range by the item count and adding the result to the first cum F; and so on.

Calculates the cumulative percentage of items for each itemized group or interval (histograms).

Calculates the cumulative percentage of total value for each itemized group or interval (histograms).

Entire Population

Advantage VISION:Excel provides the following information on the population as a whole:

Mean dollar amount.

Standard deviation of dollar amounts.

Standard error of the mean (that is, the standard deviation divided by the square root of the number of items in the population).

Coefficient of variation (that is, the standard deviation of the population divided by the mean of the population).

The minimum dollar value found.

The maximum dollar value found.

Histograms

Advantage VISION:Excel provides the following types of histograms with equal interval, logarithmic interval, and alphanumeric frequency distribution functions:

Count of items (COUNT)—

Total of items (VALUE)

COUNT Histogram

There are always 50 positive intervals for a COUNT histogram, plus a zero point. The size of the count interval is determined by dividing the maximum count by 50 and rounding up. The number of intervals to use at any level is determined by dividing the count at that level by the interval size and rounding up.

Page 125: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Advantage VISION:Excel Options

Chapter 4: Frequency Distribution Reporting 4–15

The following report is an example of alphanumeric frequency distribution COUNT histogram.

9/30/97 FREQUENCY DISTRIBUTION HISTOGRAM REPORT PAGE 1

APPLICATION 01

--------I T E M S -------- COUNT CUM % OF TOTAL CUM % OF COUNT HISTOGRAM OF ITEMS ITEMS OF ITEMS TOTAL 0------------------------------------

BO 1 0.50 44.99 0.24 +

EO 3 2.00 52.00 0.51 ++

FO 7 5.50 300.74 2.09 ++++

IO 6 8.50 681.30 5.67 +++

KO 22 19.50 3765.92 25.47 +++++++++++

LO 1 20.00 45.24 25.71 +

MA 61 50.50 8524.80 70.52 +++++++++++++++++++++++++++++++

MF 8 54.50 1836.67 80.17 ++++

MI 2 55.50 276.23 81.63 +

MN 4 57.50 158.29 82.46 ++

MO 8 61.50 2801.84 97.19 ++++

MR 1 62.00 43.00 97.41 +

MT 5 64.50 359.13 99.30 +++

MU 3 66.00 629.05 102.61 ++

NA 12 72.00 9964.36- 50.23 ++++++

PO 18 81.00 440.10 52.54 +++++++++

RO 1 81.50 65.00 52.88 +

TO 7 85.00 6875.90 89.03 ++++

VO 1 85.50 41.91 89.25 +

WE 1 86.00 11.20 89.31 +

WO 28 100.00 2034.15 100.00 ++++++++++++++

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS 10

+ = 2

Page 126: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Advantage VISION:Excel Options

4–16 Reference Guide

VALUE Histogram

Because it is possible to have negative values, the VALUE histogram has a floating zero point. There are a maximum of 50 intervals, plus a zero point. The location of the zero point is calculated based on the content of the record being read. The formula to determine number of negative intervals in VALUE Histogram is as follows:

The number of positive intervals is 50 minus the number of negative intervals. The zero point is located between the two. The negative interval size is the maximum negative total divided by the number of negative intervals rounded up. The positive interval size is the maximum positive total divided by the number of positive intervals rounded up.

The number of intervals used at any particular level is the total divided by the appropriate interval size rounded up.

The following report is an example of alphanumeric frequency distribution VALUE histogram.

9/30/97 FREQUENCY DISTRIBUTION HISTOGRAM REPORT PAGE 1

APPLICATION 01

--------I T E M S -------- COUNT CUM % OF TOTAL CUM % OF VALUE HISTOGRAM OF ITEMS ITEMS OF ITEMS TOTAL 0-------------------------------

BO 1 0.50 44.99 0.24 +

EO 3 2.00 52.00 0.51 +

FO 7 5.50 300.74 2.09 ++

IO 6 8.50 681.30 5.67 ++++

KO 22 19.50 3765.92 25.47 +++++++++++++++++++++

LO 1 20.00 45.24 25.71 +

MA 61 50.50 8524.80 70.52 +++++++++++++++++++++++++++++++++++++++++++++++

MF 8 54.50 1836.67 80.17 +++++++++++

MI 2 55.50 276.23 81.63 ++

MN 4 57.50 158.29 82.46 +

MO 8 61.50 2801.84 97.19 ++++++++++++++++

MR 1 62.00 43.00 97.41 +

MT 5 64.50 359.13 99.30 ++

MU 3 66.00 629.05 102.61 ++++

NA 12 72.00 9964.36- 50.23 ***

PO 18 81.00 440.10 52.54 +++

RO 1 81.50 65.00 52.88 +

Page 127: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–17

TO 7 85.00 6875.90 89.03 ++++++++++++++++++++++++++++++++++++++

VO 1 85.50 41.91 89.25 +

WE 1 86.00 11.20 89.31 +

WO 28 100.00 2034.15 100.00 ++++++++++++

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS 10

+ = 182.00 * = 3322.00-

The methodology for determining the values for each type of histogram is given below.

Reporting Option

Advantage VISION:Excel is also flexible in the reporting options it offers. A Frequency Distribution Report is printed automatically, but you also have the option of using Advantage VISION:Results report writing capabilities. Up to 90 reports are allowed for each pass of the system. You can, optionally, specify the report heading.

Logical Flow of Frequency Distribution The following flowchart depicts the flow of the statements and the output they generate. The purpose of this flowchart is to walk you through the flow to reinforce your understanding of what happens and what to expect when you use Advantage VISION:Excel's frequency distribution function.

Page 128: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–18 Reference Guide

Input to Advantage VISION:Excel

The following code is an example of both Advantage VISION:Excel and Advantage VISION:Results Input statements for a logarithmic frequency distribution.

FILE ACCTREC INPUT FB 352 5280 1

BAL 5 170 PD 2 2

FREQ 01 LOGARITHMIC 3

DISTFIELD BAL

LOWAMT $0.00

HIGHAMT $5.00

FREQUENCY 01 4

FIN

Page 129: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–19

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements. The figure can be divided into the following sections:

Line 1 — FILE Statement (Advantage VISION:Results)

Line 2 — Field Definition Statement (Advantage VISION:Results)

Line 3 — Frequency Distribution Statement (Advantage VISION:Excel)

Line 4 — Procedure and Selection Statements (Advantage VISION:Results)

FILE Statement

The Advantage VISION:Results FILE statement is thoroughly defined in your Advantage VISION:Results Reference Guide. Therefore, the discussion here is limited to major areas applicable to Advantage VISION:Excel.

The FILE statement defines the input file. For more information on free-form keywords, see Free-Form Keywords in the chapter “Introduction.”

Field Definition Statement

The field definition statement defines data names for fields used in the interval, logarithmic, or alphanumeric function. The field definition statement specifies:

How large the field is.

Where it begins in the record.

How it appears.

Every time you use a data name in a Frequency Distribution statement, you must define it in an Advantage VISION:Results field definition statement. The following code demonstrates a field definition statement.

BAL 5 170 PD 2

Note: If you forget to define the attributes of BAL in a field definition statement as shown to the right, Advantage VISION:Excel generates an error message that the statement with the data name BAL was not defined.

Frequency Distribution Statement

The syntax for each type of frequency distribution (equal interval, logarithmic, alphanumeric) is shown in the sections Equal Interval Frequency Distribution, Logarithmic Frequency Distribution, and Alphanumeric Frequency Distribution.

Page 130: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–20 Reference Guide

Equal Interval Frequency Distribution

The syntax for frequency statement for Equal Interval frequency distribution is as follows:

FREQ nn EQUAL

DISTFIELD dataname START nnnnnnnnnnn

INTERVALSIZE nnnnnnnnnnn INTERVALNO nn

[REPTITLE dataname] [STDREPT {YES | NO}]

[HISTOGRAM {NO | COUNT | VALUE | BOTH}]

[DYLFQxx [BY yyy] {DISK | TAPE} SYSxxx]

The keywords associated with the Equal Interval statements are as follows:

Keyword Description

FREQ Required. Defines this statement as frequency distribution.

nn Required. A unique application number from 01–99.

EQUAL Required. Defines this frequency distribution statement as equal interval.

DISTFIELD Required. The data name of the field that is the object of the frequency distribution. This data name must be previously defined in an Advantage VISION:Results field definition.

START Required. The starting value of the frequency distribution. A numeric value from -9,999,999,999 through 99,999,999,999. Negative values should be preceded by a negative (-) sign. A dollar sign and commas are acceptable.

Floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned. A maximum of 11 positions (including digits, decimal point, and any negative sign) can be used. No more than nine digits to the right of the decimal point are allowed.

INTERVALSIZE Required. The interval size is a positive numeric value. A dollar sign and commas are acceptable. Floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned. A maximum of 11 positions (including digits and any decimal point) can be used. No more than nine digits to the right of the decimal point are allowed.

INTERVALNO Required. The number of intervals needed. It is an integer value from 1–999.

Page 131: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–21

Keyword Description

REPTITLE The data name of the field that contains the report title. This data name must be previously defined in a Advantage VISION:Results field definition.

STDREPT Enter YES or NO to specify whether to generate a standard report. YES is the default.

HISTOGRAM Enter a valid code to specify what type of histogram to generate. Valid codes are:

NO — No histogram is generated. NO is the default.

COUNT— A histogram reflecting the count of items is generated.

VALUE — A histogram reflecting the item values is generated.

BOTH — Both COUNT and VALUE histograms are generated.

DYLFQxx Specifies the output file name to which an unformatted frequency report data can be written. A matching DYLFQxx string must be coded as a JCL filename specified in a DD, DLBL, or TLBL statement. The xx value is chosen from the alphanumeric ranges AA-ZZ and/or 00-99.

BY yyy — Specifies the blocking factor to be used to calculate the DYLFQxx block size; where yyy is a decimal value. If BY is omitted, the default factor is 10. If running under z/OS and the Advantage VISION:Results DYLINSTL parameter SYSBLOK is set to Y, or OPTION SYSBLOCK is coded in the program, then the DYLFQxx block size will be determined by z/OS.

DISK — A required specification when running under the VSE operating system and writing file DYLFQxx to a disk device.

TAPE — A required specification when running under the VSE operating system and writing file DYLFQxx to a tape device.

SYSnnn — The required VSE programmer logical unit assigned to the DYLFQxx disk or tape output device, where nnn is a decimal value.

Page 132: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–22 Reference Guide

Logarithmic Frequency Distribution

The syntax for frequency statement for Logarithmic frequency distribution is as follows:

FREQ nn LOGARITHMIC

DISTFIELD dataname [LOWAMT nnnnnnnnnnn]

[HIGHAMT nnnnnnnnnnn] [REPTITLE dataname]

[STDREPT {YES | NO}]

[HISTOGRAM {NO | COUNT | VALUE | BOTH}]

[DYLFQxx [BY yyy] {DISK | TAPE} SYSxxx]

The keywords associated with the Logarithmic statement are as follows:

Keyword Description

FREQ Required. Defines this statement as frequency distribution.

nn Required. A unique application number from 01–99.

LOGARITHMIC Required. Defines this frequency distribution statement as logarithmic.

DISTFIELD Required. The data name of the field that is the object of the frequency distribution. This data name must be previously defined in an Advantage VISION:Results field definition.

LOWAMT The starting value of the frequency distribution. A numeric value from -9,999,999,999 through 99,999,999,999. Negative values are preceded by a negative (-) sign. A dollar sign and commas are acceptable. Floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned.

A maximum of 11 positions (including digits, decimal point, and any negative sign) can be used. No more than nine digits to the right of the decimal point are allowed.

Page 133: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–23

Keyword Description

HIGHAMT The ending value of the frequency distribution. A numeric value from -9,999,999,999 through 99,999,999,999. Negative values are preceded by a negative (-) sign. A dollar sign and commas are acceptable. Floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned.

A maximum of 11 positions (including digits, decimal point, and any negative sign) can be used. No more than nine digits to the right of the decimal point are allowed.

If the LOWAMT and HIGHAMT entries are blank, the default is -100,000,000 for LOWAMT and 100,000,000 for HIGHAMT.

If you want a range of -90,000,000,000 through 90,000,000,000, enter MIN in LOWAMT and MAX in HIGHAMT.

REPTITLE The data name, previously defined in an Advantage VISION:Results field definition, of the field that contains the report title.

STDREPT Enter YES or NO to specify whether to generate a standard report. YES is the default

HISTOGRAM Enter a valid code to specify what type of histogram to generate. Valid codes are:

NO — No histogram is generated. NO is the default.

COUNT — A histogram reflecting the count of items is generated.

VALUE — A histogram reflecting the item values is generated.

BOTH — Both COUNT and VALUE histograms are generated.

Page 134: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–24 Reference Guide

Keyword Description

DYLFQxx Specifies the output file name to which an unformatted frequency report data can be written. A matching DYLFQxx string must be coded as a JCL filename specified in a DD, DLBL, or TLBL statement. The xx value is chosen from the alphanumeric ranges AA-ZZ and/or 00-99.

BY yyy — Specifies the blocking factor to be used to calculate the DYLFQxx block size; where yyy is a decimal value. If BY is omitted, the default factor is 10. If running under z/OS and the Advantage VISION:Results DYLINSTL parameter SYSBLOK is set to Y, or OPTION SYSBLOCK is coded in the program, the DYLFQxx block size will be determined by z/OS.

DISK — A required specification when running under the VSE operating system and writing file DYLFQxx to a disk device.

TAPE — A required specification when running under the VSE operating system and writing file DYLFQxx to a tape device.

SYSnnn — The required VSE programmer logical unit assigned to the DYLFQxx disk or tape output device, where nnn is a decimal value.

Alphanumeric Frequency Distribution

The syntax for frequency statement for alphanumeric frequency distribution is as follows:

FREQ nn ALPHANUMERIC

DISTFIELD dataname ITEMFIELD dataname

ITEMNO nnn [REPTITLE dataname]

[STDREPT {YES | NO}]

[HISTOGRAM {NO | COUNT | VALUE | BOTH}]

[DYLFQxx [BY yyy] {DISK | TAPE} SYSxxx]

Page 135: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–25

The keywords associated with the alphanumeric statement are as follows:

Keyword Description

FREQ Required. Defines this statement as frequency distribution.

nn Required. A unique application number from 01–99.

ALPHANUMERIC Required. Defines this frequency distribution statement as alphanumeric.

DISTFIELD Required. The data name of the field that is the object of the frequency distribution. This data name must be previously defined in an Advantage VISION:Results field definition.

ITEMFIELD Required. The data name of the field that is to be itemized. This data name must be previously defined in an Advantage VISION:Results field definition. The length of the field cannot be more than 34 bytes. The field can be alphabetic, numeric, packed decimal, or binary.

ITEMNO Required. The number of unique items in the ITEMFIELD entry. An integer value from 1–999. This field defaults to 255 when it is left blank.

REPTITLE The data name of the field that contains the report title. This data name must be previously defined in an Advantage VISION:Results field definition.

STDREPT Enter YES or NO to specify whether or not to generate a standard report. YES is the default.

HISTOGRAM Enter a valid code to specify what type of histogram to

generate. Valid codes are:

NO — No histogram is generated. NO is the default.

COUNT — A histogram reflecting the count of items is generated.

VALUE — A histogram reflecting the item value is generated.

BOTH — Both COUNT and VALUE histograms are generated.

Page 136: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–26 Reference Guide

Keyword Description

DYLFQxx Specifies the output file name to which an unformatted frequency report data can be written. A matching DYLFQxx string must be coded as a JCL filename specified in a DD, DLBL, or TLBL statement. The xx value is chosen from the alphanumeric ranges AA-ZZ and/or 00-99.

BY yyy — Specifies the blocking factor to be used to calculate the DYLFQxx block size; where yyy is a decimal value. If BY is omitted, the default factor is 10. If running under z/OS and the Advantage VISION:Results DYLINSTL parameter SYSBLOK is set to Y, or OPTION SYSBLOCK is coded in the program, the DYLFQxx block size will be determined by z/OS.

DISK — A required specification when running under the VSE operating system and writing file DYLFQxx to a disk device.

TAPE — A required specification when running under the VSE operating system and writing file DYLFQxx to a tape device.

SYSnnn — The required VSE programmer logical unit assigned to the DYLFQxx disk or tape output device, where nnn is a decimal value.

Procedure Logic

The procedure logic is the coding for the frequency distribution application. For example, the first procedure statement is as follows:

FREQUENCY nn

In this code, nn is the application number that directly associates a FREQUENCY command to a FREQ statement.

When the FREQUENCY command is executed, the frequency data for the record is automatically saved in an internal table. At the end of the job, the accumulated data is printed as the Frequency Distribution Report and histograms.

Page 137: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–27

Output from Advantage VISION:Excel

Advantage VISION:Excel generates the following output and reports:

Frequency Distribution Statement Listing

Frequency Distribution Advantage VISION:Excel File Statistics

Frequency Distribution Advantage VISION:Results File Statistics

Frequency Distribution Report

Frequency Distribution Statement Listing

Advantage VISION:Excel generates a listing of all statements entered and validated by Advantage VISION:Excel. An example of Frequency Distribution Statement Listing is as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

BAL 5 170 PD 2

FREQ 01 LOGARITHMIC

DISTFIELD BAL

LOWAMT $0.00

HIGHAMT $5.00

FREQUENCY 01

FIN

Advantage VISION:Excel generates the following reports, in addition to the Frequency Distribution Report.

Frequency Distribution Advantage VISION:Excel File Statistics

Frequency Distribution Advantage VISION:Results File Statistics

The Advantage VISION:Excel file statistics are a summary total of statements read and the number of records written.

Page 138: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–28 Reference Guide

Frequency Distribution Advantage VISION:Excel File Statistics

11/30/97 VISION:EXCEL FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 11

NUMBER OF PARAMETER CARDS READ 11

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 17

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 17

NUMBER OF RECORDS WRITTEN TO COMPILER PARAMETER FILE 17

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 2

NUMBER OF LINES PRINTED 21

Note: Comments are not considered statements. (Comments have an asterisk or semicolon in column 1.)

Page 139: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–29

Frequency Distribution Advantage VISION:Results File Statistics

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

LESS THAN 0.00 9 4.50 10572.13- 55.58- 1174.68- 3151.68 301.28

0.00 4.99 25 12.50 51.77 0.27 2.07 1.74 312.45

5.00 9.99 8 4.00 48.22 0.25 6.03 1.31 318.77

10.00 14.99 15 7.50 181.49 0.95 12.10 1.58 327.42

15.00 19.99 28 14.00 434.66 2.28 15.52 1.20 339.24

20.00 24.99 11 5.50 236.53 1.24 21.50 1.47 346.65

25.00 29.99 7 3.50 184.72 0.97 26.39 1.31 352.56

30.00 34.99 9 4.50 287.19 1.51 31.91 1.41 359.26

35.00 39.99 8 4.00 293.19 1.54 36.65 1.11 365.58

40.00 44.99 9 4.50 383.68 2.02 42.63 1.75 372.28

45.00 49.99 4 2.00 185.07 0.97 46.27 1.14 376.75

50.00 54.99 6 3.00 309.58 1.63 51.60 1.43 382.22

55.00 59.99 6 3.00 339.33 1.78 56.56 1.16 387.69

60.00 64.99 2 1.00 124.96 0.66 62.48 2.48 390.85

65.00 69.99 3 1.50 198.15 1.04 66.05 0.88 394.72

70.00 74.99 1 0.50 72.50 0.38 72.50 0.00 396.95

75.00 79.99 1 0.50 77.00 0.40 77.00 0.00 399.18

80.00 84.99 3 1.50 244.06 1.28 81.35 0.95 403.05

85.00 89.99 2 1.00 178.88 0.94 89.44 0.16 406.21

90.00 94.99 0 0.00 0.00 0.00 0.00 0.00 406.21

Page 140: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–30 Reference Guide

95.00 99.99 0 0.00 0.00 0.00 0.00 0.00 406.21

100.00 104.99 2 1.00 201.40 1.06 100.70 0.50 409.37

105.00 109.99 3 1.50 323.43 1.70 107.81 0.76 413.24

110.00 114.99 2 1.00 228.75 1.20 114.35 0.14 416.40

115.00 119.99 2 1.00 233.60 1.23 116.80 1.20 419.56

120.00 124.99 3 1.50 369.74 1.94 123.25 1.39 423.43

125.00 129.99 4 2.00 509.78 2.68 127.45 1.38 427.90

130.00 134.99 0 0.00 0.00 0.00 0.00 0.00 427.90

135.00 139.99 1 0.50 136.23 0.72 136.23 0.00 430.13

140.00 144.99 2 1.00 280.00 1.47 140.00 0.00 433.29

145.00 149.99 0 0.00 0.00 0.00 0.00 0.00 433.29

MORE THAN 149.99 24 12.00 23481.32 123.44 978.39 1249.19 784.59

TOTAL 200 100.00 19023.10 100.00

MEAN= 95.12 STANDARD ERROR OF THE MEAN = 63.428

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55 MAXIMUM VALUE = 5292.24

See the Count of Items column in the Frequency Distribution Report to look at the pattern of distribution of accounts in the file. However, if you are considering stratified sampling, use the statistical information at the bottom of the report to guide you. For example, use the coefficient of variation to help you decide on whether or not to stratify. If you decide to stratify, use the information in the SQUARE ROOT RANGE X COUNT column (cum F values) to set strata interval sizes. For more information about using these measurements, see the chapter “Stratified Sampling Overview”.

Table Space Requirements

A table is built for each frequency distribution application. The amount of space or memory required for each table depends on the number of intervals, number of items, or low amount and high amount coded. If you have limited space constraints, you can determine the table space (in bytes) needed for any frequency distribution application with the following algorithms:

Equal Interval Frequency Distribution Space Considerations

Alphanumeric Frequency Distribution Space Considerations

Logarithmic Frequency Distribution Space Considerations

Page 141: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–31

Equal Interval Frequency Distribution Space Considerations

The approximate size of the table is:

Size in Bytes = (53 * (Number of Intervals + 2)) + 250

Alphanumeric Frequency Distribution Space Considerations

The approximate size of the table is:

Size in Bytes = ((Number of Items + 1) * (53 + Size of the Field to be Itemized)) + 250

Logarithmic Frequency Distribution Space Considerations

The approximate size of the table is:

Size in Bytes = (53 * (Number of Entries + 2)) + 250

This formula is derived by the following algorithm.

1. Determine the index for the low amount as follows:

Where:

s = -1 if, the low amount is negative or 1 if the low amount is positive.

d = The number of digits in the integer portion of the low amount with a minimal value of 1.

h = The high digit in the integer portion of the low amount with a minimal value of 1.

Then:

Low Index = 128 + ((s) * ((9*(d-1)) + (h-1)))

– If the low amount is blank, the low index is 56.

– If the low amount is MIN, the low index is 2.

2. Determine the index for the high amount as follows: Where:

s = -1 if the high amount is negative or + 1 if the high amount is positive.

d = the number of digits in the integer portion of the high amount with a minimal value of 1.

h = the high digit in the integer portion of the high amount with a minimal value of 1.

Page 142: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–32 Reference Guide

Then:

High Index = 128 + ((s) * ((9*(d-1)) + (h-1)))

– If the high amount is blank, the high index is 200.

– If the high amount is MAX, the high index is 255.

3. Determine the number of entries in the table as follows:

Number of Entries = High Index - Low Index

– If zero is between the high and low amounts, add 1 to the number entries.

4. Determine the approximate size of the table as follows:

Size in Bytes = (53 * (Number of Entries + 2)) + 250

The DYLFQxx Frequency Distribution Output File

Each of the three Advantage VISION:Excel Frequency distribution choices provide the option to route the resulting report data to a file. Keyword DYLFQxx, specified as a free-form Advantage VISION:Excel statement, will activate the processing of the frequency distribution output file. The syntax for DYLFQxx is explained as follows.

[DYLFQxx [BY yyy] {DISK | TAPE} SYSxxx]

DYLFQxx is an Advantage VISION:Excel keyword and the name of a DD, DLBL, or TLBL statement defining the output file to which the frequency distribution report data will be written. The xx suffix value is alphanumeric and is comprised of values from the ranges AA-ZZ and 00-99

BY yyy defines the blocking factor to be used when writing the DYLFQxx file. If BY is omitted, the default value is 10. If running under z/OS and the Advantage VISION:Results DYLINSTL parameter SYSBLOK is set to Y, or OPTION SYSBLOCK is coded in the program, the DYLFQxx block size will be determined by z/OS.

DISK or TAPE is applicable only to jobs run under the VSE operating system and is required if the DYLFQxx file is to be written to disk or tape.

SYSxxx identifies the VSE programmer logical unit used for the DYLFQxx file when writing to a disk or tape device.

The DYLFQxx output file will contain the same information found in the frequency distribution report that is sent to AUDPRINT/SYS009. The DYLFQxx report, however, will be in a compressed format as shown in the following diagram.

Page 143: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–33

In addition to the actual distribution data, each detail record will start with a type identifier in position 1. Equal interval and Logarithmic distribution records will contain the number 2 in position 1. Alphanumeric distribution records will be identified by the number 3. Also, an entry position indicator will be present in position 2 of each detail record. The first detail record will have the character L in position 2 and the last detail record will be identified by an “H” in the second position. The last or “high record” for the Equal and Logarithmic reports will actually be a “dummy” record containing a string of zeros starting in position 3. The detail records between the first and last records for the Equal, Alphanumeric, and Logarithmic output will contain a blank as the entry position indicator. The last detail or “dummy” record in the file will be followed by a summary record indicated by the number 1 in position 1.

Basic Record Sequence of the DYLFQxx File

xL detail record1 x detail record 2 x detail record 3 x x x detail record n-1 xH detail recordn or dummy record 1 summary record

In this diagram, x represents the value 2 or 3 and n is the total number of detail records. An end-of-data dummy record will appear as

xH0000000000000000000000000000000000.

The actual frequency distribution report data starts after the record type identifier and the entry position indicator. The complete details for the data fields of each type of DYLFQxx output record are shown in the following tables. The DYLFQxx file is variable blocked with a maximum record size of 129 bytes.

The DYLFQxx output record formats are shown as follows:

Summary Record Field Size

Field Type

Number of digits to the right of decimal point

Value

Record Type 1 Char 1

Application No. 2 NU 0

Total Count of Items 5 Packed **

Total Value of Items 16 Packed **

Mean Value 16 Packed **

Standard Deviation 16 Packed **

Page 144: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

4–34 Reference Guide

Summary Record Field Size

Field Type

Number of digits to the right of decimal point

Value

Minimum Value 16 Packed **

Number of Zero Items 5 Packed 0

Standard Error of the Mean

16 Packed **

Coefficient of Variation 16 Packed **

Maximum Value 16 Packed **

Detail Record for Equal Interval Frequency and Logarithmic Frequency

Field Size

Field Type

Number of digits to the right of decimal point

Value

Record Type 1 Char 2

Entry Position 1 Char H, L, or Blank*

Low Value 16 **

High Value 16 **

Count of Items 5 Packed 0

% of Items 8 Packed 2

Total of Items 16 Packed **

% of Total 8 Packed 2

Mean 16 Packed **

Standard Deviation 16 Packed **

Square Root Range x Count

16 Packed **

Page 145: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Logical Flow of Frequency Distribution

Chapter 4: Frequency Distribution Reporting 4–35

Detail Record for Alpha Numeric Frequency

Field Size

Field Type

Number of digits to the right of decimal point

Value

Record Type 1 Char 3

Entry Position 1 Char H, L, or Blank*

Alpha Item*** 34

Slack Bytes 2

Count of Items 5 Packed 0

% of Items 8 Packed 2

Total of Items 16 Packed **

% of Total 8 Packed 2

Mean 16 Packed **

Standard Deviation 16 Packed **

Slack Bytes 16 Packed

where,

(*) L — First Detail Record - Low Value is 16X'00'

(*) H — Last Detail Record – High Value is 16X’FF’

(*) H — Dummy End Record – Value is 117X’00’

(*) Blank — Detail records in between

** — As many digits to the right of the decimal point as in the amount being distributed

*** — Category Value left justified with trailing blanks

Note: For an example of a sample job using DYLFQxx, see Frequency Distribution Examples.

Page 146: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–36 Reference Guide

Frequency Distribution Examples Specifying an Equal Interval Frequency Distribution

Specifying a Logarithmic Frequency Distribution

Specifying an Alphanumeric Frequency Distribution

Specifying COUNT and VALUE Histograms

Specifying the DYLFQxx Output File

Specifying an Equal Interval Frequency Distribution

Brown and Brown are auditing Jenks, Inc., a wholesale toy company. Their initial task was to select a random sample from Jenks' accounts receivable file and examine that sample. However, very little is as yet known about this file. Consequently, Brown and Brown want to run a Frequency Distribution Report on the file first to determine if they are going to stratify.

Jenks, Inc. keeps track of minimum and maximum values on their file, so they are able to tell the auditors that all accounts fall within the $10.00 to $110.00 range. In such a case, you can perform either an equal interval or a logarithmic interval frequency distribution.

Brown and Brown arbitrarily opt for the equal interval form.

If equal intervals are from $10.00 to $19.99, $20.00 to $29.99, up to $99.99, the equal interval report would be identical to a logarithmic report on the same file. Recall that all the 147 intervals possible with a logarithmic frequency distribution are only printed if values occur at the high and low ends. The Equal Interval Frequency Distribution Input Statements are as follows:

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

FREQ 01 EQUAL

DISTFIELD BALANCE

START $10.00

INTERVAL SIZE $5.00

INTERVALNO 20

FREQUENCY 01

Page 147: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–37

The following are explanations for the statements shown in the following table.

Statement Description

FILE Statement This statement, identified by FILE, defines the input file, ACCTREC, as fixed block with a record size of 352 and a block size of 5280.

Field Definition The field definition statement defines the data name used. This statement immediately follows the appropriate FILE statement. Only one field needs to be defined for the frequency distribution. The field called BALANCE is a 5-byte field, beginning at position 170. It has two decimal places and is in packed decimal format.

Equal Interval Frequency Distribution

The application number assigned is 01. The field in the input file that is the target of the frequency distribution (DISTFIELD) procedure is BALANCE; the data name is defined in a field definition statement. The lowest interval value is $10.00 (START), and each interval increases by $5.00 (INTERVALSIZE). The number of intervals is set at 20 (INTERVALNO).

Procedure Logic This statement identifies the function to be performed, frequency distribution, by the command FREQUENCY. The application number, 01, links this instruction with the frequency statement.

The Equal Interval Frequency Distribution statements entered are as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

FREQ 01 EQUAL

DISTFIELD BALANCE

START $10.00

INTERVALSIZE $5.00

INTERVALNO 20

FREQUENCY 01

Page 148: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–38 Reference Guide

Brown and Brown receive output from Advantage VISION:Excel, as shown in the following reports.

Equal Interval Frequency Distribution Advantage VISION:Results File Statistics Report

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 334 117,568

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Equal Interval Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

10.00 14.99 152 45.51 2099.55 35.91 13.81 0.77 27.54

15.00 19.99 137 41.02 2194.74 37.54 16.02 0.85 53.89

20.00 24.99 1 0.30 24.92 0.43 24.92 0.00 55.92

25.00 29.99 8 2.40 225.86 3.86 28.23 1.06 62.24

30.00 34.99 13 3.89 430.39 7.36 33.11 1.30 70.29

35.00 39.99 19 5.69 708.25 12.11 37.28 1.16 80.03

40.00 44.99 4 1.20 163.02 2.79 40.76 0.66 84.50

TOTAL 334 100.00 5846.73 100.00

MEAN = 17.51 STANDARD ERROR OF THE MEAN = 0.383

STANDARD DEVIATION = 7.00 COEFFICIENT OF VARIATION = 0.400

MINIMUM VALUE = 11.61 MAXIMUM VALUE = 41.79

In checking the final report, Brown and Brown see that the standard deviation is small in comparison to the mean. In fact, the coefficient of variation for this population is 0.400. This is sufficiently low that stratification is not necessary before sampling. Brown and Brown proceed with simple random sampling.

Page 149: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–39

Specifying a Logarithmic Frequency Distribution

Billings Stationery and Supply sells everything from paper clips and rubber bands to copying machines and executive suite furniture. They have a greater quantity of smaller items, such as pencils, clips, and erasers. What the auditor wants to know is just how many items exist on the file and in what dollar ranges. Because the logarithmic frequency distribution function has intervals for small values, the auditors decided to use this feature.

The Logarithmic Frequency Distribution Input Statements are as follows:

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

FREQ 02 LOGARITHMIC

DISTFIELD BALANCE

FREQUENCY 02

The Advantage VISION:Excel/Advantage VISION:Results statements are nearly identical to those in the preceding example. Only the application number in the FREQUENCY command differs.

The application number is 02. The label or data name for the field to be distributed is again BALANCE. No other statements need be entered, as the logarithmic default option automatically sets up 147 intervals.

The original statements appear in the report as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

FREQ 02 LOGARITHMIC

DISTFIELD BALANCE

FREQUENCY 02

The Billings Stationery and Supply auditing staff received the following output:

Page 150: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–40 Reference Guide

Logarithmic Frequency Distribution Advantage VISION:Results File Statistics Report

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 19,873 6,995,296

RECORDS PAGE

SFILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

With this file, the standard deviation of the population proves to be extremely large in relation to the mean of the population. In fact, the standard deviation is 4.739 times that of the mean (that is, the coefficient of variation is 4.739). With a coefficient of variation that large, stratifying before sampling is imperative.

Page 151: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–41

Logarithmic Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 02

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.01 0.99 13 0.07 7.04 0.00 0.54 0.27 3.57

1.00 1.99 40 0.20 73.55 0.01 1.84 0.20 9.86

2.00 2.99 209 1.05 528.54 0.03 2.53 0.28 24.24

3.00 3.99 526 2.65 1957.68 0.29 3.72 0.27 47.06

4.00 4.99 1481 7.45 6663.79 0.98 4.50 0.29 85.35

5.00 5.99 2066 10.40 11509.00 1.70 5.57 0.29 130.58

6.00 6.99 2829 14.24 18364.98 2.71 6.49 0.29 183.50

7.00 7.99 2954 14.86 22172.21 3.27 7.51 0.29 237.58

8.00 8.99 3066 15.43 26069.43 3.84 8.50 0.29 292.67

9.00 9.99 1865 9.38 17484.21 2.58 9.37 0.29 335.64

10.00 19.99 1952 9.82 21327.81 3.15 10.93 0.79 475.28

20.00 29.99 22 0.11 581.86 0.09 26.45 2.24 490.10

30.00 39.99 127 0.64 4639.13 0.68 36.53 2.58 525.72

40.00 49.99 378 1.90 17374.32 2.56 45.96 2.92 587.17

50.00 59.99 642 3.23 35223.09 5.19 54.86 2.89 667.25

60.00 69.99 536 2.70 34588.30 5.10 64.53 2.57 740.43

70.00 79.99 192 0.97 14329.63 2.11 74.63 2.65 784.23

80.00 89.99 40 0.20 3367.69 0.50 84.19 2.82 804.22

90.00 99.99 4 0.02 374.37 0.06 93.59 2.74 810.54

100.00 199.99 385 1.94 68124.56 10.05 176.95 16.62 1006.74

200.00 299.99 369 1.86 81662.14 12.04 221.31 15.68 1198.82

300.00 399.99 1 0.01 305.96 0.05 305.96 0.00 1208.82

400.00 499.99 0 0.00 0.00 0.00 0.00 0.00 1208.82

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 1208.82

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 1208.82

700.00 799.99 1 0.01 782.03 0.12 782.03 0.00 1218.82

800.00 899.99 1 0.01 855.35 0.13 855.35 0.00 1228.82

900.00 999.99 3 0.02 2856.18 0.42 952.06 27.00 1246.14

1000.00 1999.99 145 0.73 229363.44 33.83 1581.82 268.73 1626.93

2000.00 2999.99 26 0.13 57476.97 8.48 2210.65 119.72 1788.17

TOTAL 19873 100.00 678063.26 100.00

MEAN = 34.12 STANDARD ERROR OF THE MEAN = 1.147

STANDARD DEVIATION = 161.70 COEFFICIENT OF VARIATION = 4.739

MINIMUM VALUE = 0.10 MAXIMUM VALUE = 2465.49

Page 152: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–42 Reference Guide

Specifying an Alphanumeric Frequency Distribution

Billings Stationery and Supply purchases wares from many different vendors. What the auditor wants to know is just how many items are purchased from each vendor and the total dollar amount paid to each vendor account. Because the task is to be itemized by vendor, the auditors decided to use alphanumeric frequency distribution. The Alphanumeric Frequency Distribution Input Statements are as follows:

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

ACCTNO 2 182

FREQ 01 ALPHANUMERIC

DISTFIELD BALANCE

ITEMFIELD ACCTNO

ITEMNO 100

FREQUENCY 01

The Advantage VISION:Excel/Advantage VISION:Results statements are similar to those in the previous examples. However, because alphanumeric requires two data name fields (distributed and itemized) for its distribution, they coded two field definition statements.

The field to be distributed is (BALANCE), the field to be itemized (ACCTNO), and the number of items or groups they expect (100).

The Billings Stationery and Supply auditing staff received the following output.

Alphanumeric Frequency Distribution Statement Listing

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

ACCTNO 2 182

FREQ 01 ALPHANUMERIC

DISTFIELD BALANCE

ITEMFIELD ACCTNO

ITEMNO 100

FREQUENCY 01

Page 153: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–43

Alphanumeric Frequency Distribution Advantage VISION:Results File Statistics

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Alphanumeric Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

---- I T E M S ---- COUNT % OF TOTAL % OF STANDARD OF ITEMS ITEMS OF ITEMS TOTAL MEAN DEVIATION

BO 1 0. 50 44.99 0.24 44.99 0.00

EO 3 1.50 52.00 0.27 17.33 11.15

FO 7 3.50 300.74 1.58 42.96 57.78

IO 6 3.00 681.30 3.58 113.55 139.44

KO 22 11.00 3765.92 19.80 171.18 378.72

LO 1 0.50 45.24 0.24 45.24 0.00

MA 61 30.50 8524.80 44.81 139.75 524.20

MF 8 4.00 1836.67 9.65 229.58 360.83

MI 2 1.00 276.23 1.45 138.12 1.89

MN 4 2.00 158.29 0.83 39.57 50.23

MO 8 4.00 2801.84 14.73 350.23 829.05

MR 1 0.50 43.00 0.23 43.00 0.00

MT 5 2.50 359.13 1.89 71.83 93.46

MU 3 1.50 629.05 3.31 209.68 148.83

NA 12 6.00 9964.36- 52.38- 830.36- 2793.05

PO 18 9.00 440.10 2.31 24.45 58.28

RO 1 0.50 65.00 0.34 65.00 0.00

TO 7 3.50 6875.90 36.15 982.27 1828.01

VO 1 0.50 41.91 0.22 41.91 0.00

Page 154: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–44 Reference Guide

WE 1 0.50 11.20 0.06 11.20 0.00

WO 28 14.00 2034.15 10.69 72.65 78.12

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS = 10

Specifying COUNT and VALUE Histograms

Billings Stationery and Supply wanted the distribution report not only as generated, but also to show the distribution graphically. Using the same program from the section Specifying an Alphanumeric Frequency Distribution, the command HISTOGRAM BOTH is added to get the COUNT and VALUE histograms.

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

ACCTNO 2 182

FREQ 01 ALPHANUMERIC

DISTFIELD BALANCE

ITEMFIELD ACCTNO

ITEMNO 100

HISTOGRAM BOTH

FREQUENCY 01

When Advantage VISION:Excel runs to completion, the auditors for Billings Stationery and Supply have three Frequency Distribution Reports, consisting of two histograms and one regular alphanumeric frequency distribution. If they did not want the regular alphanumeric Frequency Distribution Report (also generated in the section Specifying an Alphanumeric Frequency Distribution), they could have specified STDREPT NO. The Advantage VISION:Results statements are identical to those in the preceding example.

The Billings Stationery and Supply auditing staff received the following output from their Advantage VISION:Excel run.

Page 155: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–45

The Histogram BOTH Statement Listing Report

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2

ACCTNO 2 182

FREQ 01 ALPHANUMERIC

DISTFIELD BALANCE

ITEMFIELD ACCTNO

ITEMNO 100

HISTOGRAM BOTH

FREQUENCY 01

Histogram BOTH VISIONS: Results File Statistics Report

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 156: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–46 Reference Guide

Alphanumeric Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

--- I T E M S ---- COUNT % OF TOTAL % OF STANDARD OF ITEMS ITEMS OF ITEMS TOTAL MEAN DEVIATION

BO 1 0.50 44.99 0.24 44.99 0.00

EO 3 1.50 52.00 0.27 17.33 11.15

FO 7 3.50 300.74 1.58 42.96 57.78

IO 6 3.00 681.30 3.58 113.55 139.44

KO 22 11.00 3765.92 19.80 171.18 378.72

LO 1 0.50 45.24 0.24 45.24 0.00

MA 61 30.50 8524.80 44.81 139.75 524.20

MF 8 4.00 1836.67 9.65 229.58 360.83

MI 2 1.00 276.23 1.45 138.12 1.89

MN 4 2.00 158.29 0.83 39.57 50.23

MO 8 4.00 2801.84 14.73 350.23 829.05

MR 1 0.50 43.00 0.23 43.00 0.00

MT 5 2.50 359.13 1.89 71.83 93.46

MU 3 1.50 629.05 3.31 209.68 148.83

NA 12 6.00 9964.36- 52.38- 830.36- 2793.05

PO 18 9.00 440.10 2.31 24.45 58.28

RO 1 0.50 65.00 0.34 65.00 0.00

TO 7 3.50 6875.90 36.15 982.27 1828.01

VO 1 0.50 41.91 0.22 41.91 0.00

WE 1 0.50 11.20 0.06 11.20 0.00

WO 28 14.00 2034.15 10.69 72.65 78.12

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS = 10

Page 157: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–47

Alphanumeric Frequency Distribution COUNT Histogram

11/30/97 FREQUENCY DISTRIBUTION HISTOGRAM REPORT PAGE 1

APPLICATION 01

--- I T E M S -----COUNT CUM % OF TOTAL CUM % OF COUNT HISTOGRAM OF ITEMS ITEMS OF ITEMS TOTAL 0---------------------------------

BO 1 0.50 44.99 0.24 +

EO 3 2.00 52.00 0.51 ++

FO 7 5.50 300.74 2.09 ++++

IO 6 8.50 681.30 5.67 +++

KO 22 19.50 3765.92 25.47 +++++++++++

LO 1 20.00 45.24 25.71 +

MA 61 50.50 8524.80 70.52 +++++++++++++++++++++++++++++++

MF 8 54.50 1836.67 80.17 ++++

MI 2 55.50 276.23 81.63 +

MN 4 57.50 158.29 82.46 ++

MO 8 61.50 2801.84 97.19 ++++

MR 1 62.00 43.00 97.41 +

MT 5 64.50 359.13 99.30 +++

MU 3 66.00 629.05 102.61 ++

NA 12 72.00 9964.36- 50.23 ++++++

PO 18 81.00 440.10 52.54 +++++++++

RO 1 81.50 65.00 52.88 +

TO 7 85.00 6875.90 89.03 ++++

VO 1 85.50 41.91 89.25 +

WE 1 86.00 11.20 89.31 +

WO 28 100.00 2034.15 100.00 ++++++++++++++

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS = 10

+ = 2

Page 158: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–48 Reference Guide

Alphanumeric Frequency Distribution VALUE Histogram

11/30/97 FREQUENCY DISTRIBUTION HISTOGRAM REPORT PAGE 1

APPLICATION 01

--- I T E M S -----COUNT CUM % OF TOTAL CUM % OF VALUE HISTOGRAM OF ITEMS ITEMS OF ITEMS TOTAL 0---------------------------------

BO 1 0.50 44.99 0.24 +

EO 3 2.00 52.00 0.51 +

FO 7 5.50 300.74 2.09 ++

IO 6 8.50 681.30 5.67 ++++

KO 22 19.50 3765.92 25.47 +++++++++++++++++++++

LO 1 20.00 45.24 25.71 +

MA 61 50.50 8524.80 70.52 +++++++++++++++++++++++++++++++++++++++++++++++

MF 8 54.50 1836.67 80.17 +++++++++++

MI 2 55.50 276.23 81.63 ++

MN 4 57.50 158.29 82.46 +

MO 8 61.50 2801.84 97.19 ++++++++++++++++

MR 1 62.00 43.00 97.41 +

MT 5 64.50 359.13 99.30 ++

MU 3 66.00 629.05 102.61 ++++

NA 12 72.00 9964.36- 50.23 ***

PO 18 81.00 440.10 52.54 +++

RO 1 81.50 65.00 52.88 +

TO 7 85.00 6875.90 89.03 ++++++++++++++++++++++++++++++++++++++

VO 1 85.50 41.91 89.25 +

WE 1 86.00 11.20 89.31 +

WO 28 100.00 2034.15 100.00 ++++++++++++

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS = 10

+ = 182.00 * = 3322.00-

Page 159: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–49

Specifying the DYLFQxx Output File

The following sample was selected simply to demonstrate the use of the DYLFQxx output file. The report is not based on any special distribution requirements.

Coding the DYLFQxx specifications requires a JCL component and an Excel keyword statement. In the JCL, a DYLFQxx Ddname must be coded when running under z/OS, and a DLBL or TLBL file name must be present for VSE. In this example, a suffix of FX was arbitrarily chosen for the Frequency output keyword; accordingly, the JCL file name and Excel free-form keyword is DYLFQFX.

The DYLFQxx Frequency Distribution output file is variable blocked with a maximum record size of 129 bytes.

Additional JCL Statements Example

An example of the additional JCL statements that are needed when specifying the DYLFQxx output file is shown as follows.

For z/OS:

//DYLFQFX DD DSN=your.DYLFQxx.outfile,DISP=SHR,

// UNIT=SYSDA,SPACE=(TRK,(5,5)),

// DCB=(LRECL=129,RECFM=VB)

For VSE:

// ASSGN SYS021,X'cuu'

// DLBL DYLFQFX,'your.DYLFQxx.outfile'

// EXTENT SYS021,...extent information

Equal Interval Frequency Distribution Statements Using DYLFQxx

In the following sample code, the absence of the BY yyy sub-parameter on the DYLFQxx statement implies the default blocking factor of 10. Also, when running under the VSE operating system the DYLFQxx sub-parameters DISK or TAPE and the SYSnnn parameter are required.

OPTION XREFA EXCEL

FILE ARFILE FB 352 5280

COPY ARFIELDS

FREQ 85 EQUAL

DISTFIELD BALANCE

ITEMFIELD ACCTNO

START $10.00

Page 160: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–50 Reference Guide

INTERVALSIZE $5.00

INTERVALNO 7

DYLFQFX

FREQUENCY 85

Equal Interval Frequency Distribution Report

3/31/07 VISION:EXCEL 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 25

NUMBER OF PARAMETER CARDS READ 24

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 35

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 35

NUMBER OF RECORDS WRITTEN TO COMPILER PARAMETER FILE 36

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 2

NUMBER OF LINES PRINTED 10

COMPUTER ASSOCIATES VISION:EXCEL 7.0 DATE 3/31/07 PAGE 1

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

******************************************************

* *

* COPYRIGHT (C) 2006 CA. ALL RIGHTS RESERVED. *

* *

******************************************************

Page 161: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

Chapter 4: Frequency Distribution Reporting 4–51

3/31/07 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 85

------------ R A N G E ------------ COUNT % OF TOTAL % OF STANDARD SQUARE ROOT

L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL MEAN DEVIATION RANGE X COUNT

LESS THAN 10.00 42 21.00 10472.14- 55.05- 249.34- 1536.90 651.16

10.00 14.99 15 7.50 181.49 0.95 12.10 1.58 659.81

15.00 19.99 28 14.00 434.66 2.28 15.52 1.20 671.63

20.00 24.99 11 5.50 236.53 1.24 21.50 1.47 679.04

25.00 29.99 7 3.50 184.72 0.97 26.39 1.31 684.95

30.00 34.99 9 4.50 287.19 1.51 31.91 1.41 691.65

35.00 39.99 8 4.00 293.19 1.54 36.65 1.11 697.97

40.00 44.99 9 4.50 383.68 2.02 42.63 1.75 704.67

MORE THAN 44.99 71 35.50 27493.78 144.53 387.24 840.58 1315.04

TOTAL 200 100.00 19023.10 100.00

MEAN = 95.12 STANDARD ERROR OF THE MEAN = 63.418

STANDARD DEVIATION = 896.87 COEFFICIENT OF VARIATION = 9.429

MINIMUM VALUE = 10085.55- MAXIMUM VALUE = 5292.24

NUMBER OF ZERO ITEMS 10

Hexprint of the Contents of a DYLFQxx Output File

The following is a Hexprint of the contents of the left half of each record in the DYLFQxx output file, which was produced from the same data used in the previous report. The DYLFQxx file can be read in as an input file for use in various other tasks.

2L..........................................................å.(......&).........

FD000000000000000000000000000000000000200000010000000000000142400000055000000000

23000000000000000C000000000000010C0004C0000020C000000000000071D0000050D000000000

------------------------------------------------------------------------------

2 ..............................ñæ....*......Í................æ.......*.........

F4000000000000000000000000000000490000500000070000000000000011900000005000000000

20000000000000010C000000000000019C0001C0000005C000000000000084C0000009C000000000

------------------------------------------------------------------------------

2 ..............&...............ræ....ð...... ..............äã%.......ð.........

F4000000000000005000000000000000990000800000040000000000000044600000028000000000

Page 162: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Examples

4–52 Reference Guide

20000000000000010C000000000000019C0002C0000010C000000000000036C0000002C000000000

------------------------------------------------------------------------------

2 ..............................ñæ...........í...............Á........<.........

F4000000000000000000000000000000490000100000050000000000000026300000014000000000

20000000000000020C000000000000029C0001C0000005C000000000000035C0000002C000000000

------------------------------------------------------------------------------

2 ..............&...............ræ....@......................å........@.........

F4000000000000005000000000000000990000700000030000000000000014200000007000000000

20000000000000020C000000000000029C0000C0000005C000000000000087C0000009C000000000

------------------------------------------------------------------------------

2 ..............................ñæ....æ......á...............Éæ.................

F4000000000000000000000000000000490000900000040000000000000027900000011000000000

20000000000000030C000000000000039C0000C0000005C000000000000081C0000005C000000000

------------------------------------------------------------------------------

2 ..............&...............ræ....ð...... ................æ.......<.........

F4000000000000005000000000000000990000800000040000000000000023900000014000000000

20000000000000030C000000000000039C0000C0000000C000000000000091C0000005C000000000

------------------------------------------------------------------------------

2 ..............................ñæ....æ......á................ð.................

F4000000000000000000000000000000490000900000040000000000000033800000022000000000

20000000000000040C000000000000049C0000C0000005C000000000000086C0000000C000000000

------------------------------------------------------------------------------

2 ..............ñæ..............ræ...........í..............ñ.ð......á..........

F4000000000000004900000000000000990000100000050000000000000243800000143000000000

20000000000000049C000000000000049C0007C0000035C000000000000797C0000045C000000000

------------------------------------------------------------------------------

2H..............................................................................

FC000000000000000000000000000000000000000000000000000000000000000000000000000000

28000000000000000000000000000000000000000000000000000000000000000000000000000000

------------------------------------------------------------------------------

1í ...................................é..............iÇ@..............í)........

F5400020000000000000103000000000000000520000000000000867000000000000105500000000

1500000C000000000000921C000000000000091C000000000000098C000000000000085D001C0000

------------------------------------------------------------------------------

Page 163: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 5: Non-Stratified Sampling Overview 5–1

Chapter 5: Non-Stratified Sampling Overview

This chapter describes non-stratified sampling as it applies to Advantage VISION:Excel and is divided into the following sections:

Sampling Theory

Advantage VISION:Excel Sampling Capabilities

How to Sample Using Advantage VISION:Excel

The first section discusses some of the major concepts in sampling theory. You need to understand these concepts to use the statistical sampling techniques that are supported by Advantage VISION:Excel. This section contains the following topics:

Sampling as a method of obtaining information about an entire population by examining only a part of it.

Necessity of sampling:

– In a computerized environment

– Benefits of statistical sampling

Recognizing and handling the risk inherent in sampling (as opposed to taking a complete census):

– Statistical sampling mathematically deals with sampling risk.

– The confidence level and the precision limit control the statistical sampling risk.

– The sampling technique being used, the confidence level, and the precision limit statistically determine the sample size.

Statistical sampling:

– Depending on a randomly selected sample

– Approaching in a step-by-step manner

The second section of this overview discusses what Advantage VISION:Excel does to make your task of sampling easier.

The third section shows you how to sample using Advantage VISION:Excel and what you can expect from Advantage VISION:Excel.

Page 164: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sampling Theory

5–2 Reference Guide

Sampling Theory Sampling is a method of obtaining information about a whole collection of things by examining only a portion of it. The sample is expected to be more or less representative of the entire population.

For example, the Nielsen ratings use a sample of 1200 families (households) to determine the TV-watching preferences of more than 73 million people. Statistics are calculated and decisions are made on the basis of information inferred from that sample.

Sampling techniques are used to reduce the volume of original data to be examined in an attempt to decrease the time and cost of the auditing effort without compromising the validity and integrity of that effort. In this way, a more timely and meaningful audit report can be developed.

In auditing a computer system, the need for sampling arises when book, recorded, or unaudited values are stored on automated files and information held on tape and disk files must be traced back to originating forms and documents to verify the correctness of that information. This is normally a manual effort, necessitating a reduction in the volume of data to be examined to keep the audit effort on schedule.

Sampling techniques are applicable for both compliance testing and substantive testing. In compliance testing, an originating document, perhaps a check or a voucher, is traced through each step of the accounting internal control system to verify that each step was completed properly, including an examination for withdrawal authority, proper signatures, and proper identification. In substantive testing, the recorded value is examined against the actual value on the originating document.

Traditionally, before statistics were introduced into the area of auditing, sampling was done on a judgmental basis. That is, the auditor, using experience, observation, and, to some degree, intuition, developed a sampling plan.

Statistical sampling techniques do not replace the auditor's judgment; instead, they provide a way of obtaining precise information, enhancing the auditor's judgment.

Statistical sampling is very closely tied to mathematical laws; consequently, the amount by which the sample is truly representative of the population can be quantified and upheld. This means that by using statistical sampling, an auditor can develop a sampling plan more affirmatively and later can defend the conclusions and decisions made because of the sampling inferences more objectively.

Page 165: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sampling Theory

Chapter 5: Non-Stratified Sampling Overview 5–3

Whenever any kind of sampling is done, an element of risk is inherent in the method—the risk that the sample is not sufficiently representative of the actual population. In statistics, two terms are used:

The alpha risk — statistical evidence erroneously fails to support the correctness of recorded information that is actually correct.

The beta risk — statistical evidence erroneously supports the correctness of recorded in correct information.

In statistical sampling, you control the amount of sampling risk by specifying a confidence level and a precision limit. The confidence level is a measure of the reliability of the sample being used.

For example, if you state that you want to be 95 percent confident in your sample, you are stating that you expect that if you were to randomly choose a very large number of samples of equal size from the same population, 95 percent of those samples would be quite representative of that population. You could say, with 95 percent confidence, that the one sample chosen is somewhat representative of the population in question.

The precision limit eliminates the vagueness of “somewhat representative” and quantifies the concept of materiality. For example, if you state that you want a precision limit of 1 percent, you are asking that the value found in the sample be within 1 percent of the true value in the population. The sample size is the key. Determining the correct sample size by using statistical formulas ensures that the sample chosen supports the confidence level and the precision limit wanted.

The closer the confidence level comes to 100 percent and the closer the precision limit comes to 0 percent, the larger the sample size must be. The rule of thumb here is to specify the smallest confidence level and the largest precision limit that can be tolerated under the restraints of your audit commitments.

After you decide on the sample size, you must select the sample. Statistical sampling dictates that the sample be chosen randomly—every item in the population must have an equal chance of being selected. This eliminates any bias in the selection. When the sample is not chosen randomly, the inferences one can make from the sample can no longer be supported statistically.

A classic example of a bias sample being taken with erroneous statistical inferences being made from it is the Literary Digest poll made in 1936. In that year, the Literary Digest mailed out 10 million ballots to their subscription holders, car owners, and people in the telephone book, asking people to vote for either Landon or Roosevelt, the Republican and Democratic nominees for President. Two million ballots were returned, and the Literary Digest statistically predicted a Landon victory. However, in November when the election took place, Roosevelt won a landslide victory.

Page 166: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Sampling Capabilities

5–4 Reference Guide

Why was the prediction incorrect after such a huge sampling? The problem lay in the fact that the sample chosen was not representative of the total population. Cars and telephones were luxury items in 1936; consequently, car owners, telephone owners, and Literary Digest subscription holders tended to be in the upper economic class of the 1936 society—people who were more likely to be Republicans than Democrats were. The point being emphasized is that statistical inference can only be applied when every item in the population has an equal chance of being included in the sample.

Use the following steps as a guideline to ensure that you formulate and implement your sampling plan correctly:

1. Decide on your sampling objectives. Usually, the objective falls into one of two categories, namely:

Estimation — you use the sample results to estimate a true value in the population.

Decision Making — you use the sample results to prove or disprove a statement about the population.

2. Decide on the sampling technique that best suits your objectives.

3. Identify and specify judgmental information, such as precision limit and confidence level.

4. Identify and collect sufficient information to uniquely determine the sample size. For example, this can include population size.

5. Determine the statistically correct sample size by using the proper statistical equations or by referring to the proper published statistical tables.

6. Randomly select the sample.

7. Examine and evaluate the sample.

For a list of publications providing more information about sampling theory, see the appendix “Bibliography”.

Advantage VISION:Excel Sampling Capabilities This section describes what Advantage VISION:Excel can do to make your task of sampling easier to handle. First, refer to the guidelines provided in the section Sampling Theory. Advantage VISION:Excel automates many of the steps shown in those guidelines step-by-step, this is how Advantage VISION:Excel helps you complete each step.

Page 167: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Sampling Capabilities

Chapter 5: Non-Stratified Sampling Overview 5–5

Step 1: Deciding on the Objectives of the Sampling Plan

This decision is dependent on your judgment and knowledge of what statistical sampling can do for you. The use of each sampling technique is discussed in its individual chapter; as you read through each chapter, you gain the knowledge necessary to complete this step.

Step 2: Selecting the Sampling Technique that Best Suits Your Sampling Objectives

The sampling technique you select is dependent on your judgment and knowledge of Advantage VISION:Excel’s sampling techniques, some of which are statistically oriented. The statistical-oriented sampling techniques fall into the following categories:

Attribute Sampling Techniques — determines the number of items in a population that have a certain characteristic. Either each item has the characteristic or it does not.

This sampling technique is usually used in compliance testing where an item is judged either error-free or in-error.

Value Sampling Techniques — estimates the value of the population by extrapolating the value of the sample. This sampling technique is usually used in substantive testing to verify the correctness of monetary values.

Advantage VISION:Excel has 11 sampling techniques that can be categorized in the following ways:

Statistical versus Non-Statistical

Stratified versus Non-Stratified

Statistical Versus Non-Statistical

Advantage VISION:Excel’s statistical and non-statistical sampling techniques are:

Statistical Sampling Techniques:

– Attribute-Oriented Sampling Techniques

– Attribute Estimation Sampling

– Discovery Sampling

– Acceptance Sampling

– Value-Oriented Sampling Techniques

– Estimation Sampling of Values

– Proportional Sampling

Page 168: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Sampling Capabilities

5–6 Reference Guide

– Dollar Unit

– Stratified Mean Estimation Sampling

Non-Statistical Sampling Techniques:

– Simple Interval Sampling

– Simple Random Sampling

– Stratified Simple Random Sampling

– Stratified Simple Percentage Sampling

Note that the word simple appears in the title of all non-statistical sampling techniques and in none of the statistical sampling techniques.

Stratified Versus Non-Stratified

Advantage VISION:Excel’s 11 sampling techniques can also be logically grouped into categories that define whether or not the sampling technique is stratified.

Stratification is a method of dividing the population into sub-populations known as strata. For more information about stratified sampling, see the sampling function table in the section Non-Stratified Sampling Techniques, and the chapter “Stratified Sampling Overview.”

Advantage VISION:Excel’s stratified and non-stratified sampling techniques are:

Stratified Sampling Techniques:

– Stratified Simple Random Sampling

– Stratified Simple Percentage Sampling

– Stratified Mean Estimation Sampling

Non-Stratified Sampling Techniques:

– Simple Interval Sampling

– Simple Random Sampling

– Attribute Estimation Sampling

– Discovery Sampling

– Acceptance Sampling

– Estimation Sampling of Values

– Proportional Sampling

– Dollar Unit

Page 169: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Sampling Capabilities

Chapter 5: Non-Stratified Sampling Overview 5–7

Step 3: Identifying and Specifying Judgmental Information

The necessity and applicability of this information is discussed in later chapters.

Step 4: Identifying and Collecting Information Needed to Determine the Sample Size

To collect information, use one or both of the following methods:

Use any one of the Advantage VISION:Excel non-statistical sampling techniques, because they require a minimal amount of information

Generate a Frequency Distribution Report

Step 5: Determining the Sampling Size

Advantage VISION:Excel automatically calculates the statistically proper sample size. For information on the statistical equations that Advantage VISION:Excel uses, see the appendix “Formulas and Equations Used in Advantage VISION:Excel.” To summarize the equations found there, Advantage VISION:Excel uses the following:

The Normal probability distribution

The Hypergeometric distribution

The Binomial distribution

The Poisson distribution

Floating point arithmetic

Step 6: Selecting the Random Sample

Advantage VISION:Excel randomly selects records on the basis of numbers produced by a random number generator.

Given a starting number known as the seed number, the first random number is generated by passing the seed number through a computerized mathematical algorithm, the second random number is generated by passing the first random number through that same algorithm, the third random number is generated by passing the second random number through that algorithm, and so on. Intuitively, this does not seem to be random, but it is.

The issue of randomness can be answered by the question—” Given a long string of random numbers generated from an algorithm of this nature, how easy would it be to predict the next number to be generated in the string without knowing the actual algorithm being used?” In all likelihood, only a

Page 170: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–8 Reference Guide

random number specialist, after a thorough examination of the random number string to determine the algorithm being used, would be able to predict with accuracy the next number that would be generated in that string.

The advantage of using the mathematical formula method is that, given the seed number, the sequence of random numbers generated is always identical; consequently, an interesting run can be repeated.

Mathematicians have proposed a number of different algorithms that can be used in generating random numbers. Advantage VISION:Excel uses an algorithm that is of a multiplicative nature, one that has been extensively tested for random properties.

Advantage VISION:Excel’s random number generator can operate with or without a seed number being supplied. If you do not supply a seed number, Advantage VISION:Excel generates its own seed number by consulting the computer time clock and prints this number on the Non-Stratified Sampling Summary Report as shown in the section Advantage VISION:Excel Sampling Summary Report

Step 7: Examining and Evaluating the Sample

Examine the sample manually. Each sampling technique has its own method of being evaluated. See the individual chapter for each method for a description of the method. To aid with this evaluation, Advantage VISION:Excel, on request, generates statistical tables that can be used in the evaluation process. Because these tables involve complex mathematical equations, floating point arithmetic hardware must be available on the computer being used.

How to Sample Using Advantage VISION:Excel This section describes the following:

The allowable sampling functions

The flow of both the Advantage VISION:Excel and Advantage VISION:Results statements

All of the reports or files generated by the system

Page 171: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–9

Each of the sampling functions is described in more detail with individual examples in the chapters to follow. The chapters that are not statistically oriented emphasize the logic of Advantage VISION:Results. Readers whose knowledge of Advantage VISION:Results is limited can read the simple interval and simple random chapters before starting any of the statistical sampling chapters. The chapters that are statistically oriented emphasize the definition of the sampling technique.

The Advantage VISION:Excel sampling functions are divided into two groupings:

Non-Stratified

Stratified

Non-Stratified Sampling Techniques

This section describes only non-stratified sampling techniques or functions.

The sampling function table and the chart given in this section, identifies which sampling function belongs to which grouping, as well as whether or not each sampling function is statistically-oriented and uses a random number seed. For details regarding stratified sampling, see the chapter ”Stratified Sampling Overview.”

Note: This overview does not cover all of the sampling functions, and their outputs.

Some of the sampling functions are listed in the following table:

Sampling Parameter

Non-Stratified Sampling

Stratified Sampling

Statistically-Oriented

Random Number Seed

Simple Interval Yes N/A N/A N/A

Simple Random Yes N/A N/A Optional

Discovery Yes N/A Yes Optional

Acceptance Yes N/A Yes Optional

Attribute Yes N/A Yes Optional

Estimation of Values Yes N/A Yes Optional

Proportional yes N/A yes N/A

Dollar Unit Yes N/A Yes Optional

Random Method N/A Yes N/A Optional

Percentage Method N/A Yes N/A N/A

Page 172: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–10 Reference Guide

Sampling Parameter

Non-Stratified Sampling

Stratified Sampling

Statistically-Oriented

Random Number Seed

Mean Estimation Method

N/A Yes Yes Optional

The following flowchart depicts the flow of statements and various outputs, generated by Advantage VISION:Excel.

The purpose of this chart is to walk you through the flow to reinforce your understanding of what happens and what to expect when you use Advantage VISION:Excel.

Page 173: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–11

Input to Advantage VISION:Excel

This section describes a coded example of a program with both Advantage VISION:Excel and Advantage VISION:Results statements The program code can be divided into the following parts:

FILE Statement (Advantage VISION:Results)

Field Definition Statement (Advantage VISION:Results)

Sampling Statements (Advantage VISION:Excel)

Procedure and Selection Statements (Advantage VISION:Results)

The program code is as follows:

FILE ACCTREC FB 352 5280

ACCTRECORD 352

PAYMENT 5 170 PD 2

FILE OACCTREC OUTPUT FROM OACCTREC FB 352 5280

OTRECORD 352

OTCODE 2 182

OTCOMM 2 1

SAMPLE 01 ACCEPTANCE

POPULATION SIZE 1,000

MAXIMUM OCCURRENCE RATE 3%

ACCEPTABLE OCCURRENCE RATE 1%

UNWARRANTED RELIANCE RISK 10%

OVERAUDITING RISK 5%

SAMPLE 05 PROPORTIONAL

POPULATION TOTAL 100,000

RELIABILITY LEVEL 86%

MONETARY PRECISION LIMIT 100

AMOUNTFIELD PAYMENT

SAMPLE 06 INTERVAL 50 10 500

SAMPLE 07 RANDOM 1100 450

IF SAMPLING 01

NEXT

ELSE

GOTO A35

ENDIF

IF SAMPLING 05

NEXT

ELSE

Non-Stratified Sampling Overview A35

ENDIF

Page 174: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–12 Reference Guide

A10: IF SAMPLING 06

PERFORM W00 TO W90

ENDIF

A35: IF SAMPLING 07

PERFORM W00 TO W90

ENDIF

REJECT

W00: MOVE ACCTRECORD TO OTRECORD

IF OTCODE EQ 'BO'

MOVE 'CC' TO OTCOMM

ENDIF

W80: WRITE OACCTREC

W90:

The Advantage VISION: Results FILE, field, and procedure/selection statements are thoroughly defined in the Advantage VISION:Results Reference Guide. Therefore, the descriptions here only highlight areas that are uniquely applicable to Advantage VISION:Excel.

FILE Statement

The FILE statement defines the input and output files. This statement is identified by the command FILE. Input files can be identified by the optional keyword INPUT. Output files can be identified by the required keyword OUTPUT.

Field Definition Statements

The field definition statements are used to define a data name for fields in the input or output files. The field definition tells Advantage VISION:Results how large the field is, where it begins in the record, and how it appears. Every time you use a data name in a sampling statement, you must have previously defined it in an Advantage VISION:Results field definition statement.

The sampling application statement SAMPLE 05 PROPORTIONAL in the program code of the section Input to Advantage VISION:Excel contains the data name PAYMENT, whose attributes are defined in the Advantage VISION:Results field definition statement.

Note that all field definitions immediately follow the FILE statement with which they are associated.

Page 175: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–13

Note: If you forget to define the attributes of PAYMENT in a field definition statement as shown in the program code of the section Input to Advantage VISION:Excel, it generates an error message indicating that the statement with the data name PAYMENT is not defined.

Sampling Statements

Each sampling statement begins with the keyword SAMPLE followed by a one- or two-digit application number. For example, the program code shown in the section Input to Advantage VISION:Excel, sampling application number 1 is an acceptance sampling application, while sampling application number 5 is a proportional sampling application. Up to 99 sampling applications can be defined in an Advantage VISION:Excel program. However, each one must have a unique sampling application number.

Each SAMPLE statement defines the criteria germane to the sampling application. The SAMPLE statement is not an executable command, but rather a definition statement. Each data name, used within a SAMPLE statement must be defined within the program.

For a complete explanation of each Advantage VISION:Excel free-form SAMPLE statement, see the specific sampling chapter.

Procedure/Selection Statements

In the procedure logic, the IF SAMPLING command does the following:

Starts the correct Advantage VISION:Excel routines to determine whether or not the record is included in the sample.

Controls the imperative logic. If the record is included in the sample, the TRUE imperative logic of the IF SAMPLING command is executed; otherwise, the FALSE imperative logic is executed. The TRUE and FALSE imperative logic can contain any Advantage VISION:Results commands that are acceptable within an Advantage VISION:Results IF command structure.

Because more than one sampling application can be present in an Advantage VISION:Excel program, the application number must be included to tie the IF SAMPLING command back to its SAMPLE definition statement. For example, in the program code of section Input to Advantage VISION:Excel, the IF SAMPLING 01 command is linked to the SAMPLE 01 ACCEPTANCE statement. For this example, the IF SAMPLING 01 command causes Advantage VISION:Excel to utilize its ACCEPTANCE sampling algorithms and decision logic.

The following program code illustrates the application number bond between the SAMPLE statement and the IF SAMPLING statement.

Page 176: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–14 Reference Guide

SAMPLE 01 ACCEPTANCE

POPULATION SIZE 1,000

MAXIMUM OCCURRENCE RATE 3%

ACCEPTABLE OCCURRENCE RATE 1%

UNWARRANTED RELIANCE RISK 10%

OVERAUDITING RISK 5%

IF SAMPLING 01

NEXT

ELSE

GOTO A35

ENDIF

The IF SAMPLING 01 command in this code causes the logic flow to go to the next statement for all records to be included in the ACCEPTANCE sample. The program logic flow branches to tag A35 for all records to be excluded from the ACCEPTANCE sample.

Output from Advantage VISION:Excel

The system generates a listing of all statements entered and validated by Advantage VISION:Excel/Advantage VISION:Results. An example of this listing appears as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280

ACCTRECORD 352

PAYMENT 5 170 PD 2

FILE OACCTREC OUTPUT FROM OACCTREC FB 352 5280

OTRECORD 352

OTCODE 2 182

OTCOMM 2 1

SAMPLE 01 ACCEPTANCE

POPULATION SIZE 1,000

MAXIMUM OCCURRENCE RATE 3%

ACCEPTABLE OCCURRENCE RATE 1%

UNWARRANTED RELIANCE RISK 10%

OVERAUDITING RISK 5%

SAMPLE 05 PROPORTIONAL

POPULATION TOTAL 100,000

RELIABILITY LEVEL 86%

MONETARY PRECISION LIMIT 100

Page 177: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–15

AMOUNTFIELD PAYMENT

SAMPLE 06 INTERVAL 50 10 500

SAMPLE 07 RANDOM 1100 450

IF SAMPLING 01

NEXT

ELSE

GOTO A35

ENDIF

IF SAMPLING 05

NEXT

ELSE

GOTO A35

ENDIF

A10: IF SAMPLING 06

PERFORM W00 TO W90

ENDIF

A35: IF SAMPLING 07

PERFORM W00 TO W90

ENDIF

REJECT

W00: MOVE ACCTRECORD TO OTRECORD

IF OTCODE EQ 'BO'

MOVE 'CC' TO OTCOMM

ENDIF

W80: WRITE OACCTREC

W90:

Advantage VISION:Excel has extensive error analysis capabilities that are evident during the validation and execution of this system. The system transmits this information to the user on the SYSPRINT/SYSLST listing. For examples and complete details, refer to Chapter 1 in the Advantage VISION:Excel Error Messages Guide.

Advantage VISION:Excel generates the following additional reports:

Advantage VISION:Excel Sampling List

Advantage VISION:Excel File Statistics

Advantage VISION:Results File Statistics

Advantage VISION:Excel Sampling Summary Report

Page 178: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–16 Reference Guide

Advantage VISION:Excel Sampling List

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - ACCEPTANCE SAMPLING

POPULATION SIZE 1,000

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 3.0%

ACCEPTABLE RATE OF OCCURRENCE IN THE POPULATION 1.0%

RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE OF OCCURRENCE 10.0%

RISK OF OVERAUDITING AT THE ACCEPTABLE RATE OF OCCURRENCE 5.0%

CALCULATED SAMPLE SIZE 286 *

CALCULATED ACCEPTANCE NUMBER 5 *

ACTUAL RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE 9.9% *

ACTUAL RISK OF OVERAUDITING AT THE ACCEPTABLE RATE 3.7% *

APPLICATION 5 - PROPORTIONAL SAMPLING

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 100,000

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 100

CALCULATED RELIABILITY FACTOR 2.0 *

CALCULATED SAMPLING INTERVAL 50.00 *

CALCULATED SAMPLE SIZE 2,000 *

RANDOM RESTART NUMBER 42.04 *

LABEL OF FIELD CONTAINING AMOUNT PAYMENT

APPLICATION 6 - SIMPLE INTERVAL SAMPLING

INTERVAL DESIRED 50

STARTING NUMBER 10

MAXIMUM SAMPLE SIZE 500

APPLICATION 7 - SIMPLE RANDOM SAMPLING

POPULATION SIZE 1,100

SAMPLE SIZE DESIRED 450

Note: Comments are not statements. (Comments have an asterisk or semicolon in column 1.)

The Advantage VISION:Excel sampling list contains an entry for every valid sampling application submitted to the system. The output, shown in this report, contains the information submitted in the application statement and the calculated values. Examine these entries closely. An asterisk is entered next to those values that were calculated by Advantage VISION:Excel.

Non-Stratified Sampling Advantage VISION:Excel File Statistics

The Advantage VISION:Excel File Statistics is a summary total of statements read and number of records written.

Page 179: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–17

11/30/97 VISION:Excel 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 54

NUMBER OF PARAMETER CARDS READ 53

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 85

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 85

NUMBER OF RECORDS WRITTEN TO VISION:RESULTS PARAMETER FILE 86

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 5

NUMBER OF LINES PRINTED 47

Non-Stratified Sampling Advantage VISION:Results File Statistics

The following Non-Stratified Sampling Advantage VISION:Results File Statistics report, contains the standard input/output file information denoting file identification and record counts in and out.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 19,873 2,782,220

OACCTREC 526 63,120

RECORDS PAGES

FILE PRINT 3

REPORT PRINT

REJECTED RECORDS 19,873

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

The Non-Stratified Sampling Summary Report, shown in the following section is generated for all of the sampling functions listed below:

ACCEPTANCE

SIMPLE RANDOM

SIMPLE INTERVAL

PROPORTIONAL

Page 180: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

5–18 Reference Guide

Advantage VISION:Excel Sampling Summary Report

This report contains all of the information entered in the sampling statement, plus the calculated values and information from Advantage VISION:Excel.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - ACCEPTANCE SAMPLING

ESTIMATED POPULATION SIZE 1,000

ACTUAL POPULATION SIZE 19,873 *

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 3.0%

ACCEPTABLE RATE OF OCCURRENCE IN THE POPULATION 1.0%

RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE OF OCCURRENCE 10.0%

RISK OF OVERAUDITING AT THE ACCEPTABLE RATE OF OCCURRENCE 5.0%

ACTUAL RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE 9.9%

ACTUAL RISK OF OVERAUDITING AT THE ACCEPTABLE RATE 3.7%

CALCULATED SAMPLE SIZE 286 *

ACTUAL SAMPLE SIZE 286

CALCULATED ACCEPTANCE NUMBER 5

ORIGINAL SEED NUMBER 59,713

APPLICATION 5 - PROPORTIONAL SAMPLING

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 100

CALCULATED RELIABILITY FACTOR 2.0

CALCULATED SAMPLING INTERVAL 50.00

CALCULATED SAMPLE SIZE 2,000

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 100,000

ACTUAL (UNAUDITED) MONETARY TOTAL OF POPULATION 18,415.38 *

ACTUAL (UNAUDITED) MONETARY TOTAL OF SAMPLE 15,986.09 *

NO. OF ITEMS IN POPULATION 450

NO. OF ITEMS IN SAMPLE 128

RANDOM RESTART NUMBER 44.54

STANDARD DEVIATION (UNAUDITED) - POPULATION 195.41 *

STANDARD DEVIATION (UNAUDITED) - SAMPLE 352.67 *

MEAN (UNAUDITED) OF POPULATION 40.92 *

MEAN (UNAUDITED) OF SAMPLE 124.89 *

COEFFICIENT OF VARIATION (UNAUDITED) - POPULATION 4.775 *

COEFFICIENT OF VARIATION (UNAUDITED) - SAMPLE 2.824 *

LABEL OF FIELD CONTAINING AMOUNT PAYMENT

APPLICATION 6 - SIMPLE INTERVAL SAMPLING

INTERVAL DESIRED 50

STARTING NUMBER 10

ACTUAL POPULATION SIZE 19,873 *

MAXIMUM SAMPLE SIZE 500

Page 181: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

How to Sample Using Advantage VISION:Excel

Chapter 5: Non-Stratified Sampling Overview 5–19

ACTUAL SAMPLE SIZE 398 *

APPLICATION 7 - SIMPLE RANDOM SAMPLING

ESTIMATED POPULATION SIZE 1,100

ACTUAL POPULATION SIZE 19,873 *

SAMPLE SIZE DESIRED 450

ACTUAL SIZE DESIRED 450

ORIGINAL SEED SIZE 18,593

An asterisk is placed to the right of those values calculated during this phase of Advantage

VISION:Excel.

Page 182: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 183: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 6: Simple Interval Sampling 6–1

Chapter 6: Simple Interval Sampling

This chapter describes simple interval sampling and covers the following main points:

Definition and uses of simple interval sampling

Implementing simple interval sampling with Advantage VISION:Excel

Simple interval example

Once these topics are fully described, you are given an example and shown its implementation with Advantage VISION:Excel.

Definition and Uses of Simple Interval Sampling Simple interval sampling, sometimes called “interval selection” or “systematic random sampling”, is used to select every “nth” record from a file's population. Rather than scanning the file's population for specific records, you can select every “nth” record after a certain interval is determined and a random starting point is chosen.

First, you must determine the interval size. This is done by dividing the population size by the preferred sample size, as shown in the following equation:

The resulting interval could have a remainder.

For example, if you sample 1000 records from a population of 15000, the interval is 15, as shown by the following calculation:

You then select every fifteenth record from this population. This does not mean that selection commences with the first record and then the sixteenth, thirty-first, and so on.

Page 184: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition and Uses of Simple Interval Sampling

6–2 Reference Guide

You select a starting point that is a random number from 1 to 15, inclusive. After you choose your random starting number (using either some random method or random number tables), every fifteenth record is then selected.

Assuming that your random starting number is 12, the first five selected records are the 12th, 27th, 42nd, 57th, and 72nd records on the file. The selection of the “nth” record is done automatically with Advantage VISION:Excel.

In the previous example, interval determination is based on a whole interval number being the result of the division. If the population is 15600 instead of 15000, the interval is 15.6, as shown by the following calculation:

The rule of thumb is to always round down to the nearest whole number, even if the actual ratio is closer to the whole number above. Therefore, the interval in this example is actually 15. If the resulting interval were 213.9, you would still round down to 213 and select a random starting number between 1 and 213, inclusive.

This sampling technique is usually used to get a feel for the data. It is not statistically- or mathematically-oriented.

For a list of reading materials about simple interval sampling, see the appendix “Bibliography.”

Page 185: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Simple Interval Sampling with Advantage VISION:Excel

Chapter 6: Simple Interval Sampling 6–3

Implementing Simple Interval Sampling with Advantage VISION:Excel

The section explains the syntax for simple interval sampling statement, followed by a description of all the keywords associated with the statement.

Input Statements for Interval Sampling

The syntax for interval selection is as follows.

SAMPLE nn INTERVAL {INTERVALSIZE nnnnnnnnn START nnnnnnnnn

[MAXIMUM nnnnnnnnn]}

The keywords are described in the following table:

Keyword Description

SAMPLE Required. Describes the application as sampling. No abbreviations are allowed.

nn Required. Assign a unique application number to each requestas an integer value from 1–99.

INTERVAL Required. Describes the function as interval sampling. No abbreviations are allowed. This keyword immediately follows the application number.

INTERVALSIZE Required. The number you supply tells Advantage VISION:Excel which “nth” record you want selected (for example, every tenth record or every twentieth record). This number must be an integer value from 1–999,999,999. Commas are acceptable. Value cannot exceed nine digits.

START Required. The number with which selection is to begin. This number is selected randomly, as discussed in the section, Definition and Uses of Simple Interval Sampling, and must be an integer value from 1–999,999,999. Commas are acceptable. Value cannot exceed nine digits. Default is 1.

MAXIMUM The total number of records you want to select from the file (population). Commas are acceptable. Value cannot be zero. If this entry is omitted, the value defaults to 999,999,999.

The keywords INTERVALSIZE, START, and MAXIMUM are optional, but if you use a keyword for any of them, you must use a keyword for all of them.

Page 186: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

6–4 Reference Guide

Simple Interval Example The auditor wants to extract every fiftieth record until 500 records have been selected or end of file is reached, whichever comes first. Selection is to commence with the tenth record, and each selected record (every fiftieth record) from the input file is to be written to an output tape.

Flowchart for Simple Interval Sampling

This example is depicted in the flowchart format as follows:

Page 187: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

Chapter 6: Simple Interval Sampling 6–5

Input Statement to Advantage VISION: Excel

The following example consists of code for both Advantage VISION:Excel and Advantage VISION:Results statements.

FILE ACCTREC INPUT FB 352 5280 1

FILE OACCTREC OUTPUT FROM ACCTREC FB 352 5280 2

SAMPLE 01 INTERVAL 3

INTERVALSIZE 50 4

START 10 5

MAXIMUM 500 6

IF SAMPLING 01 7

ACCEPT 8

ELSE 9

REJECT 10

ENDIF 11

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1 and 2 are the FILE statements defining the input and output files. The keyword phrase OUTPUT FROM ACCTREC in the FILE OUTREC statement specifies to Advantage VISION:Excel/Advantage VISION:Results that it use the ACCTREC file buffer (which contains the selected record) to create the output file. Refer to the Advantage VISION:Results Reference Guide for information about the FILE statement.

Statements 3–6 specify interval selection, with an interval size of 50. Selection is to begin with the tenth record. Thereafter, select every fiftieth record until the sample size equals 500 records or until the end of the file is reached.

The procedure logic, statements 7–11, invokes interval selection 01, defined instatements 3–6. Both the SAMPLE statements and the IF SAMPLING command must be present in your program for the selection to be performed.

Advantage VISION:Excel/Advantage VISION:Results reads and bypasses the first nine records. Beginning with the tenth record, it selects every fiftieth record thereafter and accepts those records (writes each to the output file). If the record read is not the tenth record or any fiftieth record thereafter, it is rejected and another record is read.

Page 188: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

6–6 Reference Guide

Output from Advantage VISION: Excel

Advantage VISION:Excel generates following reports once the Input statements are submitted for simple interval processing.

Simple Interval Sampling Statement Listing

Simple Interval sampling List

Simple Interval Sampling Advantage VISION: Results File Statistics

Simple Interval Sampling Non-Stratified Summary Report

Simple Interval Sampling Hexadecimal/Graphics Dump

Simple Interval Sampling Statement Listing

This is a report that includes all of the statements submitted for Simple Interval Sampling. There are two FILE statements associated with input and output, as well as the IF SAMPLING statement for selection logic.

The simple interval sampling statement listing, generated by Advantage VISION:Excel appears as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC INPUT FB 352 5280

FILE OACCTREC OUTPUT FROM ACCTREC FB 352 5280

SAMPLE 01 INTERVAL

INTERVALSIZE 50

START 10

MAXIMUM 500

IF SAMPLING 01

ACCEPT

ELSE

REJECT

ENDIF

Page 189: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

Chapter 6: Simple Interval Sampling 6–7

Simple Interval Sampling List

The following report is an example of the Sampling List that Advantage VISION:Excel generates for every valid sampling application submitted to Advantage VISION:Excel.

11/30/93 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - SIMPLE INTERVAL SAMPLING

INTERVAL DESIRED 50

STARTING NUMBER 10

MAXIMUM SAMPLE SIZE 500

The output contains all the information submitted in the sampling statement. Note that the application number is application 1 and is for simple interval sampling. Also note the values submitted. The interval wanted is printed as a value of 50, the starting number is 10, and the maximum sample allowed is 500. Every valid sampling statement is contained within this sampling list.

Simple Interval Sampling Advantage VISION: Results File Statistics

The following File Statistics Summary Report is generated upon end of processing by Advantage VISION:Excel:

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 200 70,400

OACCTREC 4 1,408

RECORDS PAGES

FILE PRINT 4 3

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

In this report, the total population of records that were considered for the sampling is 200 (ACCTREC) and that of these 200, four were chosen to be included in the report (OACCTREC).

Page 190: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

6–8 Reference Guide

The Advantage VISION:Excel portion of the Advantage VISION:Results output provides the following:

The standard files information denoting file identification and record counts in and out.

The Advantage VISION: Excel Non-Stratified Sampling Summary report, given the following section, contains the application number and the function of that application (in this case, simple interval sampling).

All of the values that were originally submitted using statements.

For example, in the following report, the interval wanted, the starting number, and the maximum sample size are listed, as well as the actual population size of the file read by Advantage VISION:Results.

Simple Interval Sampling Non-Stratified Summary Report

11/30/93 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - SIMPLE INTERVAL SAMPLING

INTERVAL DESIRED 50

STARTING NUMBER 10

ACTUAL POPULATION SIZE 200

MAXIMUM SAMPLE SIZE 500

ACTUAL SAMPLE SIZE 4

In this particular example, the actual population size was smaller than originally expected. This is readily determined by the actual sample size selected from the input file.

Page 191: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

Chapter 6: Simple Interval Sampling 6–9

Simple Interval Sampling Hexadecimal/Graphics Dump

The following report is a hexadecimal/graphic dump of the four records selected in the simple interval sampling process.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

07C6024963HILL GARY EO041788022689112277S01097800000 9999970200 HILL,GARY E 10

FFCFFFFFFFCCDD44444444444CCDE444444CDFFFFFFFFFFFFFFFFFFEFFFFFFFFFFF44FFFFFFFFFF59070CCDD6CCDE4C44444

07360249638933000000000007198000000560417880226891122772010978000000099999702005405C8933B71980500000

5445 COVENTRY ST TEMPLE CITY CA 91780 & & FOFO 000000

444444444FFFF4CDECDEDE4EE444444444ECDDDC4CCEE4CC4FFFFF4444400050000000003000050CDCD4FFFFFF0000280000

000000000544503655539802300000000035473503938031091780000000010C0000C0008C0010C6666000000000023C0000

MISC 013500061 @ & 4H108 @ _4H108 @ (

0000000000444444444DCEC44444444444444444444FFFFFFFFF086700050FCFFF4444012700086FCFFF4444012700024444

C000C00C0C000000000492300000000000000000000013500061027C0010C481080000127C0009D481080000127C0002D000

A

444444000000000444444444000000000010101000040000044C

000000000C0000C000000000000C0000C0C0C0C0C0C00000C001

07C7023189SIAS EDWARDO O101988062889010278Z01227800000 9999970200 SIAS, EDWARDO 60

FFCFFFFFFFECCE44444444444CCECDCD4444DFFFFFFFFFFFFFFFFFFEFFFFFFFFFFF44FFFFFFFFFF07031ECCE64CCECDCD444

07370231892912000000000005461946000061019880628890102789012278000000099999702000932C2912B05461946000

138 E 6TH ST LA PUENTE CA 91746 @ % _MAMA 000000

444444444FFF4C4FEC4EE4444444444444DC4DECDEC444CCFFFFF44444400117000860000000086DCDC4FFFFFF0003220018

000000000138050638023000000000000031074553500031917460000000009C0009C0000C0009D4141000000000429C0039

% 3 2H124 @ _4W388 %

901080810644444F444444444444444444444444444FCFFF4444092700086FEFFF4444012800086444444444000000000444

C020C19C3C000003000000000000000000000000000281240000007C0009D463880000007C0009C000000000000C0000C000

A

444444000000000444444444000000000010100000040000044C

000000000C0000C000000000000C0000C0C0C0C0C0C00000C001

07C6008321YEARGER CLIFFORD MO041488030989100677 00000000000 0001080200 %YEAGER,CLIFFORD 110

FFCFFFFFFFECCDCCD44444444CDCCCDDC44DDFFFFFFFFFFFFFFFFFF4FFFFFFFFFFF44FFFFFFFFFF78946ECCCCD6CDCCCDDC4

07360083218519759000000003396669400460414880309891006770000000000000000010802000083C851759B339666940

M 160 W OCEAN BLVD GLEANDALE CA 01205 @ MIMI 000000

D44444444FFF4E4DCCCD4CDEC444444444CDCCDCCDC4CC4FFFFF444444400217000000010000100DCDC4FFFFFF0004400009

400000000160060635150235400000000073515413503100120500000000044C0000C0040C0040C4949000000000062C0072

@ % % 3 BRENNER M MD 225002008 @ & 2H116 @ 2H116 @

300770160644444F444CDCDDCD4D4DC444444444444FFFFFFFFF099700150FCFFF4444006700020FCFFF4444006700020444

C073C08C0C000003000295555904044000000000000225002008007C0020C281160000107C0010D281160000107C0010C000

444444000000000444444444000000000010101000040005044C

000000000C0000C000000000000C0000C0C0C0C0C0C00010C001

Page 192: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Example

6–10 Reference Guide

07C1006681MYERS EARL S101588031089092977 00000000000 9999970102 MYERS, EARL 160

FFCFFFFFFFDECDE4444444444CCDD4444444EFFFFFFFFFFFFFFFFFF4FFFFFFFFFFF44FFFFFFFFFF72019DECDE64CCDD44444

07310066814859200000000005193000000021015880310890929770000000000000099999701020121C48592B0519300000

3735 84TH LA CANADA CA 91011 123177

444444444FFFF4FFEC4444444444444444DC4CCDCCC444CCFFFFF44444400000000000013400134DDDD4FFFFFF0002000000

000000000373508438000000000000000031031514100031910110000000000C0000C0022C0022C7676012317700041C0049

% % 13 2H108 @

800020060644444FF44444444444444444444444444FCFFF4444099700330444444444000000000444444444000000000444

C040C09C0C000001300000000000000000000000000281080000027C0250D000000000000C0000C000000000000C0000C000

2 A

4444440000000004444444440000000000000000000F0000044C

000000000C0000C000000000000C0000C0C0C0C0C0C20000C001

If you look at the rightmost position of the records, you can see the numbers 10, 60, 110, and 160. Based on the criteria of the example, you will notice that every fiftieth record is chosen after the initial random starting number is selected.

Page 193: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 7: Simple Random Sampling 7–1

Chapter 7: Simple Random Sampling

This chapter describes simple random sampling and covers the following main points:

Definition of simple random sampling

Types of random selection

Simple random sampling example: Known universe

Simple random sampling example: Unknown universe

Once these topics are fully described, you are presented with an example and shown its implementation with Advantage VISION:Excel.

Definition of Simple Random Sampling You can use simple random sampling, to select records randomly in a file from the entire population to provide assurance that each record in the population has an equal chance of being selected.

Unless each record has an equal and unbiased chance of being selected, the scientific methods that determine the sample size and the reliability of the sample cannot be applied with any degree of confidence.

Simple random sampling, like simple interval sampling, is a technique that is used to get a feel for the data. The sample is chosen randomly, but the evaluation of the sample is left to your discretion. For a list of reading materials about simple random sampling, see the appendix “Bibliography.”

Types of Random Selection There are two formats of random selection:

Known Universe

Unknown Universe

Page 194: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Types of Random Selection

7–2 Reference Guide

Simple Selection:Known Universe

When using the known universe format, you either know or can accurately estimate the total number of records on the file (that is, the population) and want a predetermined sample size. The syntax for Simple Selection — Known Universe is as follows:

For more information on free-form keywords, see Free-Form Keywords in the chapter “Introduction”.

SAMPLE nn RANDOM

{POPULATION nnnnnnnnn}

{SIZE nnnnnnnnn}

[SEED nnnnnnn] [RANDPROG progname [RANDPROGSIZE nn]]

The following table explains all the keywords for Simple Selection: Known Universe

Keyword Description

SAMPLE Required. Describes the application as a sampling application. No abbreviations are allowed.

nn Required. Assign a unique application number to each sample request as an integer value from 1 to 99.

RANDOM Required. Describes the function as random selection. No abbreviations are allowed. This keyword immediately follows the application number.

POPULATION Required. Specifies the exact or estimated population (file) size. An integer value from 1 to 999,999,999. Commas are acceptable; a decimal point is not. The value cannot be zero.

Use care in estimating the population size. If your estimate is greater than the actual population size, you could get a sample that is smaller than the calculated sample size. Conversely, if your estimate is less than the actual population size, you could get a sample that is larger than the calculated sample size. The integrity of the sample size is dependent upon an accurately estimated population size. If the exact population size is specified, the exact sample size is obtained. If you cannot make a reasonable estimation of the population size, you can either make a separate Advantage VISION:Results run against your files to obtain this information or use the unknown universe format.

Page 195: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Types of Random Selection

Chapter 7: Simple Random Sampling 7–3

Keyword Description

SIZE Required. Specifies the sample size to be randomly selected from the population. An integer value from 1 to 999,999,999. The sample size cannot be larger than the population size. The value cannot be zero.

SEED The seed number is used by Advantage VISION:Excel to initialize the algorithm used in the random number generator. By specifying the seed number from a previous run, the sequence of random numbers generated is always identical; consequently, an interesting run can be repeated. Therefore, specify a previously used seed number here if you want to duplicate a prior run.

You can specify a seed number of your choice. The minimum value is 1. The maximum value is 9,999,999. When the seed number is omitted, Advantage VISION:Excelgenerates a random seed number. The random seed number is printed on the Sampling Summary Report.

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size is expressed in kilobytes (1024-bytes).

The keywords POPULATION and SIZE are optional, but if you use a keyword for any of them, you must use a keyword for all of them.

Random Selection: Unknown Universe

Use the unknown universe format when you have no immediate way of predetermining the size of your population, but you want a certain approximate percentage of that population.

When using this format, you need only supply one field of information: the percentage of an infinite population or unknown universe. The size of the selected sample will be an approximation of the requested percentage. The larger the population, the closer the actual sample size percentage will be to the requested percentage. This is demonstrated in the following table, where test runs were made that encountered populations of 200, 1,000, and 10,000.

Page 196: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Types of Random Selection

7–4 Reference Guide

Preferred Percent:

5.10 26.50 1.29 59.10 98.33 100.00

Number Randomly Selected from 200

(Actual percent)

9

(4.50%)

4

(27.00%)

3

(1.50%)

107

(53.50%)

198

(99.00%)

200

(100%)

Number Randomly

Selected from 1000

(Actual percent)

52

(5.20%)

225

(22.50%)

13

(1.30%)

579

(57.90%)

976

(97.60%)

1000

(100%)

Number Randomly

Selected from 10,000

(Actual

Percent)

507

(5.07%)

2676

(26.76%)

147

(1.47%)

5912

(59.12%)

9830

(98.30%)

10000

(100%)

The syntax for Random Selection — Unknown Universe is as follows:

SAMPLE nn RANDOM

{PERCENTAGE nnn.nnnnn[%]}

[SEED nnnnnnn] [RANDPROG progname [RANDPROGSIZE nn]]

The following table explains the keywords associated with the Syntax for Random Selection: Unknown Universe

Keywords Description

SAMPLE Required. Describes the application as a sampling application. No abbreviations are allowed.

nn Required. Assign a unique application number to each sample request as an integer value from 1 to 99.

RANDOM Required. Describes the function as random selection. No abbreviations are allowed. This keyword immediately follows the application number.

Page 197: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Types of Random Selection

Chapter 7: Simple Random Sampling 7–5

Keywords Description

PERCENTAGE Required. The approximate percentage of the infinite population or unknown universe. The percent sign is required if you do not use the keyword PERCENTAGE. The decimal point is required when fractional percentages are used (for example, 95.5 percent). If a whole number percentage is wanted, do not use a decimal point in the leftmost position (for example, code 25 percent, not .25 percent). The minimum percentage allowed is .00001; and the maximum percentage allowed is 100.

SEED The seed number is used by Advantage VISION:Excel to initialize the algorithm used in the random number generator. By specifying the seed number from a previous run, the sequence of random numbers enerated is always identical; consequently, an interesting run can be repeated. Therefore, specify a previously used seed number here if you want to duplicate a prior run.

You can specify a seed number of your choice. However, a seed of zero is the same as not specifying a seed. The maximum value is 9,999,999. When the seed number is omitted, Advantage VISION:Excel generates a random seed number. The random seed number is printed on the Sampling Summary Report.

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size is expressed in kilobytes (1024-bytes).

Page 198: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Known Universe

7–6 Reference Guide

Simple Random Sampling Example: Known Universe Refrigerated Polar Unit Corporation has an accounts receivable file that contains 50,000 records (this is the population either exact or estimated). The task is to randomly select 450 records from this file, as the sample, and write these randomly selected records to an output file.

Flowchart for Simple Random Sampling: Known Universe

The flowchart for this example is show as follows:

Page 199: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Known Universe

Chapter 7: Simple Random Sampling 7–7

Input Statements for Known Universe

The following input statements are needed for the example of known universe.

FILE ACCTREC INPUT FB 352 5280 1

FILE OACCTREC OUTPUT FROM ACCTREC FB 352 5280 2

SAMPLE 01 RANDOM 3

SIZE 450 4

POPULATION 50,000 5

IF SAMPLING 01 6

ACCEPT 7

ELSE 8

REJECT 9

ENDIF 10

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1 and 2 are the FILE statements that are required to accomplish his task. One FILE statement is required to define the input file, and the other FILE statement is required to define the output file (identified by the keyword OUTPUT following the file name). Advantage VISION:Excel uses the ACCTREC file buffer (that contains the selected record) to create the output file.

Statements 3–5 are the simple random sampling statements containing both the estimated population size and the sample size wanted.

Statements 6–10 are the statements that illustrate the technique for coding the sampling example. Utilizing Advantage VISION:Results' automatic functions for reading and end of file processing, only one statement is needed to code the selection logic.

Note the statement, IF SAMPLING. The 01, immediately following, is the application number. Both are directly associated with the sampling statement, statements 3–5.

When a record is randomly selected (true condition), ACCEPT the record (write the selected record to the output file). If the record is not randomly selected (false condition), REJECT the record (ignore the record). The reading of the input file is automatic and continues until the file is exhausted.

Page 200: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Known Universe

7–8 Reference Guide

Output from Advantage VISION:Excel for Known Universe

Following reports are generated by Advantage VISION:Excel:

Statement Listing for Known Universe

VISION Excel sampling list for Known Universe

File Statistics Summary Report For Known Universe

Non-Stratified Sampling Summary Report For Known Universe

Statement Listing for Known Universe

This report includes all of the statements, submitted to Advantage VISION:Excel. From the example, note the SAMPLING statement for simple random sampling, the two FILE statements associated with the input and output files, and the statements for the selection logic.

The statement listing is as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC INPUT FB 352 5280

FILE OACCTREC OUTPUT FROM ACCTREC FB 352 5280

SAMPLE 01 RANDOM

SIZE 450

POPULATION 50,000

IF SAMPLING 01

ACCEPT

ELSE

REJECT

ENDIF

Advantage VISION:Excel's random number selection facility is used to select a sample of 450 from the population of 50,000. If the record read is selected, fall through to the next statement and write the selected record to the output tape. If the record is not selected, reject it and read another.

Page 201: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Known Universe

Chapter 7: Simple Random Sampling 7–9

Advantage VISION:Excel Sampling List for Known Universe

The following report is an example of Advantage VISION:Excel Sampling List. This listing is generated for every valid sampling statement submitted to Advantage VISION:Excel. The output contains all of the information submitted for a sampling statement. Note the following:

The application number is Application 1.

It is for simple random sampling.

The values submitted:

– Population size is printed as a value of 50,000.

– Sample size is printed as a value of 450.

– The seed number for the random number generator is 11,337.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - SIMPLE RANDOM SAMPLING

POPULATION SIZE 50,000

SAMPLE SIZE DESIRED 450

SEED NUMBER 11,337

File Statistics Summary Report for Known Universe

The following File Statistics Summary Report is generated upon end of file processing by Advantage VISION:Excel.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 50,000 17,600,000

OACCTREC 450 158,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 202: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Known Universe

7–10 Reference Guide

Non-Stratified Sampling Summary Report for Known Universe

With Advantage VISION:Excel, you get the standard input/output file information (end of run statistics) and the Advantage VISION:Excel Non-Stratified Sampling Summary report. An asterisk (*) is placed after those values determined or calculated in the Advantage VISION:Results portion of Advantage VISION:Excel. The following Advantage VISION:Excel Non-Stratified Sampling Summary report shows the values submitted, as well as the actual values determined during the program run.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - SIMPLE RANDOM SAMPLING

ESTIMATED POPULATION SIZE 50,000 *

ACTUAL POPULATION SIZE 50,000

SAMPLE SIZE DESIRED 450

ACTUAL SAMPLE SIZE 450 *

ORIGINAL SEED NUMBER 11,337 *

One additional value also listed on this report is the Original Seed Number, the value that initialized the random number generator of Advantage VISION:Excel. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the seed number.

Page 203: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

Chapter 7: Simple Random Sampling 7–11

Simple Random Sampling Example: Unknown Universe Harvest The Unknown Corporation (HTUC) has an accounts receivable file that contains an unknown number of records, estimated to be from 50,000 to 100,000 in number. The task is to randomly select approximately one percent of the population from this file and generate a control listing report of all records selected, as well as write these randomly selected records to an output tape.

Flowchart for Simple Random Sampling: Unknown Universe

The following flowchart is a graphic illustration of the problem.

Page 204: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

7–12 Reference Guide

Input Statements for Unknown Universe

First you determine the values to specify in your selection statement. You have decided to use application number 01.

SAMPLE 01 RANDOM 1%

or

SAMPLE 01 RANDOM PERCENTAGE 1%

The keyword RANDOM specifies random selection, followed by one percent, the portion of the population you want to select. All of the statements required to perform the selection, write selected records to tape, and generate a report of the selected records are shown in the following report:

REPORT 80 WIDE

FILE ACCTREC FB 352 5280 1

BALANCE 5 170 PD 2 E 2

ACCOUNT 7 4 (ACCOUNT NUMBER) 3

NAME 25 85 (ACCOUNT NAME) 4

FILE OACCTREC FB 352 5280 OUTPUT FROM ACCTREC 5

SAMPLE 01 RANDOM 6

PERCENTAGE 1% 7

ABC: 8

IF SAMPLING 01 9

NEXT 10

ELSE 11

REJECT 12

ENDIF 13

LIST ACCOUNT NAME BALANCE 14

T1 'SAMPLING LISTING OF INFINITE POPULATION--HTUC' WITH 2 AFTER 15

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1 and 5 define the input and output files, respectively.

Statements 2–4 define the fields within the accounts receivable file that are to appear on your report (control listing).

Statements 6 and 7 are the random selection sampling statements.

Page 205: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

Chapter 7: Simple Random Sampling 7–13

Statement 9 contains the IF SAMPLING command. The application number 01 directly ties this IF SAMPLING command to the selection statement, statements 6 and 7. Both the SAMPLE definition statement and the IF SAMPLING command must be present in the program for the selection to be performed.

In the logic (statements 8–13), the random number generator is invoked and determines whether the record is to be selected as part of the sample. If the record is to be included, the true (NEXT) branch is taken and the record is printed, as well as written to the output tape. If the record is not selected, the false (REJECT) branch is taken and the record is ignored (is neither printed nor written to the output tape.)

Lines 14 and 15 define the format of the report listing.

Output from Advantage VISION:Excel for Unknown Universe

The following output and reports are generated by running the program using Advantage VISION:Excel.

Statement listing for unknown universe

Advantage VISION:Excel sampling list for unknown universe

Advantage VISION:Excel File statistics summary report for unknown universe

Advantage VISION: Results File statistics summary report for unknown universe

Non-stratified sampling summary report for unknown universe

Selected Records Report

Page 206: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

7–14 Reference Guide

Statement Listing for Unknown Universe

The following report shows the listing of the input statements, Advantage VISION:Excel simple random statements, and Advantage VISION:Results statements.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

REPORT 80 WIDE

FILE ACCTREC FB 352 5280

BALANCE 5 170 PD 2 E

ACCOUNT 7 4 (ACCOUNT NUMBER)

NAME 25 85 (ACCOUNT NAME)

FILE OACCTREC FB 352 5280 OUTPUT FROM ACCTREC

SAMPLE 01 RANDOM

PERCENTAGE 1%

ABC:

IF SAMPLING 01

NEXT

ELSE

REJECT

ENDIF

LIST ACCOUNT NAME BALANCE

T1 'SAMPLING LISTING OF INFINITE POPULATION--HTUC' WITH 2 AFTER

Advantage VISION:Excel Sampling List for Unknown Universe

The following report shows the Advantage VISION:Excel Sampling List.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - SIMPLE RANDOM SAMPLING

SAMPLE PERCENTAGE DESIRED 1.00000

Page 207: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

Chapter 7: Simple Random Sampling 7–15

Advantage VISION:Excel File Statistics Summary Report for Unknown Universe

The following report shows the Advantage VISION:Excel File Statistics Report.

11/30/97 VISION:Excel 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 31

NUMBER OF PARAMETER CARDS READ 30

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 46

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 46

NUMBER OF RECORDS WRITTEN TO COMPILER PARAMETER FILE 47

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 2

NUMBER OF LINES PRINTED 15

Advantage VISION: Results File Statistics Summary Report for Unknown Universe

The following report shows the Advantage VISION:Results File Statistics that include record counts of both input and output files.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 55,855 19,660,960

OACCTREC 556 195,712

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 12

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Non-Stratified Sampling Summary Report for Unknown Universe

The following report shows the Non-Stratified Sampling Summary Report. In addition to the information coded on the simple random statement, this report shows the values for the actual population size, the actual sample size, and the original seed number.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

Page 208: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling Example: Unknown Universe

7–16 Reference Guide

APPLICATION 1 - SIMPLE RANDOM SAMPLING

ACTUAL POPULATION SIZE 55,855

SAMPLE PERCENTAGE DESIRED 1.00000

ACTUAL SAMPLE SIZE 565

ORIGINAL SEED NUMBER 7,387

Selected Records Report

The following report shows a portion of the records selected in the sample. Each record is printed in the report format, as requested.

SAMPLING LISTING OF INFINITE POPULATION--HTUC

ACCOUNT NUMBER ACCOUNT NAME BALANCE

7087896 1.32-

7097166 LIBERTY MUTUAL INS 44.45

6002587 SANTA FE HOSP ASSN 15.00

6009166 LOCKE,JEFFREY 15.00

7043732 INS CO OF NO AMER 108.25

6219004 SOOLEY,WILLIAM 15.00

6024963 HILL, GARY E 3.80

7106246 SMITH, AUSTIN 5.12

6211151 COX,WILLIAM 100.20

6024963 HILL,GARY E 3.80

2006286 BALDWIN,HARRY R 1,108.92

7053657 BARNETT, LESTER 25.07

6218113 AGUIERA,EMILIO 108.44

7023189 SIAS, EDWARDO

6033873 NEBRENSKY,CARMEN C 3.40

7107137 VALDEZ, MARY 28.00

Page 209: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 8: Attribute Estimation Sampling 8–1

Chapter 8: Attribute Estimation Sampling

This chapter describes attribute estimation sampling and covers the following main points:

Definition of attribute estimation sampling

Implementation of attribute estimation sampling

Examining and Evaluating the Sample

Attribute Estimation Sampling Example

These topics are described in detail, followed by an example that explains how to implement it with Advantage VISION:Excel.

Definition of Attribute Estimation Sampling Attribute estimation sampling is a method by which, in a population, the number of items distinguished by a particular characteristic can be estimated to a precision within a confidence level. Implicit in this definition are the following concepts:

How many, not how much. Attribute estimation sampling is used to determine how many (that is, a specific number), not how much (that is, a specific percentage); it aids in determining how many items in a population have a certain characteristic. For example, it can be used to determine how many records on a sales file have an amount that does not match the amount on the originating sales slip. However, it cannot be used to estimate the total amount of misstatement (how much) on that sales file.

Characteristic being sought is well-defined. When each item in the sample is examined by the auditor, it falls into one of two groups: it either has the characteristic (attribute), or not. This is like tossing a coin; the coin either comes up heads, or tails.

Page 210: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Attribute Estimation Sampling

8–2 Reference Guide

For example, a petty cash voucher needs two authorizing signatures to be considered correct, or error-free. Also, a voucher is considered incorrect, or in-error, if it contains no authorizing signatures at all. In this example, attribute estimation sampling would not be appropriate for estimating the number of vouchers in-error, because a voucher that has only one authorizing signature could not be classified as correct or as incorrect under the above definition of error-free and in-error; it is in a gray area in between. This example can be made suitable for attribute estimation sampling by changing the definition of a voucher being in-error; that is, a voucher is incorrect when it has one or more authorizing signatures missing. In this way, a voucher with only one signature would be considered in-error.

Precision is controllable. With attribute estimation sampling, the precision of the estimate of how many, as well as the sampling risk, are both controllable. The estimation of the true number of items in the population containing the characteristic is based on the assumption that the percentage of characteristic items in the sample is, more or less, the same as the percentage of characteristic items in the population. That is, if the sample has 10 percent characteristic items, the population also has 10 percent characteristic items, more or less. Thus, if, in a sample of 100 items drawn from a population of 1000 items, 10 (10 percent) characteristic items are found in the sample, you can assume that there are 100 (10 percent) characteristic items in the population, more or less.

The following graphic depicts the Attribute Estimation sampling.

In attribute estimation sampling, the “more or less” idea is quantified when you decide on a precision. You control the technique by specifying how close you want the sample percentage to be to the true percentage in the population.

Page 211: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

Chapter 8: Attribute Estimation Sampling 8–3

For example, you want your sample percentage to be within one percent of the true population percentage, and you find 5 percent characteristic items in your sample. You can conclude that the true population percentage is 5 percent plus or minus one percent; that is, your true population percentage lies somewhere between 4 percent and 6 percent. Perhaps it is 4.9 percent, perhaps it is 5.6 percent, but at least you can be fairly certain it is not 12.2 percent. The following graphic depicts Attribute Estimate Sampling Precision.

The amount of this certainty is set when you decide on a confidence level. The closer the confidence level is to 100 percent, the more certain you can be that the true population percentage lies in the range inferred by the sample.

The precision and confidence levels you specify are used in a statistical formula to calculate the correct sample size. This all works because the sample size statistically chosen for this method forces your precision and your confidence level to be mathematically upheld. The closer your precision is to zero and the closer your confidence level is to 100 percent, the larger the statistically correct sample size is.

Implementation of Attribute Estimation Sampling This section describes how to implement attribute estimation sampling using Advantage VISION:Excel. Advantage VISION:Excel is a computerized system that needs information presented to it in a computerized medium (such as online statements, tape, or disk files).

If the characteristic being sought is present in each record of the automated file, sampling in any form does not make sense.

For example, if you want to determine how many records in an accounts receivable file contain a negative balance, you would write a program to count the records with negative balances, and this procedure would provide an exact count; you would not need to use attribute estimation sampling. However, if the characteristic being sought is not present in each record of the automated file, sampling becomes a very practical alternative.

Page 212: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

8–4 Reference Guide

For example, you want to determine how many records on a loan file contain erroneous original loan amounts (amounts that do not match the amounts on the originating loan application). You can use Advantage VISION:Excel's attribute estimation sampling technique to estimate the number of erroneous records. The matching of amounts on tape or disk records to amounts on originating loan documents is a manual effort that probably is quite tedious and time consuming. Sampling can reduce the manual effort and yet produce a reasonable estimate of how many records are in error.

Advantage VISION:Excel Attribute Estimation Sampling Input

The syntax for attribute estimation sampling is as follows:

SAMPLE nn ATTRIBUTE

POPULATION [SIZE] nnnnnnnnn

CONFIDENCE [LEVEL] nn.n[%] [ONESIDED | TWOSIDED]

PRECISION nn.n[%] MAXIMUM [OCCURRENCE] [RATE] nn.n[%]

[WORKSHEET] [CORRELATION [TABLE] [nnnn nnnn]]

[SEED nnnnnnn] [RANDPROG progname [RANDPROGSIZE nn]]

Note: [RANDPROGSIZE nn ] option is applicable for VSE only.

Keyword Description

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99.

ATTRIBUTE Required. Defines this sampling as an attribute sampling application. This keyword must immediately follow the application number.

POPULATION Required. Specify the population size of the file, either estimated or exact. The keyword SIZE is optional. Commas can be used. The value must be an integer from 1-999,999,999.

If you cannot estimate the population size, make a separate Advantage VISION:Results run against your files to obtain this information. If you do estimate the population size and your estimate is greater than the actual population size, you might get a sample that is smaller than the calculated sample size; conversely, if your estimated population size is less than the actual population size, you can get a sample that is larger than the calculated sample size.

Page 213: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

Chapter 8: Attribute Estimation Sampling 8–5

Keyword Description

CONFIDENCE Required. Defines the confidence level required. The keyword LEVEL and the percent sign are optional. The value cannot be zero or greater than 99.9 percent. The decimal is optional.

The confidence level is the amount of reliability you must have in the sample and is usually a percent ranging from 80.0 percent to 99.9 percent. The greater the reliability you need, the greater confidence level percentage you specify.

ONESIDED | TWOSIDED

Specifies the type of confidence level wanted. Enter ONESIDED (upper bounds of the percentage), TWOSIDED (upper and lower bounds of the percentage), or leave blank; the default is ONESIDED.

In the previous example where the sample percentage turned out to be 5.0 percent and the precision was one percent, a TWOSIDED entry in this field would mean that the true population percentage is between 4 percent and 6 percent, while a ONESIDED entry would mean that the true population percentage is less than 6 percent.

The advantage in using a one-sided confidence level is that, with all other information being identical, a one-sided confidence level produces a smaller sample size than a two-sided confidence level.

PRECISION Required. Specifies the precision required. The percent sign is optional. The value cannot be zero or greater than 99.9 percent. The decimal is optional.

Precision is a measure of how close you want the sample percentage to be to the true population percentage. Once again, this is expressed as a percentage; thus, if you specify a precision of one percent, the true population percentage is within plus or minus one percent of the sample percentage. The precision should be made as large as the audit commitment can tolerate.

MAXIMUM Required. Specifies the maximum tolerable rate of occurrence in the population. The keywords OCCURRENCE and RATE and the percent sign are optional. The value cannot be zero or greater than 99.9 percent. The decimal is optional.

The maximum tolerable rate of occurrence in the population is the maximum percentage of characteristic (error) items you can tolerate in the population without having to decide that the population needs more analysis to determine why the high rate of characteristic (error) items exists.

Page 214: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

8–6 Reference Guide

Keyword Description

WORKSHEET Specifies that you want an attribute estimation sampling worksheet (correlation of sample occurrences to probable population occurrences table).

Note: It takes a long computing time to generate this worksheet.

CORRELATION Specifies the starting sample occurrence and interval for the correlation table. The keyword TABLE is optional and only used if WORKSHEET has been specified. The starting value can be from 0–9,999; default is 0. The interval value can be from 1–9,999; default is 1.

SEED This entry is used to initiate the random number generator process. This number can be from 1–9,999,999. The default is a number generated by the random number generator.

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size should be expressed in kilobytes (1024-bytes).

User-Supplied Judgmental Information

The judgmental information you enter into Advantage VISION:Excel affects the sample size calculated, and the sample size determines the amount of time and effort you must expend to examine the sample. Therefore, follow these guidelines when entering information into Advantage VISION:Excel.

As you increase the size of the confidence level, assuming that all other parameters remain constant, the size of the sample increases. Conversely, as you decrease the size of the confidence level, the size of the sample decreases. For example, assuming that the following remains constant:

Population size 10,000

Precision 2.0%

Maximum Tolerable Rate of Occurrence in the Population 10.0%

Page 215: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

Chapter 8: Attribute Estimation Sampling 8–7

The data shown in the following table proves that as the confidence level increases the size of the sample increases.

Confidence Level-Two-Sided Calculated Sample Size

80.0% 357

85.0% 446

90.0% 574

95.0% 796

97.5% 1,016

As you decrease the size of the PRECISION entry, assuming that all other parameters remain constant, the size of the sample increases. Conversely, as you increase the size of the PRECISION entry, the size of the sample decreases. For example, assuming that the following remains constant:

Population size 5,000

Confidence Level-One-Sided 95.0%

Maximum Tolerable Rate of Occurrence in the Population 7.0%

The data shown in the following table proves that as Precision increases, the size of the sample decreases.

Precision Calculated Sample Size

1.0% 1,303

1.5% 677

2.0% 405

3.0% 189

5.0% 70

As you increase the maximum tolerable rate of occurrence in the population, assuming that all other parameters remain constant, the size of the sample increases.

Population size 25,000

Confidence Level-One-Sided 90.0%

Precision 2.5%

Page 216: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

8–8 Reference Guide

Conversely, as you decrease the size of the maximum tolerable rate of occurrence in the population, the size of the sample decreases, as evident from the following table:

Maximum Tolerable Rate of Occurrence in the Population

Calculated Sample Size

3.0% 77

4.0% 101

5.0% 125

6.0% 148

7.0% 170

The sample size associated with a two-sided confidence level is larger than the sample size associated with a one-sided confidence level, providing that all other parameters remain constant. For example, assuming that the following remains constant:

Population size 25,000

Confidence level 97.5%

Precision 1.5%

Maximum Tolerable Rate of Occurrence in the Population 5.0%

You may notice that the Two-sided confidence level is larger than the sample size associated with a one-sided confidence level.

Confidence Level Calculated Sample Size

One-Sided 799

Two-Sided 1,039

When a worksheet is printed, a statistical table is calculated and printed based on the information supplied for the table used in the evaluation of the sample. For more information, see Attribute Estimation Sampling Example .

Page 217: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

Chapter 8: Attribute Estimation Sampling 8–9

The following report illustrates an Attribute Estimation Sampling Worksheet. Pay particular attention to the Sample Occurrences columns.

11/30/97 VISION:Excel ATTRIBUTE ESTIMATION SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 2,000

ACTUAL POPULATION SIZE 2,000

CONFIDENCE LEVEL - TWO-SIDED 95.0%

DESIRED PRECISION 2.0%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 5.0%

CALCULATED SAMPLE SIZE 372

ACTUAL SAMPLE SIZE 372

ORIGINAL SEED NUMBER 88,609

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0 OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCES LOW HIGH

0 0 15 10 28 94

1 --------- 28 11 32 101

2 1 36 12 36 107

3 4 44 13 40 114

4 7 52 14 44 120

5 10 59 15 48 127

6 13 66 16 52 133

7 17 74 17 57 140

8 20 80 18 61 146

9 24 87 19 65 152

The entries in the sample occurrences columns start with 0 and go to 19 for 20 entries in increments of 1. You can control the starting number and the increment by using the CORRELATION TABLE nnnn nnnn entry.

Page 218: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

8–10 Reference Guide

The following report is an example of an Attribute Estimation Sampling Worksheet in which the starting sample occurrence for the correlation table is set to 4 and the occurrence interval is set to 3. Note that the table starts with four and proceeds in increments of three in the sample occurrences columns.

11/30/97 VISION:Excel ATTRIBUTE ESTIMATION SAMPLING WORKSHEET PAGE 1

APPLICATION 2 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 2,000

ACTUAL POPULATION SIZE 2,000

CONFIDENCE LEVEL - TWO-SIDED 95.0%

DESIRED PRECISION 2.0%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 5.0%

CALCULATED SAMPLE SIZE 372

ACTUAL SAMPLE SIZE 372

ORIGINAL SEED NUMBER 18,593

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 4

OCCURRENCE INTERVAL FOR CORRELATION TABLE 3

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCES LOW HIGH

4 7 51 34 133 245

7 17 74 37 147 263

10 28 94 40 161 281

13 40 114 43 175 298

16 52 133 46 189 316

19 65 152 49 204 334

22 78 171 52 218 351

25 92 190 55 233 369

28 105 208 58 247 386

31 119 227 61 262 404

Page 219: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Attribute Estimation Sampling

Chapter 8: Attribute Estimation Sampling 8–11

Advantage VISION:Results Program

An Advantage VISION:Results program controls the processing of your input/output files and controls when attribute estimation sampling is to be done in the sequence of execution.

An example of such a program is provided in the section Attribute Estimation Sampling Input Statements.

Whenever the IF SAMPLING statement is encountered, Advantage VISION:Excel determines, using a random number generator, whether or not the record is to be included as part of the sample.

For more information on Free-form keywords, see the chapter “Introduction”.

Advantage VISION:Excel Output

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of the Advantage VISION:Excel/Advantage VISION:Results program, as shown in the section Attribute Estimation Sampling Statements Listing.

The Advantage VISION:Excel Sampling List. This lists the information coded in the attribute estimation sampling and shows the statistically correct sample size calculated by Advantage VISION:Excel, as shown in the section Attribute Estimation Sampling List.

The Advantage VISION:Results file and record count statistics, as shown in the section Attribute Estimation Sampling Advantage VISION:Results File Statistics.

The Advantage VISION:Excel Non-Stratified Sampling Summary Report, as shown in the section Attribute Estimation Sampling Non-Stratified Sampling Summary Report. This report lists the information specified using the attribute estimation sampling input statement, the calculated statistically correct sample size, plus information pertaining to the actual run. This includes:

– Actual population size

– Actual sample size

– Original seed number

The Advantage VISION:Excel Attribute Estimation Sampling Worksheet, as shown in Attribute Estimation Sampling Worksheet. When requested, this worksheet is printed on a separate page and reiterates all the information on the Advantage VISION:Excel Non-stratified Sampling Summary Report pertaining to the application. Additionally, it includes the correlation of sample occurrences to probable population occurrences.

Page 220: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

8–12 Reference Guide

Examining and Evaluating the Sample After Advantage VISION:Excel selects the sample, examine the sample to determine how many items are actually in-error (characteristic items).

Evaluate your sample by adjusting the precision using one of the following:

The correlation table output in the Advantage VISION:Excel Attribute Estimation Sampling Worksheet.

Tables available in other books such as Arkin. For more information, see the appendix “Bibliography”.

For example, assume the following information:

Item Value

Population Size 3,000

Confidence Level-Two Sided 92.0%

Precision 2.5%

Maximum Tolerable Rate of Occurrence in the Population

7.0%

Calculated Sample Size 289

Observed Occurrences in the Sample 10

Page 221: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

Chapter 8: Attribute Estimation Sampling 8–13

Two-Sided Attribute Estimation Sampling Worksheet

The worksheet generated for this example is as follows:

11/30/97 VISION:Excel ATTRIBUTE ESTIMATION SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 3,000

ACTUAL POPULATION SIZE 3,000

CONFIDENCE LEVEL - TWO-SIDED 92.0%

DESIRED PRECISION 2.5%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 7.0%

CALCULATED SAMPLE SIZE 289

ACTUAL SAMPLE SIZE 289

ORIGINAL SEED NUMBER 89,033

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCES LOW HIGH

0 0 25 10 56 175

1 ......... 50 11 64 188

2 3 66 12 72 201

3 8 81 13 80 213

4 14 96 14 88 226

5 20 109 15 96 238

6 27 123 16 104 250

7 34 136 17 113 262

8 41 150 18 121 275

9 49 163 19 130 287

Assume that 10 occurrences were found in the sample. If you look at these ten sample occurrences entry in this report( this entry is underlined), you can now state, with 92 percent confidence, that there are between 56 and 175 characteristic (error) items in the population.

Note that the second line of the table contains a stream of periods (..........). This occurs whenever Advantage VISION:Excel cannot compute the lower or upper limit because there was no solution to the equation it attempted to solve in computing the limit.

Page 222: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

8–14 Reference Guide

One-Sided Attribute Estimation Sampling Worksheet

Now, take the same example, except with a one-sided confidence level. Note that the calculated sample size is smaller than the sample size for the two-sided confidence level — 193 as opposed to 289. The worksheet generated for this example is shown in the following report.

11/30/97 VISION:Excel ATTRIBUTE ESTIMATION SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 3,000

ACTUAL POPULATION SIZE 3,000

CONFIDENCE LEVEL - ONE-SIDED 92.0%

DESIRED PRECISION 2.5%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 7.0%

CALCULATED SAMPLE SIZE 193

ACTUAL SAMPLE SIZE 193

ORIGINAL SEED NUMBER 96,129

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCES LOW HIGH

0 0 38 10 0 241

1 0 63 11 0 260

2 0 86 12 0 278

3 0 107 13 0 296

4 0 127 14 0 313

5 0 147 15 0 331

6 0 166 16 0 349

7 0 185 17 0 367

8 0 204 18 0 384

9 0 223 19 0 402

Once again, assume that 10 occurrences were found in the sample. The entry corresponding to the ten sample occurrences is underlined. From this, you can now state, with 92 percent confidence, that you are certain that there are no more than 241 characteristic (error) items in the population.

Page 223: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

Chapter 8: Attribute Estimation Sampling 8–15

Using the Guidelines

Complete the following steps to use attribute estimation sampling with Advantage VISION:Excel:

1. Decide on your sampling objectives.

2. Define the characteristic you are seeking in each item.

3. Define the population.

4. Specify the following information dependent on your judgment:

Confidence level

Precision

Maximum tolerable rate of occurrence in the population

One-sided or two-sided confidence level

5. Determine the population size.

6. Code the Advantage VISION:Excel attribute estimation sampling statement and Advantage VISION:Results program to control the flow of your input/output files and to specify when you want the sampling logic to be executed.

7. Examine your sample to determine how many characteristic (error) items are in the sample.

8. Evaluate your sample to refine the precision of the sampling estimate.

Attribute Estimation Sampling Example This section walks you through a real-life example of the principles described in this chapter.

Background Information

Polar Hydraulic Corporation has an employee educational benefit. An employee can be reimbursed for two-thirds of the cost of classes taken while employed by the company, providing that the course is related to the employee's job and that the employee passes the class with a grade of C or better. The employee fills out a voucher form with:

Name and employee number

Current date

Name of the school or institution providing the class

Title of the class taken

Page 224: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

8–16 Reference Guide

Date period in which the class was conducted

Grade received in the class

Cost of the class

Authorizing signature of the employee's supervisor

A computerized file is maintained to account for the expenditures made for this benefit plan. Each voucher becomes one record on the file, and each record is formatted as below.

Field From To Length

Voucher Number 1 4 4

Voucher Date 5 10 6

Voucher Amount 11 15 5

Employee Number 16 19 4

Employee Name 20 44 25

In the past four years, 855 educational vouchers were completed and processed at a total cost of $57,179.14. The auditors want to examine the vouchers to verify that each one was completed with all the information outlined and, specifically, with the supervisor's authorizing signature.

Attribute estimation sampling is used to estimate the number of vouchers that were not completed correctly. The objective of the sampling plan is to verify that the educational vouchers applied to the automated file were processed properly using the internal procedural system.

Coding the Program

You need to determine and gather the pertinent information first, and then by using application number 01, write an Advantage VISION:Results program. The program should include the attribute estimation sampling statement, to control the flow of the educational voucher file and to control the sequence of the sampling execution, as shown in the following flowchart.

Page 225: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

Chapter 8: Attribute Estimation Sampling 8–17

Attribute Estimation Sampling Advantage VISION: Results Program Flowchart

Page 226: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

8–18 Reference Guide

Attribute Estimation Sampling Input Statements

The coded Advantage VISION:Results program is shown as follows.

REPORT 80 WIDE 1

FILE ACCTREC FB 45 1800 2

VNO 4 1 (VOUCHER'NO.) 3

VDATE 6 5 NU D (VOUCHER'DATE) 4

VAMOUNT 5 11 NU 2 E 5.2 (VOUCHER'AMOUNT) 5

VEMPNO 4 16 (EMPLOYEE'NO.) 6

VEMPNAME 25 20 (EMPLOYEE NAME) 7

* 8

WORKAREA 9

ERR 1 (ERROR) 10

* 11

SAMPLE 01 ATTRIBUTE 12

POPULATION SIZE 855 13

CONFIDENCE LEVEL 90.0 14

PRECISION 1.5 15

MAXIMUM OCCURRENCE RATE 7.0 16

WORKSHEET 17

IF SAMPLING 01 18

NEXT 19

ELSE 20

REJECT 21

ENDIF 22

LIST VNO VDATE VAMOUNT VEMPNO VEMPNAME ERR 23

ON FINAL 24

LIST SUM VAMOUNT WITH 3 BEFORE 25

T1 'EDUCATIONAL VOUCHERS TO BE EXAMINED' WITH 2 AFTER 26

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statement 2 is the Advantage VISION:Results FILE statement.

Statements 3–7 define the educational voucher record.

Statements 12–17 are the attribute estimation sampling statements.

Statement 18 contains the IF SAMPLING command. Note that the application number01 ties this particular IF SAMPLING command to the attribute estimation sampling statement that also contains an 01 application number. At this point, Advantage VISION:Excel starts the random number generator and determines whether the record is to be selected as part of the sample. This way, sample selection is done on a random basis.

Page 227: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

Chapter 8: Attribute Estimation Sampling 8–19

If Advantage VISION:Excel determines that the record is included in the sample, the true ACCEPT branch is taken; effectively, the record is printed in report format. If Advantage VISION:Excel determines that the record is not a part of the sample, the false REJECT branch is taken, and, effectively, the record is ignored.

Statements 23–25 define the format of the report, listing the selected sample records.

Advantage VISION:Excel Output

Advantage VISION:Excel generates various types of reports when you run the input statements mentioned previously. The reports are listed as follows:

Attribute Estimation Sampling Statements Listing

Attribute Estimation Sampling List

Record Counts Accumulated By Advantage VISION: Results

Attribute Estimation Sampling Non-Stratified Sampling Summary Report

Attribute Estimation Sampling Records Selected

Attribute Estimation Sampling Statements Listing

This report shows the listing of the attribute estimation sampling statements and the Advantage VISION:Results statements. The attribute estimation sampling statements are validated in this step.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

REPORT 80 WIDE

FILE ACCTREC FB 45 1800

VNO 4 1 (VOUCHER'NO.)

VDATE 6 5 NU D (VOUCHER'DATE)

VAMOUNT 5 11 NU 2 E 5.2 (VOUCHER'AMOUNT)

VEMPNO 4 16 (EMPLOYEE'NO.)

VEMPNAME 25 20 (EMPLOYEE NAME)

*

WORKAREA

ERR 1 (ERROR)

*

SAMPLE 01 ATTRIBUTE

POPULATION SIZE 855

CONFIDENCE LEVEL 90.0

Page 228: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

8–20 Reference Guide

PRECISION 1.5

MAXIMUM OCCURRENCE RATE 7.0

WORKSHEET

IF SAMPLING 01

NEXT

ELSE

REJECT

ENDIF

LIST VNO VDATE VAMOUNT VEMPNO VEMPNAME ERR

ON FINAL

LIST SUM VAMOUNT WITH 3 BEFORE

T1 'EDUCATIONAL VOUCHERS TO BE EXAMINED' WITH 2 AFTER

Attribute Estimation Sampling List

This report shows the Advantage VISION:Excel Sampling List. The information submitted in the attribute estimation sampling statement is listed in this report. Additionally, the sample size was calculated to be 306.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

POPULATION SIZE 855

CONFIDENCE LEVEL - ONE-SIDED 90.0%

DESIRED PRECISION 1.5%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 7.0%

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CALCULATED SAMPLE SIZE 306

Record Counts Accumulated by Advantage VISION: Results

This report shows the record counts along with file statistics accumulated by Advantage VISION:Results.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 855 38,475

Page 229: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

Chapter 8: Attribute Estimation Sampling 8–21

RECORDS PAGES

FILE PRINT 2

REPORT PRINT 7

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Attribute Estimation Sampling Non-Stratified Sampling Summary Report

This report, shows the Non-Stratified Sampling Summary Report generated. In addition to the information coded in the attribute estimation sampling statement, this report also shows the values for the actual population size, the actual sample size, and the original seed number.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 855

ACTUAL POPULATION SIZE 855

CONFIDENCE LEVEL - ONE-SIDED 90.0%

DESIRED PRECISION 1.5%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 7.0%

CALCULATED SAMPLE SIZE 306

ACTUAL SAMPLE SIZE 306

ORIGINAL SEED NUMBER 64,803

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

Page 230: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

8–22 Reference Guide

Attribute Estimation Sampling Worksheet

This report shows the Attribute Estimation Sampling Worksheet. The correlation table in this report is used in evaluating the sample.

11/30/97 VISION:Excel ATTRIBUTE ESTIMATION SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - ATTRIBUTE ESTIMATION SAMPLING

ESTIMATED POPULATION SIZE 855

ACTUAL POPULATION SIZE 855

CONFIDENCE LEVEL - ONE-SIDED 90.0%

DESIRED PRECISION 1.5%

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 7.0%

CALCULATED SAMPLE SIZE 306

ACTUAL SAMPLE SIZE 306

ORIGINAL SEED NUMBER 64,803

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCES LOW HIGH

0 0 6 10 0 40

1 0 10 11 0 44

2 0 14 12 0 47

3 0 17 13 0 50

4 0 21 14 0 53

5 0 24 15 0 56

6 0 27 16 0 59

7 0 31 17 0 62

8 0 34 18 0 65

9 0 37 19 0 68

Page 231: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

Chapter 8: Attribute Estimation Sampling 8–23

Attribute Estimation Sampling Records Selected

This report partially shows the records selected in the sample. Each record is printed in report format. The following report is the result of the LIST and TITLE statements coded in the Advantage VISION:Results program.

EDUCATIONAL VOUCHERS TO BE EXAMINED

VOUCHER VOUCHER VOUCHER EMPLOYEE EMPLOYEE ERROR NO. DATE AMOUNT NO. NAME

0001 01/01/89 70.40 0140 VICTOR VEGA

0002 01/01/89 89.92 1464 PEGGY GRIFFEN

0005 01/03/89 31.68 0604 TORIBIO FLORES

0008 01/04/89 66.10 0627 PAUL RODRIGUEZ

0012 01/31/89 92.05 2505 ZELMA JOHNSON

0013 03/31/89 107.21 2279 MORRIS PORTER

0016 04/30/89 208.80 2209 DOCK BLEYART

. .

. .

. .

0286 09/02/90 20.47 3073 PAULINE LACY

0295 09/21/90 53.40 5060 WILLIAM MATHEWS

0298 09/22/90 98.06 3154 AUSTIN HARDING

0299 09/22/90 47.60 3112 HELEN PEARSON

0302 09/25/90 62.86 5026 ALEJANDRO SCHACTEBECK

. .

. .

0443 12/23/90 87.65 3961 ALTON COX

0447 12/29/90 92.00 4094 FAY BROWN

0448 12/29/90 9.45 4139 EUGENE ROGERS

0451 01/04/91 62.93 5669 GEORGE BARRIO

0452 01/04/91 50.19 7509 MATIAS ROMO

. .

. .

. .

0587 09/06/91 84.64 9768 JERRY HAMILTON

0587 09/08/91 3.00 5838 JOHN HARRINGTON

0596 09/09/91 60.57 8197 RICHARD BLANKS

0597 09/10/91 12.40 8178 TONY NARANJO

0598 09/11/91 194.80 8273 HUGO BIANES

. .

. .

Page 232: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling Example

8–24 Reference Guide

. .

VOUCHER VOUCHER VOUCHER EMPLOYEE EMPLOYEE ERROR NO. DATE AMOUNT NO. NAME

0721 11/22/91 42.56 8403 FRANK LIMON

0724 11/23/91 47.00 5662 JOHN PINTO

0725 11/23/91 122.24 6048 CAROLYN LUKE

0727 11/23/91 55.00 6019 SUE SIMPKINS

0728 11/25/91 37.68 6056 RTHELMA ELIZABETH

. .

. .

. .

0842 01/08/92 75.80 7721 MARY MURIEL

0843 01/31/92 55.00 8927 RON LA FUENTE

0845 01/31/92 33.05 8772 RESURECCIO ENRIQUEZ

0848 02/28/92 1.32 8772 RICHARD GRIFFIN

0854 04/30/92 38.78 9042 ROBERT TOVAR

19,927.79

. .

After careful examination of the vouchers corresponding to these records, 12 vouchers have been found that had not been completed correctly. From Attribute Estimation Sampling Worksheet report, with 90.0 percent confidence, you can be certain that not more than 47 vouchers out of the 855 vouchers had been processed incorrectly. This is satisfactory, because 47 vouchers (5.5 percent) represent less than 7.0 percent, the percentage specified as the maximum tolerable rate of occurrence.

However, if you had found 19 improper vouchers in this sample, you would be forced to conclude that not more than 68 vouchers out of the 855 vouchers had been processed improperly. Because 68 vouchers (8.0 percent) is greater than the 7.0 percent specified as the maximum tolerable rate of occurrence, you would have to perform a thorough investigation to determine whether or not the prescribed procedures were being adequately enforced.

Page 233: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 9: Discovery Sampling 9–1

Chapter 9: Discovery Sampling

This chapter describes discovery sampling and covers the following main points:

Definition of discovery sampling

Discovery sampling inferences

Advantage VISION:Excel implementation of discovery sampling

Discovery sampling example

These topics are described in detail, followed by an example, which explains how to implement Discovery sampling with Advantage VISION:Excel.

Definition of Discovery Sampling In discovery sampling, you are concerned with items bearing a particular characteristic within a population. Unlike attribute estimation sampling, where the purpose is to estimate the number of characteristic items in the population, the objective of discovery sampling is to select, with a given probability, an unrestricted random sample that contains at least one of the characteristic (error) items being sought, based on the expectation that the population contains a given percentage, or rate, of characteristic items.

If the sample contains no characteristic items, the true population percentage of characteristic items is assumed to be less than or equal to the given percentage. On the other hand, if the sample contains one or more characteristic items, the discovery sampling objective has been achieved. Consequently, discovery sampling is a disclosure method — not an estimation method.

Uses of Discovery Sampling

Discovery sampling, sometimes called exploratory sampling, is used when you believe that the population occurrence rate of characteristic (error) items is close to zero; however, if you are incorrect, you would like to find at least one example of a characteristic (error) item in your sample. If you find one or more characteristic items in your sample, you will do an in-depth examination of the population. In this case, discovery sampling serves as a preliminary test before more extensive testing is done.

Page 234: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Discovery Sampling

9–2 Reference Guide

Discovery sampling is sometimes described as a method of finding a needle in a haystack. This is not strictly true. For discovery sampling to work, the population contains at least a minimum number (dependent on the size of the population) of characteristic items.

For example, if a population of one million items contained exactly one error item, the probability of selecting a small sample containing that one error item would be minute; consequently, discovery sampling would not be adequate in ferreting out that one error. No sampling technique could accomplish the task of finding that one error; it would be necessary to examine the total population.

Unlike the other sampling methods, where precision and confidence level are mandatory, precision has no place in discovery sampling. The objective of discovery sampling is disclosure — not estimation.

The confidence level is the probability of selecting a sample that contains one or more characteristic items, provided the population has more than a specified number of characteristic items. The confidence level is a measure of your control over the discovery sampling method.

The population size, the confidence level, and the expected number of occurrences of characteristic items in the population are all inserted into a mathematical formula to produce the statistically correct sample size for discovery sampling. This forces the random sample chosen to support the confidence level you want.

Page 235: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

Chapter 9: Discovery Sampling 9–3

Discovery Sampling Inferences This section explains some inferences that are made in discovery sampling.

Inference 1

The inferences can be clearly understood with the help of following graphic.

Inference 2

The inferences shown in this section are logically equivalent to the inferences shown in the section Inference1.

Page 236: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

9–4 Reference Guide

The X percent shown in Inference 1 and Inference 2, represents the maximum percentage (rate) of characteristic items in the population that can be tolerated. For example, if you can only tolerate 2.0 percent characteristic items in a given population without having to examine the population more extensively, the X percent shown in the two figures would be 2.0 percent.

Note that the strong inferences are mathematically supported by the confidence level you specify, while the weak inferences are not controllable in the discovery sampling method. You can control how often the strong inferences are true by using the confidence level properly; however, you cannot control how often the weak inferences are true.

Relationships between Occurrence and Probability

In addition to the previous examples, the following illustrations help you to understand the relationship between percentage of occurrences and probability of the sample.

Illustration 1

Illustration 2

Illustartion 3

Illustration 4

Illustartion 5

Illustration 1 and Illustration 2 show the relationship between the percentage of occurrences of characteristic items in the population and the probability that the sample contains one or more characteristic items, as well as the probability that the sample contains no characteristic items.

Note that in both figures, the probability is nearly level from 5–100 percent occurrences. Also, note that the curve in Illustration 2 is the 100 percent complement of the curve in Illustration 1. The importance of Illustration 1 and Illustration 2 is summarized in Illustration 3.

Illustration 4 and Illustration 5 are similar to Illustration 1 and Illustration 2, but they are more highly defined in the 0–2.5 percent range of occurrences of characteristic items in the population. In Illustration 4 and Illustration 5, note why the inferences made in Inference 1 and Inference 2 are termed strong and weak.

Page 237: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

Chapter 9: Discovery Sampling 9–5

Illustration 1

This illustration represents the relationship between percentage of occurrences and probability of sample containing characteristic items.

Illustration 2

This illustration represents the relationship between percentage of occurrences and probability of sample not containing characteristic items.

Page 238: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

9–6 Reference Guide

Illustration 3

This illustration represents a summary of effect of number of characteristic items.

Illustration 4

This illustration represents the relationships between percentage of occurrences and probability of sample containing characteristic items.

Page 239: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

Chapter 9: Discovery Sampling 9–7

Illustration 5

This illustration represents the relationships between percentage of occurrences and probability of sample not containing characteristic items.

Strong Inferences

Examine the strong inferences in Illustration 5 to determine how often you can select a sample containing no characteristic items when, in truth, the population contains more than X percent characteristic items. Assume that you can tolerate 2.5 percent characteristic items in the population; then X percent, the maximum tolerable rate of occurrence in the population, is 2.5 percent. Also assume that the population size is 2000 and that the sample size is 125.

In Illustration 5, note that at the 2.5 percent occurrence rate, the probability is about 4 percent. This means that if the population contains 2.5 percent characteristic items, the probability of selecting a sample with no characteristic items is 4 percent. This would correspond to a confidence level of 96 percent at a tolerable rate of 2.5 percent.

In Illustration 2, note that as the percentage of occurrences increases beyond 2.5 percent, the probability of no occurrences in the sample decreases and approaches zero percent. Therefore, the probability is less than 4 percent that a population of 2000 items containing more than 2.5 percent characteristic items yields a sample (size 125) that contains no characteristic items. Admittedly, 4 percent is fairly low.

Page 240: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

9–8 Reference Guide

Weak Inferences

Examine the weak inferences in Illustration 4 to determine how often you can select a sample that contains one or more characteristic items from a population containing X percent or less characteristic items. Assume that you can tolerate 2.5 percent characteristic items in the population. Also assume that the population size is 2000 and that the sample size is 125.

In Illustration 4, note that at the 2.5 percent occurrence rate, the probability is about 96 percent, which is the confidence level. Look at the 0.5 percent and 1.0 percent occurrences in Illustration 4; the probabilities that the sample contains one or more characteristic items are approximately 48 percent and 73 percent, respectively.

The probability of selecting a sample with one or more characteristic items from a population containing less than the tolerable percentage of occurrences can be quite high, but that is not a strong indication that the population contains more than the specified number of characteristic items; that is why this inference is a weak inference.

Sample Size and Probability

The following section explains the relationship between the sample size and the probability that the sample contains one or more characteristic items for two population sizes.

Page 241: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Inferences

Chapter 9: Discovery Sampling 9–9

Probability of Sample Containing Characteristic Items

The following graph represents the relationship between sample size and probability of sample containing characteristic items.

The importance of this graph is to show that as the confidence level you specify increases, the sample size also increases; this concept is emphasized in the graph shown in the following section.

Summary Effect of Sample Size

The following figure represents the summary effect of sample size.

Page 242: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

9–10 Reference Guide

Advantage VISION:Excel Implementation of Discovery Sampling

The remainder of this chapter describes how to implement discovery sampling in Advantage VISION:Excel.

Advantage VISION:Excel Discovery Sampling Input Statements

The syntax for discovery sampling is as follows:

SAMPLE nn DISCOVERY

POPULATION [SIZE] nnnnnnnnn

CONFIDENCE [LEVEL] nn.n[%] [ONESIDED | TWOSIDED]

MAXIMUM [OCCURRENCE] [NUMBER] nnnnnnnn [WORKSHEET]

CORRELATION [TABLE] [nnnn nnnn]] [SEED nnnnnnn]

RANDPROG progname [RANDPROGSIZE nn]]

The following table describes the keywords associated with discovery sampling:

Keywords Description

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99.

DISCOVERY Required. Defines this sampling as a discovery sampling. This keyword must follow immediately after the application number.

POPULATION Required. Specifies the population size of the file, either estimated or exact. The keyword SIZE is optional. Enter an integer from 1–999,999,999. Commas are allowed. The value cannot be zero.

If you cannot estimate the population size, make a separate Advantage VISION:Results run against your files to obtain this information. If you do estimate the population size and your estimate is greater than the actual population size, you can get a sample that is smaller than the calculated sample size; conversely, if your estimated population size is less than the actual population size, you can get a sample that is larger than the calculated sample size.

Page 243: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

Chapter 9: Discovery Sampling 9–11

Keywords Description

CONFIDENCE Required. Defines the confidence level required. The keyword LEVEL and the percent sign are optional. The percent value cannot be zero or greater than 99.9 percent. Normally, this is a percentage value that is greater than 80 percent. The decimal is required.

The confidence of finding at least one occurrence in the sample is the amount of reliability you need in the sample. If the population contains exactly the maximum tolerable number of occurrences of characteristic items, enter a value that equals the probability of finding at least one occurrence in the sample.

The information entered into this field is a percent, usually ranging from 80.0 percent to 99.9 percent; the closer the percent is to 100 percent, the more certain you can be that the strong inferences shown in Inference 1 and Inference 2 are true for the sample chosen. Remember, the greater the confidence level, the greater the statistically-correct sample size.

ONESIDED | TWOSIDED

Specifies the type of confidence level wanted. Enter ONESIDED (upper bounds of the percentage), TWOSIDED (upper and lower bounds of the percentage), or leave blank; the default is ONESIDED.

MAXIMUM Required. OCCURRENCE and NUMBER are optional. Enter an integer from 1–99,999,999. Commas are allowed.

The maximum tolerable number of occurrences in the population is the maximum number of characteristic (error) items in the population you can tolerate without having to more extensively examined the population.

WORKSHEET Specifies that you want the Attribute Estimation Sampling Worksheet (correlation of sample occurrences to probable population occurrences table). Be aware that considerably more computer time is required to generate this worksheet.

CORRELATION Specifies the starting sample OCCURRENCE and interval for the correlation table. Use the keyword TABLE only if WORKSHEET has been specified. The starting value can be an integer from 0–9,999; the default is 0. The interval value can be an integer from 1–9,999; the default is 1.

SEED This entry is used to initiate the random number generator process. This integer can be from 1–9,999,999. The default is a number generated by the random number generator.

Page 244: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

9–12 Reference Guide

Keywords Description

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel’s, enter the name of your random number generator program after the RANDPROG keyword. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE

VSE only. Enter the memory size required for the user random number generator program. The memory size is expressed in kilobytes (1024-bytes).

Evaluating an Attribute Estimation Sample

Although discovery sampling is a disclosure method, Advantage VISION:Excel provides the statistical table necessary to evaluate a discovery sample as an attribute estimation sample. If you find one or more characteristic items in your sample, by switching to evaluation as an attribute estimation sample, you can determine the range between which the true number of characteristic items in the population falls. When you enter the optional items, the Discovery Sampling Worksheet used for estimation evaluation is printed as a part of the Advantage VISION:Excel run. The discovery sampling worksheet is shown in the following section.

Page 245: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

Chapter 9: Discovery Sampling 9–13

Discovery Sampling Worksheet

The printed Discovery Sampling Worksheet used for estimation evaluation is shown as follows:

11/30/97 Advantage VISION:EXCEL DISCOVERY SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - DISCOVERY SAMPLING

ESTIMATED POPULATION SIZE 1,000

ACTUAL POPULATION SIZE 1,000

DESIRED CONFIDENCE OF FINDING AT LEAST ONE OCCURRENCE IN A SAMPLE

- ONE SIDED 95.0%

MAXIMUM TOLERABLE NUMBER OF OCCURRENCES IN THE POPULATION 25

CALCULATED SAMPLE SIZE 112

ACTUAL SAMPLE SIZE 112

ORIGINAL SEED NUMBER 29,769

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCE LOW HIGH

0 0 25 10 0 144

1 0 40 11 0 155

2 0 54 12 0 165

3 0 66 13 0 175

4 0 78 14 0 185

5 0 89 15 0 196

6 0 101 16 0 206

7 0 112 17 0 215

8 0 123 18 0 226

9 0 133 19 0 236

For more information about attribute estimation sampling, see Attribute Estimation Sampling Example in the chapter “Attribute Estimation Sampling.”

Page 246: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

9–14 Reference Guide

Advantage VISION: Results Program

Write an Advantage VISION:Results program to control your input/output files and to control the sequence in which the sampling occurs (an entire program is provided in Discovery Sampling Example).

For more information on free-form keywords, see the chapter “Introduction.”

Syntax for Advantage VISION:Excel IF SAMPLING Command

The syntax for IF SAMPLING command is as follows:

IF SAMPLING 01

GOTO INC

ELSE

GOTO EXC

ENDIF

The IF Sampling command controls the sequence. When the command is executed, Advantage VISION:Excel takes over, starting the random number generator to determine randomly whether or not the record is to be included in the sample. If the record is accepted, processing continues at the tagname INC. On the other hand, if the record is not included in the sample, the next executed instruction is at the tagname EXC.

Advantage VISION:Excel Output

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Results and Advantage VISION:Excel discovery sampling statements. For more information, see the code listing given in the section Discovery Sampling Statement Listing.

The Advantage VISION:Excel Sampling List. This lists the information coded in the Discovery Sampling statement, plus the statistically-correct sample size calculated by Advantage VISION:Excel — this is how large your sample is. For more information, see Discovery Sampling List.

The Advantage VISION:Excel File Statistics. This lists the record counts of the files used by Advantage VISION:Excel. For more information, see Discovery Sampling Advantage VISION:Excel File Statistics.

The Advantage VISION:Results File and Record Statistics. For more information, see Discovery Sampling Advantage VISION:Results File Statistics.

Page 247: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Discovery Sampling

Chapter 9: Discovery Sampling 9–15

The Advantage VISION:Excel Non-Stratified Sampling Summary Report lists the following.

– The information you specified in the discovery sampling statement

– The calculated statistically-correct sample size

– Information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run, including:

– Actual population size

– Actual sample size

– Original seed number

The Advantage VISION:Excel Discovery Sampling Worksheet, if you requested it. This report is used only if you want to evaluate your sample as an attribute estimation sample (see the report in the section, Discovery Sampling Worksheet).

Examining and Evaluating the Sample

After Advantage VISION:Excel selects your sample, you must examine it, searching for characteristic (error) items. You can terminate your search as soon as you find one characteristic (error) item in the sample. If the sample contains no characteristic (error) items, you can conclude that the number of characteristic items in the population is less than or equal to the maximum tolerable number of occurrences in the population with a confidence level equal to the confidence of finding at least one occurrence in the sample.

For example, assume the following information:

Item Value

Population Size 5,000

Confidence of finding at least one occurrence in the sample

95.0%

Maximum tolerable number of occurrences in the sample

40

Calculated sample size 361

If no characteristic (error) items were found in this sample, you could conclude, with 95 percent confidence, that there are 40 or fewer characteristic (error) items in the population. However, if one or more characteristic items were found in this sample, you would have to do a fuller examination of the population.

Page 248: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–16 Reference Guide

Using the Guidelines

Complete the following steps to use discovery sampling using Advantage VISION:Excel:

1. Decide on your sampling objectives. Remember, the primary purpose of discovery sampling is disclosure — not estimation; although, after the sample is selected, you can elect to evaluate the sample on an estimation basis.

2. Define the population.

3. Define the characteristic you are seeking in each item.

4. Specify the information dependent on your sound judgment.

Maximum tolerable number of occurrences in the population.

Confidence of finding at least one occurrence in the sample.

5. Determine the population size.

6. Code an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input/output files and to specify when you want the sampling logic to be executed.

7. Examine your sample, searching for characteristic (error) items. If your objective is strictly disclosure, you can stop your examination after you find the first characteristic item. If your objective is estimation, continue the examination so you can determine the exact number of characteristic items in the sample.

8. Evaluate your sample.

Discovery Sampling Example This section walks you through a real-life example.

Background Information

The accounts payable file of the McGraw Tool Co. is to be audited; selected records are matched against originating invoices and company internal vouchers to verify that:

The vendor names and account numbers match.

The invoice dates match.

The unit prices match.

The number of units match.

The originating invoice has the proper written approval.

Page 249: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

Chapter 9: Discovery Sampling 9–17

After a cursory investigation, it appears that the employees involved with maintaining the accounts payable file are closely following the internal control procedures set up for this function.

To prove or disprove this point, you sample using the discovery sampling method. You can tolerate no more than one percent procedural errors in the file. Thus, if you find no error records in the sample, you are satisfied that the internal control procedures are being followed adequately. However, if you find one or more records in the sample that are in error, you will do a fuller investigation of the situation.

The accounts payable file is formatted as follows:

Field From To Length Type

Vendor No. 1 3 3

Vendor Name 4 33 30

Vendor Address 34 65 32

Vendor City 66 85 20

Vendor State 86 87 2

Vendor Zip 88 92 5

Purchase Order No. 94 97 4 Packed

Purchase Order Date 98 103 6

Product No. 104 106 3 Packed

Number of Units 107 109 3 Packed

Unit Price 110 115 6 Packed

Total Amount 116 122 7 Packed

Filler 123 123 1

Invoice No. 124 127 4 Packed

Invoice Date 128 133 6

Invoice Amount 134 140 7 Packed

After passing the accounts payable file through a small program, you find that it contains 1511 records with a total payable amount of $261,620.77. Because you can only tolerate a rate of one percent errors in the population, the maximum tolerable number of occurrences in the population would be 15 (that is, 1511 multiplied by one percent). With this information, you are ready to write an Advantage VISION:Results discovery sampling program.

Page 250: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–18 Reference Guide

Discovery Sampling Advantage VISION:Results Program Flowchart

The flow of the Advantage VISION:Results program is shown as follows.

Page 251: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

Chapter 9: Discovery Sampling 9–19

Discovery Sampling Input Statements

The following Advantage VISION:Results program is written as per the flowchart given in the previous section.

FILE ACCTREC INPUT FB 150 3000 1

COMPNO 3 1 PD (COMPANY'NUMBER) 2

COMNAM 30 4 (COMPANY NAME) 3

STREET 32 34 4

CITY 20 66 5

STATE 2 86 6

ZIP 5 88 7

PONUM 4 94 PD (P.O.'NUMBER) 8

PODATE 6 98 NU D (P.O.'DATE) 9

PRODNO 3 104 PD (PRODUCT'NO.) 10

NOUNITS 3 107 PD 2 E (NUMBER'OF UNITS) 11

UNIP 6 110 PD 2 E (UNIT'PRICE) 12

POTOTAL 7 116 PD 2 E (P.O.'AMOUNT) 13

INVNO 4 124 PD 14

INVDATE 6 128 NU D (MERCHANDISE'DATE RECEIVED) 15

INVAMT 7 134 PD E 16

CONTROL POTOTAL 17

SAMPLE 01 DISCOVERY 18

POPULATION SIZE 1511 19

CONFIDENCE LEVEL 96.0% 20

MAXIMUM OCCURRENCE NUMBER 15 21

WORKSHEET 22

IF SAMPLING 01 23

NEXT 24

ELSE 25

REJECT 26

ENDIF 27

LIST COMPNO COMNAM PONUM PODATE PRODNO NOUNITS UNIP POTOTAL INVDATE 28

ON CHANGE IN POTOTAL 29

LIST POTOTAL WITH 3 BEFORE 30

T1 'MCGRAW TOOL CO.' WITH 2 AFTER 31

T2 'ACCOUNTS PAYABLE AUDIT REPORT' WITH 2 AFTER 32

T1+90 DYLDATEPAG 33

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

The use of an input file is specified by the FILE statement (statement 1).

The name, position, and length of the fields in the input record are defined in the field definition statements 2–16.

Page 252: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–20 Reference Guide

Statements 18–22 are the Advantage VISION:Excel discovery sampling statements.

The Advantage VISION:Excel IF SAMPLING command is shown in statement 23. Note that application number 01 is coded after the command IF SAMPLING; this particular sampling operation is tied to the Advantage VISION:Excel discovery sampling statements (statements 18–22) containing 01 in its application number field.

When the IF SAMPLING command is executed, the random number generator is invoked to determine whether the record should be accepted as part of the sample or rejected. If the record is to be included in the sample, the true branch NEXT is executed; the record is printed in report format, and the next record is read. If the record is to be excluded from the sample, the false branch REJECT is executed; the record is not printed, and the next record is read.

The format of the report is defined by statements 28–33.

Advantage VISION:Excel Output

The Advantage VISION:Excel statements and the Advantage VISION:Results program are run together using Advantage VISION:Excel. The following reports are generated by Advantage VISION:Excel:

Discovery Sampling Statement Listing

Discovery Sampling List

Discovery Sampling Advantage VISION:Excel File Statistics

Discovery Sampling Advantage VISION:Results File Statistics

Discovery Sampling Non-Stratified Sampling Summary Report

Discovery Sampling Worksheet

Discovery Sampling Partial Listing of Selected Records

Page 253: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

Chapter 9: Discovery Sampling 9–21

Discovery Sampling Statement Listing

This report shows a listing of the Advantage VISION:Excel discovery sampling statement and the Advantage VISION:Results program input to the system.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC INPUT FB 150 3000

COMPNO 3 1 PD (COMPANY'NUMBER)

COMNAM 30 4 (COMPANY NAME)

STREET 32 34

CITY 20 66

STATE 2 86

ZIP 5 88

PONUM 4 94 PD (P.O.'NUMBER)

PODATE 6 98 NU D (P.O.'DATE)

PRODNO 3 104 PD (PRODUCT'NO.)

NOUNITS 3 107 PD 2 E (NUMBER'OF UNITS)

UNIP 6 110 PD 2 E (UNIT'PRICE)

POTOTAL 7 116 PD 2 E (P.O.'AMOUNT)

INVNO 4 124 PD

INVDATE 6 128 NU D (MERCHANDISE'DATE RECEIVED)

INVAMT 7 134 PD E

CONTROL POTOTAL

SAMPLE 01 DISCOVERY

POPULATION SIZE 1511

CONFIDENCE LEVEL 96.0%

MAXIMUM OCCURRENCE NUMBER 15

WORKSHEET

IF SAMPLING 01

NEXT

ELSE

REJECT

ENDIF

LIST COMPNO COMNAM PONUM PODATE PRODNO NOUNITS UNIP POTOTAL INVDATE

ON CHANGE IN POTOTAL

LIST POTOTAL WITH 3 BEFORE

T1 'MCGRAW TOOL CO.' WITH 2 AFTER

T2 'ACCOUNTS PAYABLE AUDIT REPORT' WITH 2 AFTER

T1+90 DYLDATEPAG

Page 254: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–22 Reference Guide

Discovery Sampling List

This report shows the Advantage VISION:Excel Sampling List. Note that each field in the Advantage VISION:Excel discovery sampling statement is listed here with a title descriptive of the field, plus the information coded for the field. Also, fields left blank when coded are listed here with their default values. Additionally, the statistically-correct sample size was calculated as 291 for the information submitted using the discovery sampling statement.

11/30/97 VISION:EXCEL SAMPLING LIST PAGE 1

APPLICATION 1 - DISCOVERY SAMPLING

POPULATION SIZE 1,511

DESIRED CONFIDENCE OF FINDING AT LEAST ONE OCCURRENCE IN THE SAMPLE

- ONE SIDED 96.0%

MAXIMUM TOLERABLE NUMBER OF OCCURRENCES IN THE POPULATION 15

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CALCULATED SAMPLE SIZE 291

Discovery Sampling Advantage VISION:Excel File Statistics

This report shows the Advantage VISION:Excel File Statistics. The record counts shown here can be tied into other reports.

11/30/97 VISION:EXCEL 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 23

NUMBER OF PARAMETER CARDS READ 22

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 38

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 38

NUMBER OF RECORDS WRITTEN TO VISION:RESULTS PARAMETER FILE 39

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 2

NUMBER OF LINES PRINTED 22

Page 255: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

Chapter 9: Discovery Sampling 9–23

Discovery Sampling Advantage VISION:Results File Statistics

This report shows the file and record statistics for the Advantage VISION:Results run.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 1,511 266,650

RECORDS PAGES

FILE PRINT 2

REPORT PRINT 7

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

The number of records read from the input file, 1511, is equal to the actual population size shown in the section Discovery Sampling Worksheet. You can calculate the number of rejected records by subtracting the calculated sample size from the population size as given in the report of the section Discovery Sampling List. The equation is as follows:

Population Size – Calculated Sample Size = Number of Rejected Records

511 – 291 = 1220

Page 256: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–24 Reference Guide

Discovery Sampling Non-Stratified Sampling Summary Report

This is the Non-Stratified Sampling Summary Report. In addition to the information coded in the discovery sampling statement, this report lists the actual population size, the actual sample size, and the seed number needed to rerun this job.

11/30/97 VISION:EXCEL NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - DISCOVERY SAMPLING

ESTIMATED POPULATION SIZE 1,511

ACTUAL POPULATION SIZE 1,511

DESIRED CONFIDENCE OF FINDING AT LEAST ONE OCCURRENCE IN THE SAMPLE

- ONE SIDED 96.0%

MAXIMUM TOLERABLE NUMBER OF OCCURRENCES IN THE POPULATION 15

CALCULATED SAMPLE SIZE 291

ACTUAL SAMPLE SIZE 291

ORIGINAL SEED NUMBER 72,817

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

Discovery Sampling Worksheet

The following report shows the Discovery Sampling Worksheet needed to evaluate the sample for estimation purposes.

11/30/97 VISION:EXCEL DISCOVERY SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - DISCOVERY SAMPLING

ESTIMATED POPULATION SIZE 1,511

ACTUAL POPULATION SIZE 1,511

DESIRED CONFIDENCE OF FINDING AT LEAST ONE OCCURRENCE IN THE SAMPLE

- ONE SIDED 96.0%

MAXIMUM TOLERABLE NUMBER OF OCCURRENCES IN THE POPULATION 15

CALCULATED SAMPLE SIZE 291

ACTUAL SAMPLE SIZE 291

ORIGINAL SEED NUMBER 72,817

WORKSHEET DESIRED YES

STARTING SAMPLE OCCURRENCE FOR CORRELATION TABLE 0

OCCURRENCE INTERVAL FOR CORRELATION TABLE 1

CORRELATION OF SAMPLE OCCURRENCES TO PROBABLE POPULATION OCCURRENCES

SAMPLE POPULATION OCCURRENCES SAMPLE POPULATION OCCURRENCES OCCURRENCES LOW HIGH OCCURRENCE LOW HIGH

Page 257: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

Chapter 9: Discovery Sampling 9–25

0 0 15 10 0 86

1 0 24 11 0 92

2 0 32 12 0 99

3 0 40 13 0 105

4 0 47 14 0 111

5 0 53 15 0 117

6 0 60 16 0 123

7 0 67 17 0 129

8 0 73 18 0 135

9 0 80 19 0 141

After careful examination of the sample records, you find none that are in error. You can now conclude that the file contains no more than one percent records in error. However, for the purpose of discussion, assume that you find three records in error in the sample.

This is not satisfactory, and you want to estimate the total number of error records on the entire accounts payable file.

Notice the underlined entries in this report—these entries correspond to three sample occurrences. Therefore, you can now state with 96 percent confidence, that the accounts payable file contains no more than 40 records in error.

Page 258: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling Example

9–26 Reference Guide

Discovery Sampling Partial Listing of Selected Records

This report is a partial listing of the records selected for the sample.

MCGRAW TOOL CO. DATE 11/30/97 PAGE 1

ACCOUNTS PAYABLE AUDIT REPORT

COMPANY COMPANY NAME P.O. P.O. DATE PRODUCT NUMBER UNIT P.O. MERCHANDISE NUMBER NUMBER NO. OF UNITS PRICE AMOUNT DATE RECEIVED

0010238 AUTOMATIC COMPUTER SVC 010000 01/01/97 58461 .97 39.03 37.85 01/01/97

0071641 NEW BRITIAN MACHINE CO 010004 01/01/97 56498 3.45 3.45 11.90 01/26/97

0018947 ASSOC CROCERS OF CO 010006 01/02/97 26151 9.13 10.54 96.23 01/26/97

0087797 NATIONAL BUREAU OF STANDARDS 010009 01/02/97 39718 18.00 5.73 103.14 01/23/97

0013102 SBC 010015 01/04/97 82265 18.00 3.16 56.88 01/26/97

0070291 AMERICAN WHSLE HARDWARE 010019 01/04/97 95268 2.31 2.30 5.31 01/23/97

. . . .

. . . .

. . . .

0010872 SYSTEM DVLPMT CORP 011504 05/25/97 91653 10.83 2.52 27.29 06/18/97

0066353 TELEMARK INC 011506 05/25/97 38340 7.93 3.37 26.72 06/13/97

0073684 THE FEDERAL GLASS CO 011509 05/26/97 61486 18.14 1.30 23.58 06/24/97

51,338.96

Page 259: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 10: Acceptance Sampling 10–1

Chapter 10: Acceptance Sampling

This chapter describes acceptance sampling and covers the following main points:

Definition of acceptance sampling

Acceptance versus Attribute and Discovery Sampling

Implementation of Acceptance Sampling

Acceptance Sampling Example

These topics are described in detail, followed by an example, which explains how to implement acceptance sampling with Advantage VISION:Excel.

Definition of Acceptance Sampling In acceptance sampling, you are concerned with items bearing a particular characteristic within a population. Acceptance sampling is a technique by which an unrestricted random sample can be used to decide whether the population occurrence rate of characteristic items is greater than a specified rate or less than or equal to a second, but lesser, specified rate. As part of the initial planning, the following mathematical values must be determined:

Statistically correct sample size

Statistically correct acceptance number

After the sample is selected, it is examined to determine the number of characteristic items in the sample. Assume that the sample has “W” characteristic items in it. If “W” is less than or equal to the acceptance number, you can infer that the population contains the second specified rate, or less, of characteristic items. However, if “W” is greater than the acceptance number, you can infer that the population contains a rate of occurrence of characteristic items that is greater than the first specified rate.

Objectives

The objective of acceptance sampling is to make a decision. Thus, acceptance sampling is sometimes known as attribute decision sampling. Acceptance sampling has long been a tool of quality control experts who use the technique to weed out bad batches and lots. Depending on the results of the sample, the batch is either accepted or rejected. For example, assume the following values for an acceptance sampling plan:

Page 260: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

10–2 Reference Guide

Item Value

Size of batch 1,000

Size of sample 200

Acceptance number 5

For each batch, an item would be randomly selected and tested for error or defect, then another item, and so on. This would continue until either 200 items had been randomly selected and examined, or until six (5 plus 1) error or defective items had been found, whichever came first. In the former case, the batch would be accepted, while in the latter case, the batch would be rejected.

Once the acceptance sampling plan is determined, it can be administered by a person who knows very little about sampling.

Acceptance versus Attribute and Discovery Sampling Although attribute estimation sampling, discovery sampling, and acceptance sampling all deal with items in a population that bear a particular characteristic, the difference between the three sampling techniques is in the objective achieved by each one of the methods:

Sampling Technique Objective

Attribute estimation sampling Estimation

Discovery sampling Disclosure

Acceptance sampling Decision

The true rate of occurrence of characteristic items in the population is unknown. With acceptance sampling, you attempt to determine whether the true population rate is greater than or less than a specified rate (known as the maximum tolerable rate of occurrence in the population). The true rate of occurrence of characteristic items in the population is known as TRATE, and the maximum tolerable rate of occurrence in the population is known as MXRATE.

Page 261: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

Chapter 10: Acceptance Sampling 10–3

Inference 1:

If TRATE is greater than MXRATE, the sample infers a rejection condition — the number of characteristic items in the sample is greater than the acceptance number.

How often this inference is true is controlled by the confidence level expressed in a slightly different way. In acceptance sampling, instead of specifying a confidence level to control how often the inference is true, you specify a risk level to control how often the inference can be false. Thus, the risk of unwarranted reliance at the MXRATE is introduced into the mathematical picture. This risk is symbolically denoted as RISK1 and is the probability that Inference 1 is false; RISK1 is the risk you are willing to take that the sample inference indicates an acceptance condition instead of a rejection condition.

Inference 2a:

If TRATE is less than or equal to MXRATE, the sample infers acceptance — the number of characteristic items in the sample is less than or equal to the acceptance number.

There is a serious problem with this inference. Illustration 1 shows a sample with a population of 5,000, a sample size of 200, and an acceptance number of 5 to illustrate this problem.

Page 262: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

10–4 Reference Guide

Illustration 1

The graphs A and B show the probability that the sample infers acceptance or rejection, respectively, as TRATE varies. For this example, assume that MXRATE is 5.0 percent. Note that in graph B, the probability of rejection is about 94 percent when TRATE is 5 percent. However, looking at graph A, the probability of acceptance at TRATE = 5 percent is only 6 percent. At TRATE = 4 percent, the probability of acceptance is only 18 percent—not very much. This means that if TRATE = 4 percent, Inference 2a would only be true 18 percent of the time, certainly not often enough to be satisfactory. With data taken from Illustration 1, the table below shows that the probability of acceptance does not become sufficiently large until, TRATE decreases below 1.5 percent.

Page 263: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

Chapter 10: Acceptance Sampling 10–5

TRATE Probability of Acceptance

4.0% 17.2%

3.0% 43.5%

2.5% 61.6%

2.0% 79.6%

1.5% 92.8%

1.0% 98.9%

0.5% 99.9%

To force more control over Inference 2a, the acceptable rate of occurrence in the population (symbolically denoted as ACRATE) is introduced into the mathematical picture, as shown in Inference 2b.

Inference 2b:

If TRATE is less than or equal to ACRATE, the sample infers acceptance — the number of characteristic items in the sample is less than or equal to the acceptance number.

You must always specify ACRATE as a value that is less than MXRATE. For example, assume that MXRATE = 5 percent and ACRATE = 1.5 percent. Referring again to Illustration 1, note that if TRATE is 5 percent or greater, the probability of rejection is 94 percent or greater; while if TRATE is 1.5 percent or less, the probability of acceptance is 92 percent or greater. In this example, both Inferences 1 and 2b would be true more than 90 percent of the time.

You also need to be concerned with how often Inference 2b is true or how often you can bear to have this inference be false. The risk of overauditing at ACRATE, RISK2, controls how often Inference 2b is false. You specify RISK2 to indicate the measure of risk you can bear in getting a rejection condition when, in truth, the sample has inferred an acceptance condition.

Illustration 2 and Illustration 3 show the inferences made in acceptance sampling, where:

X% = MXRATE

Y% = ACRATE

Z = Acceptable number

Page 264: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

10–6 Reference Guide

Illustration 2

Illustration 3

The inferences made here are logically equivalent to the inferences made in Illustration 2. These are called strong inferences because you can control how often they are true or false by specifying the proper risk values.

Fi

Page 265: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

Chapter 10: Acceptance Sampling 10–7

Illustration 4

This illustration shows the relationship of risk to the probabilities of acceptance or rejection.

Relationship of Sample Size to Acceptance Number

Illustration 5 shows the relation of the sample size to the acceptance number for a population of 5000.

Illustration 5

Page 266: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance versus Attribute and Discovery Sampling

10–8 Reference Guide

Curve A is defined by the following values:

Item Value

Population size 5,000

ACRATE 1.0%

RISK2 1.4%

Curve B is defined by the following values:

Item Value

Population size 5,000

MXRATE 2.0%

RISK1 1.6%

Curve C is defined by the following values:

Item Value

Population size 5,000

MXRATE 6.0%

RISK1 1.6%

The statistically-correct sample size and acceptance number occur at the intersection of Curve A and Curve C; for the information above, the sample size would be about 200 and the acceptance number would be 5.

The statistically-correct sample size and acceptance number occur at the intersection of Curve A and Curve B for the above information. Namely, the sample size is about 1710, and the acceptance number is 25. The difference between MXRATE and ACRATE in Curves A and C is 5 percent; while, between Curves A and B, the difference is only one percent. This illustrates the fact that the closer MXRATE is to ACRATE, the larger the statistically-correct sample size is and the larger the acceptance number is, as demonstrated in the illustration 6 shown in the following section.

Page 267: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Acceptance Sampling

Chapter 10: Acceptance Sampling 10–9

Illustration 6

Do not be concerned with calculating the statistically-correct sample size and acceptance number; Advantage VISION:Excel does these calculations for you automatically. However, understand how the information you specify affects the outcome of the calculations.

Implementation of Acceptance Sampling The remainder of this chapter describes how to implement acceptance sampling in Advantage VISION:Excel.

Advantage VISION:Excel Acceptance Sampling Statement

This section describes how to use acceptance sampling in Advantage VISION:Excel. The. syntax for acceptance sampling is as follows:

SAMPLE nn ACCEPTANCE

POPULATION [SIZE] nnnnnnnnn

ACCEPTABLE [OCCURRENCE] [RATE] nn.n[%]

MAXIMUM [OCCURRENCE] [RATE] nn.n[%]

OVERAUDITING [RISK] nn.n[%]

UNWARRANTED [RELIANCE] [RISK] nn.n[%]

[SEED nnnnnnn] [RANDPROG progname [RANDPROGSIZE nn]]

The following abbreviations are used in acceptance sampling.

Abbreviation Description

ACRATE The acceptable rate of occurrence in the population.

MXRATE The maximum rate of occurrence in the population.

RISK1 The risk of unwarranted reliance at the maximum tolerable rate of occurrence.

Page 268: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Acceptance Sampling

10–10 Reference Guide

Abbreviation Description

RISK2 The risk of overauditing at the acceptable rate of occurrence.

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99.

ACCEPTANCE Required. Defines this sampling as an acceptance sampling. This keyword follows immediately after the application number.

POPULATION Required. Specifies the population size of the file, either estimated or exact. Enter an integer from 1–999,999,999. The keyword SIZE is optional. Commas are allowed. The value cannot be zero.

ACCEPTABLE Required. Specifies ACRATE. OCCURRENCE, RATE, and the percent sign are optional. Enter a percent value no greater than 99.9. Value cannot be zero. Normally, this value is 10 percent or less.

MAXIMUM Required. Specifies MXRATE. OCCURRENCE, RATE, and the percent sign are optional. Enter a percent value no greater than 99.9. Value cannot be zero. Normally, this value is 10 percent or less. This value must be greater than ACRATE.

OVERAUDITING Required. Specifies RISK2. RISK and the percent sign are optional. Enter a percent value no greater than 99.9. Value cannot be zero. Normally, this value is 10 percent or less.

UNWARRANTED Required. Specifies RISK1. RELIANCE, RISK, and the percent sign are optional. Enter a percent value no greater than 99.9. Value cannot be zero. Normally, this value is 10 percent or less.

SEED This entry is used to initiate the random number generator process. This number can be from 1–9,999,999. The default is a number generated by the random number generator.

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel’s, enter the name of your random number generator program after the RANDPROG keyword. For more information about the linkage between Advantage VISION:Excel and your random number generator, see Advantage VISION:Excel Toolkit Reference Guide.

Page 269: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Acceptance Sampling

Chapter 10: Acceptance Sampling 10–11

Abbreviation Description

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size should be expressed in kilobytes (1024-bytes).

If you do not know the size of the population, you can do an auxiliary Advantage VISION: Results run through your files to get this information. The correct population size is necessary to calculate the proper sample size and acceptance number.

Advantage VISION: Results Program

Write an Advantage VISION: Results program to control the flow of your input and output files. Write an Advantage VISION:Excel program to control when the random selection logic is to be performed. Use the Advantage VISION:Excel IF SAMPLING command to direct the selection flow, as shown in the following section.

Syntax for IF SAMPLING Command

The command syntax is as follows:

IF SAMPLING 01

GOTO WRT

ELSE

REJECT

ENDIF

Note that the IF SAMPLING command is immediately followed by 01. This ties this IF SAMPLING command to the acceptance sampling statement. Whenever the IF SAMPLING command is encountered during the course of execution, Advantage VISION:Excel randomly determines whether or not to select the record.

If the record is to be selected, a branch to the true tagname, WRT, is made immediately. If the record is not to be selected, the false branch, REJECT, is executed immediately.

Page 270: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Acceptance Sampling

10–12 Reference Guide

Advantage VISION:Excel Output

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Results program (see Acceptance Sampling Statement Listing in the section Advantage VISION:Excel Generated Output).

The Advantage VISION:Excel Sampling List (see Advantage VISION:Excel Sampling List in the section Advantage VISION:Excel Generated Output). This lists the information coded in the acceptance sampling statement, plus the statistically-correct sample size and the statistically-correct acceptance number calculated by Advantage VISION:Excel.

The Advantage VISION:Results file and record count statistics (see Acceptance Sampling Advantage VISION: Results File Statistics in the section Advantage VISION:Excel Generated Output).

The Advantage VISION:Excel Non-Stratified Sampling Summary Report (see Acceptance Sampling Non-Stratified Sampling Summary Report, in the section Advantage VISION:Excel Generated Output). This report lists the following:

– The information specified in the acceptance sampling input statement.

– The calculated statistically-correct sample size.

– The calculated statistically-correct acceptance number.

– Information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run. This includes:

– Actual population size

– Actual sample size

– Original seed number

Page 271: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Acceptance Sampling

Chapter 10: Acceptance Sampling 10–13

Examining and Evaluating the Sample

After Advantage VISION:Excel selects your sample, examine it, searching for characteristic (error)items. Terminate the examination as soon as you find more characteristic items than the acceptance number and assume a rejection condition (that is, TRATE is greater than MXRATE). If the number of characteristic items in the sample is less than or equal to the acceptance number, assume an acceptance condition (that is, TRATE is less than or equal to ACRATE). For example, assume the following information:

Items Description

Population size 10,000

MXRATE 3.0%

ACRATE 0.5%

RISK1 1.7%

RISK2 1.5%

Calculated sample size 400

Calculated acceptance number 5

If the sample of 400 items contains five or fewer characteristic items, you can be 98.5 percent (100.0 percent minus 1.5 percent) certain that TRATE is less than or equal to 0.5 percent; this is an acceptance condition. However, if the sample of 400 items contains six or more characteristic items, you can be 98.3 percent (100.0 percent minus 1.7 percent) certain that TRATE is greater than 3.0 percent; this is a rejection condition.

Using the Guidelines

Complete the following steps to use acceptance sampling in Advantage VISION:Excel:

1. Decide on your sampling objectives. Remember, the primary purpose of acceptance sampling is making a decision.

2. Define the population.

3. Define the characteristic you are seeking in each item.

4. Specify the following information, based on your sound judgment:

– MXRATE

– ACRATE

– RISK1

– RISK2

Page 272: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

10–14 Reference Guide

5. Determine the population size.

6. Code an Advantage VISION:Results program to control the flow of your input/output files and to specify when you want the sampling logic to be executed.

7. Examine your sample to determine if the number of characteristic items in it exceeds the acceptance number.

8. Evaluate your sample.

Acceptance Sampling Example This section walks you through a real-life example of the principles described in this chapter.

Background Information

The accounts receivable file of Henry's Camera Emporium is audited to verify that the internal control procedures used to manage data entering the accounts receivable system are adequate. This file contains variable length records and is composed of detail records and one summary record for each outstanding account.

The format of these records is as follows:

Field From To Length Type

Detail Record:

Record Length 1 2 2 Binary

Filler 3 4 2 00

Customer Number 5 7 3 Packed

Record Type 8 8 1 D

Sales Invoice Number 9 11 3 Packed

Date of Sales 12 17 6

Product Number 18 20 3 Packed

Product Description 21 40 20

Quantity 41 43 3 Packed

Price Per Unit 44 47 4 Packed

Total Amount 48 52 5 Packed

Page 273: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

Chapter 10: Acceptance Sampling 10–15

Field From To Length Type

Summary Record:

Record Length 1 2 2 Binary

Filler 3 4 2 00

Customer Number 5 7 3 Packed

Record Type 8 8 1 T

Balance 9 13 5 Packed

Date Balance Lost 14 19 6

Date of Last Payment Received

20 25 6

Amount of Last Payment Received

26 29 4 Packed

Date of Last Sales 30 35 6

Amount of Last Sales 36 39 4 Packed

For this example, the auditors are interested only in the summary records; consequently, the relevant population consists only of the summary records. After passing the file once, you find that it contains 2,184 summary records (that is, 2,184 accounts). Randomly select summary records and save the selected records on an auxiliary file. In later job steps that are not shown in this example, additional information (such as customer name and address) is appended to the auxiliary record, the file is sorted into zip code sequence, and confirmation notices are printed and mailed.

For this example, assume the following:

You cannot tolerate more than 2.0 percent errors in the file; while you can accept an error rate of 0.5 percent, providing that the errors are not gross over statements or understatements.

A risk of no more than 2.0 percent is allowed for receiving an acceptance condition; when, in truth, a rejection condition should be reflected by the sample.

A risk of no more than 4.5 percent is allowed for receiving a rejection condition when, actually, the sample should have inferred an acceptance condition.

Page 274: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

10–16 Reference Guide

Coding the Program

With this information, you can now code the Advantage VISION:Results program, as shown in the following section. For this example, use application number 02.

Acceptance Sampling Input Statements

FILE ACCTREC VB 100 2008 1

RECTYPE 1 8 2

FILE OUTREC VB 100 2008 OUTPUT FROM ACCTREC 3

SAMPLE 02 ACCEPTANCE 4

POPULATION SIZE 2184 5

ACCEPTABLE OCCURRENCE RATE 0.5% 6

MAXIMUM OCCURRENCE RATE 2% 7

UNWARRANTED RELIANCE RISK 2% 8

OVERAUDITING RISK 4.5% 9

IF RECTYPE EQ 'T' 10

NEXT 11

ELSE 12

REJECT 13

ENDIF 14

IF SAMPLING 02 15

ACCEPT 16

ELSE 17

REJECT 18

ENDIF 19

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1 and 3 are the FILE statements that define the input and output files, respectively.

Statement 2 defines an input file field definition.

Statements 4 through 9 are the Advantage VISION:Excel Acceptance Sampling statements.

Statements 10 through 14 show the logic used to define the population; only summary records are allowed into the selection logic. If the record does not have T in the recordtype field, it is rejected immediately.

Page 275: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

Chapter 10: Acceptance Sampling 10–17

Statement 15 shows the Advantage VISION:Excel IF SAMPLING command. When this instruction is executed, if the record is to be selected, it is accepted and written to the output file. If the record is not to be included in the sample, it is rejected.

Acceptance Sampling Advantage VISION: Results Program Flowchart

The Advantage VISION:Results program flow is shown as follows:

Page 276: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

10–18 Reference Guide

Advantage VISION:Excel Generated Output

Following reports are generated after Advantage VISION:Excel processing for acceptance sampling is completed:

Acceptance Sampling Statement Listing

Advantage VISION:Excel Sampling List

Acceptance Sampling Advantage VISION: Results File Statistics

Acceptance Sampling Non-Stratified Sampling Summary Report

Acceptance Sampling Statement Listing

This report shows the statement listing of the acceptance sampling statement and the Advantage VISION:Results statements submitted to Advantage VISION:Excel. The acceptance sampling statement is validated in this step.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC VB 100 2008

RECTYPE 1 8

FILE OUTREC VB 100 2008 OUTPUT FROM ACCTREC

SAMPLE 02 ACCEPTANCE

POPULATION SIZE 2184

ACCEPTABLE OCCURRENCE RATE 0.5%

MAXIMUM OCCURRENCE RATE 2%

UNWARRANTED RELIANCE RISK 2%

OVERAUDITING RISK 4.5%

IF RECTYPE EQ 'T'

NEXT

ELSE

REJECT

ENDIF

IF SAMPLING 02

ACCEPT

ELSE

REJECT

ENDIF

Page 277: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

Chapter 10: Acceptance Sampling 10–19

Advantage VISION:Excel Sampling List

This report shows the Advantage VISION:Excel Sampling List.

11/30/97 Advantage VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 2 - ACCEPTANCE SAMPLING

POPULATION SIZE 2,184

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 2.0%

ACCEPTABLE RATE OF OCCURRENCE IN THE POPULATION 0.5%

RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE OF OCCURRENCE 2.0%

RISK OF OVERAUDITING AT THE ACCEPTABLE RATE OF OCCURRENCE 4.5%

CALCULATED SAMPLE SIZE 580

CALCULATED ACCEPTANCE NUMBER 5

ACTUAL RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE 1.2%

ACTUAL RISK OF OVERAUDITING AT THE ACCEPTABLE RATE 4.5%

The information submitted in the acceptance sampling statement is listed in this report. Additionally, data calculated is listed in this report: the sample size was calculated to be 580, and the acceptance number was calculated as 5. Note that the actual risks were also calculated. The actual risks, theoretically, are equal to the risks asked for when filling out the acceptance sampling statement.

In this case, the risk of over auditing at ACRATE requested is indeed equal to the actual risk of overauditing at ACRATE (that is, both are equal to 4.5 percent). However, in this case, the requested RISK1 is 2.0 percent, while the actual RISK1 is 1.2 percent. The slight difference in risks is caused by rounding to the nearest integer when calculating the sample size and acceptance number.

Consequently, the actual risks shown in this listing are for the exact sample size and acceptance number shown on the listing. Note that, for the information submitted, the sample size calculated was 580 and the acceptance number calculated was 5.

Page 278: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

10–20 Reference Guide

Acceptance Sampling Advantage VISION: Results File Statistics

This report shows the record counts accumulated by Advantage VISION:Results.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 9,442 500,360

OUTREC 580 24,940

RECORDS PAGES

FILE PRINT 2

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Acceptance Sampling Non-Stratified Sampling Summary Report

The Non-Stratified Sampling Summary Report generated is shown as follows:

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 2 - ACCEPTANCE SAMPLING

ESTIMATED POPULATION SIZE 2,184

ACTUAL POPULATION SIZE 2,184

MAXIMUM TOLERABLE RATE OF OCCURRENCE IN THE POPULATION 2.0%

ACCEPTABLE RATE OF OCCURRENCE IN THE POPULATION 0.5%

RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE OF OCCURRENCE 2.0%

RISK OF OVERAUDITING AT THE ACCEPTABLE RATE OF OCCURRENCE 4.5%

ACTUAL RISK OF UNWARRANTED RELIANCE AT MAXIMUM TOLERABLE RATE 1.2%

ACTUAL RISK OF OVERAUDITING AT THE ACCEPTABLE RATE 4.5%

CALCULATED SAMPLE SIZE 580

ACTUAL SAMPLE SIZE 580

CALCULATED ACCEPTANCE NUMBER 5

ORIGINAL SEED NUMBER 66,193

Page 279: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling Example

Chapter 10: Acceptance Sampling 10–21

In addition to the information coded in the acceptance sampling statement, this report also shows the values for the actual population size, the actual sample size, and the original seed number.

After receiving the confirmation notices back from the relevant account holders, you find that ten account holders indicated that information pertaining to their accounts was invalid. You conclude that the population must be more thoroughly examined, because ten exceeds the acceptance number of five.

For the sake of discussion, assume that only three confirmation notices were returned indicating error. Because three is less than the acceptance number five, you can conclude that the population contains less than 0.5 percent error and is acceptable.

Page 280: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 281: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 11: Proportional Sampling 11–1

Chapter 11: Proportional Sampling

This chapter describes proportional sampling and covers the following main points:

Definition of proportional sampling

Implementation of proportional sampling

Proportional Sampling example

These topics are described in detail, followed by an example, which explains how to implement Proportional Sampling with Advantage VISION:Excel.

Definition of Proportional Sampling The definition of proportional sampling (also known as monetary unit sampling or cumulative monetary amounts sampling) that is used in this chapter is based on the method published by the Banking Administration Institute. Refer to the Proportional Sampling section of their publication, Statistical Sampling for Bank Auditors, to gain a fuller understanding of the technique. The main ideas are presented here.

The proportional sampling method was designed to indicate the following types of errors:

Compliance Deviations — indicate errors in internal control procedures. For example, the authorizing signature missing on a loan draft.

Substantive Deviations — indicate errors in monetary amounts. For example, an invalid amount posted to a payroll account.

Objectives

The proportional sampling technique can achieve either one or both of the following objectives:

It can mathematically support the validity of your original assessment regarding the effectiveness of the internal control procedures.

It can aid in establishing an upper bound on the total amount of monetary (variable) error in the recorded (unaudited) population.

Page 282: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Proportional Sampling

11–2 Reference Guide

When a variable, such as a dollar amount, can be associated with each item in a population, proportional sampling can be used. The variable can be expressed in terms of yards, gallons, pounds, acres — any unit in which fractional portion is sensible. For example, 1.57 inches, 3.2222 pints, or 10.24 tons. However, because auditors mostly deal with accounting populations, this discussion is limited to dollars.

As with other statistical sampling techniques, the principle idea behind proportional sampling is to randomly select an unbiased sample and to examine and evaluate that sample. Unlike other variable sampling techniques, it is not necessary to know the number of items in the population, nor the standard deviation of the population.

However, for Advantage VISION:Excel's proportional sampling, it is necessary to know the total recorded unaudited value of the population; for populations that are accessible by a computer, this value is quite easily obtainable and, in many cases, can be found in the trial balance report.

The basic unit of selection for proportional sampling is the dollar. Each dollar in the population has an equal chance of being selected, with selection proceeding on a systematic basis. A sampling interval is calculated and a random starting value within that interval is chosen.

For example, assume the following:

Random starting value = $10

Sampling interval = $300

Population contains the following values:

Item Value Cumulative Value

1 $50 $0 – $50

2 $150 $51 – $200

3 $120 $201 – $320

4 $200 $321 – $520

5 $500 $521 – $1020

6 $250 $1021 – $1270

The items containing the 10th, 310th, 610th, 910th, and 1210th dollar value would be selected. Thus, the items 1, 3, 5, and 6 shown in the table would be included in the sample.

Page 283: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Proportional Sampling

Chapter 11: Proportional Sampling 11–3

Note that the larger the dollar value of an item, the more likely it is to be selected as part of the sample. That is, the probability that an item is included in the sample is proportional to its value, hence, the name proportional sampling. This technique leads to automatic and optimum stratification, with large valued items (items whose value is greater than or equal to the sampling interval) being included in the sample on a 100 percent basis.

The proportional sampling technique combines theory from both discovery sampling and attribute sampling. If no errors are found in the sample, the sample is evaluated on a discovery basis; however, if errors are found in the sample, the sample is evaluated on a modified attribute basis.

Because the basic assumption is that the population contains a low rate of errors, the Poisson probability distribution is used as a close approximation to the Hypergeometric probability distribution. The sampling interval is calculated based on the initial discovery assumption that the sample contains no errors if the population does not exceed a specified rate of errors.

For example, if the population contained 0.5 percent errors, P, and you choose a sample of 400 items, n, from that population, you would expect the sample to have two erroneous items in it, because n*P = (400 * .005) = 2.0. In fact, the probability of such a sample containing one or more erroneous items is 86 percent. A short breakdown of integral (n*P)s is shown as follows:

Number of Erroneous Items in Sample

Probability n*P = 1.0

Probability

n*P = 2.0

Probability n*P = 3.0

0 37% 14% 5%

1 or more 63% 86% 95%

Because the true rate of errors in the population is unknown, the maximum tolerable rate of errors is used instead. This rate is the upper limit of errors you can tolerate within the population. Thus P, from now on, is used to symbolize the upper limit of errors.

The value of n*P is the reliability factor and is denoted by the symbolic letter R. The probability that the sample contains one or more erroneous items, providing that the population error rate exceeds P, is the reliability level. The monetary precision (MP) is the maximum tolerable rate of errors in the population times the total recorded (unaudited) value of the population.

MP = M*P

Where,

MP — is the monetary precision.

M — is the total recorded (unaudited) value of the population.

P — is the maximum tolerable rate of errors in the population.

Page 284: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Proportional Sampling

11–4 Reference Guide

The sampling interval, J, is calculated by dividing the monetary precision by the reliability factor.

J = MP / R

J — is the sampling interval.

MP — is the monetary precision.

R — is the reliability factor.

Because MP = M*P, and R = n*P, then it could be said that J = M*P / n*P = M/n.

To obtain the sampling interval for a reliability level of 95 percent, divide the monetary precision by the reliability factor, 3.0. The table Reliability Factors and Related Precision Adjustment Factors (reprinted by permission of Deloitte & Touche), is shown in the following section. This table lists reliability levels with corresponding reliability factors. For more information about the precision adjustment factors, see the appendix "Proportional Sampling Manual Method Evaluation."

Reliability Factors and Related Precision Adjustment Factors

There are two tables shown in this section:

Table 1—This table shows Precision Adjustment Factors (p) for evaluating samples at Reliability Levels, for errors of overstatement of population items.

Table 2—This table shows Precision Adjustment Factors (p) for Evaluating Samples at Reliability Levels, for errors of understatement of population items (Reprinted by permission from Deloitte & Touche).

Page 285: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Proportional Sampling

Chapter 11: Proportional Sampling 11–5

Table 1 is shown as follows:

Reliability Factor (R)

0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.6 2.0 2.3 3.0 4.6

Reliability

Levels

50% 55% 59% 63% 66% 69% 72% 75% 80% 86% 90% 95% 99%

Precision Adjustment Factors (p) for Evaluating Samples at Reliability Levels Shown Above

Rank of Errors

For Errors of Overstatement of Population Items

1 1.01 1.05 1.11 1.15 1.20 1.24 1.28 1.32 1.39 1.51 1.59 1.75 2.04

2 1.01 1.04 1.08 1.12 1.15 1.18 1.21 1.24 1.28 1.38 1.44 1.56 1.77

3 1.00 1.04 1.07 1.10 1.13 1.15 1.17 1.20 1.24 1.31 1.36 1.46 1.64

4 1.00 1.03 1.06 1.09 1.11 1.13 1.15 1.17 1.21 1.27 1.32 1.40 1.56

5 1.00 1.03 1.05 1.08 1.10 1.12 1.14 1.16 1.19 1.25 1.29 1.36 1.50

6 1.00 1.03 1.05 1.07 1.09 1.11 1.13 1.14 1.17 1.23 1.26 1.33 1.46

7 1.00 1.02 1.04 1.07 1.09 1.10 1.12 1.13 1.16 1.21 1.24 1.31 1.43

8 1.00 1.02 1.04 1.06 1.08 1.10 1.11 1.12 1.15 1.20 1.23 1.29 1.40

9 1.00 1.02 1.04 1.06 1.08 1.09 1.10 1.12 1.14 1.19 1.22 1.28 1.38

10 1.00 1.02 1.04 1.06 1.07 1.09 1.10 1.11 1.14 1.18 1.21 1.26 1.36

11 1.00 1.02 1.04 1.05 1.07 1.08 1.10 1.11 1.13 1.17 1.20 1.25 1.35

12 1.00 1.02 1.03 1.05 1.07 1.08 1.09 1.10 1.13 1.16 1.19 1.24 1.34

13 1.00 1.02 1.03 1.05 1.06 1.08 1.09 1.10 1.12 1.16 1.18 1.23 1.33

14 1.00 1.02 1.03 1.05 1.06 1.07 1.08 1.10 1.12 1.15 1.18 1.22 1.32

15-19 1.00 1.02 1.03 1.05 1.06 1.07 1.08 1.09 1.11 1.15 1.17 1.22 1.31

20-24 1.00 1.01 1.03 1.04 1.05 1.06 1.07 1.08 1.10 1.13 1.15 1.19 1.26

25-29 1.00 1.01 1.03 1.04 1.05 1.06 1.06 1.07 1.09 1.11 1.13 1.17 1.24

30-39 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.06 1.08 1.10 1.12 1.15 1.22

40-49 1.00 1.01 1.02 1.03 1.04 1.05 1.05 1.06 1.07 1.09 1.10 1.13 1.19

50-74 1.00 1.01 1.02 1.03 1.04 1.04 1.05 1.05 1.06 1.08 1.09 1.12 1.17

75-99 1.00 1.01 1.02 1.02 1.03 1.03 1.04 1.04 1.05 1.07 1.08 1.10 1.14

100 and Over

1.00 1.01 1.02 1.02 1.03 1.03 1.04 1.04 1.04 1.06 1.07 1.09 1.12

Page 286: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Proportional Sampling

11–6 Reference Guide

Table 2 is shown as follows:

Reliability Factor (R)

0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.6 2.0 2.3 3.0 4.6

Reliability Levels

50% 55% 59% 63% 66% 69% 72% 75% 80% 86% 90% 95% 99%

Precision Adjustment Factors (p) for Evaluating Samples at Reliability Levels Shown Above

Rank of Errors

For Errors of Understatement of Population Items

1 0.67 0.58 0.49 0.45 0.40 0.35 0.31 0.28 0.22 0.14 0.10 0.05 0.00

2 0.96 0.92 0.87 0.82 0.78 0.74 0.70 0.66 0.60 0.49 0.42 0.30 0.14

3 0.99 0.95 0.91 0.88 0.84 0.81 0.78 0.76 0.71 0.62 0.57 0.46 0.29

4 0.99 0.95 0.92 0.90 0.87 0.85 0.82 0.80 0.76 0.69 0.64 0.54 0.39

5 0.99 0.96 0.93 0.91 0.89 0.87 0.85 0.83 0.79 0.73 0.68 0.60 0.45

6 0.99 0.96 0.94 0.92 0.90 0.88 0.86 0.84 0.81 0.75 0.71 0.64 0.51

7 0.99 0.97 0.95 0.93 0.91 0.89 0.87 0.86 0.83 0.77 0.74 0.67 0.54

8 0.99 0.97 0.95 0.93 0.91 0.90 0.88 0.87 0.84 0.79 0.76 0.69 0.57

9 0.99 0.97 0.95 0.94 0.92 0.90 0.89 0.88 0.85 0.80 0.77 0.71 0.60

10 0.99 0.97 0.96 0.94 0.92 0.91 0.90 0.88 0.86 0.81 0.78 0.73 0.62

11 1.00 0.98 0.96 0.94 0.93 0.91 0.90 0.89 0.86 0.82 0.79 0.74 0.64

12 1.00 0.98 0.96 0.94 0.93 0.92 0.90 0.89 0.87 0.83 0.80 0.75 0.65

13 1.00 0.98 0.96 0.95 0.93 0.92 0.91 0.90 0.87 0.84 0.81 0.76 0.66

14 1.00 0.98 0.96 0.95 0.94 0.92 0.91 0.90 0.88 0.84 0.82 0.77 0.67

15-19 1.00 0.98 0.96 0.95 0.94 0.93 0.91 0.90 0.88 0.85 0.83 0.78 0.68

20-24 1.00 0.98 0.96 0.96 0.95 0.94 0.93 0.92 0.90 0.87 0.85 0.81 0.73

25-29 1.00 0.98 0.97 0.96 0.95 0.94 0.93 0.93 0.91 0.89 0.87 0.83 0.76

30-39 1.00 0.98 0.97 0.96 0.96 0.95 0.94 0.93 0.92 0.90 0.88 0.85 0.78

40-49 1.00 0.99 0.98 0.97 0.96 0.95 0.95 0.94 0.93 0.91 0.90 0.87 0.80

50-74 1.00 0.99 0.98 0.97 0.96 0.96 0.95 095 0.94 0.92 0.91 0.88 0.83

75-99 1.00 0.99 0.98 0.98 0.97 0.97 0.96 0.96 0.95 0.93 0.92 0.90 0.86

100 and Over

1.00 0.99 0.98 0.98 0.97 0.97 0.96 0.96 0.96 0.94 0.93 0.91 0.88

Page 287: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–7

Note: The Rank of Errors column refers to the rank of extrapolated errors (E0). Rank errors of overstatement and of understatement separately and, within each group, the ranking is from the largest to the smallest amount of error.

In the For Errors of Overstatement/Understatement of Population Items columns, the distinction between errors of overstatement and of understatement is based on their effect on the population from which the sample was drawn. If this is a reciprocal population to the one of primary audit interest, as in sampling subsequent invoices in a search for understatement of recorded liabilities, errors will have an opposite effect on the population of primary audit interest.

Implementation of Proportional Sampling This section describes how to use proportional sampling in Advantage VISION:Excel. Up to this point, this chapter has described proportional sampling as if its objective were singular: either to determine compliance or monetary deviation — one or the other, but not both. When the objective is to determine both from the same sample, determining the values to insert into the upper monetary precision limit field and the reliability level field becomes more complicated.

Determining Values

You need to determine the values to insert into four fields — two fields for compliance testing and two fields for substantive testing. These fields are shown with sample values underneath:

Compliance Testing Substantive Testing

Upper Monetary Precision Limit

Wanted

Reliability Level

Upper Monetary Precision Limit

Wanted

Reliability Level

$100,000.00 95.0% $25,000.00 86.0%

When the objective of proportional sampling is two fold, the reliability level for the substantive testing portion can be adjusted depending on the effectiveness of the internal control procedures.

Page 288: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–8 Reference Guide

Deciding between Compliance or Substantive Reliability Level

After deciding on the contents of the four fields, determine the correct set of upper monetary precision limit and reliability level to use. This is accomplished with a few computations using the following steps:

1. From Table 1 and Table 2 shown in Reliability Factors and Related Precision Adjustment Factors, find the reliability factor that corresponds to the compliance reliability level. Additionally, find the reliability factor that corresponds to the substantive reliability level.

2. Divide the compliance reliability factor into the compliance upper monetary precision limit wanted.

3. Divide the substantive reliability factor into the substantive upper monetary precision limit wanted.

4. If the result of the division in step 2, is less than or equal to the result of division in step 3, use the compliance reliability level and the upper monetary precision limit wanted in the Advantage VISION:Excel proportional sampling statements; otherwise, use the substantive reliability level and the upper monetary precision limit wanted in the Advantage VISION:Excel proportional sampling statements.

For example, let us consider the following table:

Compliance Testing Substantive Testing

Upper Monetary Precision Limit

Wanted

Reliability Level

Upper Monetary Precision Limit

Wanted

Reliability Level

$200,000.00 95.0% $50,000.00 86.0%

5. Determine reliability factor (from the table in the section Reliability Factors and Related Precision Adjustment Factors) of 95.0 percent or 86.0 percent:

– Compliance (of 95.0 percent) = 3.0

– Substantive (of 86.0 percent) = 2.0

6. $200,000.00 ÷ 3.0 = $66,666.67

7. $50,000.00 ÷ 2.0 = $25,000.00

8. Because $25,000.00 is less than $66,666.67, you should use the substantive upper monetary precision limit wanted and reliability level.

Page 289: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–9

Syntax for Proportional Sampling

The syntax for the proportional sampling is as follows:

SAMPLE nn PROPORTIONAL

POPULATION [TOTAL] nnnnnnnnnnnnnn

RELIABILITY [LEVEL] nn.n[%]

MONETARY [PRECISION] [LIMIT] nnnnnnnnnnnnnn

AMOUNTFIELD dataname [RESTART nnnnnnnnnnnnnn]

[WORKSHEET]

The keywords are described in the following table:

Keyword Description

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99.

PROPORTIONAL Required. Defines this sampling as proportional sampling. This keyword must follow immediately after the application number.

POPULATION Required. Specifies the recorded (unaudited) monetary total of the population. The keyword TOTAL is optional. Enter a positive numeric value. A dollar sign and commas are allowed. A floating decimal point is assumed and, if no decimal point is specified, it is assumed to be at the right end of the number.

A maximum of 14 characters (including digits and any decimal point) can be used. No more than 9 digits to the right of the decimal point are allowed.

RELIABILITY Required. Specifies the reliability level. LEVEL and the percent sign are optional. Enter a percent value no greater than 99.9. Value cannot be zero. The reliability level is the amount of reliance placed on inferences derived from evaluating the sample.

The greater the reliance on sample inferences, the greater the reliability level is with a maximum of 99.9 percent. The greater the reliability level, the greater the sample size. Normally, the reliability level is greater than 80 percent.

Page 290: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–10 Reference Guide

Keyword Description

MONETARY Required. Specifies the upper monetary precision limit wanted. The keywords PRECISION and LIMIT are optional. Enter a positive numeric value. A dollar sign and commas are allowed. A floating decimal point is assumed and, if no decimal point is specified, it is assumed to be at the right end of the number.

A maximum of 14 characters (including digits and any decimal point) can be used. No more than 9 digits to the right of the decimal point are allowed. Value cannot be zero.

The limit is the maximum tolerable error value for the total population. If, after the sample is examined and evaluated, the adjusted upper monetary precision limit does not exceed the upper monetary precision limit wanted, the population is deemed acceptable. If the opposite occurs, use sound judgment to determine your next course of action.

AMOUNTFIELD Required. Enter the name of the field that contains the amount. This data name must be previously defined in an Advantage VISION:Results field definition.

RESTART The random restarting value. Enter a positive numeric value. A dollar sign and commas are allowed. A floating decimal point is assumed and, if no decimal point is specified, it is assumed to be at the right end of the number. A maximum of 14 characters (including digits and any decimal point) can be used. No more than 9 digits to the right of the decimal point are allowed. Value cannot be zero.

This number can be used when a proportional sampling Advantage VISION:Excel program must be rerun. If the RESTART entry is not used, Advantage VISION:Excel generates its own random restart value that is printed in the Advantage VISION:Excel sampling list.

WORKSHEET This entry is used to specify that a proportional samplingworksheet is wanted. For more information about the worksheet, see the section Advantage VISION:Excel Output.

Page 291: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–11

Advantage VISION:Results Program

You need to write an Advantage VISION:Results/Advantage VISION:Excel program to control the flow of the input/output files and to control when sampling is to occur. The Advantage VISION:Excel command IF SAMPLING, is used within the Advantage VISION:Results program to invoke the sampling logic.

The required input statements are shown in the following section. For more information on free form keywords, see the section Free-Form Keywords in the chapter “Introduction.”

Invoking Sampling Logic within Advantage VISION:Results

The Advantage VISION:Results program code for Proportional Sampling is as follows:

FILE ACCTREC FB 352 5280 COUNT ACCRECNT

ALOANNO 4 253 PD

ALOANBAL 5 170 PD 2

SAMPLE 01 PROPORTIONAL

POPULATION TOTAL 88,900,651

RELIABILITY LEVEL 86.0

MONETARY PRECISION LIMIT 250,055.00

AMOUNTFIELD ALOANBAL

IF SAMPLING 01 GOTO INC

ELSE GOTO EXC ENDIF

Please note that the IF SAMPLING command, is an Advantage VISION:Excel command used within Advantage VISION:Results program to invoke the sampling logic.

The application number follows the command IF SAMPLING, tying the sampling operation to the Advantage VISION:Excel application uniquely identified by the same application number. When the command IF SAMPLING is executed, Advantage VISION:Excel determines whether or not the record is included as part of the sample. In this example, if the record is to be included in the sample, an unconditional branch to INC is taken; while, if the record is to be excluded from the sample, an unconditional branch to EXC is taken.

Page 292: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–12 Reference Guide

Advantage VISION:Excel Output

With a successfully run, Advantage VISION:Excel produces the following output:

A listing of the Advantage VISION:Excel/Advantage VISION:Results program. For example, see Proportional Sampling Statement Listing in the section, Advantage VISION:Excel Generated Output.

The Advantage VISION:Excel Sampling List. This lists the information coded in the proportional sampling statements, plus the sampling interval, the approximate sample size, the random restart number, and the reliability factor calculated by Advantage VISION:Excel. For example, see Proportional Sampling List, in the section Advantage VISION:Excel Generated Output.

The Advantage VISION:Results File and Record Statistics Listing. For example, see Proportional Sampling Advantage VISION:Results File Statistics, in the section Advantage VISION:Excel Generated Output.

The Advantage VISION:Excel Non-Stratified Sampling Summary Report. For example, see Proportional Sampling Non-Stratified Sampling Summary Report, in the section, Advantage VISION:Excel Generated Output. This report lists the following:

The information specified in the proportional sampling input statement.

The calculated reliability factor.

The calculated sampling interval and sample size.

The information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run. This includes:

– Actual (unaudited) monetary total of both the population and the sample

– Number of items in the population and also in the sample

– Standard deviation of the population and the sample

– Mean of the population and the sample

– Coefficient of variation of both the population and the sample.

The Proportional Sampling Worksheet (see Proportional Sampling Evaluation Worksheet, in the section, Advantage VISION:Excel Generated Output).

Page 293: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–13

Advantage VISION:Excel Proportional Sampling Statements

This following code shows just the proportional sampling statements of an Advantage VISION:Excel program.

SAMPLE 01 PROPORTIONAL

POPULATION TOTAL 72,807,205.61

RELIABILITY LEVEL 86.0

MONETARY PRECISION LIMIT 364,036.00

AMOUNTFIELD ALOANBAL

WORKSHEET

By specifying WORKSHEET, Advantage VISION:Excel generates a Proportional Sampling Worksheet, as shown in the following section, Advantage VISION:Excel Proportional Summary Worksheet.

The information printed in the Sampling Summary List for the proportional sampling application is repeated in the worksheet. Note that the reliability factor is calculated to .001 accuracy. The tables of precision adjustment factors for overstatements and understatements are produced dynamically as a function of the reliability level coded. The precision adjustment factors are calculated to an accuracy of .001.

When you perform the evaluation manually, these tables can be used instead of the table shown in the section Reliability Factors and Related Precision Adjustment Factors, during the evaluation of the sample. Thus, it is now possible to manually evaluate samples with reliability levels other than 50, 55, 59, 63, 66, 69, 72, 75, 80, 86, 90, 95, and 99 percent. For example, if you want, you can specify a reliability level of 92.2 percent and the tables generated in the Proportional Sampling Worksheet will contain the precision adjustment factors for a 92.2 percent reliability level.

However, in most instances, you can use Advantage VISION:Excel's automated proportional sampling COPY functions to evaluate the sample and the printing of the worksheet is not necessary.

Page 294: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–14 Reference Guide

Advantage VISION:Excel Proportional Summary Worksheet

This is a three page report .The first page appears as follows:

11/30/97 VISION:Excel PROPORTIONAL SAMPLING WORKSHEET PAGE 1

APPLICATION 1 - PROPORTIONAL SAMPLING

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 364,036.00

CALCULATED RELIABILITY FACTOR 1.967

CALCULATED SAMPLING INTERVAL 182,018.00

CALCULATED SAMPLE SIZE 401

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

ACTUAL (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

ACTUAL (UNAUDITED) MONETARY TOTAL OF SAMPLE 12,857,094.96

NO. OF ITEMS IN POPULATION 9,624

NO. OF ITEMS IN SAMPLE 397

RANDOM RESTART NUMBER 43,937.88

STANDARD DEVIATION (UNAUDITED) - POPULATION 14,402.02

STANDARD DEVIATION (UNAUDITED) - SAMPLE 51,072.10

MEAN (UNAUDITED) OF POPULATION 7,565.17

MEAN (UNAUDITED) OF SAMPLE 32,385.63

COEFFICIENT OF VARIATION (UNAUDITED) - POPULATION 1.904

COEFFICIENT OF VARIATION (UNAUDITED) – SAMPLE 1.577

LABEL OF FIELD CONTAINING AMOUNT ALOANBAL

Page 295: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–15

The second page appears as follows:

11/30/97 VISION:Excel PROPORTIONAL SAMPLING WORKSHEET PAGE 2

TABLE OF PRECISION ADJUSTMENT FACTORS

FOR ERRORS OF OVERSTATEMENT OF POPULATION

RELIABILITY LEVEL - 86.0%

RANK ADJ. RUNNING RANK ADJ. RUNNING RANK ADJ. RUNNING FACTOR SUM FACTOR SUM FACTOR SUM

1 1.496 1.496 35 1.092 40.560 69 1.065 77.143

2 1.366 2.862 36 1.090 41.650 70 1.065 78.208

3 1.303 4.165 37 1.089 42.739 71 1.065 79.273

4 1.265 5.430 38 1.088 43.827 72 1.064 80.337

5 1.238 6.668 39 1.087 44.914 73 1.064 81.401

6 1.218 7.886 40 1.086 46.000 74 1.063 82.464

7 1.202 9.088 41 1.085 47.085 75 1.063 83.527

8 1.189 10.277 42 1.084 48.169 76 1.062 84.589

9 1.179 11.456 43 1.083 49.252 77 1.062 85.651

10 1.170 12.626 44 1.082 50.334 78 1.062 86.713

11 1.162 13.788 45 1.081 51.415 79 1.061 87.774

12 1.155 14.943 46 1.080 52.495 80 1.061 88.835

13 1.149 16.092 47 1.079 53.574 81 1.060 89.895

14 1.144 17.236 48 1.078 54.652 82 1.060 90.955

15 .139 8.375 9 .078 5.730 3 .060 2.015

16 .135 9.510 50 1.077 56.807 84 1.059 93.074

17 1.131 20.641 51 1.076 57.883 85 1.059 94.133

18 1.127 21.768 52 1.075 58.958 86 1.059 95.192

19 1.124 22.892 53 1.075 60.033 87 1.058 96.250

20 1.121 24.013 54 1.074 61.107 88 1.058 97.308

21 1.118 25.131 55 1.073 62.180 89 1.058 98.366

22 1.115 26.246 56 1.073 63.253 90 1.057 99.423

23 1.113 27.359 57 1.072 64.325 91 1.057 100.480

24 1.110 28.469 58 1.071 65.396 92 1.057 101.537

25 1.108 29.577 59 1.071 66.467 93 1.056 102.593

26 1.106 30.683 60 1.070 67.537 94 1.056 103.649

27 1.104 31.787 61 1.070 68.607 95 1.056 104.705

28 1.102 32.889 62 1.069 69.676 96 1.056 105.761

29 1.100 33.989 63 1.068 70.744 97 1.055 106.816

30 1.099 35.088 64 1.068 71.812 98 1.055 107.871

31 1.097 36.185 65 1.067 72.879 99 1.055 108.926

32 1.096 37.281 66 1.067 73.946 100 1.054 109.980

33 1.094 38.375 67 1.066 75.012 101 1.054 111.034

34 1.093 39.468 68 1.066 76.078 102 1.054 112.088

Page 296: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–16 Reference Guide

The third page appears as follows:

11/30/97 VISION:Excel PROPORTIONAL SAMPLING WORKSHEET PAGE 3

TABLE OF PRECISION ADJUSTMENT FACTORS

FOR ERRORS OF UNDERSTATEMENT OF POPULATION

RELIABILITY LEVEL - 86.0%

RANK ADJ. RUNNING RANK ADJ. RUNNING RANK ADJ. RUNNING FACTOR SUM FACTOR SUM FACTOR SUM

1 .151 0.151 35 .907 28.680 69 .934 60.071

2 .503 0.654 36 .908 29.588 70 .935 61.006

3 .633 1.287 37 .910 30.498 71 .935 61.941

4 .696 1.983 38 .911 31.409 72 .936 62.877

5 .735 2.718 39 .912 32.321 73 .936 63.813

6 .762 3.480 40 .913 33.234 74 .936 64.749

7 .782 4.262 41 .914 34.148 75 .937 65.686

8 .798 5.060 42 .915 35.063 76 .937 66.623

9 .811 5.871 43 .916 35.979 77 .938 67.561

10 .821 6.692 44 .917 36.896 78 .938 68.499

11 .830 7.522 45 .918 37.814 79 .938 69.437

12 .838 8.360 46 .919 38.733 80 .939 70.376

13 .845 9.205 47 .920 39.653 81 .939 71.315

14 .851 10.056 48 .921 40.574 82 .940 72.255

15 .856 10.912 49 .922 41.496 83 .940 73.195

16 .861 11.773 50 .923 42.419 84 .940 74.135

17 .865 12.638 51 .923 43.342 85 .941 75.076

18 .869 13.507 52 .924 44.266 86 .941 76.017

19 .873 14.380 53 .925 45.191 87 .941 76.958

20 .876 15.256 54 .925 46.116 88 .942 77.900

21 .879 16.135 55 .926 47.042 89 .942 78.842

22 .882 17.017 56 .927 47.969 90 .942 79.784

23 .885 17.902 57 .927 48.896 91 .943 80.727

24 .887 18.789 58 .928 49.824 92 .943 81.670

25 .890 19.679 59 .929 50.753 93 .943 82.613

26 .892 20.571 60 .929 51.682 94 .944 83.557

27 .894 21.465 61 .930 52.612 95 .944 84.501

28 .896 22.361 62 .930 53.542 96 .944 85.445

29 .898 23.259 63 .931 54.473 97 .944 86.389

30 .900 24.159 64 .932 55.405 98 .945 87.334

31 .901 25.060 65 .932 56.337 99 .945 88.279

32 .903 25.963 66 .933 57.270 100 .945 89.224

33 .904 26.867 67 .933 58.203 101 .946 90.170

34 .906 27.773 68 .934 59.137 102 .946 91.116

Page 297: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

Chapter 11: Proportional Sampling 11–17

Examining and Evaluating the Sample

After Advantage VISION:Excel selects your sample, examine it for either compliance or substantive errors or both depending upon your original sampling objective. If no compliance errors are found in the sample, you can start substantive evaluation immediately after stating:

“I am R percent certain that the total value of compliance-related errors in the population does not exceed MP.”

Where:

R — is the compliance reliability level

MP — is the compliance upper monetary precision limit. MP is calculated by multiplying the sampling interval in the Advantage VISION:Excel Sampling List (see Proportional Sampling List in the section Advantage VISION:Excel Generated Output) by the reliability factor (see the tables in the section Reliability Factors and Related Precision Adjustment Factors) that corresponds to the compliance reliability level.

If compliance errors are found in the sample, compliance evaluation is completed by using the COPY functions, DYLPSLPC and DYLPSEVC. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about these functions.

If no substantive errors are found in the sample, you can state immediately:

“I am R percent certain that the total value of substantive-related errors in the population does not exceed MP.”

Where:

R — is the substantive reliability level

MP — is the substantive upper monetary precision limit. MP is calculated by multiplying the sampling interval in the Advantage VISION:Excel Sampling List (see Proportional Sampling List in the section Advantage VISION:Excel Generated Output) by the reliability factor (see the tables in the section Reliability Factors and Related Precision Adjustment Factors) that corresponds to the substantive reliability level.

If substantive errors are found in the sample, substantive evaluation is completed by using the COPY functions DYLPSLPS and DYLPSEVS. Refer to the Advantage VISION:Excel Toolkit Reference Guide.

Page 298: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Proportional Sampling

11–18 Reference Guide

Both compliance and substantive evaluation can be done manually without the aid of these COPY Functions. For more information about the manual evaluation process, see the appendix “Proportional Sampling Manual Method Evaluation.”

Using the Guidelines

Complete the following steps to use proportional sampling in Advantage VISION:Excel:

1. Decide on your sampling objectives.

– With proportional sampling, you can test for compliance errors or substantive errors or both.

– The primary substantive purpose of proportional sampling is to determine, with a particular reliability level, an upper bound to the amount of monetary error.

2. Define the population.

3. Define the value within each item of the population you are auditing.

4. Code an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input/output files and to specify when you want the sampling logic to be executed.

5. Examine your sample, searching for compliance or substantive errors depending on your sampling objective.

6. Evaluate your sample manually or by using the DYLPSLPC, DYLPSEVC, DYLPSLPS, and DYLPSEVS COPY functions.

Page 299: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–19

Proportional Sampling Example This section walks you through a real-life example of the principles described in this chapter.

Background Information

The loan file of the Freedom Savings and Loan Association is to be audited to determine whether its loan balances recorded (unaudited) total of $72,807,205.61 is reasonable. Proportional sampling will be used to determine the upper bound of error in the recorded loan balance total. For each item in the sample chosen, compliance testing is done against the originating loan document; while, substantive testing is done by sending confirmation notices to the appropriate borrowers.

After examining the activity of the loan department, you have determined that the effectiveness of their internal control procedures for loan applications and processing is average.

Field Information

Each record on the loan file represents one loan and all the information necessary for that loan can be found on that record. For sampling purposes, you are only interested in two of the fields on each record. These fields are:

Field From To Length Type

Loan Number 253 256 4 Packed

Loan Balance 170 174 5 Packed

Use application number 01. The recorded (unaudited) monetary total of the population is $72,807,205.61. The label of the field containing the amount is ALOANBAL and is defined in a data definition statement within the Advantage VISION:Results program.

Page 300: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–20 Reference Guide

Determine Values for the Example

Because you are conducting a dual-purpose test, decide on an upper monetary precision limit and a reliability level for both compliance testing and substantive testing. For compliance testing, you want an upper monetary precision limit that is 2 percent of the recorded population total with a reliability level of 95 percent. For substantive testing, you want an upper monetary precision limit that is within 0.7 percent of the recorded population total with a reliability level of 86 percent. Thus, the pertinent information is:

Compliance Testing Substantive Testing

Upper Monetary Precision Limit Wanted

Reliability Level

Upper Monetary Precision Limit

Wanted

Reliability Level

$1,456,145.00 95.0% $509,650.44 86.0%

However, recognizing that the file may contain a few errors, you reduce the substantive upper monetary precision limit to 0.5 percent from 0.7 percent so that you have a 0.2 percent allowance when you adjust the monetary precision during the sample evaluation procedure. Thus, for the purpose of the Advantage VISION:Excel run, the pertinent information becomes:

Compliance Testing Substantive Testing

Upper Monetary Precision Limit Wanted

Reliability Level

Upper Monetary Precision Limit

Wanted

Reliability Level

$1,456,145.00 95.0% $364,036.00 86.0%

Page 301: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–21

Choosing between Compliance and Substantive Reliability Level

Perform the following step to determine whether to submit the compliance data or the substantive data to Advantage VISION:Excel.

Determine reliability factor (from Table 1 in the section Reliability Factors and Related Precision Adjustment Factors) of 95.0 percent and 86.0 percent:

Item Compliance Testing Substantive Testing

Desired Upper Monetary Precision Limit Wanted

$1,456,145.00 $364,036.00

Reliability Level 95.0% 86.0%

Reliability Factor 3.0 3.0

Division $1,456,145.00 ÷ 3.0

= 485,381.66

$364,036.00 ÷ 2.0 =$182,018.00

Because $182,018.00 is less than $485,381.66, the substantive data will be used in the Advantage VISION:Excel proportional sampling statements.

Advantage VISION:Results Program for the Example

Write an Advantage VISION:Results program to control the reading of the loan file and randomly select records from the Advantage VISION:Excel loan file to create the sample. Each record selected for the sample is printed in an appropriate report and is also written to a sampling output file. In a later job step, which is not included in this example, confirmation notices are printed from the sampling file.

Page 302: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–22 Reference Guide

Advantage VISION:Results Program Flowchart for the Example

The flowchart for the Advantage VISION:Results program is shown as follows:

Proportional Sampling Input Statements for the Example

The input statements for the Advantage VISION:Results program flowchart shown in the previous section are shown as follows:

FILE ACCTREC FB 352 5280 COUNT ACCRECNT 1

ALOANNO 4 253 PD 2

ALOANBAL 5 170 PD 2 3

FILE OUTREC FB 30 900 OUTPUT FROM OUTREC 4

JREC 25 5

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER) 6

JLOANNO 4 5 PD Z (LOAN'NUMBER) 7

JLOANBAL 5 9 PD 2 E (BOOK'VALUE) 8

Page 303: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–23

JRECNO 5 16 PD E (RECORD'NUMBER) 9

WORKAREA 10

TALLY E 4.0 11

CNT 5 PD VALUE 0 12

*SAMPLING LOGIC 13

SAMPLE 01 PROPORTIONAL 14

POPULATION TOTAL 72,807,205.61 15

RELIABILITY LEVEL 86.0 16

MONETARY PRECISION LIMIT 364,036.00 17

AMOUNTFIELD ALOANBAL 18

IF SAMPLING 01 19

NEXT 20

ELSE 21

REJECT 22

ENDIF 23

24

JSEQNO = JSEQNO + 1 25

MOVE ALOANNO TO JLOANNO 26

MOVE ALOANBAL TO JLOANBAL 27

MOVE ACCRECNT TO JRECNO 28

REPORT 75 WIDE 29

LIST JSEQNO JLOANNO JLOANBAL JRECNO 30

ON FINAL 31

LIST SUM JLOANBAL TALLY AT JSEQNO+3 32

WITH 2 BEFORE AND 2 AFTER 33

T1 'SAMPLE DRAWN FOR LOAN FILE AUDIT' WITH 2 AFTER 34

Statements 1 and 4, the Advantage VISION:Results FILE statements, define the input ACCTREC file and the output OUTREC file. Each record output to the OUTREC file is written from its own record area.

Statements 2–3 and 5–9, the Advantage VISION:Results data definition statements, define the labels associated with the fields being used in the program. Statements 2–3 define the fields of concern in the input record. Note that ALOANBAL in statement 3 is the label of field containing the amount coded in the Advantage VISION:Excel proportional sampling statements as shown in statement 18. Statements 5–9 define the fields in the output record.

Statements 10–12 are the work areas that are required.

Statements 14–18 define the information to be used in the proportional sampling. These statements are declarative in nature and are not executable, much as the definition of the ALOANNO field in statement 2 is declarative and not executable.

Page 304: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–24 Reference Guide

Statements 19–28, the Advantage VISION:Results data manipulation statements, show the logic for sampling, formatting, printing, and writing. Because you are using Advantage VISION:Results automatic cycle, the reading of the input records, the printing of the sample record in the report, and the writing of the output record is automatic.

Statement 19 shows the Advantage VISION:Results command IF SAMPLING. The 01 ties this statement directly to the application number in the Advantage VISION:Excel proportional sampling statements as shown in statement 14. Consequently, when statement 19 is executed, using internal proportional sampling logic, Advantage VISION:Excel determines whether the record should be included in the sample. If the record is to be included, it is listed and written to the output file. If the record is to be excluded, the record is rejected.

Statements 29–34 define the report to be printed. For more information on these statement types, see Advantage VISION:Results Reference Guide.

Advantage VISION:Excel Generated Output

Now the Advantage VISION:Excel program is processed using Advantage VISION:Excel. After the completion of processing Advantage VISION:Excel generates the following reports and output.

Proportional Sampling Statement Listing

Proportional Sampling List

Proportional Sampling Advantage VISION:Results File Statistics

Proportional Sampling Non-Stratified Sampling Summary Report

Proportional Sampling Selected Records

Proportional Sampling Evaluation Worksheet

Proportional Sampling Evaluation Worksheet Analysis for Substantive Errors

Page 305: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–25

Proportional Sampling Statement Listing

The following output shows the listing of the Advantage VISION:Excel program input to the system.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ACCTREC FB 352 5280 COUNT ACCRECNT

ALOANNO 4 253 PD

ALOANBAL 5 170 PD 2

FILE OUTREC FB 30 900 OUTPUT FROM OUTREC

JREC 25

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER)

JLOANNO 4 5 PD Z (LOAN'NUMBER)

JLOANBAL 5 9 PD 2 E (BOOK'VALUE)

JRECNO 5 16 PD E (RECORD'NUMBER)

WORKAREA

TALLY E 4.0

CNT 5 PD VALUE 0

*SAMPLING LOGIC

SAMPLE 01 PROPORTIONAL

POPULATION TOTAL 72,807,205.61

RELIABILITY LEVEL 86.0

MONETARY PRECISION LIMIT 364,036.00

AMOUNTFIELD ALOANBAL

IF SAMPLING 01

NEXT

ELSE

REJECT

ENDIF

JSEQNO = JSEQNO + 1

MOVE ALOANNO TO JLOANNO

MOVE ALOANBAL TO JLOANBAL

MOVE ACCRECNT TO JRECNO

REPORT 75 WIDE

LIST JSEQNO JLOANNO JLOANBAL JRECNO

ON FINAL

LIST SUM JLOANBAL TALLY AT JSEQNO+3

WITH 2 BEFORE AND 2 AFTER

T1 'SAMPLE DRAWN FOR LOAN FILE AUDIT' WITH 2 AFTER

Page 306: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–26 Reference Guide

Proportional Sampling List

This output shows the Advantage VISION:Excel Sampling List. Note that each field of the Advantage VISION:Excel proportional sampling statements is listed here with a title descriptive of the field plus the information coded for the field. Also, fields omitted when coded are listed here with their default values. Additionally, the statistically correct sampling interval was calculated as $182,018.00 for the information submitted using the proportional sampling statements.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - PROPORTIONAL SAMPLING

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 364,036.00

CALCULATED RELIABILITY FACTOR 2.0

CALCULATED SAMPLING INTERVAL 182,018.00

CALCULATED SAMPLE SIZE 401

RANDOM RESTART NUMBER 43,937.88

LABEL OF FIELD CONTAINING AMOUNT ALOANBAL

Proportional Sampling Advantage VISION:Results File Statistics

This report, shows the file and record statistics for the Advantage VISION:Results run. The number of records read from the ACCTREC file, 9624, is equal to the number of items in the population as shown in the section Proportional Sampling Non-Stratified Sampling Summary Report. Also note that the number of records written to the output file (397) is equal to the number of items in the sample as shown in Proportional Sampling Non-Stratified Sampling Summary Report.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:RESULTS CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 9,624 3,387,648

OUTREC 397 11,910

RECORDS PAGES

FILE PRINT 3

REPORT PRINT 8

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 307: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–27

Proportional Sampling Non-Stratified Sampling Summary Report

This is the Non-Stratified Sampling Summary Report. In addition to the information coded in the proportional sampling statements, this report lists information pertinent to the Advantage VISION:Results run.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - PROPORTIONAL SAMPLING

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 364,036.00

CALCULATED RELIABILITY FACTOR 2.0

CALCULATED SAMPLING INTERVAL 182,018.00

CALCULATED SAMPLE SIZE 401

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

ACTUAL (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

ACTUAL (UNAUDITED) MONETARY TOTAL OF SAMPLE 12,857,094.96

NO. OF ITEMS IN POPULATION 9,624

NO. OF ITEMS IN SAMPLE 397

RANDOM RESTART NUMBER 43,937.88

STANDARD DEVIATION (UNAUDITED) - POPULATION 14,402.02

STANDARD DEVIATION (UNAUDITED) - SAMPLE 51,072.10

MEAN (UNAUDITED) OF POPULATION 7,565.17

MEAN (UNAUDITED) OF SAMPLE 32,385.63

COEFFICIENT OF VARIATION (UNAUDITED) - POPULATION 1.904

COEFFICIENT OF VARIATION (UNAUDITED) - SAMPLE 1.577

LABEL OF FIELD CONTAINING AMOUNT ALOANBAL

Proportional Sampling Selected Records

This report shows a partial listing of the records selected for the sample.

SAMPLE DRAWN FOR LOAN FILE AUDIT

SEQUENCE LOAN BOOK RECORD NUMBER NUMBER VALUE NUMBER

1 15237 5,997.75 1

2 15264 6,423.53 28

3 15297 3,872.94 61

4 15331 4,188.70 95

5 15352 4,581.99 116

6 15378 3,585.71 142

7 15398 150,006.32 162

8 15414 6,357.67 178

Page 308: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–28 Reference Guide

9 15450 24,668.29 214

10 15484 5,848.49 248

11 15509 4,081.61 273

12 15531 5,704.12 295

13 15568 4,445.31 332

14 15607 3,461.78 371

. . . .

. . . .

. . . .

. . . .

. . . .

385 24557 5,983.13 9,321

386 24576 30,673.63 9,340

387 24598 2,125.24 9,362

388 24624 24,640.00 9,388

389 24643 18,759.37 9,407

390 24671 5,616.99 9,435

391 24697 5,981.76 9,461

392 24722 23,963.98 9,486

393 24742 3,011.53 9,506

394 24766 3,373.99 9,530

395 24794 30,892.91 9,558

396 24800 32,868.80 9,564

397 24835 4,471.67 9,599

397 12,857,94.96

After correlating the items in the sample with the original loan documents, you found the following compliance errors:

Loan Number Recorded Loan Balance

18523 4,461.00

22311 18,692.77

Page 309: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–29

From the returned confirmation notices, you found the following substantive errors:

Loan Number

Recorded Loan Balance

Audited loan Balance

Difference

15741 $28,299.81 $29,298.81 -999.00

18313 3,533.53 3,353.53 180.00

19315 31,733.36 33,733.16 -1,999.80

21672 246,624.54 246,426.54 198.00

The COPY functions DYLPSLPC and DYLPSEVC are now used to complete the compliance evaluation. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the usage of these COPY functions. The report generated for compliance evaluation is shown next.

Proportional Sampling Evaluation Worksheet

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

ANALYSIS FOR COMPLIANCE ERRORS PAGE 1

(A) RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

(B) DESIRED COMPLIANCE PRECISION 1,456,145.00

(C) COMPLIANCE RELIABILITY LEVEL 95.0%

(D) COMPLIANCE RELIABILITY FACTOR 2.996

(E) SAMPLING INTERVAL 182,018.00

REF. ITEM TOP PRECISION ITEM NO. VALUE STRATUM ADJUSTMENT VALUE ERROR FACTOR COUNT VALUES

(F) (G) (H) (I)

22311 18,692.77 1.749

18523 4,461.00 1.552

TOTAL .00 3.301 2

(J) (K) (L)

(M) TOTAL AMOUNT OF ESTIMATED POPULATION ERRORS J+(L*E) 364,036.00

(N) RATIO OF ESTIMATED POPULATION ERRORS TO THE

MONETARY TOTAL OF THE POPULATION (100*M)/A .5000%

(O) PRECISION ADJUSTED POPULATION ERRORS J+(K*E) 600,841.42

(P) REVISED COMPLIANCE PRECISION O+(D*E) 1,146,167.35

(Q) RATIO OF THE DESIRED COMPLIANCE PRECISION TO

THE MONETARY TOTAL OF THE POPULATION (100*B)/A 2.00%

(R) RATIO OF THE REVISED COMPLIANCE PRECISION TO THE

MONETARY TOTAL OF THE POPULATION (100*P)/A 1.57%

Page 310: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

11–30 Reference Guide

Because the Ratio of the Revised Compliance Precision to the Monetary Total of the Population, 1.57 percent, is less than 2.00 percent, (the compliance monetary precision originally wanted), the compliance test is deemed acceptable and the substantive reliability level remains at 86.0 percent. If the ratio were greater than 2.0 percent, the substantive reliability level would be adjusted upwards, for evaluation purposes, because less reliance can be placed on the effectiveness of the internal control procedures.

The COPY functions DYLPSLPS and DYLPSEVS are now used to complete the substantive evaluation. For more information about the usage of these COPY functions, see Advantage VISION:Excel Toolkit Reference Guide.

Proportional Sampling Evaluation Worksheet Analysis for Substantive Errors

The report generated for substantive evaluation is shown as follows:

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

ANALYSIS FOR SUBSTANTIVE ERRORS PAGE 1

(A) RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

(B) DESIRED SUBSTANTIVE PRECISION 509,650.44

(C) SUBSTANTIVE RELIABILITY LEVEL 86.0 %

(D) SUBSTANTIVE RELIABILITY FACTOR 1.967

(E) SAMPLING INTERVAL 182,018.00

ANALYSIS OF OVERSTATEMENT ERRORS

REF. ITEM TOP NON-TOP STRATUM PRECISION PRECISION NO. VALUE STRATUM STRATUM ERROR ADJUSTMENT ADJUSTED ERROR ERROR (I*E)/G FACTOR ERROR VALUE VALUE VALUE (J*L)

(F) (G) (H) (I) (J) (L) (M)

18313 3,533.53 180.00 9,272.10 1.496 13,871.06

21672 246,624.54 198.00 198.00

TOTAL 198.00 9,272.10 14,069.06

(N) (O) (P)

(N) TOTAL AMOUNT OF TOP STRATUM OVERSTATEMENT ERRORS (SUM COLUMN H) 198.00

(O) TOTAL ESTIMATE OF NON-TOP STRATUM OVERSTATEMENT ERRORS (SUM COLUMN J) 9,272.10

(P) PRECISION ADJUSTED UPPER BOUND OF OVERSTATEMENT ERRORS (SUM COLUMN M) 14,069.06

Page 311: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Example

Chapter 11: Proportional Sampling 11–31

Page 2 of Proportional Sampling Evaluation Worksheet Analysis for Substantive Errors is shown as follows.

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

ANALYSIS FOR SUBSTANTIVE ERRORS PAGE 2

ANALYSIS OF UNDERSTATEMENT ERRORS

REF. ITEM TOP NON-TOP STRATUM PRECISION PRECISION NO. VALUE STRATUM STRATUM ERROR ADJUSTMENT ADJUSTED ERROR ERROR (I*E)/G FACTOR ERROR VALUE VALUE VALUE (J*L)

(F) (G) (H) (I) (J) (L) (M)

19315 31,733.36 1,999.80 11,470.57 .151 1,732.06

15741 28,299.81 999.00 6,425.34 .503 3,231.95

TOTAL .00 17,895.91 4,964.01

(Q) (R) (S)

(Q) TOTAL AMOUNT OF TOP STRATUM UNDERSTATEMENT ERRORS (SUM COLUMN H) .00

(R) TOTAL ESTIMATE OF NON-TOP STRATUM UNDERSTATEMENT ERRORS (SUM COLUMN J) 17,895.91

(S) PRECISION ADJUSTED LOWER BOUND OF UNDERSTATEMENT ERRORS (SUM COLUMN M) 4,964.01

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

ANALYSIS FOR SUBSTANTIVE ERRORS PAGE 3

(T) RETROACTIVE MONETARY ADJUSTMENTS .00-

(U) TOTAL ESTIMATED POPULATION ERRORS N+O-Q-R-T 8,425.81-

(V) RATIO OF TOTAL ESTIMATED POPULATION ERRORS TO THE MONETARY TOTAL OF THE POPULATION (100*U)/A .0116-%

(W) TOTAL SUBSTANTIVE PRECISION ADJUSTED ERRORS P-S 9,105.05

(X) REVISED SUBSTANTIVE PRECISION (D*E)+W-T 367,134.46

(Y) RATIO OF THE DESIRED SUBSTANTIVE PRECISION TO THE MONETARY TOTAL OF THE POPULATION (100*B)/A .70 %

(Z) RATIO OF THE REVISED SUBSTANTIVE PRECISION TO THE MONETARY TOTAL OF THE POPULATION (100*X)/A .50 %

Because the Ratio of the Revised Substantive Precision to the Monetary Total of the Population, 0.50 percent, is less than 0.70 percent, you can conclude with 86 percent confidence that the recorded total of the loan balance file is not overstated by more than $367,134.46.

Page 312: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 313: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 12: Estimation Sampling of Values 12–1

Chapter 12: Estimation Sampling of Values

This chapter describes estimation sampling of values and covers the following main points:

Definition of estimation sampling of values

Estimation sampling using Advantage VISION:Excel

Examining and Evaluating the sample

Estimation sampling example

These topics are described in detail, followed by an example, which explains how to use Estimation Sampling with Advantage VISION:Excel.

Definition of Estimation Sampling Of Values When a variable, such as a dollar amount, is associated with each item in a population, use estimation sampling of values to estimate the total value of that variable within the population; the total value can be estimated to the precision wanted within a selected confidence level.

The variable associated with each item is a value measured in units such as dollars, gallons, yards, or pounds. Estimation sampling of values estimates how much, while attribute estimation sampling estimates how many.

The how much concept implies measurement in contiguous units; that is, units that can be split into fractions if necessary — 5.16 dollars, 2.5 pounds, 6.8 tons, 2.8546 ohms; while, the how many concept implies measurement in whole units, such as 25 customers, 10 errors, or 7,654 records.

Because auditors normally deal with monetary accounting populations, this discussion is limited to dollar valued variables where the book or unaudited total value of the population is either unknown or known.

If unknown, use estimation sampling of values both to estimate the total value of the population and to specify the monetary precision of that estimate. If known, be aware of two populations:

Population of originating documents

Population of records on a computerized file that represents the contents of the originating documents

Page 314: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Estimation Sampling Of Values

12–2 Reference Guide

Under ideal conditions, the population of records identically reflect the values in the population of the originating documents. Because this ideal condition rarely occurs, the computerized file is audited to determine how well the values in the file actually match the values of the originating population. If the computerized file is truly representative of the originating documents, you can be reasonably certain that the total value of the computerized file is close to the total value of the originating documents.

The total value of the file is easily obtained by processing the records using a computer program to accumulate the values. However, the total value of the originating documents is not easily obtainable, because the accumulation of this value normally entails an enormous manual effort. In this case, use estimation sampling of values to estimate the total value of the originating documents and to specify the precision of that estimate.

Once the estimated value of the originating population is determined, a decision about the reasonableness of the total value of the computerized file can be made. In the remainder of this chapter, the originating documents are referred to as the originating population and the computerized file as the recorded or unaudited population.

Because Advantage VISION:Excel is a computerized system, it must process data that is in a computerized form. Consequently, Advantage VISION:Excel randomly selects a sample from the recorded population. Each item in the sample must be matched to an item in the originating population. This procedure creates the audited sample.

Because this method depends on the assumption that each item in the originating population is represented by one and only one item in the recorded population, make certain that the above assumption holds true whenever you use Advantage VISION:Excel's estimation sampling of values technique.

You can control the estimation sampling of values technique by specifying the following parameters:

Monetary unit precision wanted

Confidence level

Another assumption that is made with the estimation sampling of values technique is that the average unit value in the sample is more or less equal to the average unit value in the population. For example, from a population of 100 items, suppose you take a random sample of five items with the following dollar values.

Page 315: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Estimation Sampling Of Values

Chapter 12: Estimation Sampling of Values 12–3

Random Sample Dollar Values

1 $5.25

2 $2.75

3 $3.36

4 $4.89

5 $6.15

Total $22.40

Average (mean)Unit Value $22.40/5=54.48

You could infer from this sample that the total of the population is $448.00 ($4.48 × 100), more or less. The more or less concept is quantified when you specify the monetary unit precision you want. For example, if you had specified a monetary unit precision of $±.10, you could assume that the true average unit value of an item in the population is somewhere between $4.38 and $4.58. Therefore, the total value of the population would be between $438.00 and $458.00. Perhaps the true total value is $442.00 or $454.00, but it is not $520.00.

The amount of this certainty is controlled by the value you specify as the confidence level. In the prior example, a sample of five items from a population of 100 items can be chosen in 75,287,520 different ways. The confidence level dictates the percentage of the 75,287,520 samples that have an average unit value that is within the wanted monetary unit precision of the true average unit value of the population. Assume the confidence level was specified as 95 percent. Of the 75,287,520 ways a sample of five items can be $5.25 $2.75 $3.36 $4.89 $6.15 Total $22.40 Average (mean) unit value $22.40 / 5 = $4.48 chosen from a population of 100 items, 71,523,144 (95 percent of 75,287,520) of those ways would provide samples of size five, each of which has an average unit value that is within $.10 of the true average unit value of the population.

Therefore, when one sample of five items is chosen, there is a 95 percent chance that it is one of the 71,523,144 samples whose average unit value is within $.10 of the true average value of the population.

The key to the estimation sampling of values technique is the statistically correct sample size. The selected monetary unit precision and confidence level combined with the standard deviation of the population are substituted into a statistical formula to provide the statistically correct sample size. The standard deviation is information about the population that must be determined before the estimation sampling of values technique can be used. The statistical formula used in determining the sample size is based on the conformity of the population distribution to the normal distribution.

Page 316: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Estimation Sampling Of Values

12–4 Reference Guide

The following graph shows the shape of a normal distribution.

The standard deviation in a distribution is a measure of the dispersion of the values in that distribution. The closer the extreme values are to the central value, the smaller the standard deviation.

The cumulative probability associated with a probability distribution is represented by the area under the probability distribution curve. By definition, the total area under the distribution curve must always be equal to 100 percent. Taking the standard deviation as a unit of measurement, the area covered by a particular number of standard deviations plus and minus from the mean (average unit value) is always a specific percentage of the total area under the distribution curve.

Note that in the Normal Distribution graph shown in this section, ±1 standard deviation from the mean (average unit value) always covers 68.27 percent of the total area under the normal distribution curve.

Similarly, ±2 standard deviations covers 95.45 percent of the area under the distribution curve. Tables are available in most statistical books that correlate the Z factor standard deviation with the percentage of area it would cover under the normal distribution curve.

Page 317: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Estimation Sampling Of Values

Chapter 12: Estimation Sampling of Values 12–5

The formula for the standard deviation is shown as follows:

Where,

S.D. — represents the standard deviation.

X — represents each individual item value.

M — represents the mean of the distribution.

N — represents the number of items in the distribution.

Standard deviations always take on the same units as the units presented in the population. If the total value you are attempting to estimate with the estimation sampling of values technique is dollars, the standard deviation is expressed as dollars; if the total value being estimated is in yards, the standard deviation is in yards.

To demonstrate this, return to the previous example of a population with 100 items from which a sample of five items is randomly chosen. Assume the population is normally distributed, the true mean value (average unit value) of the population is $4.50, and the true standard deviation of the population is $1.35. There are 75,287,520 different samples of size five that can be chosen from a population of 100. Of the 75,287,520 samples, 51,398,789 (68.27% x 75,287,520) samples have a mean value (average unit value) that is within one standard deviation of the true mean value of the population—$4.50 ±$1.35 ($3.15 to $5.85). 71,861,937 (95.45 percent × 75,287,520) samples have a mean value that is within two standard deviations of the true mean of the population—$4.50 ±$2.70 ($1.80 to $7.20).

Consequently, when one sample of five items is taken from the population of 100 items, there is a 68.27 percent chance that it is one of the 51,398,789 samples where the mean lies between $3.15 and $5.85 and there is a 95.45 percent chance that the sample chosen is one of the 71,861,937 samples where the mean lies between $1.80 and $7.20. Returning to the example, the standard deviation for five items are calculated in the following table:

Page 318: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Estimation Sampling Of Values

12–6 Reference Guide

Item Value X M X-M (X-M)2

1 $5.25 4.50 0.75 0.5625

2 $2.75 4.50 1.75 3.0625

3 $3.36 4.50 1.14 1.2996

4 $4.89 4.50 0.39 0.1521

5 $6.25 4.50 1.75 3.0625

Total: 22.50 8.1392

M = (22.50 / 5) = $4.50

S.D. = Square Root (8.1392 / (5-1)) = $1.43

The standard deviation of the sample of five is $1.43. The sample mean and standard deviation usually differ slightly from the true mean and the true standard deviation of the population. However, they are close to each other. In this example, the true standard deviation of the population is $1.35; while, the standard deviation of the selected sample is $1.43.

When the population distribution closely approximates a normal distribution, the standard deviation is relatively small. When the population distribution is greatly skewed, the standard deviation relative to the mean of the population is quite large and, consequently, the sample size could be relatively large. In the latter case, stratified sampling would be a better alternative to estimation sampling of values.

In summary, stratified sampling is a method by which a population is divided into more homogeneous subpopulations in order to apply the estimation sampling of values technique to each of the subpopulations.

For more information about stratified sampling, see the chapters “Stratified Sampling Overview”, “Stratified Simple Random Sampling”, “Stratified Simple Percentage Sampling”, and “Stratified Mean Estimation Sampling.”

For more information about deciding whether or not to stratify a population, see Advantage VISION:Excel Frequency Distribution Report.

Page 319: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

Chapter 12: Estimation Sampling of Values 12–7

Estimation Sampling Using Advantage VISION:Excel The remainder of this chapter describes how to use estimation sampling of values in Advantage VISION:Excel.

Advantage VISION:Excel Frequency Distribution Report

This section describes how to use the Frequency Distribution Report to perform estimation sampling of values. For information about how to generate a Frequency Distribution Report, see the chapter “Frequency Distribution Reporting.”

Begin the process by analyzing the population of recorded values. The following report, shows a Frequency Distribution Report made for a small population of 2,458 items.

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.00 9.99 2 0.08 7.67 0.00 3.84 0.51 4.47

10.00 19.99 0 0.00 0.00 0.00 0.00 0.00 4.47

20.00 29.99 0 0.00 0.00 0.00 0.00 0.00 4.47

30.00 39.99 3 0.12 113.10 0.03 37.70 2.58 9.94

40.00 49.99 12 0.49 527.46 0.14 43.96 2.17 20.89

50.00 59.99 17 0.69 936.83 0.26 55.11 3.01 33.92

60.00 69.99 11 0.45 724.24 0.20 65.84 2.88 44.40

70.00 79.99 69 2.81 5307.61 1.46 76.92 2.32 70.65

80.00 89.99 114 4.64 9659.52 2.65 84.73 2.91 104.40

90.00 99.99 92 3.74 8783.45 2.41 95.47 2.82 134.72

100.00 109.99 103 4.19 10757.99 2.95 104.45 2.93 166.80

110.00 119.99 205 8.34 23685.22 6.50 115.54 2.76 212.05

120.00 129.00 220 8.95 27442.31 7.53 124.74 2.86 258.93

130.00 139.99 209 8.50 28220.51 7.74 135.03 2.94 304.62

140.00 149.99 205 8.34 29603.52 8.12 144.41 2.99 349.87

150.00 159.99 220 8.95 34127.58 9.36 155.13 2.85 396.75

160.00 169.99 215 8.75 35380.34 9.70 164.56 2.79 443.09

170.00 179.99 198 8.06 34621.15 9.50 174.85 2.86 487.56

180.00 189.99 198 8.06 36505.73 10.01 184.37 2.64 532.03

190.00 199.99 92 3.74 17902.69 4.91 194.59 2.93 562.35

200.00 209.99 89 3.62 18223.23 5.00 204.76 2.86 592.17

210.00 219.99 68 2.77 14645.39 4.02 215.37 2.80 618.23

220.00 229.99 62 2.52 13803.29 3.79 222.63 2.23 643.12

Page 320: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

12–8 Reference Guide

230.00 239.99 13 0.53 3051.79 0.84 234.75 1.51 654.52

240.00 249.99 14 0.57 3436.67 0.94 245.48 2.93 666.35

250.00 259.99 18 0.73 4610.80 1.26 256.16 2.66 679.76

260.00 269.99 5 0.20 1319.51 0.36 263.90 3.37 686.83

270.00 279.99 1 0.04 277.95 0.08 277.95 0.00 689.99

280.00 289.99 0 0.00 0.00 0.00 0.00 0.00 689.99

290.00 299.99 3 0.12 885.66 0.24 295.22 2.50 695.46

TOTAL 2458 100.00 36461.21 100.00

MEAN = 148.32 STANDARD ERROR OF THE MEAN = 0.842

STANDARD DEVIATION = 41.73 COEFFICIENT OF VARIATION = 0.281

MINIMUM VALUE = 3.32 MAXIMUM VALUE = 297.86

Note that the coefficient of variation is an indicator of relative dispersion and is equal to the ratio of the standard deviation to the mean of the distribution, 0.281 (41.73 / 148.32). The larger the coefficient of variation, the larger the statistically correct sample size needed for estimation sampling of values and, consequently, the greater the amount of effort expended in examining and evaluating the sample. Whenever the coefficient of variation is greater than .9, seriously consider using a stratified sampling technique instead of estimation sampling of values.

Syntax of Estimation Sampling of Values

The syntax for estimation sampling of values is shown as follows:

SAMPLE nn ESTIMATION

POPULATION [SIZE] nnnnnnnnn

CONFIDENCE [LEVEL] nn.n[%] [ONESIDED | TWOSIDED]

MONETARY [UNIT] [PRECISION] nnnnnnnnnnnnnn

STANDARD [DEVIATION] nnnnnnnnnnnnnn

AMOUNTFIELD dataname [SEED nnnnnnn]

[RANDPROG progname [RANDPROGSIZE nn]]

Keyword Description

SAMPLE Required. Defines the application as sampling

nn Required. A unique application number from 01–99

ESTIMATION Required. Defines this as estimation sampling of values. This keyword follows immediately after the application number.

Page 321: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

Chapter 12: Estimation Sampling of Values 12–9

Keyword Description

POPULATION Required. Specifies the population size of the file, either estimated or exact. The keyword SIZE is optional. An integer value from 1–999,999,999. This field can contain commas.

The population size can be taken from the Frequency Distribution Report. For example, in the report shown in Advantage VISION:Excel Frequency Distribution Report, the population size is 2,458.

CONFIDENCE Required. Defines the confidence level required. The keyword LEVEL and the percent sign are optional. The value cannot be zero or greater than 99.9 percent. The decimal is required.

The confidence level is the amount of reliability you need in the sample and is usually expressed as a percent ranging from 90.0 percent to 99.9 percent. That is, the confidence level is the probability that the sample you select has a mean value that is within the precision wanted for the true mean value of the population.

ONESIDED | TWOSIDED

Specifies the type of confidence level wanted. Enter ONESIDED (upper bounds of the percentage), TWOSIDED (upper and lower bounds of the percentage), or leave blank; the default is ONESIDED.

If the entry is TWOSIDED, the sample is two-sided; for example, if the mean of the sample is $5.25 and the selected precision is $.25, with a two-sided confidence level you can state that the true mean of the population lies between 5.00 and $5.50 ($5.25 ±.25).

If this entry is ONESIDED (the default), the inference made from the sample is one-sided. For example, if the mean of the sample is $5.25 and the selected precision is $.25, with a one-sided confidence level you can state that the true mean of the population does not exceed $5.50. The advantage to a one-sided confidence level as opposed to a two-sided confidence level is that the one-sided confidence level yields a smaller sample size, assuming that all other information remains the same.

Page 322: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

12–10 Reference Guide

Keyword Description

MONETARY Required. Specifies the monetary unit precision wanted. The keywords UNIT and PRECISION are optional. Enter a positive value no greater than 99,999,999,999,999. This field can contain a dollar sign, decimal point, and commas. The decimal point, if missing, is assumed to be right-aligned. A maximum of 14 positions (including digits and any decimal point) can be used. The value cannot be zero.

The selected monetary unit precision specifies how close you want the mean value in the sample to be to the true mean value of the population.

STANDARD Required. Specifies the standard deviation of the population. The keyword DEVIATION is optional. Enter a positive value no greater than 99,999,999,999,999. This field can contain a dollar sign, decimal point, and commas. The decimal point, if missing, is assumed to be right-aligned. A maximum of 14 positions (including digits and any decimal point) can be used. The value cannot be zero.

The standard deviation can be taken from the Frequency Distribution Report. For example, in the report shown in Advantage VISION:Excel Frequency Distribution Report, the standard deviation is 41.73.

The standard deviation shown in the Frequency Distribution Report is associated with the recorded population; ideally, use the standard deviation of the originating population.

Because this information is unknown and not easily obtainable, assume that the standard deviation of the originating population is approximately equal to the standard deviation of the recorded population.

Due to the possible discrepancy that this assumption can cause, the monetary unit precision of the sample is adjusted during the sample evaluation step.

AMOUNTFIELD Required. Enter the name of the field that contains the amount. For example, statement 20 in the code shown in the section Estimation Sampling of Values Input Statements, specifies JBOOKVAL as the field containing the amount. This data name must be previously defined in an Advantage VISION:Results field definition.

SEED This entry is used to initiate the random number generator process. This integer can be from 1–9,999,999. The default is a number generated by the random number generator.

Page 323: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

Chapter 12: Estimation Sampling of Values 12–11

Keyword Description

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel’s, enter the name of your random number generator program after the RANDPROG keyword. Refer to the Advantage VISION:Excel Toolkit Reference Guide for more information about the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size is expressed in kilobytes (1024-bytes).

Syntax for Advantage VISION:Results IF SAMPLING Command

Write an Advantage VISION:Excel program to control your input/output files. Use the Advantage VISION:Results command IF SAMPLING to control the sampling sequence.

IF SAMPLING 01

GOTO WRT

ELSE

REJECT

ENDIF

The application number ties the IF SAMPLING operation to the Advantage VISION:Excel application uniquely identified by the same application number. When the IF SAMPLING command is executed, Advantage VISION:Excel starts the random number generator to determine whether or not the record is included as part of the sample. If the record is to be included in the sample, an unconditional branch to WRT is executed. If the record is to be excluded from the sample, it is rejected.

Advantage VISION:Excel Output

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Excel/Advantage VISION:Results program (see the report in Estimation Sampling of Values Statement Listing).

The Advantage VISION:Excel Sampling List. This lists the information coded in the estimation sampling of values statement and it shows the statistically correct sample size calculated by Advantage VISION:Excel — this is the size of your sample (see the report in Estimation Sampling of Values Sampling List).

Page 324: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Using Advantage VISION:Excel

12–12 Reference Guide

The Advantage VISION:Results File and Record Statistics listing (see the report in Estimation Sampling of Values Advantage VISION:Results File Statistics).

The Advantage VISION:Excel Non-Stratified Sampling Summary Report (see the report in Estimation Sampling of Values Non-Stratified Sampling Summary Report). This report lists the following:

– The information you specified using the estimation sampling of values statement.

– The calculated statistically correct sample size

– Information pertaining to the actual Advantage VISION:Excel/Advantage VISION:Results portion of the run. This includes:

– Actual population size

– Calculated reliability factor

– Actual sample size

– Actual (unaudited) total amount in both the population and sample

– Mean (unaudited) of both the population and sample

– Standard deviation (unaudited) of both the population and sample

– Coefficient of variation (unaudited) of both the population and sample

– Original Seed Number Order Recorded Audited Difference

Page 325: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

Chapter 12: Estimation Sampling of Values 12–13

Examining and Evaluating the Sample After Advantage VISION:Excel randomly selects a sample of recorded values, examine it and correlate the unaudited items in the sample to the originating documents in order to replace recorded values with their actual originating values. This can be done by setting up a schedule similar to the one shown in the following section:

Audited Sample Values

Order Recorded Audited Difference No. Value Value

3 $ 50.26 $ 50.26 $ .00

10 50.84 52.84 -2.00

19 47.85 48.75 - .90

25 51.35 51.35 .00

28 50.89 50.98 - .09

32 48.56 48.56 .00

36 51.12 51.12 .00

42 47.66 46.76 .90

49 49.68 49.68 .00

51 49.24 49.24 .00

Perform the following steps to evaluate the sample:

1. Estimate the total value of the originating population.

2. Adjust the monetary unit precision. When errors are found in the sample, the selected monetary unit precision is adjusted upwards to maintain the confidence level wanted.

Use the following reports to accomplish these steps:

The Frequency Distribution Report of the audited sample values.

The Non-Stratified Summary Report created during the Advantage VISION:Excel estimation sampling of values run.

To generate the Frequency Distribution Report of the audited sample values, submit the sample audited values to the Advantage VISION:Excel frequency reporting function.

Page 326: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

12–14 Reference Guide

Frequency Distribution Report

This report is generated from the values in the audited sample. This report shows the Frequency Distribution Report generated for the audited sample values shown in Audited Sample Values.

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT

L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

40.00 49.99 5 50.00 242.99 48.64 48.60 1.00 7.07

50.00 59.99 5 50.00 256.55 51.36 51.31 0.85 14.14

TOTAL 10 100.00 499.54 100.00

MEAN = 49.95 STANDARD ERROR OF THE MEAN = 0.519

STANDARD DEVIATION = 1.64 COEFFICIENT OF VARIATION = 0.033

MINIMUM VALUE = 46.76 MAXIMUM VALUE = 52.84

Page 327: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

Chapter 12: Estimation Sampling of Values 12–15

Non-Stratified Summary Report

Advantage VISION:Excel automatically generates the Non-Stratified Summary Report during the estimation sampling of values run. This report shows the estimation sampling of values run made to generate the sample in Audited Sample Values.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - ESTIMATION SAMPLING OF VALUES

CONFIDENCE LEVEL - ONE SIDED 95.0%

DESIRED UNIT MONETARY PRECISION 0.75

ESTIMATED POPULATION SIZE 33

ACTUAL POPULATION SIZE 33

CALCULATED SAMPLE SIZE 10

NORMAL DISTRIBUTION Z FACTOR 1.645

CALCULATED RELIABILITY FACTOR .4343

ACTUAL SAMPLE SIZE 10

ACTUAL (UNAUDITED) TOTAL AMOUNT IN POPULATION 1,652.98

ACTUAL (UNAUDITED) TOTAL AMOUNT IN SAMPLE 497.45

MEAN (UNAUDITED) OF POPULATION 50.09

MEAN (UNAUDITED) OF SAMPLE 49.75

ESTIMATED STANDARD DEVIATION 1.73

ACTUAL (UNAUDITED) STANDARD DEVIATION OF POPULATION 1.73

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 1.30

COEFFICIENT OF VARIATION (UNAUDITED) - POPULATION 0.035

COEFFICIENT OF VARIATION (UNAUDITED) - SAMPLE 0.026

LABEL OF FIELD CONTAINING AMOUNT BOOKVAL

ORIGINAL SEED NUMBER 3,982

This report is generated from the values in the recorded population.

Page 328: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

12–16 Reference Guide

Estimating Total Value of Population

The estimate of the total value of the population is calculated by multiplying the actual population size (from the report in Non-Stratified Summary Report) by the mean value in the audited sample (from the report shown in Frequency Distribution Report) as shown in the equation below:

Actual Population Size x Mean Value in Audited Sample = Estimate of Total Value of Population

33 x 49.95 = 1648.35

Therefore, for the example in the report shown in Frequency Distribution Report and Non-Stratified Summary Report shown in the previous section, the total estimated value of the population is 1,648.75.

Adjusting the Monetary Unit Precision

The monetary unit precision is calculated by multiplying the standard deviation of the audited sample (from the report shown in Frequency Distribution Report ) by the calculated reliability factor (from the report in Non-Stratified Summary Report) as shown in the equation below:

Standard Deviation of Audited Sample x Calculated Reliability Factor = Monetary Unit of Precision

1.64 x .4343 = .71

Therefore, for the example in the report shown in Frequency Distribution Report and the report in Non-Stratified Summary Report, the adjusted monetary unit precision is $.71.

Conclusions

This means that you can be 95 percent (the one-sided confidence level shown in the report in Non-Stratified Summary Report) certain that the true average unit value of the population does not exceed $50.66 (49.95 + .71) or, equivalently, because you have 33 items in the population (from the report in Non-Stratified Summary Report) you can be 95 percent certain that the true total value of the originating population does not exceed $1,671.78 (33 × 50.66).

Page 329: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Examining and Evaluating the Sample

Chapter 12: Estimation Sampling of Values 12–17

Using the Guidelines

Complete the following steps to use estimation sampling of values in Advantage VISION:Excel:

1. Decide on your sampling objectives.

– Define the population.

– Define the value you are seeking in each item.

– Generate a Frequency Distribution Report for the population of items. If the coefficient of variation is greater than 0.9, seriously consider using stratified sampling instead of estimation sampling of values.

2. Specify the following information dependent on your judgment:

– Confidence level

– The monetary unit precision wanted

– One or two-sided confidence wanted

3. Obtain the following information from the Frequency Distribution Report:

– Population size

– Standard deviation of the population

4. Code the Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input/output files and to specify when you want the sampling logic to be executed.

Additionally, verify that each original value is represented only once as a recorded value.

5. Input the Advantage VISION:Excel/Advantage VISION:Results program to Advantage VISION:Excel that selects a proper sample for you.

6. Examine your sample, replacing recorded values with audited values from the originating population.

7. Evaluate your audited sample:

– Generate a Frequency Distribution Report using the audited values in your sample.

– Using the mean and the standard deviation from the Frequency Distribution Report, and the actual population size and the calculated reliability factor from the Non-Stratified Sampling Summary Report, you can now estimate the total value of the originating population and adjust the monetary unit precision.

Page 330: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–18 Reference Guide

Estimation Sampling Example This section walks you through a real-life example of the principles described in this chapter.

Background Information

The auditors at the Rac Moving and Storage Company want to verify the total amount expended for gasoline in the year 1992. The truck drivers use company credit cards and are expected to give their receipts to the company accountant who checks them against the invoices received from the gas company. Each receipt is numbered consecutively and entered into a computerized gasoline receipts file, which is used to maintain the gasoline expense account. Each record on the file represents one receipt.

The fields of interest in the record are as follows:

Field From To Length Type

Receipt Number 1 5 5 packed

Amount of Receipt

24 28 5 packed

Page 331: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–19

Evaluating the Sample

You need to run a Frequency Distribution Report against the gasoline receipts file, shown as follows:

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.00 9.99 13 0.10 35.54 0.01 2.73 2.71 11.40

10.00 19.99 163 1.30 2595.65 0.41 15.92 2.27 51.75

20.00 29.99 906 7.21 24351.47 3.89 26.88 2.13 146.89

30.00 39.99 1928 15.34 69030.49 11.03 35.80 3.00 285.67

40.00 49.99 3242 25.79 145737.76 23.29 44.95 2.88 465.64

50.00 59.99 3461 27.53 190485.88 30.44 55.04 2.90 651.58

60.00 69.99 1868 14.86 119321.10 19.07 63.88 2.97 788.19

70.00 79.99 810 6.44 59126.41 9.45 73.00 2.22 878.14

80.00 89.99 171 1.36 14339.57 2.29 83.86 2.35 919.47

90.00 99.99 8 0.06 767.94 0.12 95.99 3.66 928.41

TOTAL 1 2570 100.00 625791.81 100.00

MEAN = 49.78 STANDARD ERROR OF THE MEAN = 0.122

STANDARD DEVIATION = 13.71 COEFFICIENT OF VARIATION = 0.275

MINIMUM VALUE = 0.18 MAXIMUM VALUE = 99.94

You would like to be 95 percent confident in the sample and, because the mean of the recorded values is $49.78 and you would like to be within 1.5 percent of the true mean value of the originating population, you selected the monetary unit precision to be $.50. Why $.50 instead of $.75?

Because the sample evaluation step consists of adjusting the selected monetary unit precision, you allow for a certain amount of error by using only a portion of the selected percentage of precision; therefore, one percent instead of 1.5 percent. This provides a leeway of 0.5 percent. One percent of $49.78 is approximately $.50.

From this Frequency Distribution Report, note the following:

The population size is 12,570.

The standard deviation of the recorded population is $13.71.

The coefficient of variation is 0.275.

Consequently, the estimation sampling of values technique is adequate.

Page 332: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–20 Reference Guide

The objective of this sampling procedure is to assert that the total value of the gasoline receipts file is within 1.5 percent of the total value of the 12,570 handwritten gas receipt slips without having to manually total all 12,570 slips.

Coding the Program

Code the program to accomplish the following tasks:

Make certain that all receipts are accounted for on the file. Because the receipts are consecutively numbered, the program verifies that the receipt number in each record is one greater than the receipt number in the previous record. Any missing receipts numbers are printed.

Make certain that the file contains no records with duplicate receipt numbers. This is accomplished by verifying that the receipt number in a record is not the same as the receipt number in the next record. Any duplicate receipts are printed.

Sample records that do not contain duplicate receipt numbers using the estimation of values sampling technique.

The flowchart and the program code for the Advantage VISION:Results program are shown in the following sections.

Note: The file is already in sequence by receipt number.

Page 333: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–21

Estimation Sampling of Values Program Flowchart

Page 334: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–22 Reference Guide

Estimation Sampling of Values Program Flowchart (Continued)

Estimation Sampling of Values Input Statements

The following code is the Advantage VISION:Results program that was coded to implement the flowchart shown in the previous section.

OPTION STRUCTURED

FILE ACCTREC FB 36 1800 COUNT ACCTCNT STATUS INSTAT 1

ARECPNO 5 1 PD 2

ABOOKVALUE 5 24 PD 2 3

FILE OUTREC OUTPUT FROM OUTREC FB 30 900 COUNT OUTRECNT 4

JREC 30 5

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER) VALUE 0 6

JRECPNO 4 5 PD Z (RECEIPT'NUMBER) VALUE 0 7

JBOOKVAL 5 9 PD 2 E (BOOK'VALUE) 8

RECNO 5 14 PD E (RECORD'NUMBER) 9

JERR FLAG 1 19 (ERROR'FLAG) 10

WORKAREA 11

Page 335: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–23

NXRECPNO 4 1 PD 12

SAVEFLAG 1 VALUE ' ' 13

SVRECPNO 4 PD 14

SAMPLE 01 ESTIMATION 15

POPULATION SIZE 12,570 16

CONFIDENCE LEVEL 95.0% 17

MONETARY UNIT PRECISION .50 18

STANDARD DEVIATION 13.71 19

AMOUNTFIELD JBOOKVAL 20

READ ACCTREC ; READ INPUT RECORD. 21

MOVE ARECPNO TO NXRECPNO ; INIT. NEXT RECEIPT NO. FIELD. 22

DOWHILE INSTAT NE 'E' 23

DOWHILE NXRECPNO LT ARECPNO ; THE RECEIPT NO. FIELD SHOULD 24

MOVE NXRECPNO TO JRECPNO ; BE 1 GREATER THAN THE 25

OVE 0 TO JBOOKVAL ; RECEIPT NO. FIELD IN THE 26

OVE 0 TO JRECNO ; PREVIOUS RECORD. OTHERWISE 27

OVE 'M' TO JERRFLAG ; RECEIPTS ARE MISSING AND 28

ERFORM W00 TO W90 ; DUMMY MISSING RECORDS WILL 29

XRECPNO = NXRECPNO + 1 ; BE WRITTEN AND PRINTED. 30

ENDDO 31

PERFORM M00 TO M90 ; SETUP OUTPUT RECORD. 32

MOVE JRECPNO TO SVRECPNO ; SAVE RECEIPT NO. 33

MOVE 'Y' TO SAVEFLAG ; RECORD IS IN THE OUTPUT AREA. 34

READ ACCTREC ; READ THE NEXT RECORD. 35

IF ARECPNO EQ SVRECPNO ; A RECORD WITH A RECEIPT NUMBER 36

MOVE 'D' TO JERRFLAG ; THAT MATCHES THE RECEIPT 37

PERFORM W00 TO W90 ; NUMBER IN THE PREVIOUS 38

MOVE 'N' TO SAVEFLAG ; RECORD IS ERRONEOUS. 39

DOUNTIL ARECPNO NE SVRECPNO ; WRITE AND PRINT SUCH 40

PERFORM M00 TO M90 ; DUPLICATE RECORDS. 41

MOVE 'D' TO JERRFLAG 42

PERFORM W00 TO W90 43

READ ACCTREC 44

ENDDO 45

ELSE 46

IF SAMPLING 1 PERFORM W00 TO W90 ENDIF 47

MOVE 'N' TO SAVEFLAG ; SAVED RECORD HAS BEEN PROCESSED 48

ENDIF 49

NXRECPNO = SVRECPNO + 1 50

ENDDO 51

STOP 52

M00: ; MOVE INPUT REC TO OUTPUT REC. 53

MOVE SPACES TO JREC 54

MOVE ARECPNO TO JRECPNO 55

OVE ABOOKVALUE TO JBOOKVAL 56

OVE ACCTCNT TO JRECNO 57

M90: 58

W00: ; WRITE THE OUTPUT RECORD. 59

JSEQNO = OUTRECNT + 1 60

LIST JSEQNO JRECPNO JBOOKVAL JRECNO JERRFLAG 61

Page 336: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–24 Reference Guide

WRITE OUTREC 62

W90: 63

ON END OF INPUT 64

IF SAVEFLAG EQ 'Y' 65

IF SAMPLING 1 PERFORM W00 TO W90 ENDIF 66

ENDIF 67

STOP 68

ON FINAL 69

MOVE TALLY TO JSEQNO 70

LIST JSEQNO SUM JBOOKVAL WITH 2 BEFORE 71

T1 'SAMPLE DRAWN TO AUDIT GASOLINE RECEIPT FILE' WITH 2 AFTER 72

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1–3 define the input file and the fields within the input record that are used in the program. ARECPNO is the entry receipt number assigned to each credit card receipt. ABOOKVALUE is the value of the item represented by the record.

Statements 4–10 define the output file and the fields in the output record. JREC is the name of the 30-character record. JSEQNO is incremented by one every time a record is written to the file. JRECPNO is the receipt number. JBOOKVAL is the value of the item. JRECNO is the record number of the corresponding input record. JERRFLAG is a 1-byte field that is set to blank for good records, D for records with duplicate receipt numbers, or M for records with missing receipt numbers.

Statements 11–14 define the WORKAREA fields. NXRECPNO contains the receipt number that should be in the next record (if the receipt number is one greater than the current record). SAVEFLAG is set to Y when a record is held in the output area for duplicate testing. SVRECPNO contains the receipt number of the first record in a group of duplicate records.

Statements 15–20 define the estimation of values sampling technique. The population size is 12,570 records. The confidence level is 95.0 percent. The monetary unit precision is .50. The standard deviation of the unaudited population is 13.71 determined by a Frequency Distribution Report. The field in the input record that contains the amount is JBOOKVAL.

Statements 21 and 22 are executed to read the first record and to initialize the NXRECPNO field.

Statement 23 controls the DOWHILE loop terminating after the last record in the input file has been processed. The ENDDO in statement 51 is the end of this DOWHILE loop.

Page 337: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–25

Statements 24–31 contain the DOWHILE loop that controls the testing for missing receipt numbers. For example, if a record contains a receipt number of 10 and the next record contains a receipt number of 15, this DOWHILE loop generates dummy records for receipt numbers 11–14, each with an error flag of M. The dummy records are both listed and written to the output file.

Statements 32–45 contain the part of the program that controls the testing for duplicate records. Statements 32–35 are preparatory for the DOUNTIL loop. All duplicate records are listed and written to the output file with a D in the error flag field.

Statement 47 samples the non-duplicated records. The records that are to be included in the sample are listed and written to the output file.

Statement 48 sets SAVEFLAG to “N”.

Statement 50 increments the current receipt number by one and places it in NXRECPNO.

Statements 53–58 contain the logic that is performed to move the fields in the input record to the output record.

Statements 59–63 contain the logic that is performed to list the fields in the record and to write the output record.

When the end of file is reached, if SAVEFLAG contains a Y, statements 64–68 present the held record to the sampling logic. If the last record is to be included in the sample, it is listed and written to the output file. The program is stopped.

Statements 69–72 define the on-final processing of the report and the report title.

Advantage VISION:Excel Output for the Example

After this program is executed, the Advantage VISION:Results program is run using Advantage VISION:Excel. Following output and reports are generated after processing of Estimation Sampling:

Estimation Sampling of Values Statement Listing

Estimation Sampling of Values Sampling List

Estimation Sampling of Values Advantage VISION:Results File Statistics

Estimation Sampling of Values Non-Stratified Sampling Summary Report

Estimation Sampling of Values Selected Records

Estimation Sampling of Values Records in Error

Estimation sampling of values Frequency Distribution Report

Page 338: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–26 Reference Guide

Match Files and Print Frequency Distribution Report Statement Listing

These reports are shown in the following sections.

Estimation Sampling of Values Statement Listing

This is the statement listing of the Advantage VISION:Excel/Advantage VISION:Results program input to the system.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

OPTION STRUCTURED

FILE ACCTREC FB 36 1800 COUNT ACCTCNT STATUS INSTAT

ARECPNO 5 1 PD

ABOOKVALUE 5 24 PD 2

FILE OUTREC OUTPUT FROM OUTREC FB 30 900 COUNT OUTRECNT

JREC 30

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER) VALUE 0

JRECPNO 4 5 PD Z (RECEIPT'NUMBER) VALUE 0

JBOOKVAL 5 9 PD 2 E (BOOK'VALUE)

JRECNO 5 14 PD E (RECORD'NUMBER)

JERRFLAG 1 19 (ERROR'FLAG)

WORKAREA

NXRECPNO 4 1 PD

SAVEFLAG 1 VALUE ' '

SVRECPNO 4 PD

SAMPLE 01 ESTIMATION

POPULATION SIZE 12,570

CONFIDENCE LEVEL 95.0%

MONETARY UNIT PRECISION .50

STANDARD DEVIATION 13.71

AMOUNTFIELD JBOOKVAL

READ ACCTREC ; READ INPUT RECORD.

MOVE ARECPNO TO NXRECPNO ; INIT. NEXT RECEIPT NO. FIELD.

DOWHILE INSTAT NE 'E'

DOWHILE NXRECPNO LT ARECPNO ; THE RECEIPT NO. FIELD SHOULD

MOVE NXRECPNO TO JRECPNO ; BE 1 GREATER THAN THE

MOVE 0 TO JBOOKVAL ; RECEIPT NO. FIELD IN THE

MOVE 0 TO JRECNO ; PREVIOUS RECORD. OTHERWISE

MOVE 'M' TO JERRFLAG ; RECEIPTS ARE MISSING AND

PERFORM W00 TO W90 ; DUMMY MISSING RECORDS WILL

NXRECPNO = NXRECPNO + 1 ; BE WRITTEN AND PRINTED.

ENDDO

Page 339: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–27

PERFORM M00 TO M90 ; SETUP OUTPUT RECORD.

MOVE JRECPNO TO SVRECPNO ; SAVE RECEIPT NO.

MOVE 'Y' TO SAVEFLAG ; RECORD IS IN THE OUTPUT AREA.

READ ACCTREC ; READ THE NEXT RECORD.

IF ARECPNO EQ SVRECPNO ; A RECORD WITH A RECEIPT NUMBER

MOVE 'D' TO JERRFLAG ; THAT MATCHES THE RECEIPT

PERFORM W00 TO W90 ; NUMBER IN THE PREVIOUS

MOVE 'N' TO SAVEFLAG ; RECORD IS ERRONEOUS.

DOUNTIL ARECPNO NE SVRECPNO ; WRITE AND PRINT SUCH

PERFORM M00 TO M90 ; DUPLICATE RECORDS.

MOVE 'D' TO JERRFLAG

PERFORM W00 TO W90

READ ACCTREC

ENDDO

ELSE

IF SAMPLING 1 PERFORM W00 TO W90 ENDIF

MOVE 'N' TO SAVEFLAG ; SAVED RECORD HAS BEEN PROCESSED

ENDIF

NXRECPNO = SVRECPNO + 1

ENDDO

STOP

M00: ; MOVE INPUT REC TO OUTPUT REC.

MOVE SPACES TO JREC

MOVE ARECPNO TO JRECPNO

MOVE ABOOKVALUE TO JBOOKVAL

MOVE ACCTCNT TO JRECNO

M90:

W00: ; WRITE THE OUTPUT RECORD.

JSEQNO = OUTRECNT + 1

LIST JSEQNO JRECPNO JBOOKVAL JRECNO JERRFLAG

WRITE OUTREC

W90:

ON END OF INPUT

IF SAVEFLAG EQ 'Y'

IF SAMPLING 1 PERFORM W00 TO W90 ENDIF

ENDIF

STOP

ON FINAL

MOVE TALLY TO JSEQNO

LIST JSEQNO SUM JBOOKVAL WITH 2 BEFORE

T1 'SAMPLE DRAWN TO AUDIT GASOLINE RECEIPT FILE' WITH 2 AFTER

Page 340: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–28 Reference Guide

Estimation Sampling of Values Sampling List

This report shows the Advantage VISION:Excel Sampling List. You may note that each field in the Advantage VISION:Excel estimation sampling of values statement is listed with a title descriptive of the field, plus the information coded for the field. Default entries are listed with their default values.

Additionally, the statistically correct sample size was calculated as 1,751 for the information submitted using the estimation sampling of values statements.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - ESTIMATION SAMPLING OF VALUES

POPULATION SIZE 12,570

CONFIDENCE LEVEL - ONE SIDED 95.0%

DESIRED UNIT MONETARY PRECISION 0.50

STANDARD DEVIATION 13.71

CALCULATED SAMPLE SIZE 1,751

NORMAL DISTRIBUTION Z FACTOR 1.6449

LABEL OF FIELD CONTAINING AMOUNT JBOOKVAL

Estimation Sampling of Values Advantage VISION:Results File Statistics

This output shows the file and record statistics for the Advantage VISION:Results run.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ACCTREC 12,570 452,520

OUTREC 1,754 52,620

RECORDS PAGES

FILE PRINT 4

REPORT PRINT 36

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 341: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–29

Estimation Sampling of Values Non-Stratified Sampling Summary Report

The summary report, shows the report generated, listing the estimation sampling of values statements, the actual population size, the actual sample size, and the seed number.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - ESTIMATION SAMPLING OF VALUES

CONFIDENCE LEVEL - ONE SIDED 95.0%

DESIRED UNIT MONETARY PRECISION 0.50

ESTIMATED POPULATION SIZE 12,570

ACTUAL POPULATION SIZE 12,568

CALCULATED SAMPLE SIZE 1,751

NORMAL DISTRIBUTION Z FACTOR 1.6449

CALCULATED RELIABILITY FACTOR 0.0365

ACTUAL SAMPLE SIZE 1,751

ACTUAL (UNAUDITED) TOTAL AMOUNT IN POPULATION 625,675.61

ACTUAL (UNAUDITED) TOTAL AMOUNT IN SAMPLE 87,687.89

MEAN (UNAUDITED) OF POPULATION 49.78

MEAN (UNAUDITED) OF SAMPLE 50.08

ESTIMATED STANDARD DEVIATION 13.71

ACTUAL (UNAUDITED) STANDARD DEVIATION OF POPULATION 13.71

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 13.79

COEFFICIENT OF VARIATION (UNAUDITED) - POPULATION 0.275

COEFFICIENT OF VARIATION (UNAUDITED) - SAMPLE 0.275

LABEL OF FIELD CONTAINING AMOUNT JBOOKVAL

ORIGINAL SEED NUMBER 1,897

Page 342: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–30 Reference Guide

Estimation Sampling of Values Selected Records

This report shows a partial listing of the records selected. Note that the D and M in the error flag field indicates that receipt number 18642 was duplicated and receipt 18643 was missing.

SAMPLE DRAWN TO AUDIT GASOLINE RECEIPT FILE

SEQUENCE RECEIPT BOOK RECORD ERROR NUMBER NUMBER VALUE NUMBER FLAG

1 12345 59.53 1

2 12352 59.83 8

3 12357 55.71 13

4 12377 59.42 33

5 12382 48.33 38

..

101 13051 32.74 707

102 13052 54.32 708

103 13068 72.45 724

104 13089 73.60 745

105 13091 44.28 747

..

201 13684 67.47 1,340

202 13685 68.13 1,341

203 13697 53.19 1,353

204 13730 47.49 1,386

205 13732 43.52 1,388

..

301 14335 53.87 1,991

302 14337 30.70 1,993

303 14345 52.16 2,001

304 14349 56.14 2,005

305 14359 56.27 2,015

..

401 14986 47.78 2,642

402 14987 59.58 2,643

403 14988 39.94 2,644

404 14993 46.87 2,649

405 15001 54.63 2,657

..

501 15717 27.42 3,373

502 15718 37.05 3,374

503 15724 48.74 3,380

504 15728 59.92 3,384

Page 343: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–31

505 15729 38.81 3,385

..

601 16454 53.21 4,110

602 16455 28.39 4,111

603 16467 63.17 4,123

604 16482 71.67 4,138

605 16488 28.91 4,144

..

701 17204 61.83 4,860

702 17205 61.63 4,861

703 17206 55.92 4,862

704 17208 43.85 4,864

705 17210 33.19 4,866

..

801 17863 70.13 5,519

802 17866 43.33 5,522

803 17880 21.06 5,536

804 17881 64.71 5,537

805 17885 57.80 5,541

911 18641 52.18 6,297

912 18642 50.15 6,298 D

913 18642 66.05 6,299 D

914 18643 M

915 18657 16.79 6,313

..

1001 19265 56.58 6,921

1002 19275 37.78 6,931

1003 19276 38.55 6,932

1004 19288 28.66 6,944

1005 19299 63.55 6,955

..

1101 19979 62.89 7,635

1102 19982 60.88 7,638

1103 19994 25.94 7,650

1104 20005 63.90 7,661

1105 20008 39.01 7,664

..

1201 20766 59.30 8,422

1202 20778 82.98 8,434

1203 20784 61.18 8,440

1204 20831 17.38 8,487

1205 20837 66.84 8,493

Page 344: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–32 Reference Guide

..

1301 21567 61.33 9,223

1302 21568 63.14 9,224

1303 21588 22.46 9,244

1304 21596 51.28 9,252

1305 21597 75.34 9,253

..

1401 22316 43.11 9,972

1402 22318 48.45 9,974

1403 22323 59.00 9,979

1404 22324 40.18 9,980

1405 22342 41.71 9,998

..

1501 23073 51.49 10,729

1502 23078 31.13 10,734

1503 23084 48.07 10,740

1504 23089 59.78 10,745

1505 23093 59.87 10,749

..

1600 23819 38.68 11,475

1701 24525 38.86 12,181

1702 24532 58.36 12,188

1703 24536 60.77 12,192

1704 24538 55.92 12,194

1705 24562 09.13 12,218

..

1751 24856 38.50 12,512

1752 24886 46.33 12,542

1753 24888 32.78 12,544

1754 24907 57.81 12,563

1,754 87,804.09

Page 345: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–33

Estimation Sampling of Values Records in Error

After examining the sample and matching the recorded values against the values on the actual handwritten receipts, you found 33 records in error, as shown in the following report. All other records in the sample were correct.

DIFFERENCES BETWEEN BOOK VALUES AND AUDITED VALUES

SEQUENCE RECEIPT AUDITED BOOK DIFFERENCE NUMBER NUMBER VALUE VALUE

16 12466 63.27 36.27 27.00

70 12881 34.60 44.60 10.00-

106 13093 58.55 8.05 .50

205 13732 34.52 43.52 9.00-

260 14075 43.73 43.37 .36

291 14253 24.51 25.41 .90-

344 14654 49.47 39.47 10.00

388 14921 84.05 54.05 30.00

466 15454 45.23 42.53 2.70

501 15717 72.42 27.42 45.00

534 15986 71.46 71.64 .18-

567 16209 92.11 29.11 63.00

599 16444 29.01 28.01 1.00

646 16839 71.47 71.74 .27-

698 17196 54.57 55.47 .90-

768 17599 66.95 69.65 2.70-

807 17891 43.78 47.38 3.60-

834 18091 50.68 60.68 10.00-

864 18316 75.75 57.75 18.00

1055 19686 53.23 44.96 8.27

1121 20154 61.54 73.70 12.16-

1179 20552 12.74 45.65 32.91-

1232 20987 76.12 27.54 48.58

1261 21221 40.52 48.25 7.73-

1309 21610 25.56 61.99 36.43-

1336 21766 45.79 60.80 15.01-

1390 22225 48.10 32.11 15.99

1427 22565 52.15 29.55 22.60

1468 22883 22.56 34.99 12.43-

1524 23253 74.32 59.63 14.69

1603 23855 95.38 38.89 56.49

1636 24072 58.14 84.44 26.30-

1695 24480 20.29 47.38 27.09-

33 1,752.57 1,596.00 156.57

Page 346: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–34 Reference Guide

Estimation Sampling Of Values Frequency Distribution Report

You must obtain the standard deviation of the audited sample. To do so, generate a Frequency Distribution Report of the audited sample, as shown in the following report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

-- R A N G E -- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.00 9.99 2 0.11 0.64 0.00 0.32 0.11 4.47

10.00 19.99 20 1.14 314.57 0.36 15.73 1.91 18.61

20.00 29.99 125 7.14 3338.50 3.80 26.71 2.28 53.95

30.00 39.99 283 16.16 10211.06 11.62 36.08 2.87 107.12

40.00 49.99 428 24.44 19370.68 22.05 45.26 2.89 172.51

50.00 59.99 477 27.24 26272.82 29.91 55.08 2.92 241.54

60.00 69.99 260 14.85 16606.51 18.90 63.87 2.98 292.50

70.00 79.99 124 7.08 9026.43 10.28 72.79 2.05 327.70

80.00 89.99 29 1.66 2416.32 2.75 83.32 1.90 344.72

90.00 99.99 3 0.17 286.93 0.33 95.64 3.00 350.19

TOTAL 1751 00.00 87844.46 100.00

MEAN = 50.17 STANDARD ERROR OF THE MEAN = 0.333

STANDARD DEVIATION = 13.92 COEFFICIENT OF VARIATION = 0.277

MINIMUM VALUE = 0.22 MAXIMUM VALUE = 99.44

To complete the evaluation, you need the Advantage VISION:Excel Non-Stratified Sampling Summary Report from the original estimation sampling of value run (see, the Estimation Sampling of Values Non-Stratified Sampling Summary Report ).

Calculating Estimated Total Value of the Population

Calculate the estimated total value of the population by multiplying the actual population size (see, the Estimation Sampling of Values Non-Stratified Sampling Summary Report) by the mean value of the audited sample (see Estimation Sampling Of Values Frequency Distribution Report) as shown in the equation below:

Actual Population Size x Mean Value in Audited Sample = Estimate of Total Value of Population

12,568 x $50.17 = $630,536.56

Page 347: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–35

Therefore, the estimated total value of the population is $630,536.56. However, because the records identified by sequence numbers 912–914 were not included in the population (see, Estimation Sampling of Values Selected Records) you investigate and find that the receipt number in record 913 was entered incorrectly; it should have been entered as receipt number 18643.

Because the records for receipts 18642 and 18643 were not allowed to be randomly included in the sample, now add the value of these records to the estimated total, as shown in the equation below:

$630,536.56 + $50.15 + $65.05 =$630,652.76

Therefore, the estimated total value of the originating population becomes $630,652.76.

Calculate the adjusted monetary unit precision by multiplying the standard deviation of the audited sample (see, Estimation Sampling Of Values Frequency Distribution Report) by the calculated reliability factor (see, the Estimation Sampling of Values Non-Stratified Sampling Summary Report) as shown in the equation below:

Standard Deviation of Audited Sample x Calculated Reliability Factor = Total Monetary Precision

$13.92 x .0365 = $.50808

Therefore, the adjusted monetary unit precision is $.50808. This is well below the $.75 (1.5 percent) wanted as the monetary unit precision.

Calculate the adjusted total monetary precision by multiplying the adjusted monetary unit precision by the actual population size (see, the Estimation Sampling of Values Non-Stratified Sampling Summary Report ) as shown in the equation below:

Monetary Unit of Precision x Actual Population Size = Total Monetary Precision

$.50808 x 12,568 = $6,385.55

Therefore, the adjusted total monetary precision is $6,385.55.

For the purpose of this example, use a one-sided confidence level. Therefore, calculate the upper limit of the total value by adding the estimated total value of the originating population to the adjusted total monetary precision, as shown in the equation below:

$630,652.76 + $6,385.55 = $637,038.31

This means that you could be 95 percent certain that if you had manually totaled all 12,570 handwritten receipts, the total would not have exceeded $637,038.31.

Page 348: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–36 Reference Guide

Conclusions for Estimation Sampling Example

The gasoline receipts file you are auditing has a total value of $625,675.61 (see, the Estimation Sampling of Values Non-Stratified Sampling Summary Report). Compared to the estimated total value of the originating population of $630,652.76 and the upper limit of $637,038.31, the gasoline receipts file total is quite reasonable. Consequently, you do not have to take further steps in auditing the gasoline receipts file.

Preparation of Frequency Distribution Report

When preparing the Frequency Distribution Report (see, Estimation sampling of values Frequency Distribution Report)instead of preparing all 1,751 values in the audited sample for entry to Advantage VISION:Excel, just the 33 audited values for the records in error were prepared. The keyed entries were prepared as follows to create a correction file.

Because all the records in the unaudited sample file (see the program code in Estimation Sampling of Values Input Statements) were correct except for 33 records, these erroneous records were corrected with the audited values from the correction file. The sequence number field was the key to matching the records. When the sequence number on a correction record matched the sequence number on the unaudited sample file, the incorrect value was replaced with the audited value.

Field From To Length

Sequence number 1 7 7

Audited value 12 20 9

Page 349: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

Chapter 12: Estimation Sampling of Values 12–37

Match Files and Print Frequency Distribution Report Statement Listing

These statements show the Advantage VISION:Excel/Advantage VISION:Results logic used to do the matching of files and the printing of the Frequency Distribution Report.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE AREC ORD FB 30 900

ASEQNO 4 1 PD Z (SEQUENCE'NUMBER)

ARECPNO 4 5 PD Z (RECEIPT'NUMBER)

ABOOKVAL 5 9 PD 2 E (BOOK'VALUE)

AERRFLAG 1 19

FILE BRECORD FB 30 900

BSEQNO 7 1

BAUDITVAL 9 12 NU 2 (AUDITED'VALUE)

WORKAREA

ASEQNOSV 7 1

AUDITVALUE 4 9 PD 2

RDIFF 5 14 PD 2 (DIFFERENCE)

A00:

READ ARECORD

A01:

READ BRECORD

A02:

MOVE ASEQNO TO ASEQNOSV

IF ASEQNOSV LT BSEQNO

GOTO A10

ENDIF

IF ASEQNOSV EQ BSEQNO

GOTO A20

ENDIF

* 'B' RECORD LESS THAN 'A' RECORD

MOVE BAUDITVAL TO AUDITVALUE

PERFORM A30 TO A35

* 'A' RECORD IS LESS THAN 'B' RECORD

A10:

IF AERRFLAG EQ SPACE

NEXT

ELSE

REJECT

ENDIF

MOVE ABOOKVAL TO AUDITVALUE

Page 350: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling Example

12–38 Reference Guide

PERFORM A30 TO A35

READ ARECORD

GOTO A02

* 'A' RECORD IS EQUAL TO 'B' RECORD

A20:

MOVE BAUDITVAL TO AUDITVALUE

MOVE BAUDITVAL TO RDIFF

RDIFF = RDIFF - ABOOKVAL

IF AERRFLAG EQ SPACE

NEXT

ELSE

REJECT

ENDIF

PERFORM R00 TO R90

PERFORM A30 TO A35

GOTO A00

* DO FREQUENCY REPORT

A30:

FREQ 01 EQUAL

DISTFIELD AUDITVALUE

START $0.00

INTERVALSIZE $10.00

INTERVALNO 20

FREQUENCY 01

A35:

* DO DETAILED REPORT

R00:

LIST ASEQNO ARECPNO BAUDITVAL ABOOKVAL RDIFF

R90:

ON FINAL

LIST SUM (BAUDITVAL ABOOKVAL RDIFF) TALLY AT ASEQNO+2

WITH 2 BEFORE

T1 'DIFFERENCES BETWEEN BOOK VALUES AND AUDITED VALUES'

WITH 2 AFTER

Page 351: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 13: Dollar Unit Sampling 13–1

Chapter 13: Dollar Unit Sampling

This chapter describes dollar unit sampling and is divided into the following sections:

Definition of dollar unit sampling

Advantage VISION:Excel implementation

Dollar unit sampling examples

These sections describe the dollar unit sampling and its uses in detail with the help of examples. The examples explain how to implement Dollar Unit Sampling with Advantage VISION:Excel.

Definition of Dollar Unit Sampling The purpose of dollar unit sampling is to determine within statistical bounds the dollar amount of errors in an accounting population. Dollar unit sampling is a statistical sampling technique that gives every dollar in an accounting population an equal opportunity to be included in the sample. This chapter describes the dollar unit sampling method from the book Dollar-Unit Sampling, A Practical Guide for Auditors by Leslie, Teitlebaum, and Anderson.

As with other statistical sampling techniques, the principle idea behind dollar unit sampling is to randomly select a statistically correct sample and to examine and evaluate that sample.

Unlike other variable sampling techniques, it is not necessary to know the number of items in the population nor the standard deviation of the population. However, it is necessary to know the total recorded unaudited value of the population; for populations that are accessible by a computer, this value, in many cases, can be found in the trial balance report.

The unit of selection for dollar unit sampling is the dollar. Consequently, dollar unit sampling can only be used when a dollar amount can be associated with each item in the population. Each dollar in the population has an equal chance of being selected with selection proceeding on a cellular random basis.

A statistically correct sampling interval is calculated and the population is divided into equal-sized cells; each cell is equal in size to the statistically calculated sampling interval.

Exactly one dollar is randomly chosen from each cell. The Item that contains the selected dollar, also gets included in the sample.

Page 352: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Dollar Unit Sampling

13–2 Reference Guide

Also, the dollars in each cell are accumulated starting from the first dollar to the last dollar in the cell. For example, the cell values can be distributed as follows:

Item Value Cumulative Dollar

Dollar Spread Percent of Cell

1 $10.56 $10.56 $0.00-10.56 11.57%

2 $5.88 $16.44 $10.57-16.44 6.44%

3 $12.64 $29.08 $16.45-29.08 13.85%

4 $25.95 $55.03 $29.09-55.03 28.43%

5 $3.72 $58.75 $55.04-58.75 4.07%

6 $32.54 $91.29 $58.76-91.29 35.64%

TOTAL $91.29 100.00%

Suppose the random dollar, $36.94, had been selected for this particular cell. Item number 4 in this cell would have been included in the sample, because $36.94 falls between $29.09 and $55.03.

The dollar unit sampling technique is a form of proportional sampling: the greater the dollar value of an item, the more likely it is to be included in the sample. For example, in the above cell example, the total value of the cell is $91.29. The first item value-wise is 11.57 percent of the cell. The sixth item value-wise is 35.64 percent of the cell. Therefore, item 6 has approximately a three times better chance of being selected than does item1.

This technique leads to automatic and optimum stratification with large value items (items whose value is greater than or equal to the sampling interval) being included in the sample on a 100 percent basis.

Because the assumption is that the population contains a low rate of errors, the Poisson probability distribution is used as a close approximation to the Hypergeometric probability distribution. The Poisson probability distribution is represented by the following formula:

Where:

P — is the probability of the sample containing exactly X errors (1 minus the confidence level).

e — is the base of the Napier logarithm system -2.7182818.

Page 353: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Dollar Unit Sampling

Chapter 13: Dollar Unit Sampling 13–3

p — is the error percentage in the original population.

n — is the sample size.

X — is the number of errors in the sample.

In calculating the statistically correct interval size (cell width) and in evaluating the sample, the Upper Error Limit Table, shown in the Confidence Levels table given in next section, is used extensively. This table contains factors that were calculated using the Poisson probability distribution. Each Upper Error Limit (UEL) factor represents the expected number of errors in the sample (np in the formula above) and is pendent on the confidence level (P in the formula above) and the number of errors in the sample.

For example, the UEL factor for a confidence level of 97.5 percent and zero actual errors in the sample is 3.69 and the UEL factor for a confidence level of 97.5 percent and one actual error in the sample is 5.58. The 3.69 is calculated by determining what value of np satisfies the equation:

np = 3.69 is the solution of the above equation. For example:

(approximately)

The 5.58 is calculated by solving the cumulative Poisson probability distribution for (np) assuming the sum of the probabilities for zero and one error in the sample:

The solution is np = 5.58 because:

(approximately)

The Precision Gap Widening (PGW) is the difference between the current UEL and the prior UEL minus one.

Page 354: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Dollar Unit Sampling

13–4 Reference Guide

Calculating the Cell Width

Perform the following steps to calculate the statistically correct sampling interval, or cell width:

1. Decide on the maximum dollar amount of error you can tolerate in the population.

2. Decide on the confidence level you need.

3. Decide on the number of errors you expect to find in the sample.

4. Determine the UEL factor (from the Confidence Levels table starting shown in the next section.) that corresponds to the confidence level and the number of expected errors in the sample.

5. Divide the maximum tolerable amount of error in the population by the UEL factor to get the statistically correct sampling interval (cell width).

For example, suppose you can tolerate a 2 percent error in a population totaling $ 500,000 (step 1 above), you want to be 90 percent confident in the conclusions you derive from the sample (step 2 above) and you expect to find zero error items in your sample (step 3 above). The maximum tolerable dollar amount of error is $10,000 ($500,000 x .02). The UEL factor (as shown in the following Confidence Levels table) for the above information is 2.31 (as per step 4 in this section). The sampling interval would be $10,000÷2.31= $4329.00 (as per step 5 in this section).

Page 355: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Dollar Unit Sampling

Chapter 13: Dollar Unit Sampling 13–5

Confidence Level

The following Confidence level table displays upper error limits.

Number of Errors 75.0% 80.0% 85.9% 87.5% 90.0% 92.5% 95.0% 97.5% 99.0%

UEL PGW UEL PGW UEL PGW UEL PGW UEL PGW UEL PGW UEL PGW UEL PGW UEL PGW

0 1.39 0.0 1.61 0.0 1.90 0.0 2.08 0.0 2.31 0.0 2.59 0.0 3.00 0.0 3.69 0.0 4.61 0.0

1 2.70 0.31 3.00 0.39 3.38 0.48 3.61 0.53 3.89 0.58 4.25 0.66 4.75 0.75 5.58 0.89 6.64 1.03

2 3.92 0.22 4.28 0.28 4.73 0.35 5.00 0.39 5.33 0.44 5.74 0.49 6.30 0.55 7.23 0.65 8.41 0.77

3 5.11 0.19 5.52 0.24 6.02 0.29 6.32 0.32 6.68 0.35 7.14 0.40 7.76 0.46 8.77 0.54 10.05 0.64

4 6.28 0.17 6.72 0.20 7.27 0.25 7.60 0.28 8.00 0.32 8.49 0.35 9.16 0.40 10.25 0.48 11.61 0.56

5 7.43 0.15 7.91 0.19 8.50 0.23 8.86 0.26 9.28 0.28 9.80 0.31 10.52 0.36 11.67 0.42 13.11 0.50

6 8.56 0.13 9.08 0.17 9.71 0.21 10.09 0.23 10.54 0.26 11.09 0.29 11.85 0.33 13.06 0.39 14.57 0.46

7 9.69 0.13 10.24 0.16 10.90 0.19 11.30 0.21 11.77 0.23 12.36 0.27 13.15 0.30 14.43 0.37 16.00 0.43

8 10.81 0.12 11.38 0.14 12.08 0.18 12.50 0.20 13.00 0.23 13.61 0.25 14.44 0.29 15.77 0.34 17.41 0.41

9 11.92 0.11 12.52 0.14 13.25 0.17 13.69 0.19 14.21 0.21 14.85 0.24 15.71 0.27 17.09 0.32 18.79 0.38

10 13.02 0.10 13.65 0.13 14.42 0.17 14.87 0.18 15.41 0.20 16.08 0.23 16.97 0.26 18.39 0.30 20.15 0.36

11 14.12 0.10 14.78 0.13 15.57 0.15 16.04 0.17 16.60 0.19 17.29 0.21 18.21 0.24 19.69 0.30 21.49 0.34

12 15.22 0.10 15.90 0.12 16.72 0.15 17.21 0.17 17.79 0.19 18.50 0.21 19.45 0.24 20.97 0.28 22.82 0.33

13 16.31 0.09 17.02 0.12 17.86 0.14 18.37 0.16 18.96 0.17 19.69 0.19 20.67 0.22 22.23 0.26 24.14 0.32

14 17.40 0.09 18.13 0.11 19.00 0.14 19.52 0.15 20.13 0.17 20.88 0.19 21.89 0.22 23.49 0.26 25.45 0.31

15 18.49 0.09 19.24 0.11 20.13 0.13 20.67 0.15 21.30 0.17 22.07 0.19 23.10 0.21 24.74 0.25 26.75 0.30

16 19.57 0.08 20.34 0.10 21.26 0.13 21.81 0.14 22.46 0.16 23.25 0.18 24.31 0.21 25.99 0.25 28.03 0.28

17 20.66 0.09 21.44 0.10 22.39 0.13 22.95 0.14 23.61 0.15 24.42 0.17 25.50 0.19 27.22 0.23 29.31 0.28

18 21.73 0.07 22.54 0.10 23.51 0.12 24.08 0.13 24.76 0.15 25.59 0.17 26.70 0.20 28.45 0.23 30.59 0.28

19 22.81 0.08 23.64 0.10 24.63 0.12 25.22 0.14 25.91 0.15 26.75 0.16 27.88 0.18 29.67 0.22 31.85 0.26

20 23.89 0.08 24.73 0.09 25.74 0.11 26.34 0.12 27.05 0.14 27.91 0.16 29.07 0.19 30.89 0.22 33.11 0.26

Page 356: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Dollar Unit Sampling

13–6 Reference Guide

21 24.96 0.07 25.82 0.09 26.85 0.11 27.47 0.13 28.19 0.14 29.07 0.16 30.24 0.17 32.10 0.21 34.36 0.25

22 26.03 0.07 26.91 0.09 27.96 0.11 28.59 0.12 29.32 0.13 30.22 0.15 31.42 0.18 33.31 0.21 35.60 0.24

23 27.10 0.07 28.00 0.09 29.07 0.11 29.71 0.12 30.46 0.14 31.37 0.15 32.59 0.17 34.52 0.21 36.85 0.25

24 28.17 0.07 29.09 0.09 30.18 0.11 30.83 0.12 31.59 0.13 32.52 0.15 33.76 0.17 35.71 0.19 38.08 0.23

25 29.24 0.07 30.17 0.08 31.28 0.10 31.94 0.11 32.72 0.13 33.66 0.14 34.92 0.16 36.91 0.20 39.31 0.23

26 30.30 0.06 31.25 0.08 32.38 0.10 33.05 0.11 33.84 0.12 34.80 0.14 36.08 0.16 38.10 0.19 40.54 0.23

27 31.37 0.07 32.33 0.08 33.48 0.10 34.16 0.11 34.96 0.12 35.94 0.14 37.24 0.16 39.29 0.19 41.76 0.22

28 32.43 0.06 33.41 0.08 34.58 0.10 35.27 0.11 36.08 0.12 37.08 0.14 38.39 0.15 40.47 0.18 42.98 0.22

29 33.49 0.06 34.49 0.08 35.67 0.09 36.38 0.11 37.20 0.12 38.21 0.13 39.54 0.15 41.65 0.18 44.19 0.21

30 34.56 0.07 35.57 0.08 36.77 0.10 37.48 0.10 38.32 0.12 39.34 0.13 40.69 0.15 42.83 0.18 45.40 0.21

35 39.86 0.06 40.94 0.07 42.23 0.09 42.99 0.10 43.88 0.11 44.97 0.13 46.42 0.15 48.69 0.17 51.42 0.20

40 45.13 0.05 46.28 0.07 47.65 0.08 48.46 0.09 49.40 0.10 50.56 0.12 52.08 0.13 54.48 0.16 57.36 0.19

45 50.39 0.05 51.60 0.06 53.04 0.08 53.90 0.09 54.89 0.10 56.10 0.11 57.71 0.13 60.22 0.15 63.24 0.18

50 55.63 0.05 56.91 0.06 58.42 0.08 59.31 0.08 60.35 0.09 61.62 0.10 63.30 0.12 65.93 0.14 69.08 0.17

55 60.86 0.05 62.19 0.06 63.77 0.07 64.70 0.08 65.79 0.09 67.11 0.10 68.86 0.11 71.60 0.13 74.87 0.16

60 66.08 0.04 67.47 0.06 69.11 0.07 70.08 0.08 71.21 0.08 72.59 0.10 74.40 0.11 77.24 0.13 80.63 0.15

65 71.30 0.04 72.73 0.05 74.44 0.07 75.44 0.07 76.61 0.08 78.04 0.09 79.92 0.10 82.86 0.12 86.36 0.15

70 76.50 0.04 77.99 0.05 79.75 0.06 80.79 0.07 82.00 0.08 83.47 0.09 85.41 0.10 88.45 0.12 92.07 0.14

75 81.70 0.04 83.24 0.05 85.05 0.06 86.13 0.07 87.37 0.07 88.89 0.08 90.89 0.10 94.02 0.11 97.75 0.14

80 86.89 0.04 88.47 0.05 90.34 0.06 91.45 0.06 92.74 0.07 94.30 0.08 96.36 0.09 99.58 0.11 103.40 0.13

85 92.07 0.04 93.70 0.05 95.63 0.06 96.77 0.06 98.09 0.07 99.70 0.08 101.81 0.09 105.11 0.11 109.04 0.13

90 97.25 0.04 98.93 0.05 100.90 0.05 102.07 0.06 103.43 0.07 105.08 0.08 107.25 0.09 110.63 0.10 114.66 0.12

95 102.43 0.04 104.15 0.04 106.17 0.05 107.37 0.06 108.76 0.07 110.45 0.07 112.67 0.08 116.14 0.10 120.26 0.12

100 107.60 0.03 109.36 0.04 111.43 0.05 112.66 0.06 114.08 0.06 115.81 0.07 118.09 0.08 121.64 0.10 125.85 0.12

Page 357: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–7

Advantage VISION:Excel Implementation Use an Advantage VISION:Results program to implement dollar unit sampling.

Required Information

The program is divided into the following types of statements:

FILE Statement (Advantage VISION:Results)

Field Definition Statements (Advantage VISION:Results)

Dollar Unit Sampling Statements (Advantage VISION:Excel)

Procedure and Selection Statements (Advantage VISION:Results)

The Advantage VISION:Results FILE and field statements are thoroughly defined in the Advantage VISION:Results Reference Guide. Therefore, the discussion here is rather brief; only those major areas of concern are highlighted.

FILE Statement

The FILE statement defines the input and output files. This statement is identified by the command FILE. Input files are identified by the optional keyword INPUT. Output files are identified by the required keyword OUTPUT.

Field Definition Statements

The field definition statements are used to define a data name for fields in either the input or output files. The field definition tells you how large the field is, where it begins in the record, and how it appears. Every time you use a data name in a dollar unit sampling statement, define it in an Advantage VISION:Results field definition statement.

Note that all field definitions immediately follow the FILE statement with which they are associated.

Note: If you forget to define the attributes of a field definition statement, Advantage VISION:Excel generates an error message indicating that the data name was not defined.

Page 358: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

13–8 Reference Guide

Dollar Unit Sampling Statements

The syntax for the dollar unit sampling follows.

SAMPLE nn DOLLAR

AMOUNTFIELD dataname CELL [WIDTH] nnnnnnnnnnnnnn

[DUPLICATE [CHECK] [FIELD] dataname]]

[KEY [RECORDS] [FLAG]] [ZERO [VALUES] nnnnnnnnnnn]

[SMALL [VALUES] nnnnnnnnnnn] [SEED nnnnnnn]

[RANDPROG progname [RANDPROGSIZE nn]]

The associated keywords are described in the following table:

Keyword Description

SAMPLE Required. Specifies this statement as a sampling statement

nn Required. A unique application number; an integer from 1–99.

DOLLAR Required. Specifies this sampling statement as dollar unit sampling. This keyword follows immediately after the application number.

AMOUNTFIELD Required. The data name of the field containing the dollar amount against which dollar unit sampling occurs. Define this field in an Advantage VISION:Results data definition statement.

CELL [WIDTH] Required. Specifies the cell width (sampling interval). Enter a positive numeric value no greater than 99,999,999,999,999. The calculation of the cell width is explained in the section Vision:Excel Output. Dollar amounts can include the dollar sign, commas, and a decimal point. A maximum of 14 positions (including digits and any decimal point) are allowed. Any decimal places beyond those defined in the AMOUNTFIELD entry are ignored.

DUPLICATE [CHECK][FIELD]

The data name of the field against which duplicate checks are performed. This field is used to set on the Advantage VISION:Results Flag DYLSPxxDPF whenever successive records with the identically same duplicate check field are found (on = Y). xx in DYLSPxxDPF reflects the individual application number. The data name is previously defined to Advantage VISION:Results.

Sort the input file by the duplicate check field in order for duplicate checking to work properly.

Page 359: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–9

Keyword Description

KEY [RECORDS][FLAG]

This flag causes Advantage VISION:Excel to examine the field DYLSPxxKYF. If DYLSPxxKYF is equal to Y, the record is included in the sample and accumulated in a special set of key record counters.

ZERO [VALUES] If a dollar amount is included in this entry, this amount is substituted in the amount field of any records containing an amount of zero at input. This allows records that would normally be bypassed to be given a chance for selection.

Enter a positive numeric value no greater than 99,999,999,999. Dollar amounts can include the dollar sign, commas, and a decimal point. A maximum of 11 positions (including digits and any decimal point) are allowed.

Any decimal places beyond those defined in the AMOUNTFIELD entry are ignored.

SMALL [VALUES] If a dollar amount is included in this entry, this amount is substituted in the amount field of any records containing an amount less than the value specified. This increases the likelihood of small valued records being included in the sample.

Enter a positive numeric value no greater than 99,999,999,999.

Dollar amounts can include the dollar sign, commas, and a decimal point. A maximum of 11 positions (including digits and any decimal point) are allowed. Any decimal places beyond those defined in the AMOUNTFIELD entry are ignored.

The ZERO and SMALL value fields are known as lower physical unit stratum options. When they are used, they can color the results; for example, if a small value of $20.00 is specified and a negative value of $7.00 is encountered, it is increased to $20.00, causing the negative values to seem too high.

Although the population is always considered positive, negative amounts are accumulated separately.

SEED[number] This entry is used to initiate the random number generator process. This number can be 1–9,999,999. The default is a number generated by the random number generator.

Page 360: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

13–10 Reference Guide

Keyword Description

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword. For more information about the linkage between Advantage VISION:Excel and your random number generator, see the appendix "Summary of Advantage VISION:Excel Features.” If this entry is not used, Advantage VISION:Excel defaults to its own random number generator (refer to the Advantage VISION:Excel Toolkit Reference Guide).

You can specify your own subroutine, as in the Advantage VISION:Excel Toolkit Reference Guide. A third option is to use the power residue logic residing in module DYLPWRSD. Refer to the Advantage VISION:Excel Toolkit Reference Guide for instructions.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program. The memory size is expressed in kilobytes (1024-bytes).

Procedure/Selection Statements

IF SAMPLING is used in the appropriate statement within the Advantage VISION:Results program to invoke the sampling logic. The syntax for IF SAMPLING command is as follows:

IF SAMPLING 01

GOTO INC

ELSE

GOTO EXC

ENDIF

The application number (01) follows the command IF SAMPLING, tying the sampling operation to the Advantage VISION:Excel application uniquely identified by the same application number. When the special command IF SAMPLING is executed, Advantage VISION:Excel determines whether or not the record is included as part of the sample. In this code, if the record is to be included in the sample, an unconditional branch to the tagname INC is taken; if the record is to be excluded from the sample, an unconditional branch to the tagname EXC is taken.

Page 361: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–11

Adhere to the following internal priorities of sampling when using Advantage VISION:Excel's dollar unit sampling function:

If the key records flag option has been activated, the DYLSPxxKYF flag is tested for a value of Y. If it is Y, the IF SAMPLING command that started the sampling logic goes through its true imperative logic and the item is accepted into the sample.

If the item value is greater than or equal to the cell width, the item is placed into the top stratum and is sampled on a 100 percent basis, meaning that the IF SAMPLING command that started the sampling logic goes through its true imperative logic.

All other items are placed into the bottom stratum. The bottom stratum is divided into equal-sized cells and one item is randomly selected from each cell.

Advantage VISION:Excel Output

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Results program. For more information, see Dollar Unit Sampling Input Statements for Example 1.

The Advantage VISION:Excel Sampling List. This lists the information coded in the dollar unit sampling statement. For more information, see Dollar Unit Sampling List for Example 1.

The Advantage VISION:Results File and Record Statistics Listing. For more information, see Dollar Unit Sampling Advantage VISION:Results File Statistics for Example 1.

The Advantage VISION:Excel Non-Stratified Sampling Summary Report. For more information, see Dollar Unit Sampling Non-Stratified Sampling Summary report for Example 1. It lists the information you specified using the dollar unit sampling statement, plus information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run. This includes totals relative to the AMOUNTFIELD, of the following groupings:

The population — the totals of all records passed to the specific Dollar Unit Sampling (DUS) application.

The bottom stratum — the totals of all records less than the cell width.

The key items — the totals of all records flagged as key items using the DYLSPxxKYF flag. All key item records are included in the sample.

The top stratum — the totals of all records equal to or greater than the cell width. All top stratum records are included in the sample.

The bottom sample — the totals of all bottom stratum records that are to be included in the sample.

Page 362: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

13–12 Reference Guide

The composite sample — the totals of all records to be included in the sample (all key item records, all top stratum records, and all bottom sample records).

Within each of the above groupings, the following totals are maintained:

– Number of records that are in the group.

– Number of records in the group that had a zero value.

– Total value of all records within the group that contained a positive value.

– Total value of all records within the group that contained a negative value.

– Total value of all records within the group (net value).

– Total value of all records within the group assuming that all values are absolute.

Additionally, if the lower physical unit stratum option is specified, the following totals are printed for both the zero stratum and the small values stratum:

– The number of records within the stratum.

– The amount by which the value of the stratum increased because of the zero or small values value substitution.

– The number of records within the stratum that were included in the sample.

– The amount by which the value of the stratum increased as a result of the zero or small values value substitution.

Page 363: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–13

Sample Examination and Evaluation

After Advantage VISION:Excel selects your sample, examine it for errors. Overstatement Errors Evaluation Worksheet and Understatement Errors Evaluation Worksheet report shown in this section are provided to help you organize the evaluation process into easy-to-manage steps. The purpose of this exercise is to determine the following:

The most likely amount of error in the population.

The population upper error limit consistent with the confidence level wanted.

After examining your sample, separate the error items into two groups:

Those items that are income overstatement errors.

Those items that are income understatement errors.

The income overstatement errors group is evaluated separately from the income understatement errors and the two are combined for the net evaluation.

The following two worksheets explain the error items:

Overstatement Errors Evaluation Worksheet —showing the overstatement errors.

Understatement Errors Evaluation Worksheet— showing the understatement errors.

Page 364: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

13–14 Reference Guide

Overstatement Errors Evaluation Worksheet

OVERSTATEMENT ERRORS

(A) Sampling Interval (Cell Width)

(B) Confidence Level

(C) Basic Precision Factor

(D) Basic Precision Value (A × C)

(E)

Item No.

(F)

Book Value

(G)

Audited Value

(H)

Percent Tainted

(F-G)/F

(I)

MLE

Value

A x H

(J)

PGW

Factor

(K)

PGW

Tainted

H x J

(L)

PGW

Value

A x K

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

(M) Total MLE for Overstatement Errors

(N) Total PGW for Overstatement Errors

(O) Total UEL for Overstatement Errors (D + M + N)

Page 365: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–15

Understatement Errors Evaluation Worksheet

UNDERSTATEMENT ERRORS

(A) Sampling Interval (Cell Width)

(B) Confidence Level

(C) Basic Precision Factor

(D) Basic Precision Value (A × C)

(E)

Item No.

(F)

Book Value

(G)

Audited Value

(H)

Percent Tainted

(F-G)/F

(I)

MLF

Value

A x H

(J)

PGW

Factor

(K)

PGW

Tainted

H x J

(L)

PGW

Value

A x K

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

(P) Total MLE for Overstatement Errors

(Q) Total PGW for Overstatement Errors

(R) Total UEL for Overstatement Errors (D + M + N)

(S) Net MLE(M-P)

Page 366: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

13–16 Reference Guide

(T) Net Overstatements UEL (O – P)

(U) Net Understatements UEL (R – M)

The procedure for evaluating understatement errors is the same as for evaluating overstatement errors.

Place the value for the sampling interval, or cell width in field (A). For more information, see Advantage VISION:Excel Output.

Place the value for the confidence level in field (B).

Determine the Basic Precision Factor by correlating the confidence level and zero sampling errors in the Confidence Levels table shown in the section, Calculating the Cell Width and place the results in field (C).

Calculate the Basic Precision Value by multiplying the Sampling Interval (A) by the Basic Precision Value (C) and place the results in field (D).

Fill in columns E, F, and G for each item, placing the overstatement errors on the Overstatement Errors Evaluation Worksheet and the understatement errors on the Understatement Errors Evaluation Worksheet.

For each error item, calculate the Percentage Tainted by the following formula:

(Book Value - Audited Value) ÷ Book Value

Take the absolute value of the result and express it as a percentage. Place the results in column (H).

Order your overstatement errors by Percentage Tainted, starting with the largest percentage first. Do the same for the understatement errors.

Calculate the Most Likely Error (MLE) value by multiplying the Sampling Interval (A) by the Percent Tainted (H). Place the results in column (I).

Determine the Precision Gap Widening (PGW) factors from the Confidence Levels table shown in the section Calculating the Cell Width, that correspond to the confidence level. Associate the PGW factor for one error with the first error item. Associate the PGW factor for two errors with the second error item, and so on. Place the factors into column (J).

Calculate the portion of the PGW factor that is tainted by multiplying the Percent Tainted (H) by the PGW factor (J). Place the results into column (K).

Calculate the portion of the PGW value that is tainted by multiplying the Sampling Interval (A) by the portion of the Precision Gap Factor that is tainted (K). Place the results in column (L).

Determine the most likely amount of error (MLE) by totaling column (I). For overstatement errors, place the result in field (M). For understatement errors, place the result in field (P).

Page 367: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation

Chapter 13: Dollar Unit Sampling 13–17

Determine the total PGW value by totaling column L. For overstatement errors, place the result in field (N). For understatement errors, place the result in field (Q).

Determine the Total Upper Error Limit by adding the Basic Precision Value, the total MLE value, and the total PGW value. For overstatement errors, add D, M, and N together and place in field O. For understatement errors, add D, P, and Q together and place in field R.

Determine the net MLE by subtracting the understatements MLE (P) from the overstatements MLE (M) and place the results in field (S). This value represents the best estimate of the probable error in the population based upon the projection of the dollar error in the sample to a proportional dollar error in the population. If the population is 100 times larger than the sample, dollar-wise, then a dollar error in the sample would represent 100 error dollars in the population. Therefore, the MLE value is not very precise.

Determine the Net Overstatement Upper Error Limit (UEL) by subtracting the total MLE for Understatement Errors (P) from the total UEL for Overstatement Errors (O). Place the results in field (T). This value represents a net upper error limit of overstatement consistent with the confidence level. You can state you are X percent confident that the actual amount of overstatement errors in the population does not exceed this value, where X is the confidence level.

Determine the Net Understatement UEL by subtracting the total MLE for Overstatement Errors (M) from the total UEL for Understatement Errors (R). Place the results in field (U). This value represents a net upper error limit of understatement consistent with the confidence level. You can state you are X percent confident that the actual amount of understatement errors in the population n does not exceed this value, where X is the confidence level.

Using the Guidelines

To use dollar unit sampling in Advantage VISION:Excel, perform the following steps:

1. Determine the cell width. Base this on the confidence level you want and the maximum tolerable rate of error. For more information about calculating the cell width, see Advantage VISION:Excel Output. Keep in mind the cell width also determines the start of the top stratum.

2. Code an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input/output files, dollar unit sample statements, timing of execution of sampling logic, determination of which records are to be key items (if specified as an option), and handling of duplicate records as flagged in DYLSPxxDPF (when the duplicate check option is taken).

3. Examine and evaluate your sample.

Page 368: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–18 Reference Guide

Dollar Unit Sampling Examples This section explains the following sampling options with examples:

Determining the Amount of Errors in a Population

Using Zero and Small Value Options

Using the Key Record Flag

Example 1: Determining the Amount of Error in a Population

As the internal auditors of Super Cars, Inc., you want to audit the parts department. In particular, you want to sample last month's invoices from the invoice file and compare them against the actual written invoices. You are aware that the invoice file contains 200 records with one record per invoice. You also know that the absolute book value of the invoices is $40,167.36.

You need to determine the amount of error within the invoice population. You want to be 90 percent confident about the conclusions you project from the sample. You will tolerate no more than 5 percent error in the population and you assume that you will probably find only two errors in the sample.

Looking at the Confidence Levels table the UEL factor for 90 percent confidence level and two sample errors is 5.33. The maximum tolerable amount of error is 5 percent of $40,167.36, which is equal to $2,008.37. The sampling interval or cell width is equal to the maximum tolerable amount of error divided by the UEL factor ($2,008.37 ÷ 5.33 = $376.80). The amount of each invoice is entered in the field named INVAMT and is a 5-byte packed decimal field, with 2 digits to the right of the assumed decimal point.

With the above information, you can code the Advantage VISION:Excel/Advantage VISION:Results program.

Page 369: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–19

Dollar Unit Sampling Input Statements for Example 1

The following program will list the INVOICE code, the invoice number, and the invoice amount for each sampled invoice.

REPORT 80 WIDE 1

FILE INVFILE FB 352 5280 2

INVNO 7 4 NU B (INVOICE'NUMBER) 3

INVAMT 5 170 PD 2 A (INVOICE'AMOUNT) RIGHT 4

INVCODE 2 182 (INVOICE'CODE) 5

SAMPLE 01 DOLLAR 6

AMOUNTFIELD INVAMT 7

CELL WIDTH 376.80 8

IF SAMPLING 01 9

LIST INVCODE INVNO INVAMT 10

ACCEPT 11

ENDIF 12

ON FINAL 13

LIST SUM INVAMT WITH 2 BEFORE 14

T1 'SUPER CARS INC.' 15

T2 'INVOICES SAMPLE' WITH 2 AFTER 16

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements. The input statements are described as below:

Statement 1 specifies that the report is to be 80-bytes wide.

Statement 2 defines the invoice file.

Statements 3–5 define the fields you are using.

Statements 6–8 are the dollar unit sampling parameters. The application number is 1. The field containing the amount is INVAMT. The sampling interval (cell width) is $376.80.

Statements 9–16 are the procedure/selection statements. Note that because of the IF SAMPLING statement, if the record is to be included in the sample, it is listed in the report.

Page 370: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–20 Reference Guide

When your run completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Excel/Advantage VISION:Results program. For more information, see Dollar Unit Sampling Statement Listing for Example 1.

The Advantage VISION:Excel Sampling List. This lists the sampling parameter information supplied to Advantage VISION:Excel. For more information, see Dollar Unit Sampling List for Example 1.

The Advantage VISION:Results File and Record Statistics listing. For more information, see Dollar Unit Sampling Advantage VISION:Results File Statistics for Example 1.

The Advantage VISION:Excel Non-Stratified Sampling Summary Report. All the pertinent summary information for the dollar unit sampling application is printed here.

Because Advantage VISION:Excel uses a random number generator, the original seed number used to start the random number generator is printed in this report. By supplying the seed number to Advantage VISION:Excel, it is possible to rerun the program, getting the same identical sample. For more information, see Dollar Unit Sampling Non-Stratified Sampling Summary Report for Example 1.

The report itemizing the invoices in the sample. For more information, see Dollar Unit Sampling Report Itemizing the Invoices for Example 1.

Page 371: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–21

Dollar Unit Sampling Statement Listing for Example 1

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

REPORT 80 WIDE

FILE INVFILE FB 352 5280

INVNO 7 4 NU B (INVOICE'NUMBER)

INVAMT 5 170 PD 2 A (INVOICE'AMOUNT) RIGHT

INVCODE 2 182 (INVOICE'CODE)

SAMPLE 01 DOLLAR

AMOUNTFIELD INVAMT

CELL WIDTH 376.80

IF SAMPLING 01

LIST INVCODE INVNO INVAMT

ACCEPT

ENDIF

ON FINAL

LIST SUM INVAMT WITH 2 BEFORE

T1 'SUPER CARS INC.'

T2 'INVOICES SAMPLE' WITH 2 AFTER

Dollar Unit Sampling List for Example 1

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - DOLLAR UNIT SAMPLING

FIELD THAT CONTAINS THE AMOUNT INVAMT

CELL WIDTH 376.80

DUPLICATE CHECK FIELD

KEY RECORDS REQUESTED NO

LOWER PHYSICAL UNIT STRATUM REQUESTED NO

Page 372: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–22 Reference Guide

Dollar Unit Sampling Advantage VISION:Results File Statistics for Example 1

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

INFILE 200 70,400

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 1

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Dollar Unit Sampling Non-Stratified Sampling Summary Report for Example 1

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - DOLLAR UNIT SAMPLING

AMOUNT FIELD INVAMT

CELL WIDTH 376.80

NO. OF CELLS IN BOTTOM STRATUM 26

ORIGINAL SEED NUMBER 20,737

POPULATION TOTALS

NO. OF RECORDS 200

NO. OF ZERO RECORDS 10

TOTAL POSITIVE VALUE 29,595.23

TOTAL NEGATIVE VALUE 10,572.13

TOTAL NET VALUE 19,023.10

TOTAL GROSS VALUE 40,167.36

BOTTOM STRATUM TOTALS

NO. OF RECORDS 187

NO. OF ZERO RECORDS 10

TOTAL POSITIVE VALUE 9,092.99

TOTAL NEGATIVE VALUE 486.58

TOTAL NET VALUE 8,606.41

TOTAL GROSS VALUE 9,579.57

KEY ITEM TOTALS

NO. OF RECORDS 0

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 0.00

Page 373: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–23

TOTAL NEGATIVE VALUE 0.00

TOTAL NET VALUE 0.00

TOTAL GROSS VALUE 0.00

TOP STRATUM TOTALS

NO. OF RECORDS 13

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 20,502.24

TOTAL NEGATIVE VALUE 10,085.55

TOTAL NET VALUE 10,416.69

TOTAL GROSS VALUE 30,587.79

BOTTOM SAMPLE VALUES

NO. OF RECORDS 24

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 3,120.12

TOTAL NEGATIVE VALUE 256.12

TOTAL NET VALUE 2,864.00

TOTAL GROSS VALUE 3,376.24

COMPOSITE SAMPLE TOTALS

NO. OF RECORDS 37

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 23,622.36

TOTAL NEGATIVE VALUE 10,341.67

TOTAL NET VALUE 13,280.69

TOTAL GROSS VALUE 33,964.03

Page 374: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–24 Reference Guide

Dollar Unit Sampling Report Itemizing the Invoices for Example 1

This report shows the itemized details (Invoice Code, Invoice Number, and Invoice Amount) of the invoice records. Please note that the three records appearing inside the boxes represent the error items in the invoice.

SUPER CARS INC.

INVOICES SAMPLE

INVOICE INVOICE INVOICE CODE NUMBER AMOUNT

FO 8011508 178.70

IO 2002299 413.58

IO 6218113 108.44

KO 2005131 848.71

KO 6088678 305.64

KO 1014021 1,702.42

KO 6067956 80.24

KO 7014996 106.74

MA 6215785 170.91

MA 6219004 15.00

MA 2006286 1,108.92

MA 2013568 3,886.33

MA 2009072 128.90

MA 6046819 15.04

MA 6069495 57.00

MA 1013637 843.74

MA 1014617 855.22

MF 4003896 196.00

MF 1013904 1,142.31

MI 6008321 140.00

MN 2005956 125.29

MO 2002922 2,541.70

MO 6001327 118.00

MT 2014017 258.00

MU 1014706 406.46

MU 6105904 176.00

NA 2623 256.12-

NA 1009681 10,085.55-

PO 8009155 40.42

PO 9018239 89.60

TO 6114253 51.60

TO 2010933 1,460.61

TO 2000504 5,292.24

Page 375: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–25

WO 8011699 57.50

WO 8010641 82.56

WO 9007156 352.80

WO 7093853 265.74

13,280.69

Compare each of the 37 invoices against the original handwritten invoices. You find three invoices in error, as follows:

Invoice Number

Book Value Audited Value

Under/ Over

Amount

Tainted

Percent Tainted

4003896 $196.00 $169.00 O $27.00 13.78%

2005956 $125.29 $175.29 U $50.00 39.91%

7093853 $265.74 $205.74 O $60.00 22.58%

For more information about the completed evaluation worksheets, see Dollar Unit Sampling Overstatement Errors Evaluation Worksheet for Example 1, and Dollar Unit Sampling Understatement Errors Evaluation Worksheet for Example 1. Remember the items are grouped by understatements and overstatements and, within each grouping, they are itemized in percent tainted in descending sequence. The conclusion drawn from the evaluation is that, with 90 percent confidence, the net upper error limit of overstatements is $929.22 and the net upper error limit of understatements is $971.02.

Page 376: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–26 Reference Guide

Dollar Unit Sampling Overstatement Errors Evaluation Worksheet for Example 1

O V E R S TAT E M E N T E R R O R S

(A) Sampling Interval (Cell Width) $376.80

(B) Confidence Level 90%

(C) Basic Precision Factor 2.31

(D) Basic Precision Value (A × C) $870.41

(E)

Item No.

(F)

Book Value

(G)

Audited Value

(H)

Percent Tainted

(F-G)/F

(I)

MLE

Value

A x H

(J)

PGW

Factor

(K)

PGW

Tainted

H x J

(L)

PGW

Value

A x K

1 7093853 $265.74 $205.74 22.58% $85.08 .58 13.10% $49.36

2 4003896 $196.00 $169.00 13.78% $51.92 .44 6.06% $22.83

3

4

5

6

7

8

9

10

11

12

13

14

15

16

(M) Total MLE for Overstatement Errors $ 137.80

(N) Total PGW for Overstatement Errors $ 72.19

(O) Total UEL for Overstatement Errors (D + M + N) $ 1079.60

Page 377: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–27

Dollar Unit Sampling Understatement Errors Evaluation worksheet for Example 1

U N D E R S TAT E M E N T E R R O R S

(A) Sampling Interval (Cell Width) $376.80

(B) Confidence Level 90%

(C) Basic Precision Factor 2.31

(D) Basic Precision Value (A × C) $870.41

(E)

Item No.

(F)

Book Value

(G)

Audited Value

(H)

Percent Tainted

(F-G)/F

(I)

MLE

Value

A x H

(J)

PGW

Factor

(K)

PGW

Tainted

H x J

(L)

PGW

Value

A x K

1 2005956 $125.29 $175.29 39.91% $150.38 .58 23.15% $87.23

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

(P) Total MLE for Understatement Errors $ 150.58

(Q) Total PGW for Understatement Errors $ 87.23

(R) Total UEL for Understatement Errors (D + P + Q) $1108.02

(S) Net MLE (M – P) $ –13.38

Page 378: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–28 Reference Guide

(T) Net Overstatements UEL (O – P) $ 929.22

(U) Net Understatements UEL (R – M) $ 971.02

Example 2: Using Zero and Small Value Options

The second example shown below uses the zero and small value options. All items that are zero in value are changed to $10.00 and all items that are less than $25.00 are changed to $25.00. Additionally, a seed number is supplied to the Advantage VISION:Excel random number generator.

Dollar Unit Sampling Statement Listing for Example 2

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE INVFILE FB 352 5280

INVNO 7 4 NU B (INVOICE'NUMBER)

INVAMT 5 170 PD 2 A (INVOICE'AMOUNT) RIGHT

INVCODE 2 182 (INVOICE'CODE)

SAMPLE 02 DOLLAR

AMOUNTFIELD INVAMT

CELL WIDTH 155.22

ZERO VALUES 10.00

SMALL VALUES 25

SEED 7697195

IF SAMPLING 02

LIST INVCODE INVNO INVAMT

ACCEPT

ENDIF

ON FINAL

LIST SUM INVAMT WITH 2 BEFORE

T1 'SUPER CARS INC.'

T2 'INVOICES SAMPLE' WITH 2 AFTER

Page 379: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–29

Dollar Unit Sampling Non-Stratified Sampling Summary Report for Example 2

The following Advantage VISION:Excel Non-Stratified Sampling Summary Report produced for this example, is similar to the one produced for Example 1, with the addition of the lower physical unit stratum options.

Note that using a smaller cell width causes the bottom sample to contain 43 records in this example instead of 24, as in Example 1, more records overlapped into two cells and were, therefore, selected twice (48 cells in bottom stratum); only 43 records were selected in the bottom stratum.

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 2 - DOLLAR UNIT SAMPLING

AMOUNT FIELD INVAMT

CELL WIDTH 155.22

NO. OF CELLS IN BOTTOM STRATUM 48

ORIGINAL SEED NUMBER 7,697,195

POPULATION TOTALS

NO. OF RECORDS 200

NO. OF ZERO RECORDS 10

TOTAL POSITIVE VALUE 29,595.23

TOTAL NEGATIVE VALUE 10,572.13

TOTAL NET VALUE 19,023.10

TOTAL GROSS VALUE 40,167.36

BOTTOM STRATUM TOTALS

NO. OF RECORDS 173

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 7,186.24

TOTAL NEGATIVE VALUE 158.60

TOTAL NET VALUE 7,027.64

TOTAL GROSS VALUE 7,344.84

KEY ITEM TOTALS

NO. OF RECORDS 0

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 0.00

TOTAL NEGATIVE VALUE 0.00

TOTAL NET VALUE 0.00

TOTAL GROSS VALUE 0.00

TOP STRATUM TOTALS

NO. OF RECORDS 27

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 23,481.32

TOTAL NEGATIVE VALUE 10,519.19

Page 380: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–30 Reference Guide

TOTAL NET VALUE 12,962.13

TOTAL GROSS VALUE 34,000.51

BOTTOM SAMPLE VALUES

NO. OF RECORDS 43

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 2,462.07

TOTAL NEGATIVE VALUE 25.00

TOTAL NET VALUE 2,437.07

TOTAL GROSS VALUE 2,487.07

COMPOSITE SAMPLE TOTALS

NO. OF RECORDS 70

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 25,943.39

TOTAL NEGATIVE VALUE 10,544.19

TOTAL NET VALUE 15,399.20

TOTAL GROSS VALUE 36,487.58

LOWER PHYSICAL UNIT STRATUM OPTION

ZERO STRATUM

NO. OF RECORDS IN STRATUM 10

STRATUM INCREASE IN VALUE 100.00

NO. OF RECORDS IN SAMPLE 1

SAMPLE INCREASE IN VALUE 10.00

SMALL VALUE STRATUM

NO. OF RECORDS IN STRATUM 82

STRATUM INCREASE IN VALUE 1,077.99

NO. OF RECORDS IN SAMPLE 15

SAMPLE INCREASE IN VALUE 216.89

Page 381: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–31

Example 3: Using the Key Record Flag

The third example uses the key record flag to select all records with an item value greater than $300.00. Additionally, the power residue random number generator is called (DYLPWRSD).

Dollar Unit Sampling Statement Listing for Example 3

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE INVFILE FB 352 5280

INVNO 7 4 NU B (INVOICE'NUMBER)

INVAMT 5 170 PD 2 A (INVOICE'AMOUNT) RIGHT

INVCODE 2 182 (INVOICE'CODE)

SAMPLE 03 DOLLAR

AMOUNTFIELD INVAMT

CELL WIDTH 376.80

KEY RECORDS FLAG

RANDPROG DYLPWRSD

SEED 5938302

IF INVAMT GT 300

MOVE 'Y' TO DYLSP03KYF

ENDIF

IF SAMPLING 03

LIST INVCODE INVNO INVAMT

ACCEPT

ENDIF

ON FINAL

LIST SUM INVAMT WITH 2 BEFORE

T1 'SUPER CARS INC.'

T2 'INVOICES SAMPLE' WITH 2 AFTER

Note that in the logic used to set the key record flag DYLSP03KYF, the application number in the flag corresponds to the dollar unit sampling statement. The key item totals are part of the composite sample totals.

Page 382: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

13–32 Reference Guide

Dollar Unit Sampling Non-Stratified Sampling Summary Report for Example 3

11/30/97 VISION:Excel NON-STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 3 - DOLLAR UNIT SAMPLING

AMOUNT FIELD INVAMT

CELL WIDTH 376.80

NO. OF CELLS IN BOTTOM STRATUM 22

ORIGINAL SEED NUMBER 5,938,302

POPULATION TOTALS

NO. OF RECORDS 200

NO. OF ZERO RECORDS 10

TOTAL POSITIVE VALUE 29,595.23

TOTAL NEGATIVE VALUE 10,572.13

TOTAL NET VALUE 19,023.10

TOTAL GROSS VALUE 40,167.36

BOTTOM STRATUM TOTALS

NO. OF RECORDS 183

NO. OF ZERO RECORDS 10

TOTAL POSITIVE VALUE 7,786.10

TOTAL NEGATIVE VALUE 486.58

TOTAL NET VALUE 7,299.52

TOTAL GROSS VALUE 8,272.68

KEY ITEM TOTALS

NO. OF RECORDS 16

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 21,809.13

TOTAL NEGATIVE VALUE 0.00

TOTAL NET VALUE 21,809.13

TOTAL GROSS VALUE 21,809.13

TOP STRATUM TOTALS

NO. OF RECORDS 1

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 0.00

TOTAL NEGATIVE VALUE 10,085.55

TOTAL NET VALUE 10,085.55-

TOTAL GROSS VALUE 10,085.55

BOTTOM SAMPLE VALUES

NO. OF RECORDS 21

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 1,632.19

TOTAL NEGATIVE VALUE 0.00

TOTAL NET VALUE 1,632.19

Page 383: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Examples

Chapter 13: Dollar Unit Sampling 13–33

TOTAL GROSS VALUE 1,632.19

COMPOSITE SAMPLE TOTALS

NO. OF RECORDS 38

NO. OF ZERO RECORDS 0

TOTAL POSITIVE VALUE 23,441.32

TOTAL NEGATIVE VALUE 10,085.55

TOTAL NET VALUE 13,355.77

TOTAL GROSS VALUE 33,526.87

Page 384: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 385: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 14: Stratified Sampling Overview 14–1

Chapter 14: Stratified Sampling Overview

This chapter describes stratified sampling and its implementation using Advantage VISION:Excel.

It is divided into the following sections:

Definition of stratified sampling

Reasons for using stratified sampling

Stratified sampling techniques supported by Advantage VISION:Excel

Statistical considerations for using stratified sampling

Determining statistical stratification for a population

Advantage VISION:Excel implementation of stratified sampling

Definition of Stratified Sampling Stratified sampling is a technique by which a population is divided into two or more sub-populations known as strata, which contain items with values that do not vary greatly from each other. A random sample is selected from each stratum and each stratum sample is examined and evaluated independently. The evaluations of the various stratum samples are combined to provide a final evaluation of the total population.

A value must be associated with each item in the population. The value can be measured in any definable unit, such as gallons, yards, and pounds (or fractions thereof), but for purposes of this chapter, dollar units are used.

A stratum is defined by limiting values — a lower value and an upper value. For example, in a population that contains items valued from $1.00 to $100.00, you could set up three strata. The first stratum contains all items valued from $1.00 to $9.99; the second, all items valued from $10.00 to $74.99; and the third, from $75.00 to $100.00. Note that every item in the population falls into only one of the three strata.

In Advantage VISION:Excel, a stratum is defined by the upper value with the lower value assumed to be the upper value of the previous stratum. The upper value is included in the stratum while the lower value is included in the previous stratum. For information about determining how to limit values for each stratum, see Defining the Strata.

Page 386: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Reasons for Using Stratified Sampling

14–2 Reference Guide

Reasons for Using Stratified Sampling You can use stratified sampling whenever you need to estimate the total value of a population or whenever the concept of sub-dividing a population is applicable.

Stratified sampling, as opposed to non-stratified sampling techniques, is used for the following reasons:

To delegate the examination and evaluation of the sample to more than one auditor.

To reduce the overall number of items to be examined and evaluated.

Stratified Sampling Techniques Supported by Advantage VISION:Excel

Advantage VISION:Excel provides three types of stratified sampling techniques, each distinguished by the way, the sample is chosen.

Simple Random Method — in this method, you tell Advantage VISION:Excel how many items from each stratum, you want in your stratum samples and Advantage VISION:Excel randomly selects the items for each stratum sample. You also tell Advantage VISION:Excel the total number of items in each stratum.

Simple Percentage Method — in this method, you tell Advantage VISION:Excel the percentage of each stratum you want to include in your stratum samples and Advantage VISION:Excel selects, on an equal interval basis, the items for each stratum sample. For example, if you were to ask for 5 percent of the stratum, Advantage VISION:Excel would select every twentieth item as part of the stratum sample. Therefore, Advantage VISION:Excel does not need to know the number of items in each stratum in advance.

Mean Estimation Method — in this method, you provide Advantage VISION:Excel with information that enables Advantage VISION:Excel to calculate a statistically meaningful sample size for each stratum. The selection of items from each stratum is done on a random basis.

The simple random method and the simple percentage method are not statistically oriented and, consequently, once Advantage VISION:Excel selects your stratum samples, the evaluation of those stratum samples is dependent on the objectives of the sampling procedure and your sound judgment.

Page 387: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Statistical Considerations for Using Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–3

The mean estimation method is statistically oriented and, therefore, once Advantage VISION:Excel randomly selects your stratum samples, you can follow a step-by-step procedure in evaluating the samples and combining the results of the stratum samples. The conclusions drawn from sampling with the mean estimation method can be mathematically supported, because the equations used to calculate the stratum sample sizes and the method of sample evaluation are based upon known statistical theorems.

Statistical Considerations for Using Stratified Sampling Advantage VISION:Excel provides following two statistical sampling techniques that can be used to estimate the total value of a population.

The Non-stratified Estimation Sampling of Values method

The Stratified Mean Estimation method

Example 1: Non-stratified Estimation Sampling of Values Method

The Estimation Sampling of Values method is efficient when the individual item values within a population are relatively close to each other. When most of the item values cluster around the mean value of the population, the Estimation Sampling of Values method works well with a relatively small sample size to provide the precision wanted within the confidence level.

The following graph is an example of the frequency distribution for a population that can be evaluated by using the Estimation Sampling of Values method.

Page 388: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Statistical Considerations for Using Stratified Sampling

14–4 Reference Guide

Example 2: Stratified Mean Estimation Method

The stratified sampling Mean Estimation method should be used when the item values within the population are very widely dispersed. If the population is stratified correctly, the total of the sample sizes for each stratum is much smaller than the sample size needed to do a non-stratified Estimation Sampling of Values examination, assuming that the precision and the confidence level wanted remain the same. For example, assume that the dollar value for each item in a population of 900 items was as follows:

Item Number Dollar Value

1 $ 100

2 $ 500

3 $ 9000

4 $ 100

5 $ 500

6 $ 9000

Page 389: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Statistical Considerations for Using Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–5

Item Number Dollar Value

7 $ 100

8 $ 500

9 $ 9000

- -

- -

- -

This population contains $100, $500, and $9000 items in equal numbers. Assume that you want to sample from this population to estimate the total value of the population, assuming you are unaware that there are only three dollar values in the population.

If you want to be 95 percent confident in the conclusions drawn from the sample and you want the unit value of the sample to be within $100 of the true unit value of the population, you have to have a random sample of 791 items using the Estimation Sampling of Values method. You have to sample about 88 percent of the population.

Note that the mean of this population is $3200 and the standard deviation is $4104.47.

If you use stratified sampling and place the $100 valued items in one stratum, the $500 valued items in the second stratum, and the $9000 valued items in the third stratum, with a very small sample from each stratum, you could tell that there is no variability within each stratum.

Audit populations are likely to have more than three dollared values in the population. A more likely audit population is shown in the following graph.

Page 390: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

14–6 Reference Guide

This graph reveals that there are five distinct sub-populations or strata. The strata can be summarized in the following table:

Strata Dollar Range

1 $0 - $500

2 $600 - $1000

3 $1400 - $2600

4 $3100 - $3700

5 $3700 - $4000

6 Greater than $4000

From each stratum, you can now take a sample and evaluate it. The evaluation of all stratum samples are combined to provide the final evaluation of the population.

Determining Statistical Stratification for a Population This section explains when to use the stratified sampling Mean Estimation method instead of the non-stratified Estimation Sampling of Values method. This is dependent upon the ratio of the standard deviation to the mean of the population. In the population shown in the graph, in Example 2: Stratified Mean Estimation Method, the standard deviation of the population was $4104.47, the mean value of the population was $3200, and the statistically correct sample size was 791 items, which is 88 percent of the population. At that rate, you might as well examine the whole population and be 100 percent certain.

In this example, the ratio of the standard deviation to the mean value, called the coefficient of variation, is 1.28 (4104.47/3200).

When the coefficient of variation for a population is 0.5 or less, stratification is not necessary. When the coefficient of variation is between 0.5 and 0.9, stratification could be necessary. When the coefficient of variation is greater than 0.9, stratification is needed. Therefore, because the coefficient of variation is 1.28, stratified sampling definitely should be used.

With Advantage VISION:Excel, the coefficient of variation is easily obtained by using the Frequency Reporting function. For a description of this function, see the chapter “Frequency Distribution Reporting.”

Page 391: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

Chapter 14: Stratified Sampling Overview 14–7

Frequency Distribution Report for Example 1

This report is generated for the population shown as per the graph appearing in Example 1: Non-Stratified Sampling of Values Method.

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

------ R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

100.00 199.99 42 1.62 6758.06 0.52 160.91 22.55 64.80

200.00 299.99 154 5.93 41066.09 3.13 266.66 24.39 188.89

300.00 399.99 365 14.04 132126.81 10.08 361.99 30.22 379.93

400.00 499.99 715 27.51 321461.20 24.53 449.60 29.38 647.31

500.00 599.99 699 26.89 384151.77 29.31 549.57 28.72 911.68

600.00 699.99 406 15.62 259514.54 19.80 639.20 30.07 1113.16

700.00 799.99 169 6.50 123670.79 9.44 731.78 23.58 1243.15

800.00 899.99 42 1.62 35209.69 2.69 838.33 21.18 1307.95

900.00 999.99 7 0.27 6560.90 0.50 937.27 21.13 1334.41

TOTAL 2599 100.00 1310519.85 100.00

MEAN = 504.24 STANDARD ERROR OF THE MEAN = 2.690

STANDARD DEVIATION = 137.12 COEFFICIENT OF VARIATION = 0.272

MINIMUM VALUE = 126.19 MAXIMUM VALUE = 977.49

Page 392: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

14–8 Reference Guide

Frequency Distribution Report for Example 2

This report is generated for the population shown as per the graph appearing in Example 2: Stratified Mean Estimation Method.

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

------ R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

200.00- 100.01- 22 0.34 2679.95- 0.03- 121.82- 17.78 46.90

100.00- 0.01- 33 0.51 2733.81- 0.03- 82.84 12.27 104.34

0.00 99.99 59 0.92 4244.60 0.04 71.94 19.40 181.15

100.00 199.99 696 10.82 115115.21 1.20 165.40 24.44 444.95

200.00 299.99 1680 26.12 421408.02 4.38 250.84 28.54 854.81

300.00 399.99 721 11.21 240308.63 2.50 333.30 25.09 1123.31

400.00 499.99 41 0.64 17359.52 .18 423.40 15.20 1187.34

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 1187.34

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 1187.34

700.00 799.99 76 1.18 59349.10 0.62 780.91 16.07 1274.51

800.00 899.99 477 7.42 405677.22 4.21 850.48 25.55 1492.90

900.00 999.99 77 1.20 70595.19 0.73 916.82 13.86 1580.65

1000.00 1099.99 0 0.00 0.00 0.00 0.00 0.00 1580.65

1100.00 1199.99 0 0.00 0.00 0.00 0.00 0.00 1580.65

1200.00 1299.99 0 0.00 0.00 0.00 0.00 0.00 1580.65

1300.00 1399.99 0 0.00 0.00 0.00 0.00 0.00 1580.65

1400.00 1499.99 3 0.05 4270.64 0.04 1423.55 16.77 1597.97

1500.00 1599.99 1 0.02 1532.15 0.02 1532.15 0.00 1607.97

1600.00 1699.99 24 0.37 39504.29 0.41 1646.01 29.51 1656.96

1700.00 1799.99 27 0.42 47341.19 0.49 1753.38 31.51 1708.92

1800.00 1899.99 52 0.81 96348.45 1.00 1852.85 26.15 1781.03

1900.00 1999.99 54 0.84 105173.10 1.09 1947.65 26.49 1854.51

2000.00 2099.99 45 0.70 92299.60 0.96 2051.10 28.93 1921.59

2100.00 2199.99 60 0.93 129191.03 1.34 2153.18 30.39 1999.05

2200.00 2299.99 24 0.37 54079.85 0.56 2253.33 28.08 2048.04

2300.00 2399.99 25 0.39 58705.06 0.61 2348.20 29.00 2098.04

2400.00 2499.99 2 0.03 4899.44 0.05 2449.72 18.98 2112.18

2500.00 2599.99 3 0.05 7583.38 0.08 2527.79 8.92 2129.50

2600.00 2699.99 0 0.00 0.00 0.00 0.00 0.00 2129.50

2700.00 2799.99 0 0.00 0.00 0.00 0.00 0.00 2129.50

2800.00 2899.99 0 0.00 0.00 0.00 0.00 0.00 2129.50

2900.00 2999.99 0 0.00 0.00 0.00 0.00 0.00 2129.50

3000.00 3099.99 2 0.03 6146.28 0.06 3073.14 25.39 2143.64

3100.00 3199.99 76 1.18 240856.27 2.50 3169.16 31.26 2230.81

Page 393: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

Chapter 14: Stratified Sampling Overview 14–9

3200.00 3299.99 413 6.42 1344803.76 13.96 3256.18 31.35 2434.02

3300.00 3399.99 656 10.20 2198101.19 22.82 3350.76 28.87 2690.13

3400.00 3499.99 588 9.14 2024373.18 21.02 3442.81 26.10 2932.60

3500.00 3599.99 193 3.00 682258.58 7.08 3535.02 23.38 3071.52

3600.00 3699.99 23 0.36 83562.97 0.87 3633.17 15.64 3119.48

3700.00 3799.99 4 0.06 15025.20 0.16 3756.30 29.54 3139.48

3800.00 3899.99 212 3.30 819424.03 8.51 3865.21 23.64 3285.07

3900.00 3999.99 63 0.98 246920.54 2.56 3919.37 17.49 3364.44

TOTAL 6432 100.00 9631043.91 100.00

MEAN = 1497.36 STANDARD ERROR OF THE MEAN = 18.365

STANDARD DEVIATION = 1472.89 COEFFICIENT OF VARIATION = 0.984

MINIMUM VALUE = 169.96- MAXIMUM VALUE = 3988.31

Because the coefficient of variation appearing in the section Frequency Distribution Report for Example 1, is 0.272, which is less than 0.5, stratifying that population is not necessary. However, in the Frequency Distribution report for Example 2, the coefficient of variation is 0.984, which is greater than 0.9 and, consequently, the population should be stratified.

Theoretically, you should be using the standard deviation, mean value, and the coefficient of variation that apply to the originating population. However, when Advantage VISION:Excel's Frequency Distribution Report is used, the basis of it is the book or unaudited population, because the originating population is normally not in a form that can be used by a computerized program. Make sure to rectify this use of book values during the evaluation step of the sampling process.

Defining the Strata

Once you decide to stratify the population, determine the lower and upper limits of each stratum. This section describes the optimal allocation method for determining these limits, which creates homogeneous strata. To illustrate this method, perform the following steps to stratify the population represented by the Advantage VISION:Excel Frequency Distribution Report shown in Frequency Distribution Report for Example 2.

1. Examine all items that are peculiar or materially large on a 100 percent basis; that is, examine all negative-valued items and all items with values above $4000.00. The remainder of the population, which includes items valued from $0.00–$4000.00, is stratified.

2. Study the last column of the report shown in the section Frequency Distribution Report for Example 2; in this discussion, the Square Root Range X Count column is referred to as the Cum F column.

3. Decide on the number of strata into which you would like to divide the population. For the purpose of this exercise, assume you want five strata.

Page 394: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

14–10 Reference Guide

4. Subtract the Cum F entry preceding $0.00 (lower limit of population to be stratified) from the Cum F entry at $4,000 (upper limit of population to be stratified) to determine the Cum F range, as shown in the following equation:

3364.44 – 104.34 = 3260.10

5. Divide the Cum F Range by the number of strata wanted (in this case, 5) to determine the Cum F increment, as shown in the following equation:

3260.10 ÷ 5 = 652.02

6. To determine the upper limit for the first stratum, first add the Cum F increment to the Cum F entry preceding $0.00 (lower limit of population to be stratified), as shown in the following equation:

104.34 + 652.02 = 756.36

Then, find the Cum F entry that is closest to this sum. The high limit corresponding to this Cum F entry becomes the upper limit of the first stratum. 756.36 is closest to Cum F value 854.81 and the high range for 854.81 is 299.99. Therefore, the upper limit for stratum 1 is 299.99.

7. To determine the upper limit for the second stratum, first add two times the Cum F increment to the Cum F entry preceding $0.00 (lower limit of population to be stratified), as shown in the following equation:

104.34 + (2 × 652.02) = 1408.38

Then, find the Cum F entry that is closest to this sum. The high limit corresponding to this Cum F entry becomes the upper limit of the first stratum. 756.36 is closest to Cum F value 1492.90 and the high range for 1492.90 is 899.99. Therefore, the upper limit for stratum 1 is 899.99.

8. To determine the upper limit for the nth stratum, first add n times the Cum F increment to the Cum F entry preceding $0.00 (lower limit of population to be stratified), as shown in the following equation:

104.34 + (n × 652.02) = Upper Cum F value for nth stratum

Then, find the Cum F entry that is closest to this sum. The high limit corresponding to this Cum F entry becomes the upper limit of the first stratum. Therefore, for this example, the limits of the strata would be as follows:

Stratum Dollar Range

1 $ 0.00 – 299.99

2 $ 300.00 – 899.99

3 $ 900.00 – 2299.99

4 $ 2300.00 – 3399.99

5 $ 3400.00 – 4000.00

Page 395: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Determining Statistical Stratification for a Population

Chapter 14: Stratified Sampling Overview 14–11

This method can be further refined. Instead of the closest high range being taken as the limit, the upper limit can be calculated by interpolation. For a description of this method, see the chapter “Stratified Simple Percentage Sampling.”

Page 396: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–12 Reference Guide

Advantage VISION:Excel Implementation of Stratified Sampling

The purpose of this section is to familiarize you with how to do stratified sampling with Advantage VISION:Excel and the output that Advantage VISION:Excel produces. This overview includes stratified sampling functions, as well as the flow of both the Advantage VISION:Excel and Advantage VISION:Results statements. The reports and files generated by this system are examined and discussed.

Stratified Sampling Output Flowchart

This flowchart depicts the flow of the statements and the output they generate. The purpose of the flowchart is to walk you through the statements to reinforce your understanding of how Advantage VISION:Excel functions.

Page 397: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–13

Stratified Sampling Input Statements

The following code is an example of an Advantage VISION:Excel/Advantage VISION:Results program.

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

FILE ARFILE INPUT FB 352 5280 1

BOOKVALUE 5 170 PD 2 2

PAYAMT 4 253 PD 2 3

FILE OARFILE OUTPUT FB 352 5280 FROM ARFILE 4

SAMPLE 01 STRATIFIED PERCENTAGE 5

FIELDNAME BOOKVALUE 6

STRATUM1 LIMIT 51.05 10.00% 7

STRATUM2 LIMIT 175.64 5.00% 8

STRATUM3 LIMIT 5000.00 50.50% 9

SAMPLE 05 STRATIFIED RANDOM 10

FIELDNAME PAYAMT 11

STRATUM1 LIMIT 50.44 SIZE 1865 SELECT 75 12

STRATUM2 LIMIT 250.45 SIZE 737 SELECT 25 13

STRATUM3 LIMIT 900.00 SIZE 134 SELECT 10 14

IF SAMPLING 01 15

WRITE OARFILE 16

ENDIF 17

IF SAMPLING 05 18

GOTO OKAY 19

ENDIF 20

DYLCOUNT1 = DYLCOUNT1 + 1 21

REJECT 22

OKAY: 23

LIST BOOKVALUE PAYAMT 24

Statements 1 and 4 define the input and output files. Statement 1 is the input file identified by the keyword INPUT, which is optional. Statement 4 is the output file (OUTPUT) and is required.

Page 398: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–14 Reference Guide

Statements 2–3 are the field definitions. This is where you define a data name to a field in either the input or output records or a work area. The field definition tells the system how large the field is, where it begins in the record, and how it appears. Every time you use a data name in a sampling statement, define it in an Advantage VISION:Results field definition statement. Note that all field definitions immediately follow the FILE statement they are associated with.

Statements 5–14 are the stratified sampling statements. Statements 5–9 are for stratified percentage sampling and statements 10–14 are for stratified random sampling. These statements are definition statements and are not executable.

The label of the field to be stratified (FIELDNAME BOOKVALUE) refers to the data name of the field, as defined in an Advantage VISION:Results field definition statement, that contains the dollar or numeric value to be stratified.

In Advantage VISION:Excel, a stratum is defined by the upper value, with the lower value assumed to be the upper value of the previous stratum. Each stratum can be represented negatively or positively; it can contain a leading minus sign, a leading dollar sign, commas, and a decimal point.

Note: If you forget to define the attributes of a field definition, Advantage VISION:Excel generates an error message that explains that the statement with the data name is not defined.

Consider the following example:

These upper limit values: Define these ranges:

Stratum 1 $ -50.00 $ -50.00 and less

Stratum 2 $ 0.00 $ -49.99 to $ 0.00

Stratum 3 $ 100.00 $ 0.01 to $ 100.00

Stratum 4 $ 250.00 $ 100.01 to $ 250.00

Stratum 5 $ 300.00 $ 250.01 to $ 300.00

Each stratum limit must be greater in value than the previously specified stratum limit as shown in the section Stratified Sampling Input Statements. Any deviation from this causes the appropriate error message to be generated and the statement is rejected.

Advantage VISION:Excel automatically generates an extra stratum for every stratified sampling application submitted to Advantage VISION:Excel. For example, if five strata are requested, a sixth is automatically generated with a maximum upper limit of 99,999,999,999. If eight strata are requested, nine are generated, and so on. The additional stratum is always sampled on a 100 percent basis.

Page 399: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–15

Statements 15–24 contain the procedure logic. Statement 15 is the IF SAMPLING command. The 01 as coded is the application number. The IF SAMPLING command and the application number, 01, is directly associated with the Advantage VISION:Excel sampling statement in statement 5.

Advantage VISION:Excel identifies the sampling function requested and the criteria, such as population size and confidence level, as defined in each sampling application. Therefore, each application number must be unique for sampling. Note that there is also an IF SAMPLING command (statement 18) for statement 10.

To process the records that meet the criteria for each individual sampling application, you must use the GOTO command as shown in statement 19.

The procedure logic tells Advantage VISION:Excel that if the record read from the input file meets all of the criteria as defined in the sampling statements, branch to the tag name OKAY; if not, proceed to the next procedure statement. See the individual stratified sampling chapters later in this guide for more information about the procedure logic.

Output from Advantage VISION:Excel

Advantage VISION:Excel has error analysis capabilities that are evident during the validation and execution of the program. The system transmits this information to you using the listing.

For complete details with examples, see the Advantage VISION:Excel Messages and Codes Guide.

Advantage VISION:Excel generates the following output and reports at the end of processing:

Stratified Sampling Statement Listing

Advantage VISION:Excel Stratified Sampling List

Advantage VISION:Excel File Statistics

Advantage VISION:Results Stratified Sampling File Statistics

Advantage VISION:Excel Stratified Sampling Summary Report

Page 400: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–16 Reference Guide

Stratified Sampling Statement Listing

The system generates this listing, once all the statements entered are validated by Advantage VISION:Excel.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE ARFILE INPUT FB 352 5280

BOOKVALUE 5 170 PD 2

PAYAMT 4 253 PD 2

FILE OARFILE OUTPUT FB 352 5280 FROM ARFILE

SAMPLE 01 STRATIFIED PERCENTAGE

FIELDNAME BOOKVALUE

STRATUM1 LIMIT 51.05 10.00%

STRATUM2 LIMIT 175.64 5.00%

STRATUM3 LIMIT 5000.00 50.50%

SAMPLE 05 STRATIFIED RANDOM

FIELDNAME PAYAMT

STRATUM1 LIMIT 50.44 SIZE 1865 SELECT 75

STRATUM2 LIMIT 250.45 SIZE 737 SELECT 25

STRATUM3 LIMIT 900.00 SIZE 134 SELECT 10

IF SAMPLING 01

WRITE OARFILE

ENDIF

IF SAMPLING 05

GOTO OKAY

ENDIF

DYLCOUNT1 = DYLCOUNT1 + 1

REJECT

OKAY:

LIST BOOKVALUE PAYAMT

Page 401: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–17

Advantage VISION:Excel Stratified Sampling List

The Advantage VISION:Excel Sampling List contains an entry for every valid sampling application submitted to Advantage VISION:Excel. As seen in the following report, it contains the information submitted using the application statements and the calculated values.

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE PERCENTAGE METHOD

LABEL OF FIELD TO BE STRATIFIED BOOKVALUE

STRATUM 1

UPPER LIMIT 51.05

PERCENT OF STRATUM TO SELECT 10.00

STRATUM 2

UPPER LIMIT 175.64

PERCENT OF STRATUM TO SELECT 5.00

STRATUM 3

UPPER LIMIT 5,000.00

PERCENT OF STRATUM TO SELECT 50.50

STRATUM 4 - 100% OF THIS STRATUM WILL BE INCLUDED IN THE SAMPLE

UPPER LIMIT 999,999,999,999,999

PERCENT OF STRATUM TO SELECT 0.00

APPLICATION 5 - STRATIFIED SAMPLING - SIMPLE RANDOM METHOD

LABEL OF FIELD TO BE STRATIFIED PAYAMT

STRATUM 1

UPPER LIMIT 50.44

NO. OF ITEMS IN STRATUM 1,865

NO. OF ITEMS TO SELECT FROM STRATUM 75

STRATUM 2

UPPER LIMIT 250.45

NO. OF ITEMS IN STRATUM 737

NO. OF ITEMS TO SELECT FROM STRATUM 25

STRATUM 3

UPPER LIMIT 900.00

NO. OF ITEMS IN STRATUM 134

NO. OF ITEMS TO SELECT FROM STRATUM 10

STRATUM 4 - 100% OF THIS STRATUM WILL BE INCLUDED IN THE SAMPLE

UPPER LIMIT 999,999,999,999,999

NO. OF ITEMS IN STRATUM 0

NO. OF ITEMS TO SELECT FROM STRATUM 0

Page 402: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–18 Reference Guide

Advantage VISION:Excel File Statistics

The Stratified Sampling Advantage VISION:Excel File Statistics report is a summary total of statements read and number of records written.

11/30/97 VISION:Excel 7.0 FILE STATISTICS PAGE 1

NUMBER OF CARDS READ FROM SYSIN-SYSIPT 38

NUMBER OF PARAMETER CARDS READ 37

NUMBER OF RECORDS WRITTEN TO AUDWORK WORK FILE 59

NUMBER OF RECORDS READ FROM AUDWORK WORK FILE 59

NUMBER OF RECORDS WRITTEN TO VISION:RESULTS PARAMETER FILE 60

NUMBER OF RECORDS WRITTEN TO CONTROL BLOCKS FILE 3

NUMBER OF LINES PRINTED 88

Page 403: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–19

Advantage VISION:Results Stratified Sampling File Statistics

The Advantage VISION:Results file statistics information, as shown in the following report, denotes file identification and record counts in and out.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

ARFILE 2,864 1,008,128

OARFILE 402 141,504

RECORDS PAGES

FILE PRINT 3

REPORT PRINT 5

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

TOTAL NUMBER 01 2,626

TOTAL NUMBER 02

TOTAL NUMBER 03

TOTAL NUMBER 04

TOTAL NUMBER 05

TOTAL NUMBER 06

TOTAL NUMBER 07

TOTAL NUMBER 08

TOTAL NUMBER 09

TOTAL NUMBER 10

RETURN CODE-0000

Page 404: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–20 Reference Guide

Advantage VISION:Excel Stratified Sampling Summary Report

This report contains the original information submitted using the stratified sampling statements, plus values calculated by Advantage VISION:Excel.

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE PERCENTAGE METHOD

ACTUAL POPULATION SIZE 2,864

TOTAL AMOUNT IN POPULATION 471,645.45

STANDARD DEVIATION OF POPULATION 585.51

LABEL OF FIELD STRATIFIED BOOKVALUE

STRATUM 1

UPPER LIMIT OF STRATUM 51.05

PERCENT OF STRATUM TO SELECT 10.00%

ACTUAL NO. OF ITEMS IN STRATUM 1,864 *

ACTUAL NO. OF ITEMS IN SAMPLE 186 *

TOTAL AMOUNT IN STRATUM 34,216.15 *

TOTAL AMOUNT IN SAMPLE 3,457.99 *

STRATUM MEAN 18.36 *

SAMPLE MEAN 18.59 *

STANDARD DEVIATION OF STRATUM 15.44 *

STANDARD DEVIATION OF SAMPLE 16.89 *

STRATUM COEFFICIENT OF VARIATION 0.841 *

SAMPLE COEFFICIENT OF VARIATION 0.909 *

STRATUM 2

UPPER LIMIT OF STRATUM 175.64

PERCENT OF STRATUM TO SELECT 5.00%

ACTUAL NO. OF ITEMS IN STRATUM 649 *

ACTUAL NO. OF ITEMS IN SAMPLE 32 *

TOTAL AMOUNT IN STRATUM 62,159.01 *

TOTAL AMOUNT IN SAMPLE 3,048.19 *

STRATUM MEAN 95.78 *

SAMPLE MEAN 95.26 *

STANDARD DEVIATION OF STRATUM 33.85 *

STANDARD DEVIATION OF SAMPLE 35.46 *

STRATUM COEFFICIENT OF VARIATION 0.353 *

SAMPLE COEFFICIENT OF VARIATION 0.372 *

STRATUM 3

UPPER LIMIT OF STRATUM 5,000.00

PERCENT OF STRATUM TO SELECT 50.50%

ACTUAL NO. OF ITEMS IN STRATUM 337 *

Page 405: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–21

ACTUAL NO. OF ITEMS IN SAMPLE 170 *

TOTAL AMOUNT IN STRATUM 293,769.85 *

TOTAL AMOUNT IN SAMPLE 152,530.04 *

STRATUM MEAN 871.72 *

SAMPLE MEAN 897.24 *

STANDARD DEVIATION OF STRATUM 976.31 *

STANDARD DEVIATION OF SAMPLE 999.28 *

STRATUM COEFFICIENT OF VARIATION 1.120 *

SAMPLE COEFFICIENT OF VARIATION 1.114 *

STRATUM 4 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

PERCENT OF STRATUM TO SELECT 0.00%

ACTUAL NO. OF ITEMS IN STRATUM 14 *

ACTUAL NO. OF ITEMS IN SAMPLE 14 *

TOTAL AMOUNT IN STRATUM 81,500.44 *

TOTAL AMOUNT IN SAMPLE 81,500.44 *

STRATUM MEAN 5,821.46 *

SAMPLE MEAN 5,821.46 *

STANDARD DEVIATION OF STRATUM 0.00 *

STANDARD DEVIATION OF SAMPLE 0.00 *

STRATUM COEFFICIENT OF VARIATION 0.000 *

SAMPLE COEFFICIENT OF VARIATION 0.000 *

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 2

APPLICATION 5 - STRATIFIED SAMPLING - SIMPLE RANDOM METHOD

ACTUAL POPULATION SIZE 2,864

TOTAL AMOUNT IN POPULATION 456,839.34

STANDARD DEVIATION OF POPULATION 558.70

LABEL OF FIELD STRATIFIED PAYAMT

STRATUM 1

UPPER LIMIT OF STRATUM 50.44

ESTIMATED NO. OF ITEMS IN STRATUM 1,865

ACTUAL NO. OF ITEMS IN STRATUM 1,865 *

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 75 *

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 75 *

TOTAL AMOUNT IN STRATUM 34,217.74 *

TOTAL AMOUNT IN SAMPLE 1,299.98 *

STRATUM MEAN 18.35 *

SAMPLE MEAN 17.33 *

STANDARD DEVIATION OF STRATUM 15.42 *

STANDARD DEVIATION OF SAMPLE 16.08 *

STRATUM COEFFICIENT OF VARIATION 0.840 *

SAMPLE COEFFICIENT OF VARIATION 0.928 *

Page 406: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

14–22 Reference Guide

ORIGINAL SEED NUMBER 5,063 *

STRATUM 2

UPPER LIMIT OF STRATUM 250.45

ESTIMATED NO. OF ITEMS IN STRATUM 737

ACTUAL NO. OF ITEMS IN STRATUM 737 *

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 25 *

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 25 *

TOTAL AMOUNT IN STRATUM 80,403.98 *

TOTAL AMOUNT IN SAMPLE 2,906.25 *

STRATUM MEAN 109.10 *

SAMPLE MEAN 116.25 *

STANDARD DEVIATION OF STRATUM 49.02 *

STANDARD DEVIATION OF SAMPLE 50.71 *

STRATUM COEFFICIENT OF VARIATION 0.449 *

SAMPLE COEFFICIENT OF VARIATION 0.436 *

ORIGINAL SEED NUMBER 70,803 *

STRATUM 3

UPPER LIMIT OF STRATUM 900.00

ESTIMATED NO. OF ITEMS IN STRATUM 134 *

ACTUAL NO. OF ITEMS IN STRATUM 134 *

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 10 *

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 10 *

TOTAL AMOUNT IN STRATUM 58,251.69 *

TOTAL AMOUNT IN SAMPLE 4,039.71 *

STRATUM MEAN 434.71 *

SAMPLE MEAN 403.97 *

STANDARD DEVIATION OF STRATUM 193.65 *

STANDARD DEVIATION OF SAMPLE 168.97 *

STRATUM COEFFICIENT OF VARIATION 0.445 *

SAMPLE COEFFICIENT OF VARIATION 0.418 *

ORIGINAL SEED NUMBER 27,849 *

STRATUM 4 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

ESTIMATED NO. OF ITEMS IN STRATUM 0

ACTUAL NO. OF ITEMS IN STRATUM 128 *

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 0 *

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 128 *

TOTAL AMOUNT IN STRATUM 283,965.93 *

TOTAL AMOUNT IN SAMPLE 283,965.93 *

STRATUM MEAN 2,218.48 *

SAMPLE MEAN 2,218.48 *

STANDARD DEVIATION OF STRATUM 1,517.93 *

Page 407: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Implementation of Stratified Sampling

Chapter 14: Stratified Sampling Overview 14–23

STANDARD DEVIATION OF SAMPLE 1,517.93 *

STRATUM COEFFICIENT OF VARIATION 0.684 *

SAMPLE COEFFICIENT OF VARIATION 0.684

ORIGINAL SEED NUMBER

In this report, an asterisk has been placed next to those values calculated during this phase of Advantage VISION:Excel.

Each item is discussed for the first stratum, or Stratum 1, as it appears on the summary report.

You must enter both the Upper Limit of Stratum and Percent of Stratum to Select.

Actual No. of Items In Stratum is the total of all records being stratified whose value is equal to or less than the upper limit for the stratum, but greater than the upper limit for the prior stratum.

Actual No. of Items in Sample is the total number of all selected records for this stratum.

Total Amount in Stratum is the accumulated total value (dollar or numeric) of all records whose value is equal to or less than the upper limit for this stratum, but greater than the upper limit for the previous stratum.

Total Amount in Sample is the accumulated total value (dollar or numeric) of all selected records for this stratum.

Stratum Mean is the Total Amount in Stratum divided by the Actual No. of Items in Stratum.

Sample Mean is the Total Amount in Sample divided by the Actual No. of Items in Sample.

Stratum Coefficient of Variation is the Standard Deviation of Stratum divided by the Stratum Mean.

Sample Coefficient of Variation is the Standard Deviation of Sample divided by the Sample Mean.

For information about the determining formula for Standard Deviation of Stratum and Standard Deviation of Sample, see the appendix “Formulas and Equations Used in Advantage VISION:Excel.”

Page 408: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 409: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 15: Stratified Simple Random Sampling 15–1

Chapter 15: Stratified Simple Random Sampling

This chapter describes stratified simple random sampling and is divided into the following sections:

Definition of stratified simple random sampling

Implementation of stratified simple random sampling

Stratified simple random sampling example

These topics are described in detail, followed by an example, which explains how to implement stratified simple random Sampling with Advantage VISION:Excel.

Definition of Stratified Simple Random Sampling Use stratified simple random sampling if you want to select an unbiased sample from each of two or more sub-populations, known as strata. For example, you have determined that the file you are examining contains dollar values from $200 to $1500.

You also know exactly how many records are in each dollar group.

Based on this, you decide to set up three strata. In Advantage VISION:Excel, a stratum is defined by the upper value with the lower value assumed to be the upper value of the previous stratum. Therefore, the strata could be represented as follows:

Strata Upper Value Description

Stratum 1 $500.00 Includes all records with values from $200.00 to $500.00

Stratum 2 $1000.00 Includes all records with values from $500.01 to $1000.00

Stratum 3 $1500.00 Includes all records with values from $1000.01 to $1500.00

Page 410: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Random Sampling

15–2 Reference Guide

Implementation of Stratified Simple Random Sampling This section describes how to use stratified simple random sampling function. Following major points covered in this section are as follows:

Input to Advantage VISION:Excel

Advantage VISION:Excel Output

Input to Advantage VISION:Excel

You need to provide the following information when using Advantage VISION:Excel's stratified simple random sampling function:

Label or data name of the field that is to be stratified.

Upper limit of each stratum.

Number of items in each stratum.

Number of items to be selected from each stratum.

Syntax of Stratified Simple Random Sampling

The syntax for stratified simple random sampling is as follows:

SAMPLE nn STRATIFIED RANDOM

FIELDNAME dataname [RANDPROG progname [RANDPROGSIZE nn]]

STRATUMn LIMIT nnnnnnnnnnn SIZE nnnnnnn SELECT nnnn

[SEED nnnnnnn]

The keywords are described in the following table:

Keyword Description

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99.

STRATIFIED Required. Defines this sampling as stratified sampling.

RANDOM Required. Defines this stratified sampling as random.

FIELDNAME Required. Enter the label (data name) of the field to be stratified. Define this data name in an Advantage VISION:Results field definition.

Page 411: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Random Sampling

Chapter 15: Stratified Simple Random Sampling 15–3

Keyword Description

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword.

For more information on the linkage between Advantage VISION:Excel and your random number generator, see the appendix "Summary of Advantage VISION:Excel Features."

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program.

STRATUMn Required. Designates the stratum number. n must be from 1–10, starting with STRATUM1.

Note: The remaining statements can be used ten times.

LIMIT Required. This field is the upper limit for STRATUMn. Enter a numeric value from -9,999,999,999 through 99,999,999,999.

This field can contain a leading dollar sign and commas. A floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned.

Negative values must be preceded by a negative sign (-).

A maximum of 11 positions (including digits, decimal point, and minus sign) can be used. No more than nine digits to the right of the decimal point are allowed.

SIZE Required. Specifies the number of items in STRATUMn (the population of each stratum). Enter an integer from 1–9,999,999. This field can contain commas.

SELECT Required. Specifies the number of items to select from STRATUMn (the size of the random sample to be selected).

Enter an integer from 1–9,999. This field can contain commas.

SEED This entry is used to initiate the random number generator process. This integer can be from 1–9,999,999. The default is a number generated by the random number generator.

Page 412: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Random Sampling

15–4 Reference Guide

You need to write an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input and output files and to control when selection logic is performed. To direct the selection flow, you need to use the IF SAMPLING Advantage VISION:Excel command. For more information on free-form keywords, see Free-Form Keywords in the chapter “Introduction.”

Syntax for IF SAMPLING Statement

The IF SAMPLING syntax is shown as follows:

IF SAMPLING 01

GOTO WRT

ELSE

REJECT

ENDIF

You may note the number 01 in the IF SAMPLING statement, refers to the application number 01. This ties this procedure statement to the stratified random sampling statements that also use the application number 01.

When the IF SAMPLING procedure statement is encountered, Advantage VISION:Excel determines whether or not to select the record. For example, if the record is to be selected, a branch to the tag WRT is made. If the record is not selected, the branch REJECT is executed.

Advantage VISION:Excel Output

When your program completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of your Advantage VISION:Excel/Advantage VISION:Results statements (see Stratified Simple Random Sampling Statement Listing, in the section Generated Output for the Example).

The Advantage VISION:Excel Sampling List. This lists the information coded in the stratified simple random statements (see, Stratified Simple Random Sampling List, in the section Generated Output for the Example).

The Advantage VISION:Results file and record count statistics (see Advantage VISION:Results File Statistics, in the section Generated Output for the Example).

The Advantage VISION:Excel Stratified Sampling Summary Report (see Stratified Sampling Summary Report, in the section Generated Output for the Example). This report lists the following:

– The information specified using the stratified simple random statements.

Page 413: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

Chapter 15: Stratified Simple Random Sampling 15–5

– Information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run. This includes:

– Actual population size

– Actual sample size

Stratified Simple Random Sampling Example This section explains how to perform Stratified Simple Random Sampling with the help of an example. The required background information is given in the following section.

Background Information

The auditor wants to create a test file from a production file by selecting an unbiased random sample from each of three strata. The data is defined in the following table:

Stratum Number

Low Value

High Value

Number of Items in Stratum

Number of Items to Select from Stratum

1 less than $51.59 2,551 250

2 $51.60 $190.62 2,290 150

3 $190.63 $384.37 511 25

The randomly selected records are to be written to an output test file after the stratum number is inserted into the record. The file contains fixed length records. The format of the record below only applies to those fields of interest in this example.

Field From To Length Type

Amount 170 174 5 packed

Stratum Number 182 183 2 character

The flowchart for this program is shown in the following section.

Page 414: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

15–6 Reference Guide

Stratified Simple Random Sampling Program Flowchart

Page 415: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

Chapter 15: Stratified Simple Random Sampling 15–7

Stratified Simple Random Sampling Input Statements

The following code shows the Advantage VISION:Excel/Advantage VISION:Results statements necessary to accomplish this task.

FILE PRODFILE INPUT FB 352 5280 1

AREC 352 1 2

AMOUNT 5 170 PD 2 3

STRATANO 2 182 4

FILE SAMPFILE OUTPUT FB 352 5280 FROM PRODFILE 5

SAMPLE 01 STRATIFIED RANDOM 6

FIELDNAME AMOUNT 7

STRATUM1 LIMIT 51.59 SIZE 2551 SELECT 250 8

STRATUM2 LIMIT 190.62 SIZE 2290 SELECT 150 9

STRATUM3 LIMIT 384.37 SIZE 511 SELECT 25 10

IF SAMPLING 01 11

MOVE DYLSP01STN TO STRATANO 12

ACCEPT 13

ELSE 14

REJECT 15

ENDIF 16

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1–4 define the input production file and describe the necessary fields in the input record.

Statement 5 defines the output sampling file.

Statements 6–10 define the stratified simple random sampling statements. The statements define the application number (01), the data name of the field that is to be stratified, the upper limits for each stratum per the specifications of the problem, the number of items in each stratum, and the number of items to be selected from each stratum.

Use Advantage VISION:Results automatic functions for reading and end of file processing and you only need to code the procedure logic statements specified in statements 11–16. The 01 in the IF SAMPLING statement (statement 11) is the sampling application number and ties it directly to sampling statement 6.

If the record is to be included in the sample, the stratum number of the record is moved to the record. Advantage VISION:Excel places the correct stratum number into the reserved word field DYLSP01STN. The ACCEPT statement (statement 13) tells Advantage VISION:Results to complete its automatic cycle by writing the selected record to the output file.

Page 416: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

15–8 Reference Guide

If the record is not to be included in the sample, the REJECT statement (statement 15) tells Advantage VISION:Results to complete its automatic cycle by excluding the writing of the record. The reading of the input file is automatic and continues until the file is exhausted.

The following table shows how the information pertaining to the population as a whole is captured:

Item Coded by User

Accumulated by Advantage VISION:Excel

Calculated by Advantage VISION:Excel

Actual Population Size

Total Amount in Population

Standard Deviation of Population

Label of Field to be Stratified

Upper Limit of Stratum

Estimated Number of Items in Stratum

Actual Number of Items in Stratum

Number of Items to select from Stratum

Actual Number of Items selected from Stratum

Total Amount in Stratum

Total Amount in Sample

Stratum Mean

Sample Mean

Standard Deviation of Stratum

Standard Deviation of Sample

Stratum Coefficient of Variation

Sample Coefficient of Variation

Original Seed Number or

Page 417: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

Chapter 15: Stratified Simple Random Sampling 15–9

Generated Output for the Example

At the end of the processing of the program, Advantage VISION:Excel generates the following output:

Stratified Simple Random Sampling Statement Listing

Stratified Simple Random Sampling List

Vision:Results File Statistics

Stratified Sampling Summary Report

Stratified Simple Random Sampling Statement Listing

The Advantage VISION:Excel/Advantage VISION:Results statements listing appears as follows:

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE PRODFILE INPUT FB 352 5280

AREC 352 1

AMOUNT 5 170 PD 2

STRATANO 2 182

FILE SAMPFILE OUTPUT FB 352 5280 FROM PRODFILE

SAMPLE 01 STRATIFIED RANDOM

FIELDNAME AMOUNT

STRATUM1 LIMIT 51.59 SIZE 2551 SELECT 250

STRATUM2 LIMIT 190.62 SIZE 2290 SELECT 150

STRATUM3 LIMIT 384.37 SIZE 511 SELECT 25

IF SAMPLING 01

MOVE DYLSP01STN TO STRATANO

ACCEPT

ELSE

REJECT

ENDIF

Page 418: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

15–10 Reference Guide

Stratified Simple Random Sampling List

This report shows the Advantage VISION:Excel Sampling List. The information submitted in the stratified simple random statements is listed in this report.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE RANDOM METHOD

LABEL OF FIELD TO BE STRATIFIED AMOUNT

STRATUM 1

UPPER LIMIT 51.59

NO. OF ITEMS IN STRATUM 2,551

NO. OF ITEMS TO SELECT FROM STRATUM 250

STRATUM 2

UPPER LIMIT 190.62

NO. OF ITEMS IN STRATUM 2,290

NO. OF ITEMS TO SELECT FROM STRATUM 150

STRATUM 3

UPPER LIMIT 384.37

NO. OF ITEMS IN STRATUM 511

NO. OF ITEMS TO SELECT FROM STRATUM 25

STRATUM 4 - 100% OF THIS STRATUM WILL BE INCLUDED IN THE SAMPLE

UPPER LIMIT 999,999,999,999,999

NO. OF ITEMS IN STRATUM 0

NO. OF ITEMS TO SELECT FROM STRATUM 0

Page 419: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

Chapter 15: Stratified Simple Random Sampling 15–11

Vision:Results File Statistics

This report shows the record counts accumulated by Advantage VISION:Results.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

PRODFILE 5,427 1,910,304

J

SAMPFILE 500 176,000

RECORDS PAGES

FILE PRINT 1

REPORT PRINT

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Stratified Sampling Summary Report

The information listed on the Stratified Sampling Summary Report for each stratum includes the following:

Information coded in the stratified simple random statements.

Values for the actual population size.

Actual sample size.

For more information on examples of the formulas used by Advantage VISION:Excel, see the appendix “Formulas and Equations Used in Advantage VISION:Excel .”

Page 420: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

15–12 Reference Guide

The report appears as follows:

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE RANDOM METHOD

ACTUAL POPULATION SIZE 5,427

TOTAL AMOUNT IN POPULATION 539,851.91

STANDARD DEVIATION OF POPULATION 402.85

LABEL OF FIELD TO BE STRATIFIED AMOUNT

STRATUM 1

UPPER LIMIT OF STRATUM 51.59

ESTIMATED NO. OF ITEMS IN STRATUM 2,551

ACTUAL NO. OF ITEMS IN STRATUM 2,551

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 250

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 250

TOTAL AMOUNT IN STRATUM 101,538.09

TOTAL AMOUNT IN SAMPLE 10,011.54

STRATUM MEAN 39.80

SAMPLE MEAN 40.05

STANDARD DEVIATION OF STRATUM 9.28

STANDARD DEVIATION OF SAMPLE 9.76

STRATUM COEFFICIENT OF VARIATION 0.233

SAMPLE COEFFICIENT OF VARIATION 0.244

ORIGINAL SEED NUMBER 48,073

STRATUM 2

PER LIMIT OF STRATUM 190.62

ESTIMATED NO. OF ITEMS IN STRATUM 2,290

ACTUAL NO. OF ITEMS IN STRATUM 2,290

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 150

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 150

TOTAL AMOUNT IN STRATUM 142,991.98

TOTAL AMOUNT IN SAMPLE 9,394.80

STRATUM MEAN 62.44

SAMPLE MEAN 62.63

STANDARD DEVIATION OF STRATUM 10.41

STANDARD DEVIATION OF SAMPLE 8.46

STRATUM COEFFICIENT OF VARIATION 0.167

SAMPLE COEFFICIENT OF VARIATION 0.135

ORIGINAL SEED NUMBER 40,737

STRATUM 3

UPPER LIMIT OF STRATUM 384.37

ESTIMATED NO. OF ITEMS IN STRATUM 511

ACTUAL NO. OF ITEMS IN STRATUM 511

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 25

Page 421: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Random Sampling Example

Chapter 15: Stratified Simple Random Sampling 15–13

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 25

TOTAL AMOUNT IN STRATUM 153,419.39

TOTAL AMOUNT IN SAMPLE 7,643.73

STRATUM MEAN 300.23

SAMPLE MEAN 305.75

STANDARD DEVIATION OF STRATUM 44.56

STANDARD DEVIATION OF SAMPLE 49.32

STRATUM COEFFICIENT OF VARIATION 0.148

SAMPLE COEFFICIENT OF VARIATION 0.161

ORIGINAL SEED NUMBER 12,897

STRATUM 4 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

ESTIMATED NO. OF ITEMS IN STRATUM 0

ACTUAL NO. OF ITEMS IN STRATUM 75

DESIRED NO. OF ITEMS TO SELECT FROM STRATUM 0

ACTUAL NO. OF ITEMS SELECTED FROM STRATUM 75

TOTAL AMOUNT IN STRATUM 141,902.45

TOTAL AMOUNT IN SAMPLE 141,902.45

STRATUM MEAN 1,892.03

SAMPLE MEAN 1,892.03

STANDARD DEVIATION OF STRATUM 2,841.23

STANDARD DEVIATION OF SAMPLE 2,841.23

STRATUM COEFFICIENT OF VARIATION 1.502

SAMPLE COEFFICIENT OF VARIATION 1.502

ORIGINAL SEED NUMBER

In this report, note that although you asked for three strata, a fourth stratum was also generated. Advantage VISION:Excel automatically generates an additional top stratum to allow for any records whose values are greater than the greatest user-specified stratum. All records that fall into the top stratum are accepted as part of the top stratum sample.

Therefore, in the example, 75 records fell into the top stratum and exactly 75 records were included in the sample for stratum 4.

If the Actual Number of Items in Stratum is not equal to the Estimated Number of Items in Stratum, the Number of Items to select from stratum might not be equal to the Actual Number of Items Selected from Stratum. Consequently, you must input the correct Number of Items in Stratum.

Page 422: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 423: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 16: Stratified Simple Percentage Sampling 16–1

Chapter 16: Stratified Simple Percentage Sampling

This chapter describes stratified simple percentage sampling and is divided into the following sections:

Definition of stratified simple percentage sampling

Implementation of stratified simple percentage sampling

Stratified simple percentage sampling example

These topics are described in detail, followed by an example, which explains how to implement stratified simple percentage sampling with Advantage VISION:Excel.

Definition Stratified Simple Percentage Sampling You can use stratified simple percentage sampling if you want to select a percentage of records from two or more sub-populations, known as strata. You can select items with values that do not vary from each other greatly by specifying an upper limit for each stratum, as well as a percentage of records to be selected from each stratum.

For example, you have determined, after running a Frequency Distribution Report, which the file you are examining clusters around the dollar values of $100 to $500; also, from the Frequency Distribution Report, you know exactly how many records are in each dollar group. Based on this, you decide to set up five strata. In Advantage VISION:Excel, a stratum is defined by the upper value, with the lower value assumed to be the upper value of the previous stratum.

Page 424: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Percentage Sampling

16–2 Reference Guide

Therefore, the strata could be represented as follows:

Strata Upper Value

Description

Stratum 1 99.99 Includes all records with values from $00.01 to $99.99.

Stratum 2 200.00 Includes all records with values from $100.00 to $200.00

Stratum 3 300.00 Includes all records with values from $200.01 to $300.00.

Stratum 4 400.00 Includes all records with values from $300.01 to $400.00.

Stratum 5 500.00 Includes all records with values from $400.01 to $500.00.

Once you have defined the upper limits, decide what percentage of each stratum you would like selected. Advantage VISION:Excel accomplishes this using an interval selection technique. For example, 5.0 percent would be every twentieth record, 10.0 percent would be every tenth record, and 25.0 percent would be every fourth record.

Implementation of Stratified Simple Percentage Sampling This section describes how to use stratified simple percentage sampling function. Following major points covered in this section are as follows:

Input to Advantage VISION:Excel

Advantage VISION:Excel Output

Input to Advantage VISION:Excel

You need to provide the following information when using Advantage VISION:Excel’s stratified simple percentage sampling function:

Label or data name of the field that is to be stratified

A stratum (its upper limit)

Percent of stratum to be selected for each stratum

Page 425: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Percentage Sampling

Chapter 16: Stratified Simple Percentage Sampling 16–3

Syntax For Stratified Simple Percentage Sampling

The syntax for stratified simple percentage sampling is as follows:

SAMPLE nn STRATIFIED PERCENTAGE

FIELDNAME dataname

STRATUMn LIMIT nnnnnnnnnnn nnn.nn[%]

The keywords associated with the command are described in the following table:

Keyword Description

SAMPLE Required. Defines the application as sampling.

nn Required. A unique application number from 01–99

STRATIFIED Required. Defines this sampling as stratified sampling.

PERCENTAGE Required. Defines this as stratified simple percentage sampling.

FIELDNAME Required. Enter the label (data name) of the field to be stratified. Define this data name in an Advantage VISION:Results field definition.

STRATUMn Required. Designates the stratum number. n must be from 1–10, starting with STRATUM1.

Note: The remaining statements can be used ten times.

LIMIT Required. This field is the upper limit for STRATUMn. Enter a numeric value from -9,999,999,999 through 99,999,999,999.

This field can contain a leading dollar sign and commas. A floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned. Negative values must be preceded by a negative sign (-).

A maximum of 11 positions (including digits, decimal point, and minus sign) can be used. No more than nine digits to the right of the decimal point are allowed.

nnn.nn[%] Required. Specifies the percent of the stratum to be selected from STRATUMn. The percent sign is optional. The decimal point is required, and the percent for each stratum can never exceed 100.00 percent.

You need to code an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input and output files and to control when selection logic is to be performed.

For more information on free-form keywords, see Free-Form Keywords, in the chapter “Inroduction.” The following section explains the control logic.

Page 426: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementation of Stratified Simple Percentage Sampling

16–4 Reference Guide

Syntax for IF SAMPLING Statement

The IF SAMPLING is used to direct the selection flow, as shown here.

IF SAMPLING 01

GOTO WRT

ELSE

REJECT

ENDIF

The application code 01 ties this IF SAMPLING statement to the simple percentage statements that also use the application number 01.

When the IF SAMPLING statement is encountered, Advantage VISION:Excel determines whether to select the record. For example, if the record is to be selected, a branch to the tag WRT is made. If the record is not to be selected, the branch REJECT is executed.

Advantage VISION:Excel Output

When your program completes successfully, Advantage VISION:Excel produces the following output:

A statement listing of the Advantage VISION:Excel/Advantage VISION:Results program. For example, Stratified Simple Percentage Sampling Statement Listing, shown in the section Generated Output for the Example.

The Advantage VISION:Excel Sampling List. This lists the information coded in the simple percentage sampling statements. For example, Stratified Simple Percentage Sampling List, in the section, Generated Output for the Example.

The Advantage VISION:Results file and record count statistics. For example, the Advantage VISION:Results File Statistics, shown in the section, Generated Output for the Example.

The Advantage VISION:Excel Stratified Sampling Summary Report. For example, the Stratified Simple Percentage Sampling-Selected Records, shown in the section, Generated Output for the Example. This report lists the following:

– The information specified using the percentage sampling input statements.

– Information pertaining to the actual Advantage VISION:Results/Advantage VISION:Excel portion of the run. This includes:

– Actual population size

– Actual sample size

Page 427: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

Chapter 16: Stratified Simple Percentage Sampling 16–5

Stratified Simple Percentage Sampling Example This section explains how to perform Stratified Simple Random Sampling with the help of an example. The required background information is given in the following section.

Background Information

Assume that you know very little about the population except that there are many different models of Mod-Peds now being sold by company XYZ. To get a feel for the population, you have decided to examine the entire database of information using the Advantage VISION:Excel frequency distribution function. From this Frequency Distribution Report, you determine that the entire population could be divided into four different strata, as shown in the following table:

Stratum Number

Low Value High Value Percent to be Selected from

Stratum

1 $199.99 $299.99 10%

2 $300.00 $499.99 20%

3 $500.00 $799.99 10%

4 $800.00 $999.99 100%

The selected records are to be written to an output file, as well as printed on a report. The input file contains fixed length records. The format of the following record is only for those fields that are to be printed on your report.

Field From To Length Type Decimal

Amount 170 174 5 packed 2

Account Code 182 183 2 character

Account Number 182 183 2 numeric

The report format is to be as follows:

COMPANY XYZ STRATA SEPARATION

STRATA NUMBER AMOUNT ACCOUNT CODE ACCOUNT NUMBER

XX XXX.XX XX XXXXXXX

XX XXX.XX XX XXXXXXX

Page 428: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

16–6 Reference Guide

The example in flowchart format is shown in the following section.

Stratified Simple Percentage Sampling Program Flowchart

Page 429: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

Chapter 16: Stratified Simple Percentage Sampling 16–7

Stratified Simple Percentage Sampling Input Statements

The following code shows the Advantage VISION:Excel/Advantage VISION:Results statements necessary to accomplish this task.

FILE PRODFILE INPUT FB 352 5280 1

AREC 352 1 2

AMOUNT 5 170 PD 2 A (AMOUNT) 3

CCTNO 7 4 (ACCOUNT'NUMBER) 4

ACCTCODE 2 182 (ACCOUNT'CODE) 5

FILE SAMPFILE OUTPUT FB 352 5280 FROM PRODFILE 6

SAMPLE 01 STRATIFIED PERCENTAGE 7

FIELDNAME AMOUNT 8

STRATUM1 LIMIT 299.99 10.00% 9

STRATUM2 LIMIT 499.99 20.00% 10

STRATUM3 LIMIT 799.99 10.00% 11

STRATUM4 LIMIT 999.99 100.00% 12

IF SAMPLING 01 13

LIST DYLSP01STN (STRATUM'NUMBER) AMOUNT 14

ACCTCODE ACCTNO 15

ACCEPT 16

ELSE 17

REJECT 18

ENDIF 19

T1 'COMPANY XYZ STRATA SEPARATION' WITH 2 AFTER 20

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements.

Statements 1–5 define the input production file and the pertinent fields in the record.

Statement 6 defines the output file. Each record to be included in this file is written from the PRODFILE input record area

Statements 7–12 define the stratified simple percentage statements: the application number (01), the data name of the field to be stratified, the upper limits per the specifications of the example, and the percent to be selected, respectively, for each of the four strata.

Statements 13–19 are the procedural logic for the sampling example.

Page 430: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

16–8 Reference Guide

Use Advantage VISION:Results automatic functions for reading and end of file processing; you need only supply the sampling logic. The 01 in the IF SAMPLING statement (statement 13) is the sampling application number; it is directly associated with the sampling application number in statement 7.

If the record is to be included in the sample, it is listed in report format and written to the sample file as part of Advantage VISION:Results ACCEPT path of its automatic cycle. Otherwise, the record is rejected (meaning that it is neither listed nor written to the sample file).

Note that the DYLSP01STN field in the LIST statement (statement 14) contains the stratum number of the stratum in which the record belongs.

Statement 20 defines the title of the report.

Generated Output for the Example

After processing of the program, Advantage VISION:Excel generates the following output:

Stratified Simple Percentage Sampling Statement Listing

Stratified Simple Percentage Sampling List

Advantage VISION:Results File Statistics

Stratified Sampling Summary Report

Stratified Simple Percentage Sampling-Selected Records

Page 431: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

Chapter 16: Stratified Simple Percentage Sampling 16–9

Stratified Simple Percentage Sampling Statement Listing

This report shows a listing of the input submitted to the Advantage VISION:Excel

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

FILE PRODFILE INPUT FB 352 5280

AREC 352 1

AMOUNT 5 170 PD 2 A (AMOUNT)

ACCTNO 7 4 (ACCOUNT'NUMBER)

ACCTCODE 2 182 (ACCOUNT'CODE)

FILE SAMPFILE OUTPUT FB 352 5280 FROM PRODFILE

SAMPLE 01 STRATIFIED PERCENTAGE

FIELDNAME AMOUNT

STRATUM1 LIMIT 299.99 10.00%

STRATUM2 LIMIT 499.99 20.00%

STRATUM3 LIMIT 799.99 10.00%

STRATUM4 LIMIT 999.99 100.00%

IF SAMPLING 01

LIST DYLSP01STN (STRATUM'NUMBER) AMOUNT

ACCTCODE ACCTNO

ACCEPT

ELSE

REJECT

ENDIF

T1 'COMPANY XYZ STRATA SEPARATION' WITH 2 AFTER

Stratified Simple Percentage Sampling List

This report shows the Advantage VISION:Excel Sampling List. The information submitted in the simple percentage sampling statements is listed in this report.

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE PERCENTAGE METHOD

LABEL OF FIELD TO BE STRATIFIED AMOUNT

STRATUM 1

UPPER LIMIT 299.99

PERCENT OF STRATUM TO SELECT 10.00

STRATUM 2

Page 432: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

16–10 Reference Guide

UPPER LIMIT 499.99

PERCENT OF STRATUM TO SELECT 20.00

STRATUM 3

UPPER LIMIT 799.99

PERCENT OF STRATUM TO SELECT 10.00

STRATUM 4

UPPER LIMIT 999.99

PERCENT OF STRATUM TO SELECT 100.00

STRATUM 5 - 100% OF THIS STRATUM WILL BE INCLUDED IN THE SAMPLE

UPPER LIMIT 999,999,999,999,999

PERCENT OF STRATUM TO SELECT 0.00

Advantage VISION:Results File Statistics

This report shows the record counts accumulated by Advantage VISION:Results.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

A

PRODFILE 19,873 6,995,296

J

SAMPFILE 2,144 754,688

RECORDS PAGES

FILE PRINT 1

REPORT PRINT 43

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 433: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

Chapter 16: Stratified Simple Percentage Sampling 16–11

Stratified Sampling Summary Report

This report shows the Stratified Sampling Summary Report. The information listed on this report for each stratum includes the following:

Information coded in the percentage sampling statements.

Values for the actual population size.

Actual sample size.

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE PERCENTAGE METHOD

ACTUAL POPULATION SIZE 19,873

TOTAL AMOUNT IN POPULATION 678,063.26

STANDARD DEVIATION OF POPULATION 161.70

LABEL OF FIELD TO BE STRATIFIED AMOUNT

STRATUM 1

UPPER LIMIT OF STRATUM 299.99

PERCENT OF STRATUM TO SELECT 10.00%

ACTUAL NO. OF ITEMS IN STRATUM 19,696

ACTUAL NO. OF ITEMS IN SAMPLE 1,969

TOTAL AMOUNT IN STRATUM 386,423.33

TOTAL AMOUNT IN SAMPLE 38,059.35

STRATUM MEAN 19.62

SAMPLE MEAN 19.33

STANDARD DEVIATION OF STRATUM 39.22

STANDARD DEVIATION OF SAMPLE 38.27

STRATUM COEFFICIENT OF VARIATION 1.999

SAMPLE COEFFICIENT OF VARIATION 1.980

STRATUM 2

UPPER LIMIT OF STRATUM 499.99

PERCENT OF STRATUM TO SELECT 20.00%

ACTUAL NO. OF ITEMS IN STRATUM 1

ACTUAL NO. OF ITEMS IN SAMPLE 0

TOTAL AMOUNT IN STRATUM 305.96

TOTAL AMOUNT IN SAMPLE 0.00

STRATUM MEAN 305.96

SAMPLE MEAN 0.00

STANDARD DEVIATION OF STRATUM 0.00

STANDARD DEVIATION OF SAMPLE 0.00

STRATUM COEFFICIENT OF VARIATION 0.000

SAMPLE COEFFICIENT OF VARIATION 0.000

STRATUM 3

UPPER LIMIT OF STRATUM 799.99

Page 434: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

16–12 Reference Guide

PERCENT OF STRATUM TO SELECT 10.00%

ACTUAL NO. OF ITEMS IN STRATUM 1

ACTUAL NO. OF ITEMS IN SAMPLE 0

TOTAL AMOUNT IN STRATUM 782.03

TOTAL AMOUNT IN SAMPLE 0.00

STRATUM MEAN 782.03

SAMPLE MEAN 0.00

STANDARD DEVIATION OF STRATUM 0.00

STANDARD DEVIATION OF SAMPLE 0.00

STRATUM COEFFICIENT OF VARIATION 0.000

SAMPLE COEFFICIENT OF VARIATION 0.000

STRATUM 4

UPPER LIMIT OF STRATUM 999.99

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 4

ACTUAL NO. OF ITEMS IN SAMPLE 4

TOTAL AMOUNT IN STRATUM 3,711.53

TOTAL AMOUNT IN SAMPLE 3,711.53

STRATUM MEAN 927.88

SAMPLE MEAN 927.88

STANDARD DEVIATION OF STRATUM 47.96

STANDARD DEVIATION OF SAMPLE 47.96

STRATUM COEFFICIENT OF VARIATION 0.052

SAMPLE COEFFICIENT OF VARIATION 0.052

STRATUM 5 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

PERCENT OF STRATUM TO SELECT 0.00%

ACTUAL NO. OF ITEMS IN STRATUM 171

ACTUAL NO. OF ITEMS IN SAMPLE 171

TOTAL AMOUNT IN STRATUM 286,840.41

TOTAL AMOUNT IN SAMPLE 286,840.41

STRATUM MEAN 1,677.43

SAMPLE MEAN 1,677.43

338.23

STANDARD DEVIATION OF SAMPLE 338.23

STRATUM COEFFICIENT OF VARIATION 0.202

SAMPLE COEFFICIENT OF VARIATION 0.202

Also, note that a fifth stratum was created, including all values equal to or greater than $1000.00. The generation of this nth stratum is an automatic feature of Advantage VISION:Excel.

Page 435: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Simple Percentage Sampling Example

Chapter 16: Stratified Simple Percentage Sampling 16–13

For examples of the formulas used by Advantage VISION:Excel, see the appendix “Formulas and Equations Used in Advantage VISION:Excel.”

Stratified Simple Percentage Sampling-Selected Records

This report is a partial listing of the records selected for the sample.

COMPANY XYZ STRATA SEPARATION

STRATUM AMOUNT ACCOUNT ACCOUNT NUMBER CODE NUMBER

1 3.80 FO 6024963

4 848.71 KO 2005131

5 1,702.42 KO 1014021

1 34.24 KO 6042325

1 20.44 KO 7029926

1 11.20 MA 9017828

1 11.20 MA 7004753

5 1,108.92 MA 2006286

5 3,886.33 MA 2013568

1 124.95 MA 2008831

1 30.00 MA 6105629

1 4.25 MA 6096859

4 843.74 MA 1013637

4 855.22 MA 1014617

1 8.06 MA 1002775

5 1,142.31 MF 1013904

1 140.00 MI 6008321

5 2,541.70 MO 2002922

1 15.00 MO 6204384

1 176.00 MU 6105904

2 310.75 NA 6027989

1 35.00 NA 8003173

1 40.40 PO 7064535

1 65.00 RO 8031126

5 1,460.61 TO 2010933

5 5,292.24 TO 2000504

1 57.50 WO 8011699

1 11.20 WO 7090943

1 .00 WO 6044832

Page 436: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 437: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 17: Stratified Mean Estimation Sampling 17–1

Chapter 17: Stratified Mean Estimation Sampling

This chapter describes stratified mean estimation sampling and is divided into the following sections:

Definition of Stratified Mean Estimation Sampling

Implementing Stratified Mean Estimation Sampling

Stratified Mean Estimation Sampling Example

These topics are described in detail, followed by an example, which explains how to use Stratified Mean Estimation Sampling with Advantage VISION:Excel.

Definition of Stratified Mean Estimation Sampling You can use stratified mean estimation sampling to estimate the total value of a population; you can only use stratified mean estimation sampling if a value can be associated with each item in that population. Perform the follow steps:

1. Divide the population into homogeneous sub-populations, known as strata.

2. Extract a sample from each stratum and evaluate it according to the techniques used in the Estimation Sampling of Values method. For more information, see the chapter “Estimation Sampling of Values.”

3. Estimate the mean value of each stratum from the stratum sample.

4. Multiply the mean value by the number of items in the stratum to calculate the total estimated value of the stratum.

5. Combine the estimated values of each stratum to determine the total estimated value of the population.

You can use stratified mean estimation sampling if the recorded or unaudited total value of the population (referred to as the recorded total value) is either known or unknown.

If the recorded total value is unknown, use stratified mean estimation sampling both to estimate the total value of the population and to specify the precision of that estimate.

Page 438: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Stratified Mean Estimation Sampling

17–2 Reference Guide

If the recorded total value is known, be aware of the following populations:

Population of originating documents (referred to as the originating population).

Population of records on a computerized file (referred to as the recorded population) that represents the contents of the originating population.

Under ideal conditions, the recorded population identically reflects the values of the originating population. Because, unfortunately, this ideal condition rarely occurs, the recorded population is audited to determine how well the values in the file actually match the values in the originating population. If the recorded population is truly representative of the originating population, you can be reasonably certain that the total value of the recorded population is close to the total value of the originating population.

The total value of the recorded population file is easily obtained by processing the records using a computer program to accumulate the values. However, the total value of the originating population is not easily obtainable because the accumulation of this value normally entails an enormous amount of manual effort.

In this case, stratified mean estimation sampling is used to estimate the total value of the originating population and to specify the total monetary precision of that estimate. Once the estimated value of the originating population is determined, a decision about the reasonableness of the total value of the recorded population can be made.

Because Advantage VISION:Excel is a computerized system, it must process data that is in a computerized form. Therefore, Advantage VISION:Excel randomly selects stratum samples from the recorded population. Each item in each stratum sample must be matched to an item in the originating population. This procedure creates the audited stratum samples.

Note: When using this method, you must assume that each item in the originating population is represented by only one item in the recorded population. It is the responsibility of the auditor to make certain that this assumption holds true for any situation in which Advantage VISION:Excel's stratified mean estimation sampling function is used.

Page 439: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Stratified Mean Estimation Sampling

Chapter 17: Stratified Mean Estimation Sampling 17–3

Implementing Stratified Mean Estimation Sampling This section describes how to use stratified mean estimation sampling function. The major points covered in this section are as follows:

Required input to Advantage VISION:Excel

Using the guidelines

Required Input to Advantage VISION:Excel

This section explains the sampling command statement and all the keywords associated with it. The syntax is given in the following section.

Syntax for Stratified Mean Estimation Sampling

The syntax for stratified mean estimation sampling is shown as follows:

SAMPLE nn STRATIFIED MEAN

POPULATION [SIZE] nnnnnnnnn CONFIDENCE [LEVEL] nn.n[%]

[ONESIDED | TWOSIDED] FIELDNAME dataname

UNIT [PRECISION] [LIMIT] nnnnnnnnnnn

[RANDPROG progname [RANDPROGSIZE nn]]

STRATUMn LIMIT nnnnnnnnnnn SIZE nnnnnn

DEVIATION nnnnnnnnnnn [SEED] nnnnnnn

The keywords for this command are described in the following table:

Keyword Description

SAMPLE Required. Defines the application as sampling

nn Required. A unique application number from 01–99.

STRATIFIED Required. Defines this sampling as stratified sampling.

MEAN Required. Defines this stratified sampling as mean.

POPULATION Required. Specify the population size of the file, either estimated or exact. The keyword SIZE is optional. Enter an integer value from 1–999,999,999. This field can contain commas. The value cannot be zero.

CONFIDENCE Required. Defines the confidence level. The keyword LEVEL and the percent sign are optional. Enter a value up to 99.9 percent. The value cannot be zero, and the decimal is required. Normally, this value is greater than 80 percent.

Page 440: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Stratified Mean Estimation Sampling

17–4 Reference Guide

Keyword Description

ONESIDED |

TWOSIDED

Specifies the type of confidence level wanted. Enter ONESIDED (upper bounds of the percentage), TWOSIDED (upper and lower bounds of the percentage), or leave blank; the default is ONESIDED.

FIELDNAME Required. Enter the label (data name) of the field to be stratified. Define this data name in an Advantage VISION:Results field definition.

UNIT Required. Defines the unit precision limit. The keywords PRECISION and LIMIT are optional. Enter a positive value no greater than 99,999,999,999.

This field can contain a decimal point and commas. If no decimal point is specified, it is assumed to be right-aligned. The value cannot be zero. A maximum of 11 positions (including digits and decimal point) can be used. No more than nine digits to the right of the decimal point are allowed.

RANDPROG If you want to use your own random number generator instead of Advantage VISION:Excel's, enter the name of your random number generator program after the RANDPROG keyword. Appendix D describes the linkage between Advantage VISION:Excel and your random number generator.

RANDPROGSIZE VSE only. Enter the memory size required for the user random number generator program.

STRATUMn Required. Designates the stratum number. n must be from 1–10, starting with STRATUM1.

Note: The remaining statements can be used ten times.

LIMIT Required. This field is the upper limit for STRATUMn. Enter a numeric value from -9,999,999,999 through 99,999,999,999. This field can contain a dollar sign and commas.

A floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned. A negative sign must precede negative values (–). A maximum of 11 positions (including digits, decimal point, and minus sign) can be used. No more than nine digits to the right of the decimal point are allowed.

SIZE Required. Specifies the number of items in STRATUMn. An integer value from 1–999,999. The value cannot be zero.

Page 441: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Stratified Mean Estimation Sampling

Chapter 17: Stratified Mean Estimation Sampling 17–5

Keyword Description

DEVIATION Required. Defines the standard deviation of STRATUMn. Enter a positive numeric value no greater than 9,999,999,999. This field can contain a dollar sign and commas.

A floating decimal point is assumed and, if no decimal point is specified, the floating decimal point is assumed to be right-aligned. The value cannot be zero. A maximum of ten positions (including digits and decimal point) can be used. No more than nine to the right of the decimal point are allowed.

SEED This entry is used to initiate the random number generator process. This number can be from 1–9,999,999. The default is a number generated by the random number generator.

You need to code an Advantage VISION:Excel/Advantage VISION:Results program to control the flow of your input and output files and to control when selection logic is performed. For more information on free-form keywords, see Free-Form Keywords in the chapter “Introduction.”

Using the Guidelines

Perform the following steps to use stratified mean estimation sampling in Advantage VISION:Excel:

1. Determine your sampling objectives.

2. Define the population.

3. Define the field containing the value you are seeking in each item.

4. Generate a Frequency Distribution Report to determine the population distribution. If the coefficient of variation is less than .9, stratification may not be necessary.

5. Decide on the number of strata you would like to divide the population into.

6. Using the Frequency Distribution Report, determine:

– Population size

– Upper limits for strata

7. With the strata as defined in step 6, determine the standard deviation of each stratum by generating the Stratified Sampling Summary Report associated with the stratified sampling - simple percentage method. From this report, determine the following:

– Number of items in each stratum

– Standard deviation of each stratum

Page 442: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Implementing Stratified Mean Estimation Sampling

17–6 Reference Guide

8. Specify the following information dependent on your sound judgment:

– Confidence level

– Unit precision limit

9. Code an Advantage VISION:Results program and the stratified sampling-mean estimation method statements to control the flow of your input/output files and to specify when you want the sampling logic to be executed. Additionally, verify that each originating item is represented once and only once as a recorded item.

10. Submit the Advantage VISION:Excel/Advantage VISION:Results program to Advantage VISION:Excel, which selects a proper sample for each stratum and generates the Stratified Sampling Summary Report.

11. Examine each stratum sample, replacing recorded values with originating values. This procedure provides the audited stratum samples.

12. Generate a Frequency Distribution Report for each audited stratum sample.

13. From the Frequency Distribution Reports, you get:

– Mean of each audited stratum sample.

– Standard deviation of each audited stratum sample.

14. From the Stratified Sampling Summary Report, you get:

– Number of items in each stratum.

– Number of items in each stratum sample.

15. Evaluate the results.

The total estimated value of the originating population is calculated by the formula,

, where,

T — is the total estimated value of the originating population.

Ni — is the number of items in the ith stratum.

Mi — is the mean of the ith audited stratum sample.

Page 443: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–7

The adjusted total monetary precision is calculated by the formula

, where,

P — is the adjusted total monetary precision.

Ni — is the number of items in the ith stratum.

ni — is the number of items in the ith stratum sample.

Si — is the standard deviation of the ith audited stratum sample.

Z — is the Z factor that ties the confidence level to the normal distribution curve.

Stratified Mean Estimation Sampling Example This section walks you through a real-life example of the principles described in this chapter.

Background Information

A company, named Great American Electrical and Appliance Outlet (GAEAO), records the inventory purchases, on an automated file. These records stored in the file are used for accounting purposes. The company uses the following procedure to verify that the total amount of purchases as recorded on that automated file is reasonable:

The purchasing department fills out a purchase order in triplicate. The original is sent to the vendor. The second copy is sent to the receiving department, and the third copy is filed in the purchasing department.

As each inventory item comes in, the receiving department checks the merchandise being received. If the merchandise is in acceptable condition, the receiving clerk verifies that the vendor's shipping invoice matches the items being received. Each item is correlated on the vendor's invoice with an entry in the originating purchase orders. A sequential purchase number is assigned to each item on the vendor's invoice that was accepted by the receiving department. The vendor's invoice is sent to the data processing department.

For each entry on the vendor's shipping invoice accepted by the receiving department, the data processing department prepares and enters one record to the automated file. The vendor's shipping invoice is sent to the purchasing department, where it is filed in sequential order.

Page 444: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–8 Reference Guide

For auditing purposes, you are interested in only the following fields in the automated record, as shown in the following table.

Field From To Length Type

Purchase Number 1 4 4

Recorded Value of Item 55 59 5 packed

Determining the Proper Sampling Method to Use

Because you want to determine the reasonableness of the total recorded value as represented on the automated file, you can use one of the following sampling methods:

Estimation sampling of values

Stratified sampling-mean estimation method

To determine which sampling method to use and also to become familiar with the distribution of the population, you need to generate first run an Advantage VISION:Excel Frequency Distribution Report, as shown in the section Frequency Distribution Report.

Generating Frequency Distribution Report

The Advantage VISION:Excel/Advantage VISION:Results program used to generate the Frequency Distribution Report is shown as follows:

FILE PURCFILE INPUT FB 352 5280

BOOKAMT 5 55 PD 2

FREQ 01 LOGARITHMIC

DISTFIELD BOOKAMT

FREQUENCY 01

For more information about generating a Frequency Distribution Report, see the chapter “Frequency Distribution Reporting.”

Page 445: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–9

Frequency Distribution Report

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

------ R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

50.00- 40.01- 1 0.02 43.54- 0.01- 43.54- 0.00 3.16

40.00- 30.01- 3 0.06 105.30- 0.02- 35.10- 2.11 8.63

30.00- 20.01- 0 0.00 0.00 0.00 0.00 0.00 8.63

20.00- 10.01- 2 0.04 28.49- 0.01- 14.25- 1.68 13.10

10.00- 9.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

9.00- 8.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

8.00- 7.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

7.00- 6.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

6.00- 5.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

5.00- 4.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

4.00- 3.01- 1 0.02 3.64- 0.00 3.64- 0.00 14.09

3.00- 2.01- 0 0.00 0.00 0.00 0.00 0.00 14.09

2.00- 1.01- 0 0.00 0.00 0.00 0.00 0.00 14.09

1.00- 0.01- 0 0.00 0.00 0.00 0.00 0.00 14.09

0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 14.09

0.01 0.99 1 0.02 0.45 0.00 0.45 0.00 15.08

1.00 1.99 0 0.00 0.00 0.00 0.00 0.00 15.08

2.00 2.99 1 0.02 2.16 0.00 2.16 0.00 16.07

3.00 3.99 1 0.02 3.88 0.00 3.88 0.00 17.06

4.00 4.99 1 0.02 4.63 0.00 4.63 0.00 18.05

5.00 5.99 0 0.00 0.00 0.00 0.00 0.00 18.05

6.00 6.99 0 0.00 0.00 0.00 0.00 0.00 18.05

7.00 7.99 0 0.00 0.00 0.00 0.00 0.00 18.05

8.00 8.99 2 0.04 17.10 0.00 8.55 0.23 19.46

9.00 9.99 0 0.00 0.00 0.00 0.00 0.00 19.46

10.00 19.99 73 1.35 1175.81 0.22 16.11 2.25 46.46

20.00 29.99 302 5.56 8102.13 1.50 26.83 2.29 101.39

30.00 39.99 684 12.60 24571.76 4.55 35.92 3.05 184.05

40.00 49.99 1277 23.53 57583.05 10.67 45.09 2.84 297.00

50.00 59.99 1341 24.71 73975.04 13.70 55.16 2.91 412.74

60.00 69.99 746 13.75 47785.18 8.85 64.06 3.07 499.07

Page 446: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–10 Reference Guide

70.00 79.99 310 5.71 22756.62 4.22 73.41 2.24 554.72

80.00 89.99 83 1.53 6954.49 1.29 83.79 2.39 583.52

90.00 99.99 4 0.07 376.33 0.07 94.08 1.13 589.84

100.00 199.99 9 0.17 1593.99 0.30 177.11 13.41 619.84

200.00 299.99 252 4.64 66351.31 12.29 263.30 26.90 778.58

300.00 399.99 275 5.07 93551.69 17.33 340.19 25.80 944.40

400.00 499.99 13 0.24 5593.33 1.04 430.26 26.40 980.45

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 980.45

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 980.45

700.00 799.99 0 0.00 0.00 0.00 0.00 0.00 980.45

800.00 899.99 4 0.07 3349.39 0.62 873.32 25.19 1000.00

900.00 999.99 7 0.13 6878.95 1.27 982.71 12.06 1026.91

1000.00 1999.99 22 0.41 26643.64 4.94 1211.07 222.95 1219.95

2000.00 2999.99 2 0.04 4860.33 0.90 2430.17 116.59 1219.95

3000.00 3999.99 0 0.00 0.00 0.00 0.00 0.00 1219.95

4000.00 4999.99 0 0.00 0.00 0.00 0.00 0.00 1219.95

5000.00 5999.99 1 0.02 5728.05 1.06 5728.05 0.00 1251.57

6000.00 6999.99 2 0.04 12620.85 2.34 6310.43 171.29 1296.29

7000.00 7999.99 1 0.02 7831.57 1.45 7831.57 0.00 1327.91

8000.00 8999.99 1 0.02 8950.86 1.66 8950.86 0.00 1359.53

9000.00 9999.99 1 0.02 9195.01 1.70 9195.01 0.00 1391.15

10000.00 19999.99 4 0.07 43575.38 8.07 10893.85 476.96 1591.15

TOTAL 5427 100.00 539851.91 100.00

MEAN = 99.98 STANDARD ERROR OF THE MEAN = 5.468

STANDARD DEVIATION = 402.85 COEFFICIENT OF VARIATION = 4.050

MINIMUM VALUE = 43.54- MAXIMUM VALUE 11667.35

Note that the coefficient of variation, shown in the Frequency Distribution Report, is 4.050.

Adhere to the following guidelines to determine which sampling method to use, based on the value of the coefficient of variation:

If the coefficient of variation is less than 0.5, the estimation sampling of values method can be used. It is not necessary to stratify the population.

If the coefficient of variation is greater than 0.9, the stratified sampling-mean estimation method should be used.

If the coefficient of variation is between 0.5 and 0.9, either method can be used. The decision is left to your discretion.

The coefficient of variation in the example is 4.050 — much greater than 0.9. Therefore, use the stratified sampling-mean estimation method.

Page 447: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–11

Stratifying the Population

The next task is to stratify the population. Looking at the Frequency Distribution Report, note that seven (1 + 3 + 2 + 1) of the records contain negative amounts. Additionally, ten (1 + 2 + 1 + 1 + 1 + 4) of the records contain values that are in excess of $5,000.00. The manager of the purchasing department states that negative inventory items and inventory items above $5,000.00 are unusual. Therefore, define the first stratum as all records that contain a negative amount. Define the highest stratum as all records containing an amount that is $5,000.00 or more. Because the highest stratum is materially important, examine all (100 percent basis) of the records that fall into it. For the remainder of the population that lies between $.01 and $4,999.99, divide it into four strata.

The following report displays the Cum F increment portion of the frequency distribution report for values between $.00 and $4,999.99.

Page 448: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–12 Reference Guide

Determining the Cum F Increment

----- R A N G E -----COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 14.09

0.01 0.99 1 0.02 0.45 0.00 0.45 0.00 15.08

1.00 1.99 0 0.00 0.00 0.00 0.00 0.00 15.08

2.00 2.99 1 0.02 2.16 0.00 2.16 0.00 16.07

3.00 3.99 1 0.02 3.88 0.00 3.88 0.00 17.06

4.00 4.99 1 0.02 4.63 0.00 4.63 0.00 18.05

5.00 5.99 0 0.00 0.00 0.00 0.00 0.00 18.05

6.00 6.99 0 0.00 0.00 0.00 0.00 0.00 18.05

7.00 7.99 0 0.00 0.00 0.00 0.00 0.00 18.05

8.00 8.99 2 0.04 17.10 0.00 8.55 0.23 19.46

9.00 9.99 0 0.00 0.00 0.00 0.00 0.00 19.46

10.00 19.99 73 1.35 1175.81 0.22 16.11 2.25 46.46

20.00 29.99 302 5.56 8102.13 1.50 26.83 2.29 101.39

30.00 39.99 684 12.60 24571.76 4.55 35.92 3.05 184.05

40.00 49.99 1277 23.53 57583.05 10.67 45.09 2.84 297.00

50.00 59.99 1341 24.71 73975.04 13.70 55.16 2.91 412.74

60.00 69.99 746 13.75 47785.18 8.85 64.06 3.07 499.07

70.00 79.99 310 5.71 22756.62 4.22 73.41 2.24 554.72

80.00 89.99 83 1.53 6954.49 1.29 83.79 2.39 583.52

90.00 99.99 4 0.07 376.33 0.07 94.08 1.13 589.84

100.00 199.99 9 0.17 1593.99 0.30 177.11 13.41 619.84

200.00 299.99 252 4.64 66351.31 12.29 263.30 26.90 778.58

300.00 399.99 275 5.07 93551.69 17.33 340.19 25.80 944.40

400.00 499.99 13 0.24 5593.33 1.04 430.26 26.40 980.45

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 980.45

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 980.45

700.00 799.99 0 0.00 0.00 0.00 0.00 0.00 980.45

800.00 899.99 4 0.07 3349.29 0.62 837.32 25.19 1000.45

900.00 999.99 7 0.13 6878.95 1.27 982.71 12.06 1026.91

1000.00 1999.99 22 0.41 26643.64 4.94 1211.07 222.95 1175.23

2000.00 2999.99 2 0.04 4860.33 0.90 2430.17 116.59 1219.95

3000.00 3999.99 0 0.00 0.00 0.00 0.00 0.00 1219.95

4000.00 4999.99 0 0.00 0.00 0.00 0.00 0.00 1219.95

Below each report is a table that lists the steps and calculations performed to determine the Cum F increment and the upper limit for each stratum. In these tables, Cum F refers to the values in the Square Root Range x Count column, and the codes in the Codes column are used for reference purposes when they appear in the Calculations column.

Page 449: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–13

Code Description Calculation Value

a Number of strata wanted 4

b Cum F at $0.00 14.09

c Cum F at $4,999.99 1,219.95

d Cum F range c – b 1,205.86

e Cum F increment d ÷ a 301.47

The reports appearing in the following sections display the portions of the frequency distribution report for each stratum:

First Stratum Monetary Upper Limit

Second Stratum Monetary Upper Limit

Third Stratum Monetary Upper Limit

First Stratum Monetary Upper Limit

-- R A N G E --- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 14.09

0.01 0.99 1 0.02 0.45 0.00 0.45 0.00 15.08

1.00 1.99 0 0.00 0.00 0.00 0.00 0.00 15.08

2.00 2.99 1 0.02 2.16 0.00 2.16 0.00 16.07

3.00 3.99 1 0.02 3.88 0.00 3.88 0.00 17.06

4.00 4.99 1 0.02 4.63 0.00 4.63 0.00 18.05

5.00 5.99 0 0.00 0.00 0.00 0.00 0.00 18.05

6.00 6.99 0 0.00 0.00 0.00 0.00 0.00 18.05

7.00 7.99 0 0.00 0.00 0.00 0.00 0.00 18.05

8.00 8.99 2 0.04 17.10 0.00 8.55 0.23 19.46

9.00 9.99 0 0.00 0.00 0.00 0.00 0.00 19.46

10.00 10.99 73 1.35 1175.81 0.22 16.11 2.25 46.46

20.00 29.99 302 5.56 8102.13 1.50 26.83 2.29 101.39

30.00 39.99 684 12.60 24571.76 4.55 35.92 3.05 184.05

40.00 49.99 1277 23.53 57583.05 10.67 45.09 2.84 297.00

50.00 59.99 1341 24.71 73975.04 13.70 55.16 2.91 412.74

Page 450: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–14 Reference Guide

The following table determines the First Stratum Monetary Upper Limit.

Code Description Calculation

Value

a Cum F at $0.00 14.09

b Cum F increment 301.47

c Cum F of upper boundary a + b 315.56

d Cum F of upper range 412.74

e Cum F of lower range 297.00

f Lower range 40.00 thru 49.99

g Upper range 50.00 thru 59.99

h High value of upper range 59.99

i High value of lower range 49.99

j Difference between high values of upper and lower ranges

h – i 10.00

k Difference between Cum F of upper boundary and Cum F of lower range

c – e 18.56

l Difference between Cum F of upper range and Cum F of lower range

d – e 115.74

m Monetary upper limit for first stratum i+(jxk/I) $51.59

Second Stratum Monetary Upper Limit

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

60.00 69.99 746 13.75 47785.18 8.85 64.06 3.07 499.07

70.00 79.99 310 5.71 22756.62 4.22 73.41 2.24 554.72

80.00 89.99 83 1.53 6954.49 1.29 83.79 2.39 583.52

90.00 99.99 4 0.07 376.33 0.07 94.08 1.13 589.84

100.00 199.99 9 0.17 1593.99 0.30 177.11 13.41 619.84

Page 451: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–15

The following table determines the Second Stratum Monetary Upper Limit.

Code Description Calculation Value

a First Cum F upper boundary 315.56

b Cum F increment 301.47

c Cum F of upper boundary a + b 617.03

d Cum F of upper range 619.84

e Cum F of lower range 589.84

f Lower range 90.00 thru 99.99

g Upper range 100.00 thru 199.99

h High value of upper range 199.99

i High value of lower range 99.99

j Difference between high values of upper and lower ranges

h – i 100.00

k Difference between Cum F of upper boundary and Cum F of lower range

c – e 27.19

l Difference between Cum F of upper range and Cum F of lower range

d – e 30.00

m Monetary upper limit for second stratum i+(jxk/I) $190.62

Third Stratum Monetary Upper Limit

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

200.00 299.99 252 4.64 66351.31 12.29 263.30 26.90 778.58

300.00 399.99 275 5.07 93551.69 17.33 340.19 25.80 944.40

Page 452: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–16 Reference Guide

The following table determines the Third Stratum Monetary Upper Limit.

Code Description Calculation Value

a Second Cum F upper boundary 617.03

b Cum F increment 301.47

c Cum F of upper boundary a + b 918.50

d Cum F of upper range 944.44

e Cum F of lower range 778.58

f Lower range 200.00 thru 299.99

g Upper range 300.00 thru 399.99

h High value of upper range 399.99

i High value of lower range 299.99

j Difference between high values of upper and lower ranges

h – i 100.00

k Difference between Cum F of upper boundary and Cum F of lower range

c – e 139.92

l Difference between Cum F of upper range and Cum F of lower range

d – e 165.82

m Monetary upper limit for third stratum

i+(jxk/I)

--------

I

$384.37

Page 453: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–17

On the basis of monetary upper limit for each stratum shown in the previous tables, the strata are defined as follows:

Stratum Money Range

1 $0.00 or less (negative values)

2 $0.01 thru $51.59

3 $51.60 thru $190.62

4 $190.63 thru $384.37

5 $384.38 thru $4,999.99

6 $5,000.00 or greater

To determine the statistically-correct sample size to draw from each stratum, you need the following additional information:

Number of items in each stratum

Standard deviation of each stratum

The easiest way to obtain this information is to process the recorded population with Advantage VISION:Excel using the stratified sampling — simple percentage method. Code the Advantage VISION:Results program shown in the following section to read the records.

Stratified Sampling Simple Percentage Input Statements

FILE PURCFILE INPUT FB 352 5280

BOOKVALUE 5 55 PD 2

SAMPLE 01 STRATIFIED PERCENTAGE

FIELDNAME BOOKVALUE

STRATUM1 LIMIT 0.00 100.00%

STRATUM2 LIMIT 51.59 100.00%

STRATUM3 LIMIT 190.62 100.00%

STRATUM4 LIMIT 384.37 100.00%

STRATUM5 LIMIT 4999.99 100.00%

IF SAMPLING 01

ACCEPT

ELSE

REJECT

ENDIF

The following Advantage VISION:Excel Stratified Sampling Summary Report is generated when you run this program.

Page 454: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–18 Reference Guide

Stratified Sampling Simple Percentage Summary Report

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - SIMPLE PERCENTAGE METHOD

ACTUAL POPULATION SIZE 5,427

TOTAL AMOUNT IN POPULATION 539,851.91

STANDARD DEVIATION OF POPULATION 402.85

LABEL OF FIELD STRATIFIED BOOKVALUE

STRATUM 1

UPPER LIMIT OF STRATUM 0.00

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 7

ACTUAL NO. OF ITEMS IN SAMPLE 7

TOTAL AMOUNT IN STRATUM 180.97-

TOTAL AMOUNT IN SAMPLE 180.97-

STRATUM MEAN 25.84-

SAMPLE MEAN 25.84-

STANDARD DEVIATION OF STRATUM 13.89

STANDARD DEVIATION OF SAMPLE 13.89

STRATUM COEFFICIENT OF VARIATION 0.537-

SAMPLE COEFFICIENT OF VARIATION 0.537-

STRATUM 2

UPPER LIMIT OF STRATUM 51.59

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 2,544

ACTUAL NO. OF ITEMS IN SAMPLE 2,544

TOTAL AMOUNT IN STRATUM 101,719.06

TOTAL AMOUNT IN SAMPLE 101,719.06

STRATUM MEAN 39.98

SAMPLE MEAN 39.98

STANDARD DEVIATION OF STRATUM 8.60

STANDARD DEVIATION OF SAMPLE 8.60

STRATUM COEFFICIENT OF VARIATION 0.215

SAMPLE COEFFICIENT OF VARIATION 0.215

STRATUM 3

UPPER LIMIT OF STRATUM 190.62

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 2,290

ACTUAL NO. OF ITEMS IN SAMPLE 2,290

TOTAL AMOUNT IN STRATUM 142,991.98

TOTAL AMOUNT IN SAMPLE 142,991.98

STRATUM MEAN 62.44

Page 455: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–19

SAMPLE MEAN 62.44

STANDARD DEVIATION OF STRATUM 10.41

STANDARD DEVIATION OF SAMPLE 10.41

STRATUM COEFFICIENT OF VARIATION 0.167

SAMPLE COEFFICIENT OF VARIATION 0.167

STRATUM 4

UPPER LIMIT OF STRATUM 384.37

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 511

ACTUAL NO. OF ITEMS IN SAMPLE 511

TOTAL AMOUNT IN STRATUM 153,419.39

TOTAL AMOUNT IN SAMPLE 153,419.39

STRATUM MEAN 300.23

SAMPLE MEAN 300.23

STANDARD DEVIATION OF STRATUM 44.56

STANDARD DEVIATION OF SAMPLE 44.56

STRATUM COEFFICIENT OF VARIATION 0.148

SAMPLE COEFFICIENT OF VARIATION 0.148

STRATUM 5

UPPER LIMIT OF STRATUM 4,999.99

PERCENT OF STRATUM TO SELECT 100.00%

ACTUAL NO. OF ITEMS IN STRATUM 65

ACTUAL NO. OF ITEMS IN SAMPLE 65

TOTAL AMOUNT IN STRATUM 54,000.73

TOTAL AMOUNT IN SAMPLE 54,000.73

STRATUM MEAN 830.78

SAMPLE MEAN 830.78

STANDARD DEVIATION OF STRATUM 479.45

STANDARD DEVIATION OF SAMPLE 479.45

STRATUM COEFFICIENT OF VARIATION 0.577

SAMPLE COEFFICIENT OF VARIATION 0.577

STRATUM 6 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

PERCENT OF STRATUM TO SELECT 0.00%

ACTUAL NO. OF ITEMS IN STRATUM 10

ACTUAL NO. OF ITEMS IN SAMPLE 10

TOTAL AMOUNT IN STRATUM 87,901.72

TOTAL AMOUNT IN SAMPLE 87,901.72

STRATUM MEAN 8,790.17

SAMPLE MEAN 8,790.17

Page 456: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–20 Reference Guide

STANDARD DEVIATION OF STRATUM 2,036.02

STANDARD DEVIATION OF SAMPLE 2,036.02

STRATUM COEFFICIENT OF VARIATION 0.232

SAMPLE COEFFICIENT OF VARIATION 0.232

From each stratum in this report , extract the upper limit, actual number of items, and the standard deviation, as shown in the following table.

Stratum Upper Limit Number of Items Standard Deviation

1 $0.00 7 $13.89

2 $ 51.59 2,544 8.60

3 $ 190.2 2,290 10.41

4 $384.37 511 44.56

5 $4,999.99 65 479.45

6 None 10 2,036.02

Total Population Size: 5,427

From Stratified Sampling Simple Percentage Summary Report, also note that the coefficient of variation in each stratum is less than .9, meaning that the strata, as they are defined, are fairly homogeneous.

Page 457: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–21

Coding the Program for Part 1

The flowchart for the Advantage VISION:Results program is shown in the following section.

Sampling Program Flowchart

Page 458: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–22 Reference Guide

Sampling Program Flowchart Continued

The Advantage VISION:Results program is broken down into smaller figures to aid in the discussion of the logic in the program.

Sampling File Input Statements

WORKAREA Fields Input Statements

Sampling File Input Statements

REPORT 75 WIDE

FILE PURCFILE INPUT FB 352 5280 COUNT ARECNT STATUS READEND

APURCNO 4 4 NU

ABOOKVALUE 5 55 PD 2

FILE SAMPFILE OUTPUT FB 25 500 FROM SAMPFILE

SAMPREC 25 1

Page 459: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–23

Each print line in the report should be 75 characters in length. The input file is PURCFILE, and the output file is SAMPFILE. For the example, you need only be concerned with the following fields in the input record:

APURCNO, the sequential purchase entry number field.

ABOOKVALUE, the value of the item field.

The following additional fields are also contained in this statement:

ARECNT, which contains a running count of the records. When the first record is read, ARECNT is 1; when the second record is read, ARECNT is 2, and so on.

READEND, which contains the value E when end of file is reached.

SAMPREC, the output record, and its fields are defined in the WORKAREA field JREC.

The output file contains all the records that are randomly selected from the strata. The output file is generated in purchase number within stratum number sequence. For future reference, this output file is referred to as the record stratum sample file.

WORKAREA Fields Input Statements

The following code shows the Stratified Mean Estimation Sampling WORKAREA Fields Input Statements, that are used in the Advantage VISION:Results program and the mean estimation method statements. Prior to a record being written, JREC is moved to SAMPREC.

WORKAREA

JREC 25 1

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER)

JPURCNO 4 5 PD Z

(PURCHASE INVOICE'ENTRY NO.)

JSTRATANO 2 9 PD A 3 (STRATUM'NUMBER)

JBOOKVAL 5 11 PD 2 E 8.2 (BOOK'VALUE)

JRECNO 5 16 PD E (RECORD' NUMBER) WORKAREA

BRANCHCNTL 1 1 PD VALUE 0

NEWPURCNO 4 2 PD VALUE 0

NXPURCNO 4 6 PD VALUE 0

OLDPURCNO 4 10 PD VALUE 0

RCNTR 4 14 PD VALUE 0

SORTEND 1 18 VALUE ' '

TALLY E 3

WORKAREA

SEQMESG 43 1

SEQMESG1 21 1 VALUE 'INPUT FILE IS NOT IN'

SEQMESG2 22 22 VALUE 'PURCHASE NO. SEQUENCE'

Page 460: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–24 Reference Guide

SAMPLE 01 STRATIFIED MEAN

POPULATION SIZE 5427

CONFIDENCE LEVEL 95.0%

UNIT PRECISION LIMIT $1.00

FIELDNAME JBOOKVAL

STRATUM1 LIMIT 0.00 SIZE 7 DEVIATION 13.89

STRATUM2 LIMIT 51.59 SIZE 2544 DEVIATION 8.60

STRATUM3 LIMIT 190.62 SIZE 2290 DEVIATION 10.41

STRATUM4 LIMIT 384.37 SIZE 511 DEVIATION 44.56

STRATUM5 LIMIT 4999.99 SIZE 65 DEVIATION 479.45

The following table lists the field names used in these input statements, as well as the field labels, the column numbers in which the fields begin and end, and the length and type of the fields. Note that JBOOKVAL is the label of the field to be stratified and JPURCNO is the sequential purchase number assigned by the receiving clerk.

Field Name From To Length Type

Output Record JREC 1 25 25

Sequential Record Number JSEQNO 1 4 4 packed

Purchase Number JPURCNO 5 8 4 packed

Stratum Number JSTRATANO 9 10 2 packed

Recorded Value-of-Item JBOOKVAL 11 15 5 packed

Input Record Number JRECNO 16 20 5 packed

The work area fields are defined as follows:

Field Description

BRANCHCNTL When this field is zero, the logic flows into reading the next record. When it is one, the logic branches back to the MISSING purchase number logic.

NEWPURCNO This field contains the purchase number of the current input record.

NXPURCNO This field contains a purchase number that is one greater than the purchase number in the prior record.

OLDPURCNO This field contains the purchase number in the prior input record.

RCNTR This field contains a running count of the records written to the output file SAMPFILE.

Page 461: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–25

Field Description

SORTEND When the SORT command recognizes an E in this field, it terminates the sort input phases, sorts all the records, and starts returning records from sort.

TALLY This is an Advantage VISION:Results reserved field. Starting with one, it is automatically incremented by one whenever a report detail line is printed. TALLY should be printed with an E edit code.

SEQMESG This field defines a message that is printed in the event that the input file is not in purchase number sequence.

Mean Estimation Method Statements

The mean estimation method defines the information needed for each stratum — the number of items in the stratum and the standard deviation of the stratum. This information is necessary so that Advantage VISION:Excel can calculate the statistically correct sample size for each stratum.

The following table lists the name of the information type, the actual value entered in the method statement portion of the section WORKAREA Fields Input Statements, and the reason for entering this value (or other related comments).

Info Type Value Reasoning /Other Comments

Application Number

01 Required.

Population Size 5,427 Found in the Advantage VISION:Excel Stratified Sampling Summary Report for stratified sampling — simple percentage method in the Actual Population Size line.

For more information, see Stratified Sampling Simple Percentage Summary Report.

Confidence Level 95% One-sided.

Page 462: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–26 Reference Guide

Info Type Value Reasoning /Other Comments

Unit Precision Level

$1.00 Looking at the Frequency Distribution Report the mean value of the population is $99.48. You want to be within approximately 1.5 percent of the true value of the originating population. However, because you are stratifying the recorded population instead of the originating population, reduce the percentage to 1.0 percent.

When you adjust the monetary unit precision during the sample evaluation step, you have a leeway of 0.5 percent.$1.00 is approximately 1 percent of $99.48, so enter $1.00 into the Unit Precision Limit field.

Therefore, when you estimate the true total value of the originating population from the stratum samples, you want the estimated total value to exceed the true total value of the originating population by no more than $5,427 (5,427 items multiplied by $1.00).

Field to be Stratified

JBOOKVAL

Must be previously defined in an Advantage VISION:Results field definition statement.

Strata 1-5 The Limit, Size, and Deviation information for strata 1-5 is obtained from the Stratified Sampling Summary Report. For more information, see Stratified Sampling Simple Percentage Summary Report. Advantage VISION:Excel automatically generates a sixth stratum to cover all amounts that are greater than the upper limit of the fifth stratum. All items that fall into this extra stratum are selected on a 100 percent basis.

Advantage VISION:Excel never calculates a stratum sample size that is less than 30. For example, the first stratum contains seven items in it. Because Advantage VISION:Excel does not calculate a sample less than 30, the sample drawn from the first stratum contains all seven items in it; selection is done on a 100 percent basis for the first stratum.

Page 463: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–27

Processing Logic Controlled by the Advantage VISION:Results Procedural Statements

The reports shown in the following sections, show the input statements for this run.

Procedural Input Statements

File Sequence Input Statements

Duplicate Records Input Statements

Missing Records Input Statements

IF SAMPLING Input Statements

IF SAMPLING Input Statements

Input Statements to Format Sort Records

Sort Records Input Statements

Return and Write Sorted Records Input Statements

Define the Report Input Statements

Stratified Mean Estimation Sampling Procedural Input Statements

Note that in the following input statements, the field JSTRATANO causes a control break in the report. If BRANCHCNTL is 1, the logic flow branches to continue with the missing-purchase-number logic. A record is read, and end of file is checked. For the first record read, the DUPLICATE and MISSING logic is bypassed.

* CONTROL JSTRATANO

*

************************************************************

* BRANCH LOGIC *

************************************************************

*

MAIN000:

IF BRANCHCNTL EQ 1

GOTO MISSING50

ENDIF

*

************************************************************

* READ A RECORD *

************************************************************

*

READREC:

READ PURCFILE

IF READEND EQ 'E'

MOVE 'E' TO SORTEND

GOTO SORTREC

Page 464: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–28 Reference Guide

ENDIF

NEWPURCNO = APURCNO

ON ONE

GOTO SAMPL

ENDONE

Stratified Mean Estimation Sampling File Sequence Input Statements

This code shows the input statements entered to verify that the input file is in purchase number sequence. If it is not, an error message is printed, and the job is terminated.

*

************************************************************

* CHECK FOR FILE SEQUENCE *

************************************************************

*

IF NEWPURCNO LT OLDPURCNO

PRINT SEQMESG

MOVE 999 TO DYLRETURN

STOP

ENDIF

Stratified Mean Estimation Sampling Duplicate Records Input Statements

This code shows the statements entered to check the records for the same purchase number. Because you are stratifying the recorded population as opposed to the originating population, you must make certain that a one-to-one correlation exists between the items in the recorded population and the items in the originating population.

In the automated recorded population, the purchase number on the first record is 55555. Each succeeding record contains a purchase number one greater than the one in the previous record. When records with duplicate purchase numbers are found, the duplicate records are assigned to stratum 7.

************************************************************

* CHECK FOR DUPLICATE RECORDS *

************************************************************

DUP:

IF NEWPURCNO NE OLDPURCNO

GOTO MISSING

ENDIF

MOVE 7 TO JSTRATANO

GOTO FORMATIT

Page 465: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–29

Stratified Mean Estimation Sampling Missing Records Input Statements

This code shows the input statements entered to check for missing purchase numbers. This occurs when two successive records do not have consecutive purchase numbers. When this occurs, Advantage VISION:Excel generates additional records, with the missing purchase numbers going into another, additional stratum (stratum number 8).

*

************************************************************

* CHECK FOR MISSING RECORDS *

************************************************************

*

MISSING:

NXPURCNO = OLDPURCNO + 1

IF NEWPURCNO EQ NXPURCNO

GOTO SAMPL

ENDIF

MOVE 0 TO JSEQNO

MOVE NXPURCNO TO JPURCNO

MOVE 8 TO JSTRATANO

MOVE 0 TO JBOOKVAL

MOVE 0 TO JRECNO

MISSING10:

MOVE 1 TO BRANCHCNTL

GOTO SORTREC

MISSING50:

JPURCNO = JPURCNO + 1

IF JPURCNO LT NEWPURCNO

GOTO MISSING10

ENDIF

Stratified Mean Estimation Sampling IF SAMPLING Input Statements

This code shows the statements entered to define the sampling logic. When the Advantage VISION:Excel IF SAMPLING procedural statement is executed, Advantage VISION:Excel determines whether or not the record should be included in the sample drawn for the stratum. If not, a branch to tag READREC is made. After the execution of the IF SAMPLING statement, DYLSP01STN contains the stratum number to which the record belongs. The stratum number is moved to the output record, the BRANCHCNTL field is set to zero, and an unconditional branch is made to format the input record into the output record before being passed to the sort.

Page 466: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–30 Reference Guide

*

************************************************************

* SAMPLING LOGIC *

************************************************************

*

SAMPL:

MOVE NEWPURCNO TO OLDPURCNO

IF SAMPLING 01

MOVE DYLSP01STN TO JSTRATANO

MOVE 0 TO BRANCHCNTL

GOTO FORMATIT

ENDIF

GOTO READREC

Input Statements to Format Sort Records

This code shows the statements that are entered to format the output record.

*

************************************************************

* FORMAT THE SORT RECORD *

************************************************************

*

FORMATIT:

MOVE 0 TO JSEQNO

MOVE APURCNO TO JPURCNO

MOVE ABOOKVALUE TO JBOOKVAL

MOVE ARECNT TO JRECNO

MOVE 0 TO BRANCHCNTL

Stratified Mean Estimation Sampling Sort Records Input Statements

This code shows the statements entered to sort the records by purchase number within strata number.

* ************************************************************

* SORT RECORDS *

************************************************************

*

SORTREC:

SORT JREC 25 USING JSTRATANO JPURCNO

UNTIL SORTEND

Page 467: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–31

Stratified Mean Estimation Sampling Return and Write Sorted Records Input Statements

This code shows the statements entered to retrieve each record from the sort after all the records on the input file have been processed. Then the record prints in the report and is written to the recorded stratum samples file. A sequential record number is placed in each output record. The sequential record number is used during the sample evaluation step to correct this file.

*

************************************************************

* RETURN AND WRITE SORTED RECORDS *

************************************************************

*

RETURNREC:

RCNTR = RCNTR + 1

MOVE RCNTR TO JSEQNO

MOVE JREC TO SAMPREC

WRITE SAMPFILE

LIST JSTRATANO JSEQNO JPURCNO JBOOKVAL JRECNO

ACCEPT

Stratified Mean Estimation Sampling Define the Report Input Statements

This code defines the logic for the report.

*

************************************************************

* DEFINE THE REPORT *

************************************************************

*

ON CHANGE IN JSTRATANO

LIST TALLY AT JSTRATANO+2

SUM JBOOKVAL

WITH 2 BEFORE AND EJECT AFTER

ON FINAL

LIST TALLY AT JSTRATANO+2

SUM JBOOKVAL

WITH 3 BEFORE

T1 'STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT'

WITH 2 AFTER

After you code the Advantage VISION:Excel/Advantage VISION:Results program, submit the program to Advantage VISION:Excel.

Page 468: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–32 Reference Guide

Output for Part 1

This section shows the following list of reports:

Stratified Mean Estimation Sampling Statement Listing

Stratified Mean Estimation Sampling List

Stratified Mean Estimation Sampling Advantage VISION:Results File Statistics

Advantage VISION:Excel Stratified Sampling Summary Report

Listing Records Drawn from Each Stratum

Stratified Mean Estimation Sampling Statement Listing

The following output shows a listing of the Advantage VISION:Excel/Advantage VISION:Results statements.

1 2 3 4 5 6 7 8

12345678901234567890123456789012345678901234567890123456789012345678901234567890

REPORT 75 WIDE

FILE PURCFILE INPUT FB 352 5280 COUNT ARECNT STATUS READEND

APURCNO 4 4 NU

ABOOKVALUE 5 55 PD 2

FILE SAMPFILE OUTPUT FB 25 500 FROM SAMPFILE

SAMPREC 25 1

WORKAREA

JREC 25 1

JSEQNO 4 1 PD Z (SEQUENCE'NUMBER)

JPURCNO 4 5 PD Z

(PURCHASE INVOICE'ENTRY NO.)

JSTRATANO 2 9 PD A 3 (STRATUM'NUMBER)

JBOOKVAL 5 11 PD 2 E 8.2 (BOOK'VALUE)

JRECNO 5 16 PD E (RECORD' NUMBER)

WORKAREA

BRANCHCNTL 1 1 PD VALUE 0

NEWPURCNO 4 2 PD VALUE 0

NXPURCNO 4 6 PD VALUE 0

OLDPURCNO 4 10 PD VALUE 0

RCNTR 4 14 PD VALUE 0

SORTEND 1 18 VALUE ' '

TALLY E 3

WORKAREA

SEQMESG 43 1

SEQMESG1 21 1 VALUE 'INPUT FILE IS NOT IN'

Page 469: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–33

SEQMESG2 22 22 VALUE 'PURCHASE NO. SEQUENCE'

SAMPLE 01 STRATIFIED MEAN

POPULATION SIZE 5427

CONFIDENCE LEVEL 95.0%

UNIT PRECISION LIMIT $1.00

FIELDNAME JBOOKVAL

STRATUM1 LIMIT 0.00 SIZE 7 DEVIATION 13.89

STRATUM2 LIMIT 51.59 SIZE 2544 DEVIATION 8.60

STRATUM3 LIMIT 190.62 SIZE 2290 DEVIATION 10.41

STRATUM4 LIMIT 384.37 SIZE 511 DEVIATION 44.56

STRATUM5 LIMIT 4999.99 SIZE 65 DEVIATION 479.45

*

CONTROL JSTRATANO

**

***********************************************************

* BRANCH LOGIC *

************************************************************

*MAIN000:

IF BRANCHCNTL EQ 1

GOTO MISSING50

ENDIF

**

***********************************************************

* READ A RECORD *

************************************************************

*READREC:

READ PURCFILE

IF READEND EQ 'E'

MOVE 'E' TO SORTEND

GOTO SORTREC

ENDIF

NEWPURCNO = APURCNO

ON ONE

GOTO SAMPL

ENDONE

***********************************************************

* CHECK FOR FILE SEQUENCE *

***********************************************************

*

IF NEWPURCNO LT OLDPURCNO

PRINT SEQMESG

MOVE 999 TO DYLRETURN

Page 470: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–34 Reference Guide

STOP

ENDIF

**

***********************************************************

* CHECK FOR DUPLICATE RECORDS *

************************************************************

*

DUP:

IF NEWPURCNO NE OLDPURCNO

GOTO MISSING

ENDIF

MOVE 7 TO JSTRATANO

GOTO FORMATIT

**

***********************************************************

* CHECK FOR MISSING RECORDS *

***********************************************************

*

MISSING:

NXPURCNO = OLDPURCNO + 1

IF NEWPURCNO EQ NXPURCNO

GOTO SAMPL

ENDIF

MOVE 0 TO JSEQNO

MOVE NXPURCNO TO JPURCNO

MOVE 8 TO JSTRATANO

MOVE 0 TO JBOOKVAL

MOVE 0 TO JRECNO

MISSING10:

MOVE 1 TO BRANCHCNTL

GOTO SORTREC

MISSING50:

JPURCNO = JPURCNO + 1

IF JPURCNO LT NEWPURCNO

GOTO MISSING10

ENDIF

***********************************************************

* SAMPLING LOGIC *

***********************************************************

SAMPL:

MOVE NEWPURCNO TO OLDPURCNO

Page 471: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–35

IF SAMPLING 01

MOVE DYLSP01STN TO JSTRATANO

MOVE 0 TO BRANCHCNTL

GOTO FORMATIT

ENDIF

GOTO READREC

*

***********************************************************

* FORMAT THE SORT RECORD *

***********************************************************

FORMATIT:

MOVE 0 TO JSEQNO

MOVE APURCNO TO JPURCNO

MOVE ABOOKVALUE TO JBOOKVAL

MOVE ARECNT TO JRECNO

MOVE 0 TO BRANCHCNTL

**

***********************************************************

* SORT RECORDS *

***********************************************************

*SORTREC:

SORT JREC 25 USING JSTRATANO JPURCNO

UNTIL SORTEND

**

***********************************************************

* RETURN AND WRITE SORTED RECORDS *

***********************************************************

*RETURNREC:

RCNTR = RCNTR + 1

MOVE RCNTR TO JSEQNO

MOVE JREC TO SAMPREC

WRITE SAMPFILE

LIST JSTRATANO JSEQNO JPURCNO JBOOKVAL JRECNO

ACCEPT

**

***********************************************************

* DEFINE THE REPORT *

***********************************************************

*

ON CHANGE IN JSTRATANO

LIST TALLY AT JSTRATANO+2

SUM JBOOKVAL

Page 472: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–36 Reference Guide

WITH 2 BEFORE AND EJECT AFTER

ON FINAL

LIST TALLY AT JSTRATANO+2

SUM JBOOKVAL

WITH 3 BEFORE

T1 'STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT'

WITH 2 AFTER

Stratified Mean Estimation Sampling List

11/30/97 VISION:Excel SAMPLING LIST PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - MEAN ESTIMATION METHOD

POPULATION SIZE 5,427

CONFIDENCE LEVEL - ONE SIDED 95.0%

UNIT PRECISION LIMIT 1.00

NORMAL DISTRIBUTION Z FACTOR 1.6449

LABEL OF FIELD TO BE STRATIFIED JBOOKVAL

STRATUM 1

UPPER LIMIT 0.00

NO. OF ITEMS IN STRATUM 7

STANDARD DEVIATION OF STRATUM 13.89

CALCULATED SAMPLE SIZE 7

STRATUM 2

UPPER LIMIT 51.59

NO. OF ITEMS IN STRATUM 2,544

STANDARD DEVIATION OF STRATUM 8.60

CALCULATED SAMPLE SIZE 125

STRATUM 3

UPPER LIMIT 190.62

NO. OF ITEMS IN STRATUM 2,290

STANDARD DEVIATION OF STRATUM 10.41

CALCULATED SAMPLE SIZE 136

STRATUM 4

UPPER LIMIT 384.37

NO. OF ITEMS IN STRATUM 511

STANDARD DEVIATION OF STRATUM 44.56

CALCULATED SAMPLE SIZE 130

STRATUM 5

UPPER LIMIT 4,999.99

NO. OF ITEMS IN STRATUM 65

Page 473: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–37

STANDARD DEVIATION OF STRATUM 479.45

CALCULATED SAMPLE SIZE 65

STRATUM 6 - 100% OF THIS STRATUM WILL BE INCLUDED IN THE SAMPLE

UPPER LIMIT 999,999,999,999,999

NO. OF ITEMS IN STRATUM 0

STANDARD DEVIATION OF STRATUM 0

CALCULATED SAMPLE SIZE 0

You may note that each field in the Advantage VISION:Excel statements is listed in this report, with a title descriptive of the field, plus the information coded for the field. Additionally, the statistically correct sample size for each stratum is calculated and listed.

Stratified Mean Estimation Sampling Advantage VISION:Results File Statistics

The following output shows the record counts accumulated by Advantage VISION:Results.

1 2 3 4 5 6 7 8 9

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

VISION:Results CONTROL TOTALS

FILE RECORD CHARACTER BLOCK DROPPED REWRITTEN INSERTED ERASED ID COUNT COUNT COUNT BLOCK COUNT RECORD COUNT RECORD COUNT RECORD COUNT

PURCFILE 5,427 1,910,304

SAMPFILE 476 11,900

RECORDS PAGES

FILE PRINT 4

REPORT PRINT 16

FIXED BLANK COUNT

FIXED DECIMAL DIVIDE

RETURN CODE=0000

Page 474: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–38 Reference Guide

Advantage VISION:Excel Stratified Sampling Summary Report

This report shows the Advantage VISION:Excel Stratified Sampling Summary Report, including the information you coded, plus information accumulated and calculated by Advantage VISION:Excel.

11/30/97 VISION:Excel STRATIFIED SAMPLING SUMMARY REPORT PAGE 1

APPLICATION 1 - STRATIFIED SAMPLING - MEAN ESTIMATION METHOD

ESTIMATED POPULATION SIZE 5,427

ACTUAL POPULATION SIZE 5,425

CONFIDENCE LEVEL - ONE SIDED 95.0%

TOTAL (UNAUDITED) AMOUNT OF POPULATION 539,755.58

STANDARD DEVIATION (UNAUDITED) OF POPULATION 402.92

UNIT PRECISION LIMIT 1.00

LABEL OF FIELD TO BE STRATIFIED JBOOKVAL

NORMAL DISTRIBUTION Z FACTOR 1.6449

STRATUM 1

UPPER LIMIT OF STRATUM 0.00

ACTUAL NO. OF ITEMS IN STRATUM 7

ESTIMATED NO. OF ITEMS IN STRATUM 7

CALCULATED SAMPLE SIZE IN STRATUM 7

ACTUAL NO. OF ITEMS IN SAMPLE 7

TOTAL (UNAUDITED) AMOUNT IN STRATUM 180.97-

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 180.97-

STRATUM MEAN (UNAUDITED) 25.84-

SAMPLE MEAN (UNAUDITED) 25.84-

ESTIMATED STANDARD DEVIATION OF STRATUM 13.89

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 13.89

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 13.89

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.537-

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.537-

ORIGINAL SEED NUMBER 37,001

STRATUM 2

UPPER LIMIT OF STRATUM 51.59

ACTUAL NO. OF ITEMS IN STRATUM 2,543

ESTIMATED NO. OF ITEMS IN STRATUM 2,544

CALCULATED SAMPLE SIZE IN STRATUM 125

ACTUAL NO. OF ITEMS IN SAMPLE 125

TOTAL (UNAUDITED) AMOUNT IN STRATUM 101,681.99

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 4,984.15

STRATUM MEAN (UNAUDITED) 39.99

SAMPLE MEAN (UNAUDITED) 39.87

ESTIMATED STANDARD DEVIATION OF STRATUM 8.60

Page 475: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–39

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 8.60

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 9.20

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.215

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.231

ORIGINAL SEED NUMBER 7,201

STRATUM 3

UPPER LIMIT OF STRATUM 190.62

ACTUAL NO. OF ITEMS IN STRATUM 2,289

ESTIMATED NO. OF ITEMS IN STRATUM 2,290

CALCULATED SAMPLE SIZE IN STRATUM 136

ACTUAL NO. OF ITEMS IN SAMPLE 136

TOTAL (UNAUDITED) AMOUNT IN STRATUM 142,932.72

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 8,301.17

STRATUM MEAN (UNAUDITED) 62.44

SAMPLE MEAN (UNAUDITED) 61.04

ESTIMATED STANDARD DEVIATION OF STRATUM 10.41

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 10.41

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 7.38

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.167

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.121

ORIGINAL SEED NUMBER 1

STRATUM 4

UPPER LIMIT OF STRATUM 384.37

ACTUAL NO. OF ITEMS IN STRATUM 511

ESTIMATED NO. OF ITEMS IN STRATUM 511

CALCULATED SAMPLE SIZE IN STRATUM 130

ACTUAL NO. OF ITEMS IN SAMPLE 130

TOTAL (UNAUDITED) AMOUNT IN STRATUM 153,419.39

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 38,912.25

STRATUM MEAN (UNAUDITED) 300.23

SAMPLE MEAN (UNAUDITED) 299.33

ESTIMATED STANDARD DEVIATION OF STRATUM 44.56

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 44.56

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 45.66

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.148

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.153

ORIGINAL SEED NUMBER 44,649

STRATUM 5

UPPER LIMIT OF STRATUM 4,999.99

ACTUAL NO. OF ITEMS IN STRATUM 65

ESTIMATED NO. OF ITEMS IN STRATUM 65

CALCULATED SAMPLE SIZE IN STRATUM 65

Page 476: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–40 Reference Guide

ACTUAL NO. OF ITEMS IN SAMPLE 65

TOTAL (UNAUDITED) AMOUNT IN STRATUM 54,000.73

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 54,000.73

STRATUM MEAN (UNAUDITED) 830.78

SAMPLE MEAN (UNAUDITED) 830.78

ESTIMATED STANDARD DEVIATION OF STRATUM 479.45

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 479.45

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 479.45

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.577

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.577

ORIGINAL SEED NUMBER 16,257

STRATUM 6 - 100% OF THIS STRATUM WAS INCLUDED IN THE SAMPLE

UPPER LIMIT OF STRATUM 999,999,999,999,999

ACTUAL NO. OF ITEMS IN STRATUM 10

ESTIMATED NO. OF ITEMS IN STRATUM 0

CALCULATED SAMPLE SIZE IN STRATUM 0

ACTUAL NO. OF ITEMS IN SAMPLE 10

TOTAL (UNAUDITED) AMOUNT IN STRATUM 87,901.72

TOTAL (UNAUDITED) AMOUNT IN SAMPLE 87,901.72

STRATUM MEAN (UNAUDITED) 8,790.17

SAMPLE MEAN (UNAUDITED) 8,790.17

ESTIMATED STANDARD DEVIATION OF STRATUM 0.00

ACTUAL (UNAUDITED) STANDARD DEVIATION OF STRATUM 2,036.02

ACTUAL (UNAUDITED) STANDARD DEVIATION OF SAMPLE 2,036.02

STRATUM COEFFICIENT OF VARIATION (UNAUDITED) 0.232

SAMPLE COEFFICIENT OF VARIATION (UNAUDITED) 0.232

ORIGINAL SEED NUMBER

Page 477: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–41

The following table shows how the information pertaining to the population as a whole is captured.

Item Coded by User

Accumulated by Advantage VISION:Excel

Calculated by Advantage VISION:Excel

Estimated Population Size

Actual Population Size

Confidence Level

Total (Unaudited) Amount in Population

Standard Deviation of Population

Unit Precision Limit

Label of Field to be Stratified

Normal Distribution Z Factor

The following table shows how the information pertaining to each stratum is captured.

Item Coded by User

Accumulated by Advantage VISION:Excel

Calculated by Advantage VISION:Excel

Upper Limit of Stratum

Estimated Number of Items in Stratum.

Actual Number of Items in Stratum

Calculated Sample Size for Stratum.

Actual Number of Items in Sample.

Total (Unaudited) Amount in Stratum

Total (Unaudited) Amount in Sample.

Page 478: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–42 Reference Guide

Item Coded by User

Accumulated by Advantage VISION:Excel

Calculated by Advantage VISION:Excel

Stratum Mean (Unaudited).

Sample Mean (Unaudited)

Estimated Standard Deviation of Stratum

Actual (Unaudited) Standard Deviation of Stratum

Actual (Unaudited) Standard Deviation of Sample

Stratum Coefficient of Variation (Unaudited)

Sample Coefficient of Variation (Unaudited)

Original Seed Number or

Seed Number or

For more information about the formulas used in the Advantage VISION:Excel calculations, see the appendix “Formulas and Equations Used in Advantage VISION:Excel.”

The following table shows the actual sample sizes for each of the strata as shown in the report in this section.

Stratum Actual Sample Size

1 7

2 125

3 136

4 130

5 65

6 10

Total: 473

Therefore, from a population of 5,425 records, you will be examining 473 items (approximately 8.7 percent of the population).

The following output was specifically programmed to be generated by Advantage VISION:Results:

Page 479: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–43

An automated (tape or disk) file containing all the records in the samples drawn from each stratum. This file is called the recorded stratum samples file.

A report listing the records in the samples drawn from each stratum, as shown in the following section..

Listing Records Drawn from Each Stratum

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

1 1 55683 33.56- 129

1 2 57155 38.08- 1,601

1 3 57222 12.57- 1,668

1 4 57676 33.66- 2,122

1 5 58587 43.54- 3,033

1 6 60206 3.64- 4,653

1 7 60641 15.92- 5,088

7 180.97-

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

2 8 55586 34.74 32

2 9 55632 39.10 78

2 10 55753 42.77 199

2 27 56467 38.57 913

. . . . .

. . . . .

. . . . .

2 115 60223 38.33 4,670

2 116 60232 40.97 4,679

2 117 60295 50.36 4,742

2 118 60321 51.05 4,768

2 132 60968 26.27 5,414

125 4,984.15

Page 480: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–44 Reference Guide

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

3 133 55556 55.90 2

3 134 55611 61.80 57

3 135 55612 60.57 58

3 151 56400 67.79 846

3 152 56417 65.02 863

3 153 56465 65.13 911

. . . . .

. . . . .

. . . . .

3 251 60511 59.18 4,958

3 252 60539 52.34 4,986

3 253 60555 66.46 5,002

3 267 60957 83.71 5,403

3 268 60961 53.48 5,407

136 8,301.17

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

4 269 55649 380.61 95

4 289 56256 261.38 702

. . . . .

. . . . .

. . . . .

4 381 60452 356.43 4,899

4 398 60948 283.56 5,394

130 38,912.25

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

5 399 55599 830.08 45

5 400 55624 397.03 70

5 401 55699 402.96 145

5 402 55741 1,249.06 187

5 418 56682 393.21 1,128

. . . . .

. . . . .

. . . . .

Page 481: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–45

. . . . .

5 446 59423 1,002.02 3,870

5 461 60731 385.19 5,178

5 462 60945 1,915.00 5,391

5 463 60965 394.66 5,411

65 54,000.73

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

6 464 55901 7,831.57 347

6 465 56310 6,139.14 756

6 466 56961 6,481.71 1,407

6 467 57078 5,728.05 1,524

6 468 57267 10,403.56 1,713

6 469 57932 8,950.86 2,378

6 470 58266 11,667.35 2,712

6 471 58422 10,877.06 2,868

6 472 58551 9,195.01 2,997

6 473 60082 10,627.41 4,529

10 87,901.72

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

7 474 58993 59.26 3,440

7 475 58993 37.07 3,439

2 96.33

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

8 476 60915

1

STRATUM SAMPLES DRAWN FOR PURCHASE FILE AUDIT

STRATUM SEQUENCE PURCHASE INVOICE BOOK RECORD NUMBER NUMBER ENTRY NO. VALUE NUMBER

476 194,015.38

Note the two records in stratum 7. These are records with duplicate purchase numbers. Stratum 8 contains the missing purchase numbers, of which you had one.

Page 482: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–46 Reference Guide

Examining the Samples

To examine the samples, pull the originating purchase invoice for each item in each stratum sample. Thereafter, manually check the value on the invoice entry against the amount in the record, as listed in the report Listing Erroneous Records, shown in this section. This way, you match and replace recorded values in the stratum samples with originating values. After completing the examination, you find 49 such discrepancies. This report shows the records that were in error and the audited values. These errors are coded, as shown in the following table, to form the audited correction file.

Field From To Length

Sequential Record Number / Sequence Number

1 7 7

Stratum Number 9 10 2

Audited Value 12 20 9

Listing Erroneous Records

DIFFERENCES BETWEEN BOOK VALUES AND AUDITED VALUES

STRATUM SEQUENCE PURCHASE AUDITED BOOK DIFFERENCE NUMBER NUMBER NUMBER VALUE VALUE

1 7 60641 10.24- 15.92- 5.68

1 10.24- 15.92- 5.68

2 9 55632 31.46 39.10 7.64-

2 18 56119 49.13 47.72 1.41

2 41 57268 57.91 51.37 6.54

2 77 58814 41.15 32.81 8.34

2 88 59045 18.99 26.39 7.40-

2 93 59214 41.80 40.91 .89

2 95 59296 55.42 49.82 5.60

2 109 59905 40.55 33.15 7.40

2 117 60295 52.40 50.36 2.04

2 125 60830 33.33 39.18 5.85-

10 422.14 410.81 11.33

3 145 56133 81.70 83.03 1.33-

3 169 57075 60.87 55.57 5.30

3 177 57375 68.70 67.19 1.51

3 186 57695 56.93 64.03 7.10-

Page 483: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–47

3 189 57817 50.61 52.19 1.58-

3 193 57896 62.64 58.70 3.94

3 201 58461 55.69 53.24 2.45

3 211 58954 58.30 56.24 2.06

3 213 58999 62.91 69.54 6.63-

3 215 59131 54.84 61.21 6.37-

3 226 59555 53.03 59.84 6.81-

3 238 59940 63.62 58.24 5.38

3 240 59997 62.13 62.41 .28-

3 254 60602 60.49 54.00 6.49

14 852.46 855.43 2.97-

4 271 55698 222.54 225.76 3.22-

4 281 56048 331.55 329.29 2.26

4 309 56985 331.64 329.40 2.24

4 321 57389 281.88 277.73 4.15

4 322 57411 315.68 314.11 1.57

4 328 57678 269.29 269.05 .24

4 342 58164 237.54 233.67 3.87

4 343 58228 299.66 294.96 4.70

4 358 59497 193.62 191.58 2.04

4 365 59910 301.43 293.47 7.96

4 383 60537 266.66 259.37 7.29

4 386 60597 343.21 339.05 4.16

4 394 60729 262.42 268.14 5.72-

13 3,657.12 3,625.58 31.54

5 402 55741 1,239.07 1,249.06 9.99-

5 407 55855 1,003.88 996.79 7.09

5 417 56625 1,189.32 1,197.97 8.65-

5 426 57691 1,105.43 1,097.20 8.23

5 428 57774 998.42 998.63 .21-

5 431 58015 393.78 390.38 3.40

5 442 59134 440.07 449.00 8.93-

5 449 59669 392.79 389.70 3.09

8 6,762.76 6,768.73 5.97-

6 470 58266 11,657.60 11,667.35 9.75-

1 11,657.60 11,667.35 9.75-

7 474 58993 66.99 59.26 7.73

Page 484: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–48 Reference Guide

1 66.99 59.26 7.73

8 476 60915 248.77 248.77

1 248.77 248.77

49 23,657.60 23,371.24 286.36

Obtaining Additional Information

To evaluate the combined samples, you must obtain the following information for each of the audited stratum samples:

Number of items in the stratum

Number of items in each audited stratum sample

Mean value of each audited stratum sample

Standard deviation of each audited stratum sample

Additionally, you need information pertaining to the total population — the Normal Distribution Z Factor. Those items that are not directly related to each audited sample can be found in the Advantage VISION:Excel Stratified Sampling Summary Report shown in Advantage VISION:Excel Stratified Sampling Summary Report. For this example, you can extract the following information from this report:

Field Data

Normal Distribution Z Factor 1.6449

Number of Items in Stratum 1 7

Number of Items in Stratum 2 2,543

Number of Items in Stratum 3 2,289

Number of Items in Stratum 4 511

Number of Items in Stratum 5 65

Number of Items in Stratum 6 10

Because the mean estimation method run was against the file of recorded values, as opposed to originating values, none of the information needed for the audited sample can be obtained from the report shown in Advantage VISION:Excel Stratified Sampling Summary Report.

Page 485: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–49

The following information still must be obtained:

Number of items in each audited stratum sample

Mean value of each audited stratum sample

Standard deviation of each audited stratum sample

To obtain this information, generate an Advantage VISION:Excel Frequency Distribution Report for each of the audited stratum samples after matching the recorded stratum samples file with the audited correction file and replacing erroneous recorded values with audited values.

The matching of the files is done using the sequential record number. When a sequential record number on the audited correction file matches the sequential record number on the recorded stratum samples file, replace the recorded value with the audited value. Otherwise, the recorded value and the audited value are identical.

Coding the Program for Part 2

To obtain additional information, you need to write Advantage VISION:Excel statements as shown in the following section.

Frequency Distribution Report Input Statements

This code shows the Advantage VISION:Excel statements and the Advantage VISION:Results program written to accomplish this task.

REPORT 75 WIDE

FILE FILEA INPUT FB 25 500

FILEAREC 25 1

ASEQNO 4 1 PD Z (SEQUENCE'NUMBER)

APURCNO 4 5 PD Z (PURCHASE'NUMBER)

ASTRATANO 2 9 PD

ABOOKVAL 5 11 PD 2 E 8.2 (BOOK'VALUE)

AUDITVAL 5 16 PD 2

*

FILE FILEB INPUT FB 25 500

FILEBREC 25 1

BSEQNO 7 1

BSTRATANO 2 9

BAUDITVAL 9 12 NU 2 E 8.2 (AUDITED'VALUE)

*WORKAREA

HIGHVAL 25 1 VALUE HIGHVALUES

WORKAREA

ASEQNOSV 4 1

AUDITVALUE 4 9 PD 2

Page 486: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–50 Reference Guide

RDIFF 5 14 PD 2 E 7.2 (DIFFERENCE)

STRATANO 2 19 NU A 3 (STRATUM'NUMBER)

TALLY E 3

READFLAGS 2 21

READA 1 21 VALUE 'A'

READB 1 22 VALUE 'B'

*CONTROL STRATANO

***********************************************************

* READ RECORDS AND MERGE ON SEQUENCE NO. *

***********************************************************

*

READRECS:

IF READA EQ 'A'

READ FILEA

ENDIF

IF READB EQ 'B'

READ FILEB

ENDIF

MOVE ' ' TO READFLAGS

MATCH00:

IF FILEAREC EQ HIGHVAL

GOTO MATCH05

ENDIF

IF FILEBREC EQ HIGHVAL

GOTO MATCH10

ENDIF

MOVE ASEQNO TO ASEQNOSV

MOVE ASTRATANO TO STRATANO

IF ASEQNOSV LT BSEQNO

GOTO MATCH10

ENDIF

IF ASEQNOSV EQ BSEQNO

GOTO MATCH20

ENDIF

**

***********************************************************

* “B” RECORD IS LESS THAN “A” RECORD *

***********************************************************

*

MATCH05:

MOVE BSTRATANO TO STRATANO

MOVE BAUDITVAL TO AUDITVALUE

MOVE 'B' TO READB

GOTO FREQ1

**

Page 487: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–51

**********************************************************

* “A” RECORD IS LESS THAN “B” RECORD *

**********************************************************

*MATCH10:

MOVE 'A' TO READA

MOVE ABOOKVAL TO AUDITVALUE

GOTO FREQ1

**

**********************************************************

* “A” RECORD IS EQUAL TO “B” RECORD *

**********************************************************

*MATCH20:

MOVE 'AB' TO READFLAGS

MOVE BAUDITVAL TO AUDITVALUE

RDIFF = BAUDITVAL - ABOOKVAL

LIST STRATANO ASEQNO APURCNO

BAUDITVAL ABOOKVAL RDIFF

**

**********************************************************

* DO FREQUENCY REPORTS *

**********************************************************

*FREQ1:

IF STRATANO EQ 1 GOTO FQ01 ENDIF

IF STRATANO EQ 2 GOTO FQ02 ENDIF

IF STRATANO EQ 3 GOTO FQ03 ENDIF

IF STRATANO EQ 4 GOTO FQ04 ENDIF

IF STRATANO EQ 5 GOTO FQ05 ENDIF

IF STRATANO EQ 6 GOTO FQ06 ENDIF

IF STRATANO EQ 7 GOTO FQ07 ENDIF

IF STRATANO EQ 8 GOTO FQ08 ENDIF

ACCEPT

FQ01:

FREQ 01 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT -1000.00

GHAMT 0.00

FREQUENCY 01

ACCEPT

FQ02:

FREQ 02 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT 0.01

HIGHAMT 51.59

FREQUENCY 02

ACCEPT

FQ03:

FREQ 03 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT 51.60

HIGHAMT 190.62

Page 488: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–52 Reference Guide

FREQUENCY 03

ACCEPT

FQ04:

FREQ 04 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT 190.63

HIGHAMT 384.37

FREQUENCY 04

ACCEPT

FQ05:

FREQ 05 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT 384.38

HIGHAMT 4999.99

FREQUENCY 05

ACCEPT

FQ06:

FREQ 06 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT 5000.00

HIGHAMT 20000.00

FREQUENCY 06

ACCEPT

FQ07:

FREQ 07 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT -100.00

HIGHAMT 100.00

FREQUENCY 07

ACCEPT

FQ08:

FREQ 08 LOGARITHMIC

DISTFIELD AUDITVALUE

LOWAMT -100.00

HIGHAMT 100.00

FREQUENCY 08

ACCEPT

Page 489: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–53

*

***********************************************************

* DEFINE THE REPORT *

***********************************************************

*

ON CHANGE IN STRATANO

LIST SUM BAUDITVAL SUM ABOOKVAL SUM RDIFF

TALLY AT STRATANO+2

WITH 1 BEFORE AND 2 AFTER

ON FINAL

LIST SUM BAUDITVAL SUM ABOOKVAL SUM RDIFF

TALLY AT STRATANO+2

WITH 3 BEFORE

T1 'DIFFERENCES BETWEEN BOOK VALUES AND AUDITED VALUES'

WITH 2 AFTER

The recorded stratum samples file is the FILEA file, and the audited correction file is the FILEB file. The work area fields are defined. Note that AUDITVALUE is the field to be submitted to the frequency reports. FILEA is read if the READA flag is set to A, and FILEB is read if the READB flag is set to B. The A and B files are kept in sync by the sequential record number. If the B sequential record number is less than the A sequential record number, the stratum number and the value from the B record are moved to the appropriate work areas.

Additionally, READB is set to B so that on the next pass of Advantage VISION:Results automatic cycle, only FILEB is read. The value from the A record is moved to the AUDITVALUE work area. READA is set to A so that on the next pass of the Advantage VISION:Results automatic cycle, only FILEA is read.

If the A sequential record number is equal to the B sequential record number,

Both READA and READB are set to A and B, respectively

On the next pass of Advantage VISION:Results automatic cycle, both the A and B files are read

The audited value from the B record is moved to AUDITVALUE

The difference between the audited value and the recorded value is calculated

The pertinent information is printed in the report

The strata are separated into their proper frequency report. Application 01 is defined for stratum 1; application 02 is defined for stratum 2, and so on. The Advantage VISION:Results procedure statements take care of the processing logic in the program. Finally, the format of the report is defined.

Page 490: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–54 Reference Guide

Output for Part 2

After this run was submitted and completed, you received the following reports:

Frequency Distribution Report for Application 01

Frequency Distribution Report for Application 02

Frequency Distribution Report for Application 03

Frequency Distribution Report for Application 04

Frequency Distribution Report for Application 05

Frequency Distribution Report for Application 06

Frequency Distribution Report for Application 07

Frequency Distribution Report for Application 08

Frequency Distribution Report for Application 01

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 01

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

50.00- 40.01- 1 14.29 43.54- 24.84 43.54- 0.00 3.16

40.00- 30.01- 3 42.86 105.30- 60.07 35.10- 2.11 8.63

30.00- 20.01- 0 0.00 0.00 0.00 0.00 0.00 8.63

20.00- 10.01- 2 28.57 22.81- 13.01 11.41- 1.16 13.10

10.00- 9.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

9.00- 8.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

8.00- 7.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

7.00- 6.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

6.00- 5.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

5.00- 4.01- 0 0.00 0.00 0.00 0.00 0.00 13.10

4.00- 3.01- 1 14.29 3.64- 2.08 3.64- 0.00 14.09

TOTAL 7 100.00 175.29- 100.00

MEAN = 25.04- STANDARD ERROR OF THE MEAN = 5.509

STANDARD DEVIATION = 14.60 COEFFICIENT OF VARIATION = 0.583-

MINIMUM VALUE = 43.54- MAXIMUM VALUE = 3.64-

Page 491: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–55

Frequency Distribution Report for Application 02

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 02

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

3.00 3.99 1 0.80 3.88 0.08 3.88 0.00 0.99

4.00 4.99 0 0.00 0.00 0.00 0.00 0.00 0.99

5.00 5.99 0 0.00 0.00 0.00 0.00 0.00 0.99

6.00 6.99 0 0.00 0.00 0.00 0.00 0.00 0.99

7.00 7.99 0 0.00 0.00 0.00 0.00 0.00 0.99

8.00 8.99 0 0.00 0.00 0.00 0.00 0.00 0.99

9.00 9.99 0 0.00 0.00 0.00 0.00 0.00 0.99

10.00 19.99 5 4.00 76.99 1.54 15.40 1.85 8.06

20.00 29.99 13 10.40 359.69 7.20 27.67 2.01 19.46

30.00 39.99 35 35.00 1253.06 25.08 35.80 2.86 38.16

40.00 49.99 58 46.40 2628.52 52.62 45.32 2.85 62.23

50.00 51.59 10 8.00 507.61 10.16 50.76 0.40 66.22

MORE THAN 51.59 3 2.40 165.73 3.32 55.24 2.25 70.57

TOTAL 125 100.00 4995.48 100.00

MEAN = 39.96 STANDARD ERROR OF THE MEAN = 0.849

STANDARD DEVIATION = 9.49 COEFFICIENT OF VARIATION = 0.237

MINIMUM VALUE = 3.88 MAXIMUM VALUE = 57.91

Frequency Distribution Report for Application 03

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 03

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

LESS THAN 51.60 1 0.74 50.61 0.61 50.61 0.00 0.99

51.60 59.99 73 53.68 4077.24 49.13 55.85 2.62 25.74

60.00 69.99 47 34.56 3029.99 36.51 64.47 3.25 47.41

70.00 79.99 11 8.09 808.15 9.74 73.47 1.99 57.89

80.00 89.99 4 2.94 332.21 4.00 83.05 1.44 64.21

TOTAL 136 100.00 8298.20 100.00

MEAN = 61.02 STANDARD ERROR OF THE MEAN = 0.629

STANDARD DEVIATION = 7.33 COEFFICIENT OF VARIATION = 0.120

MINIMUM VALUE = 50.61 MAXIMUM VALUE = 85.10

Page 492: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–56 Reference Guide

Frequency Distribution Report for Application 04

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 04

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

190.63 199.99 1 0.77 193.62 0.50 193.62 0.00 3.06

200.00 299.99 65 50.00 17140.26 44.01 263.70 27.68 83.68

300.00 384.37 64 49.23 21609.91 55.49 337.65 22.85 157.16

TOTAL 130 100.00 38953.79 100.00

MEAN = 299.57 STANDARD ERROR OF THE MEAN = 4.004

STANDARD DEVIATION = 45.65 COEFFICIENT OF VARIATION = 0.152

MINIMUM VALUE = 193.62 MAXIMUM VALUE = 384.16

Frequency Distribution Report for Application 05

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 05

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

384.38 399.99 17 26.15 6681.68 12.37 393.04 4.39 16.29

400.00 499.99 13 20.00 5584.40 10.34 429.57 26.01 52.34

500.00 599.99 0 0.00 0.00 0.00 0.00 0.00 52.34

600.00 699.99 0 0.00 0.00 0.00 0.00 0.00 52.34

700.00 799.99 0 0.00 0.00 0.00 0.00 0.00 52.34

800.00 899.99 4 6.15 3349.29 6.20 837.32 25.19 72.34

900.00 999.99 6 9.23 5881.95 10.89 980.33 11.39 96.83

1000.00 1999.99 23 35.38 27637.11 51.18 1201.61 221.87 248.49

2000.00 2999.99 2 3.08 4860.33 9.00 2430.17 116.59 293.21

TOTAL 65 100.00 53994.76 100.00

MEAN = 830.69 STANDARD ERROR OF THE MEAN = 59.473

STANDARD DEVIATION = 479.35 COEFFICIENT OF VARIATION = 0.577

MINIMUM VALUE = 385.04 MAXIMUM VALUE = 2546.75

Page 493: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–57

Frequency Distribution Report for Application 06

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 06

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

5000.00 5999.99 1 10.00 5728.05 6.52 5728.05 0.00 31.62

6000.00 6999.99 2 20.00 12620.85 14.36 6310.43 171.29 76.34

7000.00 7999.99 1 10.00 7831.57 8.91 7831.57 0.00 107.96

8000.00 8999.99 1 10.00 8950.86 10.18 8950.86 0.00 139.58

9000.00 9999.99 1 10.00 9195.01 10.46 9195.01 0.00 171.20

10000.00 19999.99 4 40.00 43565.63 49.57 10891.41 473.01 371.20

TOTAL 10 100.00 87891.97 100.00

MEAN = 8789.20 STANDARD ERROR OF THE MEAN = 643.887

STANDARD DEVIATION = 2034.65 COEFFICIENT OF VARIATION = 0.231

MINIMUM VALUE = 5728.05 MAXIMUM VALUE = 11657.60

Frequency Distribution Report for Application 07

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 07

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

30.00 39.99 1 50.00 37.07 35.62 37.07 0.00 3.16

40.00 49.99 0 0.00 0.00 0.00 0.00 0.00 3.16

50.00 59.99 0 0.00 0.00 0.00 0.00 0.00 3.16

60.00 69.99 1 50.00 66.99 64.38 66.99 0.00 6.32

TOTAL 2 100.00 104.06 100.00

MEAN = 52.03 STANDARD ERROR OF THE MEAN = 10.610

STANDARD DEVIATION = 14.96 COEFFICIENT OF VARIATION = 0.288

MINIMUM VALUE = 37.07 MAXIMUM VALUE = 66.99

Page 494: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–58 Reference Guide

Frequency Distribution Report for Application 08

11/30/97 FREQUENCY DISTRIBUTION REPORT PAGE 1

APPLICATION 08

---- R A N G E ----- COUNT % OF TOTAL % OF MEAN STANDARD SQUARE ROOT L O W H I G H OF ITEMS ITEMS OF ITEMS TOTAL DEVIATION RANGE X COUNT

TOTAL 1 0.00 248.77 0.00

MEAN = 248.77 STANDARD ERROR OF THE MEAN = 0.000

STANDARD DEVIATION = 0.00 COEFFICIENT OF VARIATION = 0.000

MINIMUM VALUE = 248.77 MAXIMUM VALUE = 248.77

Completing Forms

Complete the evaluation by filling in the following documents:

Stratified Sampling-Mean Estimation Value Estimation Sheet (calculate the estimated value of the originating population). The blank version of this form is shown in Mean Estimation- Value Estimation Sheet, and the completed version is shown in Completed Mean Estimation- Value Estimation Sheet.

Stratified Sampling-Mean Estimation Precision Adjustment Sheet (calculate the monetary precision of the estimated value of the originating population). The blank version of this form is shown in Mean Estimation Precision Adjustment Sheet, and the completed version is shown in Completed Mean Estimation Precision Adjustment Sheet.

Page 495: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–59

Mean Estimation- Value Estimation Sheet

STRATIFIED SAMPLING - MEAN ESTIMATION VALUE ESTIMATION SHEET

STRATUM 1

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 2

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 3

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 4

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 5

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 6

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 7

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 8

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 9

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

Page 496: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–60 Reference Guide

STRATUM 10

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 11

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

ESTIMATED VALUE OF POPULATION (Sum lines c for Strata 1-11) __________

Completed Mean Estimation- Value Estimation Sheet

STRATIFIED SAMPLING - MEAN ESTIMATION VALUE ESTIMATION SHEET

STRATUM 1

a. Actual No. of Items in Stratum (ME) 7

b. Stratum Mean (FQ) 25.04-

c. Estimated Value of Stratum (a x b) 175.29-

STRATUM 2

a. Actual No. of Items in Stratum (ME) 2,543

b. Stratum Mean (FQ) 39.96

c. Estimated Value of Stratum (a x b) 101,618.28

STRATUM 3

a. Actual No. of Items in Stratum (ME) 2,289

b. Stratum Mean (FQ) 61.02

c. Estimated Value of Stratum (a x b) 139,674.78

STRATUM 4

a. Actual No. of Items in Stratum (ME) 511

b. Stratum Mean (FQ) 299.57

c. Estimated Value of Stratum (a x b) 153,080.27

STRATUM 5

a. Actual No. of Items in Stratum (ME) 65

b. Stratum Mean (FQ) 830.69

c. Estimated Value of Stratum (a x b) 53,994.76

STRATUM 6

a. Actual No. of Items in Stratum (ME) 10

b. Stratum Mean (FQ) 8,789.20

c. Estimated Value of Stratum (a x b) 87,891.97

Page 497: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–61

STRATUM 7

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 8

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 9

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 10

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

STRATUM 11

a. Actual No. of Items in Stratum (ME) __________

b. Stratum Mean (FQ) __________

c. Estimated Value of Stratum (a x b) __________

ESTIMATED VALUE OF POPULATION (Sum lines c for Strata 1-11) 536,084.77

Page 498: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–62 Reference Guide

Mean Estimation Precision Adjustment Sheet

STRATIFIED SAMPLING - MEAN ESTIMATION PRECISION ADJUSTMENT SHEET

STRATUM 1

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 2

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 3

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 4

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 5

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

Page 499: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–63

STRATUM 6

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 7

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 8

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 9

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 10

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 11

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a - b __________

e. c x c __________

f. (a x d x e) / b __________

Page 500: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–64 Reference Guide

FINAL CALCULATIONS:

I. Sum of Lines f for Strata 1 through 11 __________

II. Normal Distribution Z Factor (ME) __________

III. The Square Root of Line I __________

IV. Final Overall Precision (Line II x Line III) __________

Completed Mean Estimation Precision Adjustment Sheet

MEAN ESTIMATION PRECISION ADJUSTMENT SHEET

STRATUM 1

a. Actual No. of Items in Stratum (ME) __________7_

b. Actual No. of Items in Sample (ME) __________7

c. Standard Deviation of Stratum (FQ) ___________

d. a – b ___________

e. c x c ___________

f. (a x d x e) / b 0.00 __________0.00_

STRATUM 2

a. Actual No. of Items in Stratum (ME) ______2,543

b. Actual No. of Items in Sample (ME) ________125

c. Standard Deviation of Stratum (FQ) _______9.49

d. a - b ______2,418

e. c x c ____90.0601

f. (a x d x e) / b 4,430,217.7067

STRATUM 3

a. Actual No. of Items in Stratum (ME) ______2,289

b. Actual No. of Items in Sample (ME) ________136

c. Standard Deviation of Stratum (FQ) _______7.33

d. a - b ______2,153

e. c x c ____53.7289

f. (a x d x e) / b 1,946,968.2233

STRATUM 4

a. Actual No. of Items in Stratum (ME) ________511

b. Actual No. of Items in Sample (ME) ________130

c. Standard Deviation of Stratum (FQ) ______45.65

d. a - b ________381

e. c x c __2,083.9225

f. (a x d x e) / b 3,120,930.4265

Page 501: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–65

STRATUM 5

a. Actual No. of Items in Stratum (ME) ________65_

b. Actual No. of Items in Sample (ME) ________65_

c. Standard Deviation of Stratum (FQ) ___________

d. a - b ___________

e. c x c ___________

f. (a x d x e) / b _______0.00__

STRATUM 6

a. Actual No. of Items in Stratum (ME) ________10_

b. Actual No. of Items in Sample (ME) ________10_

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b _______0.00_

STRATUM 7

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b ___________

STRATUM 8

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 9

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b __________

STRATUM 10

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b __________

Page 502: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–66 Reference Guide

STRATUM 11

a. Actual No. of Items in Stratum (ME) __________

b. Actual No. of Items in Sample (ME) __________

c. Standard Deviation of Stratum (FQ) __________

d. a – b __________

e. c x c __________

f. (a x d x e) / b __________

FINAL CALCULATIONS:

I. Sum of Lines f for Strata 1 through 11 9,498,116.3565

II. Normal Distribution Z Factor (ME) ________1.6449

III. The Square Root of Line I ______3,081.90

IV. Final Overall Precision (Line II x Line III) _______$5,069.42

All the items in stratum 1 were included in the sample drawn from stratum 1; therefore, the estimated value of the stratum is equal to the actual value of the audited sample, as shown in the total of the Total of Items column in the Frequency Distribution Report for stratum 1 (see the report in Frequency Distribution Report for Application 01). In stratum 2, a sample of 125 items was drawn from the 2,543-item stratum.

The Actual Number of Items in Stratum is taken from the Advantage VISION:Excel Stratified Sampling Summary Report for the mean estimation method, as denoted by the ME in parentheses (see the report in Advantage VISION:Excel Stratified Sampling Summary Report). The Stratum Mean is taken from the mean in the Frequency Distribution Report for Stratum 2, as denoted by the FQ in parentheses (see the report in Frequency Distribution Report for Application 02). The Estimated Value of Stratum is calculated using the following formula:

Actual Number of Items in Stratum × Stratum Mean= Estimated Value of Stratum

The audited estimated value of the population is $536,084.77, as shown in Completed Mean Estimation- Value Estimation Sheet.

The Actual Number of Items in Stratum and the Actual Number of Items in Sample are taken from the Advantage VISION:Excel Stratified Sampling Summary Report for the mean estimation method, as denoted by the ME in parentheses (see the report in Advantage VISION:Excel Stratified Sampling Summary Report).

The Standard Deviation of Stratum is taken from the Frequency Distribution Report for Stratum 2 (see the report in Frequency Distribution Report for Application 02). The report given in Completed Mean Estimation Precision Adjustment Sheet, shows the completed calculations for the Precision Adjustment Sheet.

Page 503: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

Chapter 17: Stratified Mean Estimation Sampling 17–67

Final Calculations

The calculations used to determine the Final Overall Precision are shown in the following table:

Description Equation Result

a Sum of Lines f for Strata 1–11 4,430,217.7067 +

1,946,968.2233 +

3,120,930.4265 =

9,498,116.3565

b Normal Distribution Z Factor (ME)

(see the report in Advantage VISION:Excel Stratified Sampling Summary Report)

1.6449

c The Square Root of a (above)

3081.90

d Final Overall Precision 1.6449 x 3081.90 = 5,069.42

The estimated value calculated does not include the missing or duplicate records. After the auditing adjustments, the Frequency Distribution Report for stratum 7, which represents the duplicate records, shows that the total value represented by the duplicate records is 104.06 (see the output in Frequency Distribution Report for Application 07). After the auditing adjustments, the Frequency Distribution Report for stratum 8, which represents the missing records is $248.77 (see Frequency Distribution Report for Application 08). Therefore, the audited estimated value of the purchase file is calculated as shown in the following table:

Description Value

Estimated Value of the Population + 536,084.77

Total Value of Duplicate Records + 104.06

Total Value of Missing Records + + 248.77

Estimated Value of Purchase File 536,437.60

The Final Overall Precision is $5,069.42 (from the Final Overall Precision table shown in Final Calculations). Therefore, the upper limit is calculated as follows:

Upper Limit = Estimated Value of Purchase File + Final Overall Precision

$541,507.02 = $536,437.60 + $5,069.42

Page 504: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Mean Estimation Sampling Example

17–68 Reference Guide

Conclusions

The total value of the originating population is approximately $536,437.60. You can be 95 percent confident that the value of the originating population does not exceed $541,507.02.

From the output shown in Frequency Distribution Report, note that the total of the recorded population is $539,851.91. Because this value is within 0.64 percent (less than the 1.5 percent precision wanted) of $536,437.60 and is less than the upper limit $541,507.02, you can conclude that the total value of the inventory purchases file is reasonably correct.

Page 505: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–1

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses

This chapter describes scatter diagrams, linear regression analyses, and trend line analyses and is divided into the following sections:

Definition of various methods of analyses

Input requirements for Advantage VISION:Excel

Regression analyses

Output from Advantage VISION:Excel

Linear regression analyses example

Trend Line analyses example

These topics are described in detail, followed by examples, which show how to analyze with Advantage VISION:Excel.

Definition of Various Methods of Analyses Scatter diagrams, linear regression analyses, and trend line analyses are methods for studying and measuring the relationship between two variables when data concerning the two variables are compiled empirically.

Use scatter diagrams to graphically show the relationship between the two variables.

Use linear regression analyses to define a theoretical straight line that ties the dependent variable to the independent variable.

Trend line analyses is a subset of linear regression analyses in which the independent variable is time-dependent.

Page 506: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Various Methods of Analyses

18–2 Reference Guide

Scatter Diagram

A scatter diagram is the plotting of a dependent variable against an independent variable in a graphic representation. Each set of X, Y values defines a point on the graph. Consider the following values for X and Y.

Variable Values

X 1 4 5 7 9 10 12 15 18

Y 5 11 13 15 21 25 30 35 40

The following graph shows the variable information plotted in a scatter diagram.

Page 507: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Various Methods of Analyses

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–3

Linear Regression Analyses

Use linear regression analyses to define the equation of a straight line by which the dependent variable can be estimated from the independent variable. A straight line is defined by the following equation:

Y = a + bX

where:

Y—The dependent variable.

X—The independent variable.

a —The Y intercept (the point at which the line intersects the Y-axis).

b—The slope of the line.

Using the method of least squares, a and b above are calculated so that the straight line that is defined represents the line which fits best through the actual points. For example, for the information shown above, the linear regression analysis line would be:

Y = 2.2938 + 2.1525X

The following graph shows this straight line in the scatter diagram. The dependent value Y could now be estimated by the independent value X using the above equation. Therefore, if

X=2, then Y=6.5988.

Page 508: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Definition of Various Methods of Analyses

18–4 Reference Guide

Because the straight line approximates the positioning of the actual data, the prediction of the dependent variable as a function of the independent variable is subject to a degree of inaccuracy. The amount of that inaccuracy can be estimated within confidence limits determined by the numerical value of the standard error of the estimate.

The standard error of the estimate has the same relationship to the regression line as the standard deviation has to the arithmetic mean. The normal curve Z values are used in much the same way (that is, 68.26 percent of the deviations are within one standard error of the estimate from the regression line; 95.44 percent of the deviations are within two standard errors of the regression line).

For example, the standard error of the estimate in the above data is 1.1789. The predicted dependent value for the independent value 4 is 10.9038. With a 95.44 percent confidence, you can be certain that the actual dependent value is in the range 10.9038 ± 2.3578 (or between 8.5460 and 13.2616).

The “Correlation Coefficient” is a numerical measure of the amount of relationship between the two variables. The value of the correlation coefficient ranges from -1 to +1. A value of zero indicates that there is no linear relationship between the two variables. When the value is positive, the Y values increase as the X values increase (the regression line slopes upward from left to right). When the value is negative, the Y values decrease as the X values increase (the regression line slopes downward from left to right).

The “Coefficient of Determination” indicates how well the regression line approximates the distribution of points. Its value may range from zero to one. The closer it is to zero, the less likely the two variables are linearly related. The closer it is to one, the closer the distribution of points is to the regression line.

The “Coefficient of Non-Determination” is one minus the coefficient of determination. The closer it is to one, the less likely the two variables are linearly related. The closer it is to zero, the closer the distribution of points is to the regression line.

Advantage VISION:Excel automatically calculates the slope and Y intercept of the regression line, the standard error of the estimate, the correlation coefficient, the coefficient of determination, and the coefficient of non-determination.

Page 509: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Input Requirements for Advantage VISION:Excel

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–5

Trend Line Analyses

Trend line analyses as implemented in Advantage VISION:Excel are a sub function of linear regression analyses in which the dependent variable is time-oriented (for example, months or years).

Further Sources of Information

Because the intent of this chapter is not to give a discourse on statistics, but merely a brief overview of the subject, you may want to supplement this material with information taken from the linear regression analysis and correlation analysis chapter of an elementary statistics textbook.

The sections that follow describe the formats to use when requesting scatter diagrams, linear regression analyses, or trend line analyses plotting the dependent variable against the independent variable for a graphic representation of the relationship between the two.

Input Requirements for Advantage VISION:Excel The Advantage VISION:Results FILE and field definition statements for scatter diagrams, linear regression analyses, and trend line analyses are identical except for the first keyword. In all cases, the field definition statements must precede the statement defining your scatter diagram, linear regression analysis, or trend line analysis request. The format of these statements is shown in the following section— Syntax for SCATTER Statement, Syntax for LINEAR Statement, and Syntax for TREND Statement sections respectively.

Syntax for SCATTER Statement

SCATTER nn XNAME dataname YNAME dataname

[TITLE dataname]

XSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]

YSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]

Syntax for LINEAR Statement

LINEAR nn XNAME dataname YNAME dataname

[TITLE dataname]

{XSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]]

[YSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]]

Page 510: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Input Requirements for Advantage VISION:Excel

18–6 Reference Guide

Syntax for TREND Statement

TREND nn XNAME dataname YNAME dataname

[TITLE dataname]

[XSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]]

[YSCATTER [n] FROM nnnnnnnnnnnnnn BY nnnnnnnnnnnnnn [FOR nn]]

Keyword Description

SCATTER

(in Syntax for SCATTER Statement)

Required. Indicates that a scatter diagram is requested. No abbreviations are allowed. The keywords LINEAR or TREND can be used instead of SCATTER; the three terms are interchangeable.

LINEAR (in Syntax for LINEAR Statement)

Required. Describes the application as a linear regression analysis. No abbreviations are allowed. The keywords TREND or SCATTER can be used instead of LINEAR; the three terms are interchangeable.

TREND (in Syntax for TREND Statement)

Required. Describes the application as trend line analysis. No abbreviations are allowed. The keywords LINEAR and SCATTER can be used instead of TREND; the three terms are interchangeable.

nn Required. A unique application number must be assigned to each request, even if different commands are used in the defining statements. This number is an integer with a value from 1 to 99.

XNAME Required. The data name of the field to be used as the independent (X) variable. Must be previously defined in a field definition statement. Any valid data name can be used.

YNAME Required. The data name of the field to be used as the dependent (Y) variable. Must be previously defined in a field definition statement. Any valid data name can be used.

TITLE The data name of the field containing the report title presented as a literal. The contents of the title field print at the top of the linear regression analysis (and scatter diagram, if also requested). Must be previously defined in a field definition statement. Any valid data name can be used. The maximum size of the field is 70 characters.

Page 511: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Input Requirements for Advantage VISION:Excel

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–7

Keyword Description

XSCATTER Required. This value is the scaling factor for the independent variable (X-axis). The values on the X-axis are divided by this scaling factor before being printed. If omitted, this value defaults to 1 unit.

Blank— 1 unit

1 — Thousands

2 — Millions

3 — Billions

4 — Trillions

FROM Required. The FROM starting value is on the X-axis of the scatter diagram. It is a numeric value. Negative values must be preceded by a minus sign. A leading dollar sign, a floating decimal point, and commas are allowed. If both a dollar sign and a minus sign are used, the dollar sign must precede the minus sign; therefore, $- is correct. If no decimal point is specified, right-alignment is assumed.

The value (including digits, dollar sign, minus sign, decimal point, and commas) cannot exceed 14 characters. The unit value of this field is determined by the XSCATTER scaling factor. Therefore, if 1 is coded following XSCATTER, 1.5 coded after FROM represents 1.5 thousand.

BY Required. The BY value is the unit value on the X-axis of the scatter diagram. This must be a positive numeric value. A leading dollar sign, a floating decimal point, and commas are allowed. The value (including digits, dollar sign, decimal point, and commas) cannot exceed 14 characters. The unit value of this field is determined by the XSCATTER scaling factor. Therefore, if 2 is coded following XSCATTER, 4.15 coded after BY represents 4.15 million.

FOR This value is the number of intervals to be printed on the X-axis of the scatter diagram. The value of this field must be an integer between 1 and 30, inclusive. If omitted, this value defaults to 30.

Page 512: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Input Requirements for Advantage VISION:Excel

18–8 Reference Guide

Keyword Description

YSCATTER Required. This value is the scaling factor for the dependent variable (Y-axis). The values on the Y-axis are divided by this scaling factor before being printed. If omitted, this value defaults to 1 unit.

Blank— 1 unit

1 — Thousands

2 — Millions

3 — Billions

4 — Trillions

FROM Required. The FROM starting value is on the Y-axis of the scatter diagram. It is a numeric value. Negative values must be preceded by a minus sign. A leading dollar sign, a floating decimal point, and commas are allowed. If both a dollar sign and a minus sign are used, the dollar sign must precede the minus sign; therefore, $- is correct. If no decimal point is specified, right-alignment is assumed. The value (including digits, dollar sign, minus sign, decimal point, and commas) cannot exceed 14 characters. The unit value of this field is determined by the YSCATTER scaling factor. Therefore, if 1 is coded following YSCATTER, 1.5 coded after FROM represents 1.5 thousand.

BY Required. The BY value is the unit value on the Y-axis of the scatter diagram. This must be a positive numeric value. A leading dollar sign, a floating decimal point, and commas are allowed. The value (including digits, dollar sign, decimal point, and commas) cannot exceed 14 characters. The unit value of this field is determined by the YSCATTER scaling factor. Therefore, if 2 is coded following YSCATTER, 4.15 coded after BY represents 4.15 million

FOR This value is the number of intervals to be printed on the Y-axis of the scatter diagram. The value of this field must be an integer between 1 and 20, inclusive. If omitted, this value defaults to 20.

Note: The remaining fields are only required if you are requesting a scatter diagram.

Page 513: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Regression Analysis

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–9

Regression Analysis To start the linear regression analysis, specify the REGRESSION command in your program procedure logic. If this command is omitted, no regression analysis is performed.

REGRESSION nn

The REGRESSION command and the application number nn are directly associated with the LINEAR, TREND, or SCATTER definition statements. The application numbers for each request within a single Advantage VISION:Excel program must be unique, even if you use different keywords in your defining statements.

Implementing Regression Analysis

For example, if a single program included requests for a linear regression analysis and a trend line analysis with a scatter diagram, specify two unique application numbers, one for each report, as shown in the following examples:

Regression Command: Example 1

Regression Command: Example 2

Regression Command: Example 1

LINEAR 01 XNAME SALES YNAME PROFIT

TREND 02 XNAME YEARS YNAME SALES TITLE HDRTITLE

XSCATTER FROM 1997 BY 1 FOR 12

YSCATTER 1 FROM 0 BY 100 FOR 20

Regression Command: Example 2

When you are requesting a scatter diagram, linear regression analysis, or trend line analysis, you can use the keywords LINEAR, TREND, and SCATTER interchangeably in your request statements. The command to use in your procedure logic is REGRESSION; this command is the same for all three applications. You can also specify the type of regression analysis (LINEAR, TREND, or SCATTER) following the REGRESSION command.

REGRESSION LINEAR 01

REGRESSION TREND 02

REGRESSION SCATTER 03

If the REGRESSION command is omitted, no scatter diagram, linear regression analysis, or trend line analysis is performed or produced, even though the application is defined in your program.

Page 514: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Regression Analysis

18–10 Reference Guide

Linear Regression Analysis and Scatter Diagram Input Statements

The following code, shows the Advantage VISION:Excel/Advantage VISION:Results statements required to generate a linear regression analysis and scatter diagram to determine if a linear relationship exists between the values in the fields SALES and PROFIT on the file, INFILE.

FILE INFILE 1

SALES 8 1 PD 2 2

PROFIT 8 PD 2 3

LINEAR 01 XNAME SALES YNAME PROFIT 4

XSCATTER 2 FROM 0 BY .5 FOR 24 5

YSCATTER 2 FROM 0 BY .2 FOR 18 6

REGRESSION LINEAR 01 7

The numbers on the right are used to explain the Advantage VISION:Excel and Advantage VISION:Results statements. Statement 1 is the FILE statement, defining INFILE as the input file. Statements 2 and 3 are the field definition statements, defining the fields that contain the independent data (SALES) and the dependent data (PROFIT).

The FILE and field definition statements must precede the statement defining your scatter diagram, linear regression analysis, or trend line analysis applications.

Statements 4–6 are requesting linear regression analysis and a scatter diagram. The fields defined by the data names SALES and PROFIT are used as independent and dependent variables, respectively.

For the scatter diagram parameters, a scaling factor of 2 for both the sales and profit data is specified; therefore, the data for both the independent (X-axis) and dependent (Y-axis) variables are expressed in millions.

Statements 5 and 6 contain the following information:

Plotting for both sales and profit data is to begin with a zero value, because FROM 0 has been coded for both XSCATTER and YSCATTER.

The interval size on the X-axis (sales data) is to be 0.5 million; the Y-axis interval size is 0.2 million.

24 intervals on the X-axis (out of a maximum of 30) and 18 on the Y-axis (out of a maximum of 20) have been requested.

Statement 7, the REGRESSION command, constitutes the program procedure logic. This command starts a linear regression analysis with a scatter diagram, as defined in statements 4–6.

Page 515: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Output from Advantage VISION:Excel

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–11

Linear Regression Analysis Input Statement

To request a linear regression analysis only, you would omit statements 5 and 6 from Linear Regression Analysis and Scatter Diagram Input Statements and only code the statement shown in the following code.

LINEAR 01 XNAME SALES YNAME PROFIT

Output from Advantage VISION:Excel Linear Regression analysis can be done with or without generating a scatter diagram. The following sections include programs to show this with the help of an example.

Linear Regression Analysis without Scatter Diagram

This is an example of the output generated by Advantage VISION:Excel when a linear regression analysis without a scatter diagram is requested.

11/30/97 VISION:EXCEL REGRESSION ANALYSIS PAGE 1

APPLICATION 1

LABEL OF INDEPENDENT (X) VARIABLE XVAR

LABEL OF DEPENDENT (Y) VARIABLE YVAR

REGRESSION LINE Y = A + BX

WHERE A = 19.9196-

AND B = 3.8720

STANDARD ERROR OF ESTIMATE 14.6635

CORRELATION COEFFICIENT .7297

COEFFICIENT OF DETERMINATION .5324

COEFFICIENT OF NON-DETERMINATION .4676

NO. OF RECORDS PROCESSED 140

TOTAL OF X VALUES 273.0

TOTAL OF Y VALUES 1,731.69-

MINIMUM X VALUE 5.0-

MAXIMUM X VALUE 8.9

MINIMUM Y VALUE 34.44-

MAXIMUM Y VALUE 46.77

Page 516: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Output from Advantage VISION:Excel

18–12 Reference Guide

Advantage VISION:Excel automatically calculates the following information:

Y intercept of the regression line (A).

Slope of the regression line (B).

Standard error of the estimate.

Correlation coefficient.

Coefficient of determination.

Coefficient of non-determination.

Sum of the X values.

Sum of the Y values.

Minimum and maximum X values.

Minimum and maximum Y values.

Total number of records processed.

Linear Regression Analysis with Scatter Diagram

This report shows the Regression analysis along with the requested scatter diagram.

11/30/97 VISION:EXCEL REGRESSION ANALYSIS PAGE 1

APPLICATION 1

LABEL OF INDEPENDENT (X) VARIABLE XVAR

LABEL OF DEPENDENT (Y) VARIABLE YVAR

X SCALING FACTOR MILLIONS

X STARTING VALUE 5-

X UNIT VALUE 1

X NO. OF INTERVALS 16

Y SCALING FACTOR MILLIONS

Y STARTING VALUE 40-

Y UNIT VALUE 6

Y NO. OF INTERVALS 20

REGRESSION LINE Y = A + BX

WHERE A = 19.9196-

AND B = 3.8720

STANDARD ERROR OF ESTIMATE 14.6635

CORRELATION COEFFICIENT .7297

COEFFICIENT OF DETERMINATION .5324

COEFFICIENT OF NON-DETERMINATION .4676

NO. OF RECORDS PROCESSED 140

Page 517: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Output from Advantage VISION:Excel

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–13

TOTAL OF X VALUES 273.0

TOTAL OF Y VALUES 1,731.69-

MINIMUM X VALUE 5.0-

MAXIMUM X VALUE 8.9

MINIMUM Y VALUE 34.44-

MAXIMUM Y VALUE 46.77

NO. OF RECORDS OUTSIDE OF SCATTERGRAM 0

TOTAL X VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0.0

TOTAL Y VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0.00

When the scatter diagram is requested, the report also includes the following information, in addition to the information previously listed:

Starting and unit value for X

Number of X intervals

Starting and unit value for Y

Number of Y intervals

Number of values that would not fit into the scatter diagram

Sum of the X and Y values not included in the scatter diagram

If a large number of values are not included in the scatter diagram, the program can be rerun with more appropriate starting values, unit values, and number of intervals determined by the minimum and maximum X and Y values.

Page 518: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Output from Advantage VISION:Excel

18–14 Reference Guide

The following graph is an example of the Advantage VISION:Excel scatter diagram.

Page 519: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression Analysis Example

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–15

Evaluation of Output

The purpose of linear regression analysis is to find and define a straight line that adequately describes a body of data involving two variables. The coefficient of determination indicates the following:

Whether or not the two variables are linearly related.

The form of the data within the scatter diagram.

In the linear regression analysis output shown in Linear Regression Analysis with Scatter Diagram, the coefficient of determination is 0.5324. Because it is not close to 1, it is very likely that the data does not conform to a straight line very well. The graph shown in Scatter Diagram reinforces this conclusion. Therefore, in this case, the regression line used to estimate the dependent variable from the independent variable would not be very reliable.

Linear Regression Analysis Example The marketing manager for company ABC would like to determine the relationship between weekly sales and profit for the last 200 weeks. The data necessary for this analysis are maintained on an automated file.

Linear Regression Analysis Input Statements

The following code shows the input statements required by Advantage VISION:Excel/Advantage VISION:Results program that performs this analysis.

FILE INFILE FB 65 650

SALES 8 1 PD 2

PROFIT 8 PD 2

LINEAR 01 XNAME SALES YNAME PROFIT

XSCATTER 2 FROM 0 BY .5 FOR 24

YSCATTER 2 FROM 0 BY .2 FOR 18

REGRESSION LINEAR 1

Page 520: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression Analysis Example

18–16 Reference Guide

Linear Regression Analysis

The following report shows the linear regression analysis report.

11/30/97 VISION:EXCEL REGRESSION ANALYSIS PAGE 1

APPLICATION 1

LABEL OF INDEPENDENT (X) VARIABLE SALES

LABEL OF DEPENDENT (Y) VARIABLE PROFIT

X SCALING FACTOR MILLIONS

X STARTING VALUE 0

X UNIT VALUE 0.5

X NO. OF INTERVALS 24

Y SCALING FACTOR MILLIONS

Y STARTING VALUE 0

Y UNIT VALUE 0.2

Y NO. OF INTERVALS 18

REGRESSION LINE Y = A + BX

WHERE A = 22,853.7575 E+1

AND B = .3016

STANDARD ERROR OF ESTIMATE 11,800.9206 E+1

CORRELATION COEFFICIENT .9913

COEFFICIENT OF DETERMINATION .9827

COEFFICIENT OF NON-DETERMINATION .0173

NO. OF RECORDS PROCESSED 200

TOTAL OF X VALUES 1,121,897,320.00

TOTAL OF Y VALUES 384,046,724.00

MINIMUM X VALUE 233,910.00

MAXIMUM X VALUE 10,528,290.00

MINIMUM Y VALUE 130,657.00

MAXIMUM Y VALUE 3,509,523.00

NO. OF RECORDS OUTSIDE OF SCATTERGRAM 0

TOTAL X VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0.00

TOTAL Y VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0.00

Page 521: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Trend Line Analysis Example

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–17

Scatter Diagram for the Example

Because the correlation coefficient of 0.9827 is close to 1, the regression line adequately describes the data. The scatter diagram confirms this conclusion.

Trend Line Analysis Example The marketing manager for Company XYZ would like to determine the trend in sales over the last ten years. The sales data are maintained on an automated file.

Trend Line Analysis Input Statements

This code shows the Advantage VISION:Excel/Advantage VISION:Results program requesting a trend line analysis. Note that the title YEARLY SALES TREND, 1983 TO PRESENT prints at the top of both the linear regression analysis and the scatter diagram. This was obtained by including the optional keyword, TITLE, in the trend line statement and following it with a data name. The data name HDRTITLE was chosen and defined with the literal value YEARLY SALES TREND, 1983 TO PRESENT.

Page 522: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Trend Line Analysis Example

18–18 Reference Guide

The program code is shown as follows:

FILE INFILE INPUT

YEARS 3 1 PD

SALES 8 PD 2

WORKAREA

HDRTITLE 35 1 VALUE 'YEARLY SALES TREND, 1983 TO PRESENT'

TREND 01 XNAME YEARS YNAME SALES TITLE HDRTITLE

XSCATTER FROM 1983 BY 1 FOR 12

YSCATTER 1 FROM 0 BY 100 FOR 12

REGRESSION TREND 1

Trend Line Linear Regression Analysis

The following report shows the linear regression analysis.

YEARLY SALES TREND, 1983 TO PRESENT

11/30/97 VISION:EXCEL REGRESSION ANALYSIS PAGE 1

APPLICATION 1

LABEL OF INDEPENDENT (X) VARIABLE YEARS

LABEL OF DEPENDENT (Y) VARIABLE SALES

LABEL OF TITLE FIELD (OPTIONAL) HDRTITLE

X STARTING VALUE 1,979

X UNIT VALUE 1

X NO. OF INTERVALS 12

Y SCALING FACTOR THOUSANDS

Y STARTING VALUE 0

Y UNIT VALUE 100

Y NO. OF INTERVALS 12

REGRESSION LINE Y = A + BX

WHERE A = 22,144.8336- E+4

AND B = 11,229.5661 E+1

STANDARD ERROR OF ESTIMATE 2,780.9550 E+1

CORRELATION COEFFICIENT .9963

COEFFICIENT OF DETERMINATION .9926

COEFFICIENT OF NON-DETERMINATION .0074

NO. OF RECORDS PROCESSED 10

TOTAL OF X VALUES 19,775

TOTAL OF Y VALUES 6,164,346.11

MINIMUM X VALUE 1,979

MAXIMUM X VALUE 1,989

MINIMUM Y VALUE 74,776.30

MAXIMUM Y VALUE 1,097,729.38

NO. OF RECORDS OUTSIDE OF SCATTERGRAM 0

Page 523: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Trend Line Analysis Example

Chapter 18: Scatter Diagrams and Linear Regression with Trend Line Analyses 18–19

TOTAL X VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0

TOTAL Y VALUE OF RECORDS OUTSIDE OF SCATTERGRAM 0.00

The following scatter diagram is generated for the Trend Line regression analysis.

Page 524: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 525: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix A: Reserved Words A–1

Appendix A: Reserved Words

The Advantage VISION:Excel reserved words define fields that provide communication between Advantage Vision:Excel and Advantage VISION:Results. Advantage VISION:Excel automatically generates the appropriate reserved word fields.

When using Advantage VISION:Excel, do not define fields with data names that are identical to reserved words. To do so causes compilation errors and produces diagnostic messages.

Since many reserved words start with DYL, do not define fields with data names that start with DYL.

This appendix describes each of the Advantage VISION:Excel reserved words. For more information on Advantage VISION:Results reserved words, see the Advantage VISION:Results Reference Summary.

Universal Reserved Word The DYLxxyyCB reserved word is common to all the applications: aging analysis, letter writing, frequency distribution/histograms, linear regression/trend line analysis/scatter diagrams, and sampling.

DYLxxyyCB

This reserved word designates a set of contiguous fields that provide communication between Advantage VISION:Results and Advantage VISION:Excel for a given application.

xx is one of the following function codes:

AG — Aging analysis

CN — Letter writing

FQ — Frequency distribution/histograms

LR — Linear regression/trend line analysis/scatter diagrams

SP — Sampling

yy is the application number.

Thus, DYLAG04CB is a communication area for the aging function (indicted by the AG) application 4 (indicated by the number 04).

Page 526: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Universal Reserved Word

A–2 Reference Guide

A reserved word communication area is set up for each application you enter.

Advantage VISION:Results sets the value of the first four bytes of each communication area equal to the function code plus application number. Thus, the first four bytes of DYLAG04CB are AG04.

The next four bytes in the communication area contain the address of the control block for the application. The control block contains information entered through Advantage VISION:Excel statements like population size, sample size, and so on, as well as any values accumulated and calculated by Advantage VISION:Excel.

For example, attribute estimation sampling requires that Advantage VISION:Excel calculate the sample size. Advantage VISION:Excel stores this value in the control block for the attribute estimation sampling application.

The reserved words generated for a typical aging application using an application number of 4 are shown as follows:

DYLAG04CB

DYL4TRNDAT

DYL4001030

DYL4031090

DYL4091999

DYL4UDR001

DYL4OVR999

DYL4ORP999

DYLFILECHK

DYLAG04CB is the reserved word field that defines the communication area for aging application 04.

DYL4TRNDAT and DYL4001030–DYL4ORP999 are reserved word fields defined within DYLAG04CB.

Within the communication area for aging, confirmation notice/letter writing, and sampling applications, several additional reserved word fields are defined, as described in the following sections.

Page 527: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Reserved words

Appendix A: Reserved Words A–3

Aging Reserved words The x in each reserved word represents the application number from 0 to 9. The 0 to 9 range applies only to aging application numbers.

DYLxTRNDAT

This aging application field contains the transaction date in MMDDYY format. If this field is blank, the transaction in the record is numerically invalid.

DYLxTRNDT4

This aging application field is the same as DYLxTRNDAT. This field only exists if you specify the transaction date as a 4-digit year. The format is MMDDYYYY. If this field is blank, the transaction in the record is numerically invalid.

DYLxyyyzzz

yyy is the lower limit of the age range. zzz is the upper limit of the age range.

DYLxyyyzzz is an amount field that has the same characteristics as the amount field being aged, except that it can be one byte larger.

When the transaction date in a record falls into the age range represented by yyy through zzz days, the amount in the record being aged is moved into the field DYLxyyyzzz. For example, DYL1001030 is the amount field for application 1, with the age range from 1 to 30 days. One of these fields is generated for each aging group requested by the user.

DYLxUDRyyy

yyy is the lowest From-Date of the aging application.

DYLxUDRyyy is an amount field that has the same characteristics as the DYLxyyyzzz fields. When the transaction date in a record is below the yyy days, the amount in the record being aged is placed in the field DYLxUDRyyy. For example, if accounts are being aged from 1 to 999 days (1-30, 31-90, 91-180, and 181-999), the amount for any account whose transaction date is below one day would be found in the field DYLxUDR001.

Page 528: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Reserved words

A–4 Reference Guide

DYLxOVRyyy

yyy is the highest To-Date in the aging application.

DYLxOVRyyy is an amount field that has the same characteristics as the DYLxyyyzzz field. When the transaction date in a record is above the yyy days, the amount in the record being aged is placed in the field DYLxOVRyyy. For example, if accounts are being aged from 1 to 999 days (1-30, 31-90, 91-180, and 181-999), the amount for any account whose transaction date is over 999 days would be found in the field DYLxOVR999.

DYLxORPyyy

yyy is the To-Date of the third aging field.

Since the Advantage VISION:Excel standard report for aging prints only three user supplied aging groups, the system generates an amount field for accounts above the third aging group.

For example, if the user enters four aging groups (1-30, 31-90, 91-180, and 181-999), DYLxORP180 would contain the amount for any account over 180 days. This field prints on the standard report, along with the first three user supplied aging groups.

DYLxNONE

Advantage VISION:Excel uses this field whenever the aging analysis function determines the age of the transaction but is unable to find an inclusive aging group.

For example, if the user specified three aging groups, 10-30, 61-90, and 91-120, but not 31-60, the following would occur:

All records under 10 days would have the amount moved to DYLxUDRyyy.

All records over 120 days would have the amount moved to DYLxOVRyyy and/or DYLxORPyyy.

Those records that were found to be 31 to 60 days past due or in the future would have their amount moved to DYLxNONE.

Page 529: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Reserved Word Examples

Appendix A: Reserved Words A–5

DYLxERROR

Advantage VISION:Excel uses this field whenever the date in the transaction is invalid. DYLxERROR is an amount field that has the same characteristics as the amount field being aged, except that it may be one byte larger. When the transaction date in the record is in error (not numeric), the amount in the record being aged is moved into the field DYLxERROR.

DYLxDYSBET

This 3-byte packed field contains the number of days calculated between the aging date and the transaction date in the record.

Aging Reserved Word Examples Advantage VISION:Excel automatically provides the area for each grouping of dates utilizing reserved words.

For example, if you only wanted to age (From-To) 1–30 and 31–60 days using application 4, the following reserved words would be dynamically generated:

Reserved Words

Description

DYLAG04CB Identifies the control block.

DYL4TRNDAT Contains the billing/transaction date in MMDDYY format.

DYL4001030 Contains the amount whose associated date was inclusively between the user's first range of dates From-To 1–30.

DYL4031060 Contains the amount whose associated date was inclusively between the user's second range of dates From-To 31–60.

DYL4UDR001 Contains the amount whose associated date was less than one day or zero.

DYL4OVR060 Contains the amount whose associated date was over the maximum specified, in this case over 60 days.

DYL4ORP060 Used by report options. In this instance, DYL4ORP060 contains same value as OVR060.

DYL4NONE Contains the amount whose associated date is aged, but does not have an inclusive age group.

DYL4ERROR Contains the amount whose associated transaction date was invalid.

Page 530: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Reserved Word Examples

A–6 Reference Guide

Reserved Words

Description

DYL4DYSBET Contains the calculated number of days between the aging date and the transaction date.

Note: DYL is reserved, and 4 is the user-specified application number.

When an amount and an associated transaction date are passed to Advantage VISION:Excel, the system clears all of the above amount fields to zero, determines the differences in days between the aging date and the transaction date, and, finally, places the amount into the proper amount fields.

For example, if a record contained an amount of $10.00, the transaction date was 28 days before the aging date, and the aging ranges (From-To age groups) were defined as above, DYL1001030 would contain the value of $10.00. DYL1031060, DYLXUDR001, DYL1OVR060, DYL1OPR060, DYL1ERROR, and DYL1NONE would each be zero.

For each set of aging statements submitted, Advantage VISION:Excel dynamically generates all the reserved words necessary for each analysis.

For example, if you submit two sets of AGE statements, one for application 1 and the other for application 2, with aging From-To dates of 1–30, 31–60, and 61–90 days for Application 1, and 1–30, 31–90, 91–120, and 121–999 days for Application 2, Advantage VISION:Excel would generate the following reserved words:

For Application 1:

DYLAG01CB DYL1TRNDAT DYL1001030

DYL1031060 DYL1061090 DYL1UDR001

DYL1OVR090 DYL1ORP090 DYL1ERROR

DYL1NONE DYL1DYSBET

For Application 2:

DYLAG02CB DYL2TRNDAT DYL2001030

DYL2031090 DYL2091120 DYL2121999

DYL2UDR001 DYL2OVR999 DYL2ORP120

DYL2ERROR DYL2NONE DYL2DYSBET

Page 531: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing Reserved Words

Appendix A: Reserved Words A–7

Letter Writing Reserved Words The xx in each reserved word represents an application number from 0 to 99, unless otherwise specified.

DYLCNxxID

When you assign a unique value to each individual letter-writing request, Advantage VISION:Excel places it in this field. Advantage VISION:Excel generates DYLCNxxID only if you use the LTH statement. Its length is from 1 to nn bytes as specified in the LTH statement IDLENGTH parameter.

If you are using fixed format, the CNH statement, column 15 corresponds to the IDLENGTH parameter.

DYLCNxxCHN

Generated by the letter writer and used during TWOUP processing.

DYLCNxxFRM

Generated by the letter writer and used during From-to processing.

DYLCNxxLNC

This field gives you access to the letter writer line counter for the From-To option.

DYLCNxxPAG

Generated by the letter writer and used to count the number of pages produced when creating letters for this application number.

DYLCNxxTO

Generated by the letter writer and used during From-to processing.

Page 532: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing Reserved Words

A–8 Reference Guide

DYLEXTxx

xx is alphanumeric (AA - ZZ, 00 - 99).

This is the name of an optional, user-provided subroutine. The xx is specified on the LTH DYLEXTxx keyword, or in column 21 of the CNH statement.

Advantage VISION:Excel loads this subroutine once and calls it each time a line is written to the output letter file (AUDPRINT/SYS009).

DYLTRxx

xx is alphanumeric (AA - ZZ, 00 - 99).

This is the ddname or DLBL name of the output letter file to which each output line of the letter is written.

DYLCNxxSW

Advantage VISION:Excel generates this field whenever you use the TWOUP letter command. You use this 1-byte field to control the printed location of multi-paged letters.

Page 533: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sampling Reserved Words

Appendix A: Reserved Words A–9

Sampling Reserved Words The xx in each reserved word represents as application number from 0 to 99.

DYLSPxxFLG

For example, DYLSP01FLG is a reserved word field for application 1 of a sampling procedure. You use this 1-byte field to hold a flag passed from Advantage VISION:Excel to Advantage VISION:Results.

When the value A appears in DYLSPxxFLG, a record is selected.

When the field is blank, the record is rejected.

DYLSPxxACN

For example, DYLSP01ACN is used for application 1 of a sampling procedure.

This 1-byte binary field holds an acceptance number calculated by Advantage VISION:Excel for acceptance sampling applications. DYLSPxxACN is generated for acceptance sampling applications only.

DYLSPxxSTN

For example, DYLSP01STN is used for application 1 of a sampling procedure.

Whenever Advantage VISION:Excel executes the IF SAMPLING statement for a particular application, this field contains the stratum number to which the particular record belongs. Advantage VISION:Excel generates DYLSPxxSTN for stratified sampling applications only.

DYLSPxxRNO

For example, DYLSP01RNO is used for application 1 of a sampling procedure.

Whenever Advantage VISION:Excel executes the IF SAMPLING statement for a particular application, this field contains the random number used in determining whether a record will be selected for inclusion in the sample or not.

Advantage VISION:Excel generates DYLSPxxRNO for the following sampling techniques.

Page 534: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sampling Reserved Words

A–10 Reference Guide

Non-Stratified Sampling: Acceptance Sampling

Attribute Estimation Sampling

Discovery Sampling

Estimation Sampling of Values

Simple Random Sampling

Stratified Sampling: Mean Estimation Sampling

Simple Random Sampling

DYLSPxxCNT

DYLSP01CNT is used for application 1 of a sampling procedure.

Starting from zero, Advantage VISION:Excel increments this field by one each time the IF SAMPLING statement executes for a particular application. At the end of the run, this field contains the size of the population for that application.

Advantage VISION:Excel generates DYLSPxxCNT whenever it generates DYLSPxxRNO.

DYLSPxxPOP

DYLSPxxPOP is a 5-byte packed field that is automatically generated whenever you define a non-stratified simple random sampling application.

You can set the field to the population size before the first execution of an IF SAMPLING xx statement; thereafter, the contents of DYLSPxxPOP are ignored.

You must initialize DYLSPxxPOP to a non-zero population size.

DYLSPxxSSZ

DYLSPxxSSZ is a 5-byte packed field that is automatically generated whenever you define a non-stratified simple random sampling application.

You can set this field to the sample size before the first execution of an IF SAMPLING xx statement; thereafter, the contents of DYLSPxxSSZ are ignored.

Page 535: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sampling Reserved Words

Appendix A: Reserved Words A–11

You must initialize DYLSPxxSSZ to a non-zero sample size.

Summary of Sampling Reserved Words

The following summarizes the reserved words for each type sampling:

Type Of Sampling Reserved Words

Non-Stratified Sampling

DYLSPxxCB, DYLSPxxFLG, DYLSPxxACN, DYLSPxxRNO, DYLSPxxCNT

Acceptance DYLSPxxCB, DYLSPxxFLG, DYLSPxxACN, DYLSPxxRNO, DYLSPxxCNT

Attribute Estimation DYLSPxxCB, DYLSPxxFLG, DYLSPxxRNO, DYLSPxxCNT

Discovery DYLSPxxCB, DYLSPxxFLG, DYLSPxxRNO, DYLSPxxCNT

Estimation Sampling of Values

DYLSPxxCB, DYLSPxxFLG, DYLSPxxRNO, DYLSPxxCNT

Proportional DYLSPxxCB, DYLSPxxFLG

Simple Interval DYLSPxxCB, DYLSPxxFLG

Simple Random DYLSPxxCB, DYLSPxxFLG, DYLSPxxRNO, DYLSPxxCNT, DLYSPxxPOP, DYLSPxxSSZ

Stratified Sampling DYLSPxxCB, DYLSPxxFLG, DYLSPxxSTN, DYLSPxxRNO, DYLSPxxCNT

Mean Estimation DYLSPxxCB, DYLSPxxFLG, DYLSPxxSTN, DYLSPxxRNO, DYLSPxxCNT

Percentage DYLSPxxCB, DYLSPxxFLG, DYLSPxxSTN

Simple Random DYLSPxxCB, DYLSPxxFLG, DYLSPxxSTN

Page 536: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Reserved Words

A–12 Reference Guide

Dollar Unit Sampling Reserved Words The xx in each reserved word represents an application number from 1 to 99.

DYLSPxxTYP

DYLSPxxTYP is a 2-byte field that contains the type of item last tested by the dollar unit sampling (DUS) application. This field can contain:

TP — Top stratum item — an item whose value is greater than or equal to the cell width.

KY — Key item.

BT — Bottom stratum item that was not included in the sample.

BS — Bottom stratum item that was included in the sample.

DYLSPxxCCT

DYLSPxxCCT is a 5-byte, packed decimal field that contains a running count of the cells being processed.

DYLSPxxBV

DYLSPxxBV is an 11-byte, packed decimal field that is the absolute value of the item amount adjusted if necessary by the lower physical unit stratum option. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxCD1

DYLSPxxCD1 is an 11-byte, packed decimal field that contains the selected cell dollar when the item just processed belongs to the bottom stratum and is included in the sample. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxPD1

DYLSPxxPD1 is an 11-byte, packed decimal field that contains the selected population dollar when the item just processed belongs to the bottom stratum and is included in the sample. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

Page 537: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Reserved Words

Appendix A: Reserved Words A–13

DYLSPxxRD1

DYLSPxxRD1 is an 11-byte, packed decimal field that contains the selected record dollar when the item just processed belongs to the bottom stratum and is included in the sample. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxRN1

DYLSPxxRN1 is a 5-byte, packed decimal field that is the random number that caused the item just processed to be included in the sample.

DYLSPxxCD2

DYLSPxxCD2 is an 11-byte, packed decimal field that contains the second selected cell dollar when the item just processed belongs to the bottom stratum and it overlaps two cells and it is the selected item for both cells. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxPD2

DYLSPxxPD2 is an 11-byte, packed decimal field that contains the second selected population dollar when the item just processed belongs to the bottom stratum and it overlaps two cells, and it is the selected item for both cells. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxRD2

DYLSPxxRD2 is an 11-byte, packed decimal field that contains the second selected record dollar when the item just processed belongs to the bottom stratum and it overlaps two cells and it is the selected item for both cells. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxRN2

DYLSPxxRN2 is a 5-byte, packed decimal field that is the random number that caused the item just processed to be selected a second time for the sample.

Page 538: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling Reserved Words

A–14 Reference Guide

DYLSPxxKYF

DYLSPxxKYF is the key record flag. When you wish to flag a record as a key record, move Y into this 1-byte field. The next item processed by the DUS application is processed as a key item. Advantage VISION:Excel generates this field only if you set the key record field in the DUS application parameter to Y.

DYLSPxxDPF

DYLSPxxDPF is the duplicate check flag.

Y — Last item was a duplicate record.

N — Last item was not a duplicate record.

Advantage VISION:Excel generates DYLSPxxDPF only if you code the duplicate check field in the DUS application parameter.

DYLSPxxSML

DYLSPxxSML is an 11-byte, packed decimal field that contains the value of the lower physical unit stratum option small value as it is coded in the DUS application parameter.

Advantage VISION:Excel generates this field only when you code the small value field in the DUS application parameter. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

DYLSPxxZRO

DYLSPxxZRO is an 11-byte, packed decimal field that contains the value of the lower physical unit stratum option zero value as it is coded in the DUS application parameter.

Advantage VISION:Excel generates this field only when you code the zero value field in the DUS application parameter. The number of digits to the right of the decimal point is the same as in the AMOUNT field.

Page 539: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Reserved Words

Appendix A: Reserved Words A–15

Frequency Reserved Words The xx in each reserved word represents AA - ZZ, or 00 to 99 unless otherwise specified.

DYLFQxx

xx is alphanumeric (AA – ZZ, 00 – 99).

This free-form keyword activates the writing of a compressed format frequency distribution report to an output dataset. DYLFQxx is also the matching DDname, DLBL, or TLBL file name to be found in the JCL for the frequency distribution report output dataset.

Additional Reserved word The following pages list all of the remaining Advantage VISION:Results/Advantage VISION:Excel reserved words. Do not use any of these words as data names.

Click Misc. or one of the following letters to go to that section in this alphabetical list.

Misc. A B C D E F G H I J K L M

N O P Q R S T U V W X Y Z

Misc. #0-9

#A-Z

$

$$DUMP

$COBOL

$DEFAULT

$DEND

$ECOBOL

$END

$ENDGDEF

$ENDGSET

Page 540: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–16 Reference Guide

$ENDSET

$GDEF

$GSET

$IF

$IFE

$PRINT

$SET

%

%macroname

(

)

*

**

+

,

-

/

:

;

=

@

@nnn

@PCB

2311

2314

3330

3340

3350

3375

3380

Page 541: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–17

A

ABSOLUTE

ACCEPT

ACCEPTABLE

ACCEPTANCE

ACCTITLE

ADD

ADVANCED

AFTER

AGE

AGEDATE

AGEING

AGING

ALIAS

ALLOCATE

ALPHANUMERIC

AMOUNTFIELD

AND

AREA

ARRAY

ASA

ASCENDING

ASCII

ASIS

AT

ATTRIBUTE

AUDIT

Page 542: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–18 Reference Guide

B

BDAM

BEFORE

BETWEEN

BI

BINSEARCH

BITS

BLANK

BLANKS

BOOK

BOTH

BY

BYPASS

C

CALL

CALL_ATTACH

CARD

CARDS

CASE

CATPLANID

CATSYS

CDLOAD

CELL

CH

CHnn

CHANGE

CLOSE

COBOL

COB2NR

COLUMNS

COMBINE

COMPAREN

Page 543: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–19

CON

CONFIDENCE

CONTROL

CONVENTIONAL

COPY

COPY260

COPYC

COPYDB2

COPYE

COPYL

COPYP

CORR

CORRELATION

CORRESPONDING

COUNT

CS

CSnn

CTLBRK

CTRLZ

CURRENCY

CYLOFL

D

DATA

DATAVER

DATEFORMAT

DB2PLANID

DB2SYSID

DATEFIELD

DD/MM/YY

DD/MM/YYYY

DDMMYY

DDMMYYYY

Page 544: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–20 Reference Guide

DDNAME

DECLARE_QUERY

DELETE

DESCENDING

DETAIL

DIM

DIMENSION

DIRECTORY

DISCOVERY

DISK

DISKETTE

DISKPASSWORD

DISTFIELD

DLM

DMAP

DOLLAR

DOS

DOUNTIL

DOWHILE

DROPCRLF

DROPERR

DUMMY

DUPLICATE

DY282MAT

DY282MER

DYACCEPT

DYFREZ

DYL (as a prefix)

DYL

DYL55KEY

DYL280RA

DYL25KEY

DYLFRZ

Page 545: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–21

DYLPRCA

DYLTRaa

DYNAM

DYNAMDB2

DYNAMICALLY

DYNEXT

DYSTORE

E

EBCDIC

EDIT

EDOS

EJECT

ELSE

END

ENDCASE

ENDDO

ENDIF

ENDLTD

ENDMACRO

ENDONE

END_QUERY

ENTRY

EOS

EQ

EQUAL

ERASE

ERROR

ESDS

ESTIMATION

EXCEL

EXCLUSIVE

EXIT

Page 546: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–22 Reference Guide

EXITCASE

EXITDO

EXOR

EXPRTERR

EXT

EXTENSION

EXTENTS

F

FB

FBA

FFFF

FFFFEE

FFFFFF

FIELDNAME

FIELDS

FILENAME

FILES

FILL

FILLER

FIN

FINAL

FIRSTDUP

FIXED

FOOTING

FOR

FORMAT

FREE

FREZDD

FREEZE

FREQ

FREQUENCY

FROM

Page 547: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–23

FUTURE

G

GE

GETCOM

GOTO

GROUP1

GROUP10

GROUP2

GROUP3

GROUP4

GROUP5

GROUP6

GROUP7

GROUP8

GROUP9

GT

H

HEX

HEXPRINT

HIDDEN

HIGHAMT

HIGHVALUES

HISTOGRAM

HOLD

HTAB

I

IDLEN

IDLENGTH

IDMSMOVE

IF

Page 548: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–24 Reference Guide

INDENT

INPUT

INTERPRET

INTERVAL

INTERVALNO

INTERVALSIZE

INTO

INTSEL

INW

INX

INY

INZ

IO

IQBATCH

IQFILE

IQREAD

IS

ISAM

ITEMFIELD

ITEMNO

ITERATE

J

JCL

K

KEY

KEYn

KEYLEN

KEYLOC

KSDS

Page 549: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–25

L

LASERnn

LASTDUP

LCPRINT

LE

LEFT

LEFTSAVE

LENGTH

LETTER

LIB

LIBNAME

LIBPASSWORD

LINEAR

LIST

LIST26

LISTAG

LISTAUD

LISTINS

LOGARITHMIC

LOGIC

LONG

LOWAMT

LOWER

LOVALUES

LT

LTD

LTDnn

LTH

L2U

Page 550: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–26 Reference Guide

M

MASTER

MASTERUP

MATCH

MATCHED

MAXIMUM

MEAN

MEMBER

MERGE

MIXED

MM/DD/YY

MM/DD/YYYY

MMDDYY

MMDDYYYY

MODIFY

MONETARY

MOVE

MSGCSECT

N

NAMED

NE

NEGATIVE

NEW

NEWEXT

NEWEXTENSION

NEWFILENAME

NEWNAME

NEWPAGE

NEWPARA

NEXT

NL

NO

Page 551: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–27

NOCDLOAD

NOCOB2NR

NODYL4YEAR

NOEDIT

NOEJECT

NOERROR

NOEXCEL

NOEXPRTERR

NOFEED

NOOPTIMIZE

NOOPTLIST

NOPRINTD

NOPRINTDIGITS

NO_PRINT_ENTRY_POINTS

NOQLF

NOQUALIFIERS

NORMALIZED

NORETAIN

NORWD

NOSORTAB

NOSPOOL

NOSQL2DBC

NOSTD

NOSUM

NOT

NOTOTAL

NOVSAMCAT

NOVSEALL

NOVSEDISK

NOVSETAPE

NOXREF

NU

NULL

Page 552: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–28 Reference Guide

NULLOFF

NULLON

NUMERIC

NUMFILES

O

OFFSET

ON

ONE

ONEBUFF

ONES

OPTIMIZE

OPTION

OPTIONS

OPTLIST

OR

ORIGINAL

OS

OTHERWISE

OUTPUT

OVERAUDITING

P

PAD

PAN

PARM

PARTKEY

PASSWORD

PAST

PATCHES

PATHNAME

PATHNAME01

PATHNAME02

Page 553: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–29

PATHNAME03

PATHNAME04

PATHNAME05

PATHNAME06

PATHNAME07

PATHNAME08

PATHNAME09

PATHNAME10

PATHNAME11

PATHNAME12

PATHNAME13

PATHNAME14

PATHNAME15

PATHNAME16

PATHNAME17

PATHNAME18

PATHNAME19

PCFILE

PCWRITE

PD

PDS

PDSREFA

PDSREPN

PERCENTAGE

PERFORM

PICNSAVE

PLANID

PLUnnn

POPULATION

POSITION

POSITIVE

PRECISION

PRINT

Page 554: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–30 Reference Guide

PRINTD

PRINTDIGITS

PRINTEP

PRINTERR

PRINTERROR

PRINTGEN

PRINTNOGEN

PRINT_ENTRY_POINTS

PRIOR

PROPORTIONAL

PROTECT

PUTCOM

Q

QLF

QUALIFIERS

QUIT

QUITALL

QUIKJOB

R

RANDOM

RANDPROG

RANDPROGSIZE

READ

READBOOK

READDIR

READIR

READMEM

READONLY

RECFM

REDEF

REDEFINE

Page 555: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–31

REGRESSION

REINIT

REJECT

RELBLK

RELBYTE

RELIABILITY

RELREC

RELSORT

RELTRK

REPLACE

REPLACING

REPLICA

REPORTnn

REPORTFILE

REPTITLE

RESTART

RESTORE

RETAIN

RETRIEVE

RETSORT

REUSE

REWIND

RIGHT

ROUND

ROUNDED

RRDS

Page 556: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–32 Reference Guide

S

S2R

SAMPLE

SAMPLING

SB

SCATTER

SCRATCH

SEARCH

SECURE

SEED

SELECT

SEQUENTIAL

SETREAD

SIZE

SKIP

SL

SMALL

SORT

SORTING

SPn

SPACE

SPACES

SPOOL

SQL2DBC

SSL

STANDARD

START

STATEOFF

STATEON

STATSQL

STATUS

STATUSFLAG

STDREPT

Page 557: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–33

STOP

STOPALL

STRATIFIED

STRATUM1

STRATUM10

STRATUM2

STRATUM3

STRATUM4

STRATUM5

STRATUM6

STRATUM7

STRATUM8

STRATUM9

STRUCTURED

STRUCTURED2

SUBDIR

SUBTOTAL

SUM

SUM1

SUM2

SUM3

SUM4

SUM5

SUM6

SUM7

SUMMARY

SUPPRESS

SWITCH

SYSnnn

SYSTEMID

SYS280RA

Page 558: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–34 Reference Guide

T

Tn

TABLE

TALLY

TAPE

TEST

TEXT

THEN

THROUGH

THRU

TIMECOLON

TIMEDOT

TITLE

TO

TOTAL

TPRINT

TRAN

TRANSLATE

TREND

TSIZE

TSORT

TSO_ATTACH

TWOUP

U

UNIT

UNLOAD

UNSIGNED

UNTIL

UNWARRANTED

UPPER

USE

USERDEFAULT

Page 559: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

Appendix A: Reserved Words A–35

USING

V

VAL

VALUE

VB

VCLOSE

VDELETE

VERIFY

VFILE

VOLVER

VOPEN

VREAD

VREADDIR

VREADIR

VRENAME

VSAM

VSAMCAT

VSAMEC

VSAMRC

VSEALL

VSEDISK

VSETAPE

VWRITE

W

WHEN

WIDE

WITH

WORK

WORKAREA

WORKSHEET

WRITE

Page 560: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Reserved word

A–36 Reference Guide

WRITEALL

WRITEDIR

WRITEMEM

X

XLATE

XNAME

XREF

XREFA

XSCATTER

Y

YES

YNAME

YSCATTER

YY/MM/DD

YYDDD

YYMMDD

YYYY/MM/DD

YYYYDDD

YYYYMMDD

Z

ZDIVAB

ZDIVORG

ZDIVRC

ZERO

ZONE

Page 561: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix B: Formulas and Equations B–1

Appendix B: Formulas and Equations

This appendix describes the following formulas and equations used in Advantage VISION:Excel:

Mean

Standard Deviation

Acceptance Sampling

Coefficient of Variation

Attribute Estimation Sampling

Discovery Sampling

Estimation Sampling of Values

Proportional Sampling

Stratified Sampling — Mean Estimation Method

Linear Regression Formulas

Mean The formula for the mean of a distribution is:

M = T ÷ N

M is the mean of the distribution.

T is the total value of the distribution.

N is the number of items in the distribution.

Standard Deviation The formula for the standard deviation of a distribution is:

Page 562: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Coefficient of Variation

B–2 Reference Guide

S.D. is the standard deviation of the distribution.

Xi is the value of the ith item.

M is the mean of the distribution.

N is the number of items in the distribution.

Coefficient of Variation The formula for the coefficient of variation of a distribution is:

C.V. = S.D. ÷ M

C.V. is the coefficient of variation of the distribution.

S.D. is the standard deviation of the distribution.

M is the mean of the distribution.

Acceptance Sampling The following formulas are used to calculate the sample size and acceptance number:

Page 563: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling

Appendix B: Formulas and Equations B–3

Where:

q1 is the maximum tolerable rate of occurrence in the population.

q2 is the acceptable rate of occurrence in the population.

N is the population size.

d1 is N × q1.

d2 is N × q2.

P1 is the Risk of unwanted reliance at the maximum tolerable rate of occurrence.

P2 is the Risk of over-auditing at the acceptable rate of occurrence.

n is the Sample size.

k is the Acceptance number.

Given q1, q2, N, P1, and P2, solve equations (i) and (ii) or (iii) and (iv) simultaneously for n and k.

Page 564: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling

B–4 Reference Guide

Attribute Estimation Sampling The formula used to calculate the sample size is:

Where:

n is the sample size.

N is the population size.

P is the percentage of characteristic items in the population.

Z is the normal curve factor determined by confidence level.

SE is the preferred precision.

The formulas used to calculate the lower and upper limits of the correlation table are as follows.

Hygrogeometric Distribution:

Binomial Distribution:

Given N, n, and k.

P is the Probability of finding k or less characteristic items in the sample.

N is the Population size.

n is the Sample size.

d is the Number of characteristic items in the population.

k is the Number of characteristic items in the sample.

q is the Rate of characteristic items in the population.

Page 565: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling

Appendix B: Formulas and Equations B–5

Lower Limit: For one-sided confidence, P=0,d=0,q=0.

For two sided confidence, P = [1 + (confidence level)] ÷ 2

– Solve hypergeometric distribution equation for d.

or

– Solve binomial distribution equation for q if N is greater than 100,000.

Then d or [q × (population size)] is the lower limit.

The graph for Attribute Estimation Sampling is shown as follows:

Page 566: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling

B–6 Reference Guide

Higher Limit: For one-sided confidence, P = 1 – (confidence level).

For two-sided confidence, P = [1 - (confidence level)] ÷ 2

– Solve hypergeometric distribution equation for d.

or

– Solve binomial distribution equation for q if N is greater than 100,000.

Then d or [q × (population size)] is the higher limit.

The graph for Attribute Estimation Sampling is shown as follows:

Page 567: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling

Appendix B: Formulas and Equations B–7

Discovery Sampling The formula used to calculate the Sample Size is:

The previous calculation is equal to:

Where:

N is the population size.

n is the sample size.

d is the number of characteristic items in the population.

P is the confidence of finding at least one characteristic item in the sample.

Given N, d, and P, solve for n.

Page 568: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling of Values

B–8 Reference Guide

The graph for Discovery Sampling is shown as follows:

Estimation Sampling of Values The formula used to calculate the sample size is:

S is the calculated sample size.

N is the population size.

Z is the normal distribution factor determined by confidence level.

E is the preferred monetary unit precision.

SD is the standard deviation.

Page 569: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling of Values

Appendix B: Formulas and Equations B–9

The formulas used to calculate the normal distribution Z factor are shown as follows.

Two-sided Confidence Level:

One-sided Confidence Level:

Where:

C is the confidence level.

Z is the normal distribution Z factor.

Given C, solve the equation for Z.

The formula used to calculate the reliability factor is:

Where:

R.F. is the reliability factor.

Z is the normal distribution Z factor determined by the confidence level.

N is the population size.

n is the sample size.

Page 570: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling

B–10 Reference Guide

Proportional Sampling The formula used to calculate the sampling interval is:

Where:

I is the calculated sampling interval.

R is the reliability level.

P is the preferred upper monetary precision limit.

Stratified Sampling — Mean Estimation Method The formula used to calculate the sample size for each stratum is:

Where:

T is the stratification coefficient.

k is the number of strata.

ni is the number of items in the ith stratum.

Si is the standard deviation of the ith stratum.

N is the population size.

P is the preferred unit precision limit.

Z is the normal distribution Z factor determined by confidence level.

For each stratum, the formulas used to calculate the sample size are:

Stratum Sample Size= ni × Si × T

Page 571: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

Appendix B: Formulas and Equations B–11

The formula used to calculate the normal distribution Z factor is shown as follows.

Two-sided Confidence Level:

One-sided Confidence Level:

Where:

C is the confidence level.

Z is the normal distribution Z factor.

Given C, solve the equation for Z.

Page 572: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression Formulas

B–12 Reference Guide

Linear Regression Formulas X is the independent variable.

Y is the dependent variable.

N is the number of (X, Y) pairs.

Linear Regression Line:

Y = a + bX

Where:

Standard Error of Estimate:

Correlation Coefficient:

Coefficient of Determination:

Coefficient of Non- Determination:

Page 573: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix C: Fixed Form Parameters C–1

Appendix C: Fixed Form Parameters

This appendix describes the following fixed form parameters:

Acceptance Sampling

Aging Analysis and Reporting

Attribute Estimation Sampling

Letter Writing and Confirmation Notice

Linear Regression and Scatter Diagram

Discovery Sampling

Dollar Unit Sampling

Estimation Sampling of Values

Frequency Distribution Reporting

Proportional Sampling

Random Number Seed Table — Non-Stratified

Simple Interval Sampling

Simple Random Sampling

Stratified Sampling — Basic Information

Stratified Sampling — Mean Estimation Method

Stratified Sampling — Simple Percentage Method

Stratified Sampling — Simple Random Method

Stratified Sampling — Random Number Seed Table

Acceptance Sampling Acceptance sampling requires only one statement per acceptance sampling application.

Up to 90 acceptance sampling statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry statement can be submitted with each acceptance statement.

Each application number must be a unique integer value between 1 and 99.

Page 574: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Acceptance Sampling

C–2 Reference Guide

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

Column

Field Size

Statement Use Description Code

1 2 Describes the application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes the function as acceptance sampling.

Always AC

7 1 RESERVED

8 9 Specifies the population size of the file, either estimated or exact.

An integer value from 1–999999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero. For example, (where X represents blank):

0 1 1

COL 8.0....5.

X49000XXX — The population size is 49,000.

2,000XXXX — The population size is 2,000.

17 1 RESERVED

18 4 Specifies the maximum tolerable rate of occurrence (MTRO) in the population

A percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

22 1 RESERVED

23 4 Specifies the acceptable rate of occurrence (ARO) in the population.

A percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

27 1 RESERVED

Page 575: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

Appendix C: Fixed Form Parameters C–3

Column

Field Size

Statement Use Description Code

28 4 Specifies the risk of unwarranted reliance at the maximum tolerable rate of occurrence (MTRO).

A percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be Zero.

32 1 RESERVED

33 4 Specifies the risk of over auditing at the acceptable rate of occurrence (ARO).

A percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

37 36 RESERVED

Aging Analysis and Reporting Aging analysis and reporting consists of two statements that are required for each aging analysis requested. An optional third statement is required when specifying an Aging analysis report to be sent to an output dataset in HTML format.

From and To days age groups must never have duplicates in the same aging analysis.

Up to nine aging analyses can be performed in one run of Advantage VISION:Excel.

Only one report can be generated.

Application number 0 is reserved for Advantage VISION:Excel.

Page 576: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

C–4 Reference Guide

Statement 1

The following table describes each column in the statement.

Column

Field

Size

Statement Use

Description Code

1 2 Describes the application as analysis.

Always AG

3 1 Contains a unique application number.

An integer value from 1–9

4 1 RESERVED

5 1 Specifies the aging statement as statement 1

Always 1

6 1 Reserved for 4-digit year

If use a 4-digit year, the format must be MMDDYYYY, begin in this column and end in column 13.

For example:

0 1

COL 6 0 3

12031997 — The date of the audit is December 3,1997.

03171997 — The date of the audit is March 17, 1997.

AGEDATE — The aging date is in the field AGDATE in column7.

Page 577: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

Appendix C: Fixed Form Parameters C–5

Column

Field

Size

Statement Use

Description Code

7 6 Specifies the aging date to be compared against the input field containing the billing /transaction date.

A 2-digit year must always be specified in the format MMDDYY.

Can also be the alphanumeric name of a field. The data name for both a 2-digit year and a 4-digit year can be one to six characters, starting with an alpha character.

The contents of the field must be a date in MMDDYY format for a 2-digit year and MMDDYYYY format for a 4-digit year. The field for 2-digit years must be a 6-byte character field. The field for 4-digit years must be an 8-byte character field.

For example:

0 1

COL 7 0

120397 — The date of the audit is December 3, 1997.

031797 — The date of the audit is March 17, 1997.

AGEDATE — The aging date is in the field AGDATE.

13 1 Reserved for 4 digit year

If you use a 4-digit year, the format must be MMDDYYYY, begin in this column.

14 10 Label of field containing the billing/ transaction date.

Data name defined by an Advantage VISION:Results field definition statement. the data name must have as its first character an alpha from A to Z. Field can be right –or –left-aligned or centered .For Example( where X represents blank):

1 2

COL 4………0…

AUDITDATEX — The date of the audit is December 3, 1997.

031797 — The date of the audit is March 17, 1997.

24 1 RESERVED

Page 578: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

C–6 Reference Guide

Column

Field

Size

Statement Use

Description Code

25 1 Format of the billing/ transaction date.

1=MMDDYY, 2=DDMMYY, 3=YYMMDD,

4=MM/DD/YY, 5=DD/MM/YY,

6=YY/MM/DD, 7=YYDDD, 8=MMDDYYYY,

9=DDMMYYYY, A=YYYYMMDD,

B=MM/DD/YYYY, C=DD/MM/YYYY,

D=YYYY/MM/DD, E=YYYYDD.

26 1 To specify whether past or future aging is wanted.

Blank if the transaction date is to be compared with the aging date for dates less than the aging date (past due).

F if the transaction date is to be compared with the aging date for dates greater than the aging date (future).

27 10 Label of field containing the amount.

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered. For example (where X represents blank):

2 3 3

COL 7… 0….5.

AMOUNTXXXX — AMOUNT is the label of the field containing the amount.

AMOUNTNORM — AMOUNTNORM is the label of the field.

37 1 RESERVED

38 1 Standard report

Y=yes, N or blank=no. If you specify Y, additional information must be entered in columns 39 and 40–49.

39 1 If you specify Y in column 38:

S=summary report requested, D or blank=detail report requested.

Page 579: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

Appendix C: Fixed Form Parameters C–7

Column

Field

Size

Statement Use

Description Code

40 10 Label of field. Containing the account number or field in which control breaking (footing) takes place.

Data name of a field in an input file defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered. For example (where X represents blank):

4 4 5

COL 0… 5…..0

ACCTNUMBER —ACCTNUMBER is the label of the field containing the account number.

XXXACCT18X — ACCT18 is the label of the field.

50 1 RESERVED

51 10 Label of field containing the account title (optional).

Data name of a literal or a field in an input file defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered. For example (where X represents blank):

5 5 5

COL 1… 5….0

XXTILEXXX— TITLE the label of the field containing the account title.

XXXT472XXX— T472 is the label of the field.

61 1 RESERVED

62 10 Label of field containing the report title (optional).

Data name of field in an input file or a literal defined in an Advantage VISION:Results field definition statement that contains the report title. Data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

72 1 RESERVED

Page 580: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

C–8 Reference Guide

Statement 2

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes the application as aging analysis.

Always AG

3 1 Contains same application number as specified in statement 1.

An integer value from 1–9

4 1 RESERVED

5 1 Specifies the aging statement as statement 2.

Always 2

6 1 RESERVED

7 3 From days for age group 1.

An integer value that must be less than or equal to the value in columns 10–12.

10 3 To days for age group 1.

An integer value equal to or greater thanthe value in columns 7–9.

13 3 From days for age group 2.

An integer value that must be less than or equal to the value in columns 16–18.

16 3 To days for age group 2.

An integer value equal to or greater thanthe value in columns 13–15.

19 3 From days for age group 3.

An integer value that must be less than or equal to the value in columns 22–24.

22 3 To days for age group 3.

An integer value equal to or greater thanthe value in columns 19–21.

25 3 From days for age group 4.

An integer value that must be less than or equal to the value in columns 28–30.

28 3 To days for age group 4.

An integer value equal to or greater thanthe value in columns 25–27.

31 3 From days for age group 5.

An integer value that must be less than or equal to the value in columns 34–36.

34 3 To days for age group 5.

An integer value equal to or greater thanthe value in columns 31–33.

Page 581: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

Appendix C: Fixed Form Parameters C–9

Column

Field

Size

Statement Use Description Code

37 3 From days for age group 6.

An integer value that must be less than or equal to the value in columns 40–42.

40 3 To days for age group 6.

An integer value equal to or greater thanthe value in columns 37-39.

43 3 From days for age group 7.

An integer value that must be less than or equal to the value in columns 46–48.

46 3 To days for age group 7.

An integer value equal to or greater thanthe value in columns 43-45.

49 3 From days for age group 8.

An integer value that must be less than or equal to the value in columns 52–54.

52 3 To days for age group 8.

An integer value equal to or greater thanthe value in columns 49-51.

55 3 From days for age group 9.

An integer value that must be less than or equal to the value in columns 58–60.

58 3 To days for age group 9.

An integer value equal to or greater thanthe value in columns 55–57.

61 3 From days for age group 10.

An integer value that must be less than or equal to the value in columns 64–66.

64 3 To days for age group 10.

An integer value equal to or greater thanthe value in columns 61–63.

67 6 RESERVED

Page 582: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Aging Analysis and Reporting

C–10 Reference Guide

Statement 3

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes the application as Aging.

Always AG

3 1 Contains same application number as specified in statement 1.

An integer value from 1–9

4 1 RESERVED

5 1 Specifies the aging statement as statement 3.

Always 3

6 1 RESERVED

7 8 Specifies the DDname for the output dataset that will receive the Aging analysis report in HTML format.

1-8 character alphanumeric

15 1 RESERVED

16 4 Specifies the lines per segment for the HTML document containing the Aging analysis report.

Maximum 9999; default 500

20 1 RESERVED

Page 583: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling

Appendix C: Fixed Form Parameters C–11

Column

Field

Size

Statement Use Description Code

21 2 Specifies the HTML style template in the Advantage VISION:Results HTML library to be used for the HTML report.

01-99; default 00

Attribute Estimation Sampling Attribute estimation sampling requires only one statement per attribute estimation sampling application.

Up to maximum of 90 attribute estimation sampling statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry can be submitted with each attribute estimation sampling statement.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes the application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes the function as attribute estimation sampling.

Always AT

7 1 RESERVED

Page 584: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Attribute Estimation Sampling

C–12 Reference Guide

Column

Field

Size

Statement Use Description Code

8 9 Specifies the population size of the file, either estimated or exact.

An integer value from 1–999999999. Field can be right or left aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero. For example (where X represents blank):

0 1 1

COL 8. 0....5.

XXX200XXX — The population size is 200.

10,000XXX — The population size is 10,000.

17 1 RESERVED

18 4 Specifies the confidence level required.

A percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

22 1 RESERVED

23 4 Specifies the precision required.

Percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

27 1 RESERVED

28 4 Specifies the maximum tolerable rate of occurrence in the population.

Percent value no greater than 99.9, where the precoded decimal point in the tens place is always required. Value cannot be zero.

32 1 RESERVED

33 1 Specifies the type of confidence level.

1 or blank if one sided confidence level is required. 2 if two sided confidence level is required.

34 1 RESERVED

Page 585: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

Appendix C: Fixed Form Parameters C–13

Column

Field

Size

Statement Use Description Code

35 1 Specifies that you want an attribute estimation sampling worksheet (correlation of sample occurrences to probable population occurrences table).

Be aware that considerably more CPU cycles are required to generate this worksheet.

Y specifies that the worksheet is to be generated.

36 1 RESERVED

37 4 Specifies starting sample occurrence for correlation table. Only specify when you want a worksheet.

An integer value from 0–9999. Starting occurrence defaults to 0 if left blank.

41 1 RESERVED

42 4 Specifies interval for correlation table. Only specify when you want a worksheet.

Integer value from 1–9999. Interval defaults to 1 if left blank.

46 27 RESERVED

Letter Writing and Confirmation Notice There are two types of Letter Writing statements. The first type is a header CNH statement that identifies the format, such as characters per line, of the letter. Only one CNH header can be submitted per letter. The second type is the body CN statement that contains the letter itself and the variable information that is to be inserted in the body. For more information see Variable Information in this section.

Page 586: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

C–14 Reference Guide

The number of letter writing applications is limited only by available memory and work areas.

Advantage VISION:Results report logic is still available for additional reporting purposes.

Statement 1

Only one occurrence of this statement is permitted per letter. The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 3 Describes application as confirmation notice, as well as header.

Always CNH

4 2 Contains a unique application number.

An integer value from 0–99. Spaces default to integer 0.

6 3 Specifies number of characters per line.

An integer value from 1–132. Field can be right or left aligned. Leading blanks and trailing blanks are acceptable. If the number of characters per line is left blank, the default value is set to 80.

The sum of the number of characters per line, plus the number of spaces to indent, plus the length of the identification field cannot exceed 132 characters.

9 2 Specifies number of lines per page.

An integer value from 1–99. Field an be rightorleftaligned. If the number of lines per page is left blank, the default value is set to 56. For example (where X represents blank):

01

COL 90

X3 — Three lines per page.

XX — Fifty-six lines per page (default).

Page 587: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

Appendix C: Fixed Form Parameters C–15

Column

Field

Size

Statement Use Description Code

11 1 Specifies whether or not page ejection occurs at the beginning of each letter.

Blank=yes and N=no.

12 3 Contains the number of spaces to indent the letter.

An integer value from 0–130.

The sum of the number of characters per line, plus the number of spaces to indent, plus the length of the identification field cannot exceed 132 characters.

15 2 Contains the length of the identification field.

An integer value from 0–99.

The sum of the number of characters per line, plus the number of spaces to indent, plus the length of the identification field cannot exceed 132 characters.

17 1 When Y, specifies that From-To line numbers are coded in the detail line parameter.

Blank or Y. The default is blank.

18 3 RESERVED

21 2 Identifies the optional EXIT subroutine. The subroutine is DYLEXTxx.

AA–ZZ, 00–99.

23 3 Identifies the size of the subroutine in K (VSE only).

An integer value from 1–999.

26 1 When Y, the EXIT subroutine writes all output letter records rather than writing them to AUDPRINT/SYS009.

Blank or Y. The default is blank.

Page 588: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

C–16 Reference Guide

Column

Field

Size

Statement Use Description Code

27 2 Identifies the ddname or DLBL name of the optional output letter file. The file name is DYLTRxx.

AA–ZZ, 00–99

29 3 Blocking factor for the optional output letter file.

An integer value from 1–999. The default is 10.

32 1 When Y, ASA Carriage Control Characters are used, rather than Machine Coded Carriage Control Characters (default), for the optional output letter file.

Blank or Y. The default is Blank.

33 1 Identifies the type of file (VSE only) for the optional output letter file.

1 = 2311 2 = 2314 3 = 3330

4 = 3340 5 = 3350 7 = 3375

8 = 3380 S = FBA T = TAPE

34 3 Identifies the SYS number (VSE only) for the optional output letter file.

An integer value from 000–240.

37 1 Identifies Two-Up letters.

Y= yes, N or blank=no. The default is Blank.

38 3 Specifies the number of bytes between the Two-Up letters.

The number of character positions between the left and right letters. The default is 5.

41 1 When Y, generates the field, DYLCNxxSW, that you can use to control when and where the next letter command is executed, for Two-Up letters.

Blank or Y. The default is Blank.

Page 589: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

Appendix C: Fixed Form Parameters C–17

Column

Field

Size

Statement Use Description Code

42 3 Specifies the amount of memory, in K, reserved to hold the left side letter in Two-Up letter processing.

An integer value from 1–999. The default is 10.

45 1 When Y, specifies print line generation optimization.

Blank or Y. The default is Blank.

Statement 2 —CNH Header is Blank

Use this statement when the From-To field in the CNH header parameter (Column 17 in statement 1) is blank.

Column

Field

Size

Statement Use Description Code

1 2 Describes function as confirmation notice.

Always CN

3 1 Line spacing. Space X number of lines, up to 9, before printing this line.

1 or blank denotes singlespace; 2 denotes doublespace or two spaces; 3 denotes triplespace, or three spaces; and so on, up to a maximum of 9 spaces; E denotes page ejection; J–T denote skip to channel 2–12, respectively.

4 1 Specifies text editing control.

N=new paragraph and text editing of line(s) to follow. Blank=continues text editing, removing unnecessary blanks.O=omit editing; extraneous blanks are not removed.

5 1 Specifies continuation, used when characters per line exceed 72.

1 or blank denotes original CN statement 2, 3, or 4 denotes continuation of CN statement from previous line.

Page 590: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

C–18 Reference Guide

Column

Field

Size

Statement Use Description Code

6 67 Specifies content of notice or information to be printed and edited according to specifications. For more information see Variable Information in this section.

Body of letter you want to print. All variable information (insertions) must be prefixed with an @ followed by a data name. The following special characters should not be embedded in your data names:

. , : @ ( ) / ;

For example (where X represents blank):

0 1 1

COL 6...0....5

@NAMEXXXXX— NAME and ADDRESS

@ADDRESSXX—have been defined in Advantage VISION:Results field definition statements.

Statement 2 — CNH Header is Y

Use this statement when the From-To field in the CNH header parameter (Column 17 in statement 1) is Y.

Column

Field

Size

Statement Use Description Code

1 2 Describes function as confirmation notice.

Always CN

3 1 Line spacing. Space X number of lines, up to 9, before printing this line.

1 or blank denotes single space; 2 denotes double space or two spaces; 3 denotes triple space, or three spaces; and so on, up to a maximum of 9 spaces; E denotes page ejection; J–T denote skip to channel 2–12, respectively.

4 1 Specifies text editing control.

N=new paragraph and text editing of line(s) to follow. Blank=continues text editing, removing unnecessary blanks. O=omit editing; extraneous blanks are not removed.

Page 591: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

Appendix C: Fixed Form Parameters C–19

Column

Field

Size

Statement Use Description Code

5 1 Specifies continuation, used when characters per line exceed 72.

1 or blank denotes original CN statement. 2, 3, or 4 denotes continuation of CN statement from previous line.

6 2 Associates statement with a specific line number.

An integer value from 1–99.

8 2 RESERVED

10 63 Specifies content of notice or information to be printed and edited according to specifications. For more information see Variable Information in this section.

Body of letter you want to print. All variable information (insertions) must be prefixed with an @ followed by a data name. The following special characters should not be embedded in your data names:

. , : @ ( ) / ;

For example (where X represents blank):

0 1 1

COL 6...0....5

@NAMEXXXXX— NAME and ADDRESS

@ADDRESSXX — have been defined in Advantage VISION:Results field definition statements.

Variable Information

If you want a variable to be edited (leading zeros suppressed or insertion of commas, decimal points, or dollar signs), the data name variable must appear immediately followed by an edit code as shown below:

@@BALANCE(Z)

@DATE(D)

Edit codes and Descriptions (Alphabetical Order)

Edit Codes Description

Page 592: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

C–20 Reference Guide

Edit Codes Description

A Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field.

Print decimal point and zeros to the right of decimal.

If field has no decimal positions and has a zero value, nothing prints.

Example:

. 001234.56 prints as 1,234.56

000000.00 prints as .00

000000000 prints as (blank)

B Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Blank if zero.

If zero value, print decimal point and zeros to the right of the decimal.

If field has no decimal positions and has a zero value, nothing prints.

Example:

001234.56— prints as 1234.56

000000.00 —prints as .00

000000000— prints as (blank)

D Date edit of a 6-byte zoned decimal or 4-byte packed field.

011598 prints as 01/15/98

E Edit with leading zero suppression, commas, decimal point insertion, and negative sign to the right of the field. Blank if zero.

001234.56 prints as 1,234.56

000000.00 prints as (blank)

F Leading $. Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Blank if zero. Float a currency sign to the left of the field.

-00123456 prints as $1,234.56-

000000.00 prints as (blank)

G Leading -$. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Float a currency sign to the direct left of the field. Blank if zero.

00123456 prints as -$1,234.56

000000.00 prints as (blank)

Page 593: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

Appendix C: Fixed Form Parameters C–21

Edit Codes Description

H Leading $. Edit with zero suppression, commas, decimal insertion, and negative sign to the right of the field. Float a currency sign (the default is $) to the left of the most significant digit. Blank if zero.

001234.56 prints as $1,234.56

-001234.56 prints as $1,234.56-

0000000.00 prints as .00

00000000000 prints as (blank)

J Leading -$. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Float a currency sign to the left of the field. Blank if zero.

001234.56 prints as $1,234.56

001234.56 prints as -$1,234.56

0000000.00 prints as .00

00000000000 prints as (blank)

K Leading $-. Edit with zero suppression, commas, decimal insertion, and negative sign to the direct left of the field. Float a currency sign to the left of the negative sign. Blank if zero.

00123456 prints as $-1,234.56

00000000 prints as (blank)

L Leading $-. Edit with zero suppression, commas, decimal insertion, and negative sign to the direct left of the field. Float a currency sign to the left of the negative sign. Blank if zero.

001234.56 prints as $1,234.56

001234.56 prints as $-1,234.56

0000000.00 prints as .00

00000000000 prints as (blank)

P Default edit code. Edit with decimal insertion, negative sign to the right of the field, but no commas. If the field has no decimal positions and has a zero value, zeros print.

001234.56 prints as 001234.56

000000.00 prints as 000000.00

000000000 prints as 000000000

Page 594: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Letter Writing and Confirmation Notice

C–22 Reference Guide

Edit Codes Description

Q Leading -. Edit with zero suppression, decimal insertion, negative sign to the left of the field, but no commas. Blank if zero. If zero value, print decimal point and zeros to the right of decimal. If field has no decimal positions and has a zero value, nothing prints.

001234.56 prints as 1234.56

001234.56 prints as -1234.56

000000.00 prints as .00

000000000 prints as (blank)

S Edit a social security number from a 9-byte zoned decimal (numeric) or 5-byte packed decimal field.

240167567 prints as 240-16-7567

U Leading -. Edit with zero suppression, decimal insertion, negative sign to the left of the field, but no commas. Blank if zero.

00123456 prints as 1234.56

00123456 prints as -1234.56

000000.00 prints as (blank)

V Edit a date field containing a 4-digit year.

01151998 prints as 01/15/1998

W Leading -. Edit with decimal insertion, negative sign to the left of the field, but no commas. If the field has no decimal positions and has a zero value, zeros print.

-001234.56 prints as -001234.56

0000000.00 prints as 0000000.00

000000000 prints as 000000000

X Leading -. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the field. Print decimal point and zeros to the right of decimal.

If field has no decimal positions and has a zero value, nothing prints.

001234.56 prints as 1,234.56

001234.56 prints as -1,234.56

0000000.00 prints as .00

00000000000 prints as (blank)

Page 595: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression and Scatter Diagram

Appendix C: Fixed Form Parameters C–23

Edit Codes Description

Y Leading -. Edit with zero suppression, commas, decimal insertion, and negative sign to the left of the number. Blank if zero.

-00123456 prints as -1,234.56

000000.00 prints as (blank)

Z Edit with leading zero suppression, decimal point insertion, negative sign to the right of the field, but no commas. Blank if zero.

001234.56 prints as 1234.56

000000.00 prints as (blank)

Additionally, a print length can be specified for edited data names. For example, @BALANCE (E,10) means that the data in the field BALANCE should be printed within ten characters and, if necessary, high order digits are truncated. The length option cannot be used for non-numeric, non-edited fields.

Linear Regression and Scatter Diagram There are two types of linear regression and scatter diagram statements. The first statement defines the data necessary for the linear regression analysis. The second statement defines the data needed for the scatter diagram. The first statement is required while the second statement is optional and should not be coded if the scatter diagram is not needed.

Up to a maximum of 99 linear regression and scatter diagram applications can be processed in one Advantage VISION:Excel program.

Advantage VISION:Results report logic is still available for additional reporting purposes.

Page 596: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression and Scatter Diagram

C–24 Reference Guide

Statement 1

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as linear regression and scatter diagram.

Always R

3 2 Contains a unique application number.

An integer value from 1–99. Spaces default to integer 0.

6 1 Specifies the LR statement as statement 1.

Always 1

8 10 Label of field containing the independent variable.

Data name defined by an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or-left aligned or centered.

19 10 Label of field containing the dependent variable.

Data name defined by an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right or left-aligned or centered.

30 10 Label of field containing the title. The contents of the title field prints at he top of the line a regression analysis and the scatter diagram. This parameter field is optional.

Data name defined by an Advantage VISION:Results definition statement. The data name must have as its first character an alpha from A to Z. The length of the field defined should not exceed 70 characters in length. Field can be right or left-aligned or centered.

Page 597: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression and Scatter Diagram

Appendix C: Fixed Form Parameters C–25

Statement 2

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as linear regression and scatter diagram.

Always LR

3 2 Contains a unique application number.

An integer value from 1–99

6 1 Specifies the LR statement as statement 2.

Always 2

8 1 Independent scaling factor used exclusively in the scatter diagram. The values on the X-axis are divided by the scaling factor before being printed.

1 — Thousands

2 — Millions

3 — Billions

4 — Trillions

9 14 Starting value on the-X-axis of the scatter diagram.

A numeric value. The contents of this field can be right-or left-aligned or centered. A dollar sign, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned. Negative values must be preceded by sign.

The unit value of this field is determined by the independent scaling factor. Therefore, if 1 is coded in the independent scaling factor field, 1.5 coded in this field represents 1.5 thousand.

Page 598: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Linear Regression and Scatter Diagram

C–26 Reference Guide

Column

Field

Size

Statement Use Description Code

23 14 Unit value on the X-axis of the scatter diagram.

A positive numeric value. The contents of this field can be right-or left-aligned or centered. A dollar sign, commas, leading blanks, and trailing blanks are acceptable. The unit value of this field is determined by the independent scaling factor. Therefore, if 2 is coded in the independent scaling factor field, $4.15 coded in this field represents $4.15 million.

37 2 Number of intervals to be printed on the X-axis of the scatter diagram.

An integer value from 1–30.

40 1 Dependent scaling factor used exclusively in the values on the Y-axis are divided by the scaling factor before being printed.

A numeric value. The contents of this field can be right-or left-aligned or centered. A dollar sign, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned. Negative values must be preceded by sign. The unit value of this field is determined by the dependent scaling factor. Therefore, if 1 is coded in the dependent scaling factor field,-1.5 coded in this field represents -1.5 thousand.

41 14 Starting value on the Y-axis of the scatter diagram.

55 14 Unit value on the Y-axis of the scatter diagram.

A positive numeric value. The contents of this field can be right-or left-aligned or centered. A dollar sign, commas, leading blanks, and trailing blanks are acceptable. The unit value of this field is determined by the dependent scaling factor. Therefore, if 3 is coded in the dependent scaling factor field, $5 coded in this field represents $5 billion.

Page 599: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling

Appendix C: Fixed Form Parameters C–27

Column

Field

Size

Statement Use Description Code

69 2 Number of intervals to be printed on the Y-axis of the scatter diagram.

An integer value from 1–20.

Discovery Sampling Discovery sampling requires only one statement per discovery sampling application.

Up to a maximum of 90 discovery sampling statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry can be submitted with each discovery sampling statement.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

Page 600: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling

C–28 Reference Guide

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. Spaces default to integer 0.

5 2 Describes function as discovery sampling.

Always DV

7 1 RESERVED

8 9 Specifies the population size, either estimated or exact.

An integer value from 1–999999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

For example (where X represents blank): 0 1 1

COL 8.0....5.

X20,000XX— The population size is 20,000.

50,000XXX —The population size is 50,000.

17 1 RESERVED

18 4 Specifies the confidence level.

A percent value that can be no greater than 99.9. The precoded tens decimal point is always required. Value cannot be zero.

22 1 RESERVED

Page 601: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling

Appendix C: Fixed Form Parameters C–29

Column

Field

Size

Statement Use Description Code

23 8 Specifies the maximum tolerable number of occurrences in the population.

A numeric value of 199999999. Field can be rightor leftaligned or centered.Leading blanks and trailing blanks are acceptable. Value cannot be zero.

For example (where X represents blank):

2 2 3

COL 3.5....0

4,200XXX — The maximum tolerable number of occurrences in the population is 4200.

XXXXX200 — The maximum number is 200.

31 1 RESERVED

32 1 Specifies whether you want a discovery worksheet.

The generation of this worksheet (correlation of sample occurrence to probable population table) uses a large number of CPU cycles.

Y if you want a discovery worksheet. N or blank if you do not want a discovery worksheet. The default is N or blank; no discovery worksheet is generated.

33 1 RESERVED

34 1 Specifies whether one sided confidence level is wanted.

1 or blank if one sided confidence level is required. 2 if twosided or twosided confidence level is required. The default is one-sided confidence level.

35 1 RESERVED

Page 602: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Discovery Sampling

C–30 Reference Guide

Column

Field

Size

Statement Use Description Code

36 4 Specifies starting sample occurrence for correlation table.

An integer value from 09999. Field can be right or leftaligned or centered. Leading blanks and trailing blanks are acceptable. If a worksheet is specified (Y in column 32) and the starting sample is left blank, the default value is 0.

For example (where X represents blank):

3 3

COL 6..9

X20X — The starting sample occurrence is 20.

130X — The starting sample occurrence is 130.

40 1 RESERVED

41 4 Specifies occurrence interval for the correlation table.

An integer value from 1–9999. Field can be rightor leftaligned or centered. Leading blanks and trailing blanks are acceptable. Value cannot be zero. Occurrence interval default, if left blank, is 1.

For example (where X represents blank):

4 4

COL 1..4

X72X — The occurrence interval for the correlation table is 72.

1000 — The occurrence interval for the correlation table is 1,000.

45 28 RESERVED

Page 603: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling

Appendix C: Fixed Form Parameters C–31

Dollar Unit Sampling Dollar Unit Sampling requires only one statement per sampling application.

Up to a maximum of 90 dollar unit sampling statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry can be submitted with each dollar unit sampling statement. The DYLPWRSD random number generator is recommended.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. Spaces default to integer 0.

5 2 Describes function as dollar unit sampling.

Always DU

7 1 RESERVED

8 10 Contains the label of the field that contains the dollar amount against which dollar unit sampling occurs.

Data name as defined by an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

18 14 Contains the cellwidth (sampling interval).

A positive numeric dollar amount up to 9999999999999. Dollar amounts can include a dollar sign, commas, and a decimal point. Any decimal places beyond those defined in the field definition for the label of the field containing the amount are ignored. Field can be left- or right-aligned or centered.

Page 604: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Dollar Unit Sampling

C–32 Reference Guide

Column

Field

Size

Statement Use Description Code

32 10 Label of the field (data name) against which duplicate checks are performed (optional).

Data name as defined by an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right

42 1 Specifies whether or not DYLSPxxKYF is to be examined for Y, indicating that particular record is a key record and is to be included in the sample (optional).

Y = yes, N or blank = no.

43 11 A value in this field causes any records with a zero dollar value to be assigned this value (optional).

A positive numeric dollar amount up to99999999999. Dollar amounts can include a dollar sign, commas, and a decimal point. Any decimal places beyond those defined in the field definition for the label of field containing the amount are ignored. Field can be left- or right-aligned or centered.

54 11 A value in this field causes any records with a dollar value less than this value to be assigned this value (optional).

A positive numeric dollar amount up to 99999999999. Dollar amounts can include a dollar sign, commas, and a decimal point. Any decimal places beyond those defined in the field definition for the label of field containing the amount are ignored. Field can be left or right-aligned or centered.

Page 605: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling of Values

Appendix C: Fixed Form Parameters C–33

Estimation Sampling of Values Estimation sampling of values requires only one statement per sampling application.

Up to a maximum of 90 estimation sampling of values statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry can be submitted with each estimation sampling of values statement.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as estimation of sampling values.

Always EV

7 1 RESERVED

8 9 Specifies the population size of the file, either estimated or exact.

An integer value from 1–999999999. Field can be left- or right-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

For example (where X represents blank):

0 1 1

COL 8.0....5

XX1,000XX — The population size is 1,000.

20200XXXX— The population size is 20,200.

17 1 RESERVED

Page 606: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling of Values

C–34 Reference Guide

Column

Field

Size

Statement Use Description Code

18 4 Specifies confidence level. An estimate of the degree of certainty that the population average lies within the confidence interval.

A percent value no greater than 99.9. Precoded tens decimal point always required. Value cannot be zero.

22 1 RESERVED

23 14 Specifies monetary unit precision.

A numeric value from 1–99999999999999. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

2 2 3 3

COL 3.5....0....5.

XXXX$1,000XXXX— The unit precision limit is $1,000

2000000XXXXXXX — The unit precision limit is $2,000,000

37 1 RESERVED

38 14 Specifies the standard deviation of the population.

A numeric value from 1–99999999999999. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned.

For example (where X represents blank):

3 4 4 5

COL 8.0....5....0.

$20.00XXXXXXXX — The standard deviation of the population is $20.

XXXXXXXXXXX200 — The standard deviation is $200.

52 1 RESERVED

Page 607: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Estimation Sampling of Values

Appendix C: Fixed Form Parameters C–35

Column

Field

Size

Statement Use Description Code

53 10 Specifies the label of the field containing the amount.

Data name defined in an Advantage VISION:Results

field definition statement. The data name

must have its first character as an alpha

from A to Z. The field can be left- or

right-aligned. Leading blanks and trailing blanks are acceptable.

For example (where X represents blank):

5 5 6

COL 3.5....0..

XXL270XXXX — The label of the field containing the amount is L270.

NA42XXXXXX — The label is NA42.

63 1 RESERVED

64 1 Specifies one-sided or two-sided confidence level.

1 or blank denotes one-sided confidence level. 2 denotes two-sided confidence level. The default is one-sided confidence level is assumed.

65 1 RESERVED

Page 608: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

C–36 Reference Guide

Frequency Distribution Reporting Advantage VISION:Excel provides the following types of frequency distribution reporting:

Interval

Logarithmic

Alphanumeric

Up to 90 frequency distribution requests can be generated in one pass of the system, providing that sufficient memory is available.

Interval

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as frequency distribution.

Always FQ

3 2 Contains a unique application number.

An integer value from 1–99

5 1 Describes function as interval.

Always I

6 10 Contains label of field (data name) to be distributed.

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

For example (where X represents blank):

0 1 1

COL 6..0..5

XBALANCEXX — The label of the field to be distributed is BALANCE.

XXXXBALOWD— The label is BALOWD.

16 1 RESERVED

Page 609: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

Appendix C: Fixed Form Parameters C–37

Column

Field

Size

Statement Use Description Code

17 11 Contains the starting value that is to be distributed.

A numeric value from -9999999999 to 99999999999. Negative values should be preceded by - sign. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned.

For example (where X represents blank):

1 2 2

COL 7..0....5..

X1.50XXXXXX — Starting value is $1.50.

XX1,234.56X — Starting value is $1234.56.

28 1 RESERVED

29 11 Contains the interval size.

A positive numeric value. Field can be right- or left-aligned or centered. Dollar signs, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned.

For example (where X represents blank):

23 3

COL 90....5....

$20.00XXXXX — The interval size is $20.00.

XXXXXXXX.35 — The interval size is $.35.

40 1 RESERVED

41 3 Contains the maximum number of intervals.

Integer value from 1–999

43 1 RESERVED

Page 610: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

C–38 Reference Guide

Column

Field

Size

Statement Use Description Code

44 10 (Label of the field (data name) containing the report title presented as a literal (optional).

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Label can be right- or left-aligned or centered.For example (where X represents blank):

44 5

COL 45....0...

XTITLE4AXX— TITLE4A is the label.

TITLENAME1— TITLENAME1 is the label.

54 1 RESERVED

55 1 Specifies whether or not a standard frequency report is to be generated.

Blank=yes and N=no.

56 1 RESERVED

57 1 To request histograms with frequency distribution (optional).

Blank or N=none required

C=a histogram reflecting the count of items

V=a histogram reflecting the item values

B=both histograms requested

58 2 Suffix to be appended to keyword DYLFQ to identify the frequency output dataset JCL file name.

AA-ZZ, 01-99

60 3 To specify the blocking factor for the DYLFQxx frequency output dataset.

A decimal value; default is 10

Page 611: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

Appendix C: Fixed Form Parameters C–39

Column

Field

Size

Statement Use Description Code

63 1 To specify the VSE output device type for the DYLFQxx frequency output dataset.

Required if writing to disk or tape

D = Disk output device

T = Tape output device

64 3 To specify the VSE programmer logical unit for the DYLFQxx output disk or tape device.

Required if writing to disk or tape

67 6 RESERVED

Logarithmic

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as frequency distribution.

Always FQ

3 2 Contains a unique application number.

An integer value from 1–99

5 1 Describes function as logarithmic.

Always L

Page 612: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

C–40 Reference Guide

Column

Field

Size

Statement Use Description Code

6 10 Contains label of field to be distributed.

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered. For example (where X represents blank):

0 1 1

COL 6...0....5

XXACCTNAME — The label of the field to be distributed is ACCTNAME.

CASH4VALUE — The label is CASH4VALUE.

16 1 RESERVED

17 11 Contains the low amount (minimum) that is to be distributed.

A numeric value to 99999999999 (can be a negative amount). Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. A low amount of -90 trillion is assigned if MIN is entered in this field. For example (where X represents blank):

1 2 2

COL 7..0....5..

$3,000.00XX—The minimum amount is $3,000.

XXXXX$60.95 — The minimum amount is $60.95.

28 1 RESERVED

Page 613: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

Appendix C: Fixed Form Parameters C–41

Column

Field

Size

Statement Use Description Code

29 11 Contains the high amount (maximum) that is to be distributed.

A numeric value to 99999999999 (can be negative amount). Field can be right- or left-aligned or centered. Dollar sign, leading blanks, and trailing blanks are acceptable.

Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. A high amount of +90 trillion is assigned if MAX is entered in this field.

For example (where X represents blank):

23 3

COL 90....5....

X$34,000.00 —The maximum amount is $34,000.

1,000,000XX —The maximum amount is $1,000,000.

If both the low and high amount fields are left blank, the default limits are -100 million and +100 million.

40 4 RESERVED

44 10 Label of the field (data name) containing the report title presented as a literal (optional).

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Label can be right- or left-aligned or centered. For example (where X represents blank):

44 5

COL 45....0...

XTITLEREPX — TITLEREP is the label.

TITLECOSTX — TITLECOST is the label.

54 1 RESERVED

55 1 Specifies whether or not a standard frequency report is to be generated.

Blank=yes and N=no.

Page 614: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

C–42 Reference Guide

Column

Field

Size

Statement Use Description Code

56 1 RESERVED

57 1 To request histograms with frequency distribution (optional).

Blank or N=none required

C=a histogram reflecting the count of items

V=a histogram reflecting the item values

B=both histograms requested

58 2 Suffix to be appended to keyword DYLFQ to identify the frequency output dataset JCL file name.

AA-ZZ, 01-99

60 3 To specify the blocking factor for the DYLFQxx frequency output dataset.

A decimal value; default is 10

63 1 To specify the VSE output device type for the DYLFQxx frequency output dataset.

Required if writing to disk or tape

D = Disk output device

T = Tape output device

64 3 To specify the VSE programmer logical unit for the DYLFQxx output disk or tape device.

Required if writing to disk or tape

67 6 RESERVED

Page 615: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

Appendix C: Fixed Form Parameters C–43

Alphanumeric

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as frequency distribution.

Always FQ

3 2 Contains a unique application number.

An integer value from 1–99

5 1 Describes function as alphanumeric.

Always A

6 10 Contains label of field to be distributed.

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

16 1 RESERVED

17 10 Label of field to be itemized.

Data name defined in an Advantage VISION:Results field definition statement. The length of the field defined by this label cannot be greater than 34-bytes. The format of the field can be alphabetic, numeric, packed, or binary.

27 13 RESERVED

40 3 Contains the number of items.

An integer value from 1–999.

For example (where X represents blank):

4

COL 0..

X43 — There are forty-three different alphanumeric items (classifications) in the frequency report.

X9X— There are nine different items.

43 1 RESERVED

Page 616: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Frequency Distribution Reporting

C–44 Reference Guide

Column

Field

Size

Statement Use Description Code

44 10 Label of the field (data name) containing the report title presented as a literal (optional).

Data name defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Label can be right- or left-aligned or centered.

For example (where X represents blank):

44 5

COL 45....0...

XXTITLEXXX — TITLE is the label.

THEHEADING — THEHEADING is the label.

54 1 RESERVED

55 1 Specifies whether or not a standard frequency report is to be generated.

Blank=yes and N=no.

56 1 RESERVED

57 1 To request histograms with frequency distribution (optional).

Blank or N=none required

C=a histogram reflecting the count of items

V=a histogram reflecting the item values B=both histograms requested

58 2 Suffix to be appended to keyword DYLFQ to identify the frequency output dataset JCL file name.

AA-ZZ, 01-99

60 3 To specify the blocking factor for the DYLFQxx frequency output dataset.

A decimal value; default is 10

Page 617: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling

Appendix C: Fixed Form Parameters C–45

Column

Field

Size

Statement Use Description Code

63 1 To specify the VSE output device type for the DYLFQxx frequency output dataset.

Required if writing to disk or tape

D = Disk output device

T = Tape output device

64 3 To specify the VSE programmer logical unit for the DYLFQxx output disk or tape device.

Required if writing to disk or tape

67 6 RESERVED

Proportional Sampling Proportional sampling requires only one statement per proportional sampling application.

Up to 90 proportional sampling statements can be submitted in one Advantage VISION:Excel run.

Random number seed entry is not permitted. Proportional sampling has its own restart facility (see column 54).

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as proportional sampling.

Always PS

7 1 RESERVED

Page 618: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling

C–46 Reference Guide

Column

Field

Size

Statement Use Description Code

8 14 Specifies the recorded (unaudited) monetary total of population.

A numeric value from 1–99999999999999. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

0 1 1 2

COL 8.0....5....0.

XXXXXXXXX9,000 — The monetary total is $9,000

$654,000,000X — he monetary total is $654,000,000.

22 1 RESERVED

23 4 Specifies the reliability level.

A percent value no greater than 99.9. The precoded tens place decimal point is required. Value cannot be zero.

For example:

2 2

COL 3.5.

95.7 — Ninety-five and seven tenths percent is the reliability level.

27 1 RESERVED

Page 619: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling

Appendix C: Fixed Form Parameters C–47

Column

Field

Size

Statement Use Description Code

28 14 Specifies the upper monetary precision limit.

A numeric value to 99999999999999 can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

2 3 3 4

COL 8.0....5....0.

XXXXXXXXXX300X — The upper monetary precision limit is $300.

XXXXX$2,000.00 — The upper monetary precision limit is $2,000.

42 1 RESERVED

43 10 Contains the label of the field containing the amount.

Data name defined in an Advantage VISION:Results field definition statement. The data name must have its first character as an alpha from A to Z. The field can be right- or left-aligned or centered. Leading blanks and trailing blanks are acceptable.

For example (where X represents blank):

4 4 5

COL 3.5....0..

NAMEXXXXXX— NAME is the label of the field containing the amount.

XXXXXXXXA1— A1 is the label.

53 1 RESERVED

Page 620: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling

C–48 Reference Guide

Column

Field

Size

Statement Use Description Code

54 14 Contains random restart number (optional).

A numeric value from 1–99999999999999. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

55 6 6

COL 45....0....5..

$45.00XXXXXXXX — The random restart number is $45.

XXXXX10000000X— The random restart number is ten million.

68 1 RESERVED

69 1 Specifies that you want a proportional sampling worksheet.

Y if you want a worksheet. N or blank if no worksheet.

70 3 RESERVED

Page 621: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Random Number Seed Table — Non-Stratified

Appendix C: Fixed Form Parameters C–49

Random Number Seed Table — Non-Stratified The random number seed table statement is not a stand-alone statement. It is an optional sub function statement for Discovery, Acceptance, Attribute, Simple Random, Estimation of Value, and Dollar Unit Sampling statements; however, it is not allowed for either Proportional or Simple Interval sampling.

If the statement is submitted without any seed entry information, a warning message is issued. This warning message does not terminate the processing of the Advantage VISION:Excel phase.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. This value must match the sampling statement that the RN is associated with.

5 2 Describes sub function as random number seed entry.

Always RN

7 8 Specifies a phase name of a subroutine in a core image library or member (load module) of a partitioned data set that is the user's random number generator (optional).

Leave blank if not used; otherwise, you should code the name of your random number module. The data name must have as its first character an alpha from A to Z. The field can be right- or left-aligned or centered. Leading blanks and trailing blanks are acceptable.

For example (where X represents blank):

0 1 1

COL 7..0....4

RNDNUMXX — RNDNUM is the phase name.

XXXXXXQ2 — Q2 is the phase name.

Page 622: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Sampling

C–50 Reference Guide

Column

Field

Size

Statement Use Description Code

15 2 Specifies memory size in K of the user's random number generator module. VSE only.

An integer value from 01–99.

17 1 RESERVED

18 7 Specifies the seed entry number that is used to initiate the random number generator. Original seed number can be used if you want to reselect the same random number records (optional).

Any integer value from 1–9999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable.

For example (where X represents blank):

1 2 2

COL 8.0....4

XXX3XXX —The seed entry is 3.

457XXXX — The seed entry is 457

25 48 RESERVED

Simple Interval Sampling Simple interval sampling requires only one statement per simple interval application.

Up to 90 simple interval statements can be submitted in one Advantage VISION:Excel run.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

Page 623: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Sampling

Appendix C: Fixed Form Parameters C–51

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.-

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as simple interval.

Always SI

7 1 RESERVED

8 9 Specifies the interval or every Nth record.

An integer value from 1–999999999. Fieldcan be right- or left-aligned. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

For example (where X represents blank):

0 1 1

COL 8.0...5.

20XXXXXXX — Every 20threcord isselected.

250XXXXXX — Every250th record.

XXXX30XXX— Every 30th record.

XXXX2,000 — Every 2,000th record.

17 1 RESERVED

Page 624: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Interval Sampling

C–52 Reference Guide

Column

Field

Size

Statement Use Description Code

18 9 Specifies the starting number with which selection is to commence.

A numeric value from 1–999999999. The field can be right- or left-aligned. Leading and trailing blanks, as well as embedded commas, are acceptable.

For example (where X represents blank):

1 2 2

COL 8.0....5.

XXXXX1000 — Start selecting every Nth record after bypassing the first 999.

XXX2XXXXX— Start selecting every Nth record after bypassing the first record read.

27 1 RESERVED

28 9 Maximum sample size. The number of records the user wants to extract (select) from the file.

An integer value from 1–999999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero. If sample size is left blank, the default is 999999999.

For example (where X represents blank):

2 3 3

COL 8.0....5.

XX1,000XX — One thousand records are selected.

20000XXXX — Twenty thousand records are selected.

37 36 RESERVED

Page 625: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling

Appendix C: Fixed Form Parameters C–53

Simple Random Sampling Simple random sampling requires only one statement per SR application. There are two formats of SR — known universe and unknown universe.

Up to 90 simple random statements can be submitted in one Advantage VISION:Excel run.

A random number seed entry statement can be submitted with each simple random statement.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

Known Universe

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as simple random.

Always SR

7 1 RESERVED

Page 626: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Simple Random Sampling

C–54 Reference Guide

Column

Field

Size

Statement Use Description Code

8 9 Specifies exact or estimated population size.

An integer value from 1–999999999. Field can be right- or left-aligned. Leading and trailing blanks, as well as embedded commas, are acceptable. Decimal point is not acceptable. Value cannot be zero.

For example (where X represents blank):

0 1 1

COL 8.0....5.

20000XXXX — Population is 20,000.

250,000XX — Population is 250,000.

250XXXXXX — Population is 250.

XXXX2,000 —.Population is 2,000.

17 1 RESERVED

18 9 Specifies sample size to be randomly selected from the population.

Sample size cannot be greater than the population size.

An integer value from 1–999999999. The field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

For example (where X represents blank):

1 2 2

COL 8.0....5.

XXXXX1000 — Sample size is 1,000.

XXX800XXX — Sample size is 8,000.

27 46 RESERVED

Page 627: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Basic Information

Appendix C: Fixed Form Parameters C–55

Unknown Universe

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as simple random.

Always SR

7 1 RESERVED

8 9 Contains the approximate percent of the infinite population.

Percent value from .00001–100.00000%. Precoded hundred thousandths place decimal point is required.

17 56 RESERVED

Stratified Sampling — Basic Information This statement is not a stand-alone statement; it is required for all stratified sampling techniques — simple percentage, simple random, mean estimation. The BI, or basic information statement, is made up of two statements. If you define five or fewer strata, only the first basic information statement is required. If the number of strata exceeds five, the second BI statement is also required.

Statement 1

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

Page 628: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Basic Information

C–56 Reference Guide

Column

Field

Size

Statement Use Description Code

5 2 Describes function as basic information.

Always BI

7 10 Label of the field to be stratified.

Data name of the field to be stratified defined in an Advantage VISION:Results field definition statement. The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

For example (where X represents blank):

0 1 1

COL 7..0....5.

A1FILEXXX — The label of the fieldto be stratified is A1FILE.

XXXXXNAME2 — The label is NAME2

17 1 Identifies this as the first basic information statement.

Always 1

Page 629: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Basic Information

Appendix C: Fixed Form Parameters C–57

Column

Field

Size

Statement Use Description Code

18 11 Specifies the upper limit for stratum 1.

A numeric value to 99999999999. The field can be right- or left-aligned or centered. Dollar signs, commas, leading blanks, and trailing blanks are acceptable. If no decimal point is specified, it is assumed to be right-aligned. Negative values must be preceded by minus (-) sign. For example (where X represents blank):

1 2 2

COL 8.0....5...

XXXXXXXXX24 — The upper limit for stratum1 is 24.

5,000,000XX — The upper limit for stratum1 is 5,000,000.

1.00XXXXXX — The upper limit for stratum1 is -1.

XX$200.29XX — The upper limit for stratum 1 is $200.29.

29 11 Specifies the upper limit for stratum 2.

Same as stratum 1.

40 11 Specifies the upper limit for stratum 3.

Same as stratum 1.

51 11 Specifies the upper limit for stratum 4.

Same as stratum 1.

62 11 Specifies the upper limit for stratum 5.

Same as stratum 1.

Page 630: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Basic Information

C–58 Reference Guide

Statement 2

The second BI statement should only be used if the first five strata have been exhausted and a sixth or more is needed. The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as basic information.

Always BI

7 10 RESERVED

17 1 Identifies this as the second basic information statement.

Always 2

18 11 Specifies the upper limit for stratum 6.

Same as stratum 1.

29 11 Specifies the upper limit for stratum 7.

Same as stratum 1.

40 11 Specifies the upper limit for stratum 8.

Same as stratum 1.

51 11 Specifies the upper limit for stratum 9.

Same as stratum 1.

62 11 Specifies the upper limit for stratum 10.

Same as stratum 1.

Page 631: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

Appendix C: Fixed Form Parameters C–59

Stratified Sampling — Mean Estimation Method Up to four ME statements are permitted when using the mean estimation method. The statements are identified by a 1, 2, 3, or 4 in column 7. Statements 1 and 2 are always required. Statements 1 and 2 comprise strata 1–4, as well as the population size, confidence level, and unit precision limit. Statements 3 and 4, respectively, are used for strata 5–8, and 9–10. Additionally, at least one BI statement is required.

A maximum of 90 mean estimation applications can be submitted in one Advantage VISION:Excel run.

A random number seed entry statement can be submitted with each mean estimation application. Seed number entries for each stratum are available.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION:Excel.

Statement 1

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.-

Always SP

3 2 Contains a unique application number.

An integer value from 1–99

5 2 Describes function as mean estimation.

Always ME

7 1 Identifies this as the first mean estimation statement.

Always 1

Page 632: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

C–60 Reference Guide

Column

Field

Size

Statement Use Description Code

8 9 Contains the population size, either exact or estimated.

An integer value from 1–999999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

For example (where X represents blank):

0 1 1

COL 8.0....5.

2,000XXXX — The population size is 2,000.

XXXXX1000 — The population size is 1,000

17 4 Contains confidence level.

A percent value no greater than 99.9. The precoded decimal point in ten's place is always required. Value cannot be zero.

21 11 Contains the unit precision limit.

A numeric field from 1–99999999999. Field can be right- or left-aligned or centered. Dollar sign, commas, leading blanks, and trailing blanks are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

2 2 3

COL 1...5....0.

XXX56.0095X— The unit precision is 56.0095.

$10.75XXXXX — The unit precision limit is $10.75.

32 1 RESERVED

33 1 Specifies one- or two-sided confidence level.

Blank or 1 = one-sided confidence level;

2 = two-sided confidence level. The default is one-sided confidence level.

34 39 RESERVED

Page 633: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

Appendix C: Fixed Form Parameters C–61

Statement 2

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. The value specified must be the same as statement 1.

5 2 Describes function as mean estimation.

Always ME

7 1 Identifies this as the second mean estimation statement.

Always 2

8 6 Contains number of items in stratum 1.

An integer value from 1–999999. Field can be right- or left-aligned or centered.Leading and trailing blanks, as well as embedded commas, are acceptable.Value cannot be zero.

For example (where X represents blank):

0 1

COL 8 0...

270XXX — Stratum 1 contains 270 items.

X1000X — Stratum 1 contains 1,000 items.

Page 634: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

C–62 Reference Guide

Column

Field

Size

Statement Use Description Code

14 10 Contains standard deviation of stratum 1.

A numeric value from 1–9999999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as commas and a dollar sign, are acceptable. Floating decimal point is assumed and, if no decimal point is specified, it is assumed to be right-aligned. Value cannot be zero.

For example (where X represents blank):

11 2

COL 45....0...

$27,000.00—The standard deviation of stratum 1 is $27,000.

$25.75XXXX— The standard deviation of stratum 1 is $25.75.

24 6 Contains the number of items in stratum 2.

Same as stratum 1.

30 10 Contains the standard deviation of stratum 2.

Same as stratum 1.

40 6 Contains the number of items in stratum 3.

Same as stratum 1.

46 10 Contains the standard deviation of stratum 3.

Same as stratum 1.

56 6 Contains the number of items in stratum 4.

Same as stratum 1.

62 10 Contains the standard deviation of stratum 4.

Same as stratum 1.

72 1 RESERVED

Page 635: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

Appendix C: Fixed Form Parameters C–63

Statement 3

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. The value specified must be the same as statements 1 and 2.

5 2 Describes function as mean estimation.

Always ME

7 1 Identifies this as the third mean estimation statement.

Always 3

8 6 Contains the number of items in stratum 5.

Same as stratum 1.

14 10 Contains the standard deviation of stratum 5.

Same as stratum 1.

24 6 Contains the number of items in stratum 6.

Same as stratum 1.

30 10 Contains the standard deviation of stratum 6.

Same as stratum 1.

40 6 Contains the number of items in stratum 7.

Same as stratum 1.

46 10 Contains the standard deviation of stratum 7.

Same as stratum 1.

56 6 Contains the number of items in stratum 8.

Same as stratum 1.

62 10 Contains the standard deviation of stratum 8.

Same as stratum 1.

72 1 RESERVED

Page 636: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Mean Estimation Method

C–64 Reference Guide

Statement 4

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. The value specified must be the same as statements 1, 2, and 3.

5 2 Describes function as mean estimation.

Always ME

7 1 Identifies this as the fourth mean estimation statement.

Always 4

8 6 Contains the number of items in stratum 9.

Same as stratum 1.

14 10 Contains the standard deviation of stratum 9.

Same as stratum 1.

24 6 Contains the number of items in stratum 10.

Same as stratum 1.

30 10 Contains the standard deviation of stratum 10.

Same as stratum 1.

40 33 RESERVED

Page 637: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Simple Percentage Method

Appendix C: Fixed Form Parameters C–65

Stratified Sampling — Simple Percentage Method Stratified simple percentage sampling requires at least two statements, the PC statement, and at least one BI (basic information) statement.

Up to 90 simple percentage statements can be submitted in one Advantage VISION: Excel run.

A random number seed entry statement cannot be submitted with any simple percentage statement.

Each application number must be a unique integer value between 1 and 99.

Application number 0 or 00 is reserved for use by Advantage VISION: Excel.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99.

5 2 Describes function as simple percentage

Always PC

7 6 Specifies percent of stratum to be selected from stratum 1.

A percent value no greater than 100.00. The precoded decimal point inthe hundreds position is always required.

For example (where X represents blank):

0 1 1

COL 7..0.2

100.00 — 100% of stratum 1 is to be selected.

X92.00 — 92% of stratum 1 is to be selected.

13 6 Specifies percent of stratum to be selected from stratum 2.

Same as stratum 1.

Page 638: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Simple Percentage Method

C–66 Reference Guide

Column

Field

Size

Statement Use Description Code

19 6 Specifies percent of stratum to be selected from stratum 3.

Same as stratum 1.

25 6 Specifies percent of stratum to be selected from stratum 4.

Same as stratum 1.

31 6 Specifies percent of stratum to be selected from stratum 5.

Same as stratum 1.

37 6 Specifies percent of stratum to be selected from stratum 6.

Same as stratum 1.

43 6 Specifies percent of stratum to be selected from stratum 7.

Same as stratum 1.

49 6 Specifies percent of stratum to be selected from stratum 8.

Same as stratum 1.

55 6 Specifies percent of stratum to be selected from stratum 9.

Same as stratum 1.

61 6 Specifies percent of stratum to be selected from stratum 10.

Same as stratum 1.

67 6 RESERVED

Page 639: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Simple Random Method

Appendix C: Fixed Form Parameters C–67

Stratified Sampling — Simple Random Method Stratified simple random sampling requires at least two statements — at least one RM statement and one BI (basic information) statement.

Two RM statements are permitted when using the random method, each having the capacity to handle five strata. They are identified by a 1 or 2 in column 7, where statement 1 is used for strata 1–5 and statement 2 is used for strata 6–10.

Statement 1

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1-99

5 2 Describes function as simple random.

Always RM

7 1 Identifies this as the first simple random statement number.

One is always required. If more than five strata are needed, statement 2 should also be coded.

8 7 Specifies number of items in stratum 1.

An integer value from 1–9999999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable.

For example (where X represents blank):

0 1 1

COL 8.0...4

XX7,000 — Stratum 1 contains 7,000 items.

4040XXX — Stratum 1 contains 4,040 items.

Page 640: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Simple Random Method

C–68 Reference Guide

Column

Field

Size

Statement Use Description Code

15 4 Specifies number of items to select from stratum 1.

An integer value from 1–9999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable.

For example (where X represents blank):

1 1

COL 5..8

23XX — 23 items are selected.

1000 — 1,000 items are selected.

19 7 Specifies number of items in stratum 2.

Same as stratum 1.

26 4 Specifies number of items to select from stratum 2.

Same as stratum 1.

30 7 Specifies number of items in stratum 3.

Same as stratum 1.

37 4 Specifies number of items to select from stratum 3.

Same as stratum 1.

41 7 Specifies number of items in stratum 4.

Same as stratum 1.

48 4 Specifies number of items to select from stratum 4.

Same as stratum 1.

52 7 Specifies number of items in stratum 5.

Same as stratum 1.

59 4 Specifies number of items to select from stratum 5.

Same as stratum 1.

63 10 RESERVED

Page 641: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Simple Random Method

Appendix C: Fixed Form Parameters C–69

Statement 2

Strata 6–10 are the same as the definition for strata 1–5. The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. The value specified must be the same as statement 1.

5 2 Describes function as simple random.

Always RM

7 1 Identifies this as the second simple random statement.

Always 2

8 7 Specifies number of items in stratum 6.

Same as stratum 1.

15 4 Specifies number of items to select from stratum 6.

Same as stratum 1.

19 7 Specifies number of items in stratum 7.

Same as stratum 1.

26 4 Specifies number of items to select from stratum 7.

Same as stratum 1.

30 7 Specifies number of items in stratum 8.

Same as stratum 1.

37 4 Specifies number of items to select from stratum 8

Same as stratum 1.

41 7 Specifies number of items in stratum 9.

Same as stratum 1.

48 4 Specifies number of items to select from stratum 9.

Same as stratum 1.

52 7 Specifies number of items in stratum 10.

Same as stratum 1.

59 4 Specifies number of items to select from stratum 10.

Same as stratum 1.

63 10 RESERVED

Page 642: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Random Number Seed Table

C–70 Reference Guide

Stratified Sampling — Random Number Seed Table This statement is not a stand-alone statement. It is used as an optional statement for either Stratified Simple Random Method Sampling or Stratified Mean Estimation Method Sampling. Each entry within the seed table is associated with each individual stratum from 1–10. The random seed number entered for each stratum is used by the random number generator to initiate its start.

The following table describes each column in the statement.

Column

Field

Size

Statement Use Description Code

1 2 Describes application as sampling.

Always SP

3 2 Contains a unique application number.

An integer value from 1–99. This number must match the application number of the function (simple random method or mean estimation method) that this seed entry is associated with.

5 2 Describes subfunction as random number seed entry.

Always RS

7 8 Contains the phase name of a subroutine in a core image library or member (load module) of a partitioned data set that is the user's random number generator.

The data name must have as its first character an alpha from A to Z. Field can be right- or left-aligned or centered.

For example (where X represents blank):

0 1

COL 7..0....

RND345XX — RND345 is the name of the random number generator.

XXXXR258 — R258 is the name.

15 2 Contains memory size for user's random number generator module (VSE only).

An integer value from 1–99

17 1 RESERVED

Page 643: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Stratified Sampling — Random Number Seed Table

Appendix C: Fixed Form Parameters C–71

Column

Field

Size

Statement Use Description Code

18 5 Specifies the seed number for stratum 1.

An integer value from 1–99999. Field can be right- or left-aligned or centered. Leading and trailing blanks, as well as embedded commas, are acceptable. Value cannot be zero.

23 5 Specifies the seed number for stratum 2.

Same as above, but for stratum 2.

28 5 Specifies the seed number for stratum 3.

Same as above, but for stratum 3

33 5 Specifies the seed number for stratum 4.

Same as above, but for stratum 4.

38 5 Specifies the seed number for stratum 5.

Same as above, but for stratum 5.

43 5 Specifies the seed number for stratum 6.

Same as above, but for stratum 6.

48 5 Specifies the seed number for stratum 7.

Same as above, but for stratum 7.

53 5 Specifies the seed number for stratum 8.

Same as above, but for stratum 8.

58 5 Specifies the seed number for stratum 9.

Same as above, but for stratum 9.

63 5 Specifies the seed number for stratum 10.

Same as above, but for stratum 10

68 5 RESERVED

Page 644: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 645: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix D: Summary of Advantage VISION:Excel Features D–1

Appendix D: Summary of Advantage VISION:Excel Features

This appendix describes the features and techniques available in Advantage VISION:Excel. It is divided into the following sections:

Advantage VISION:Excel Subsystems

Copy Function

SMF/RMF Reporting System

Generalized Advantage VISION:Excel Routines

Advantage VISION:Excel Subroutines

Additional Subroutines Used by the SMF and RMF Reporting System

Advantage VISION:Excel Subsystems This section describes the subsystems available with Advantage VISION:Excel.

Aging Analysis and Reporting

Determines the aging of a record based on user-specified aging groups, such as 1 to 30 days, 30 to 60 days, and so on. It can also generate standard reports —such as summary or detail reports. Aging is calculated using the past or future aging dates. Future aging can be used for applications such as cash-flow projections.

The user-provided information is as follows:

Aging date or field

Date field

Format of date field (for example: MMDDYY)

Future or past (optional)

Amount field

Aging groups

Standard report (optional): summary or detail

Page 646: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

D–2 Reference Guide

Letter Writing

This subsystem allows you to format letters with variable insertion and optional text editing. Confirmations and running letters are typical letter writing applications.

The user-provided information is as follows:

Characters per line (optional)

Lines per page (optional)

Page eject suppression (optional)

Number of spaces to indent letter (optional)

Length of indent field (optional)

Line spacing and text editing (optional)

Body of letter with variable data

Frequency Distribution —Interval

This subsystem prepares a frequency distribution with equal sized intervals (user-specified), starting with any value. Values can be positive, negative, or fractional. A standard report or histogram can be selected.

The user-provided information is as follows:

Field that is the object of the distribution

Starting value

Interval size

Number of intervals

Standard report (optional)

Histogram (optional): count and value

Frequency Distribution —Logarithmic

This subsystem prepares a frequency distribution with logarithmic intervals. Advantage VISION:Excel automatically generates the interval size. A standard report or histogram can be selected.

The user-provided information is as follows:

Field that is the object of the distribution

Low amount

High amount

Page 647: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

Appendix D: Summary of Advantage VISION:Excel Features D–3

Standard report (optional)

Histogram (optional): count and value

Frequency Distribution —Alphanumeric

This subsystem prepares a frequency distribution with alphanumeric itemization. A standard report or histogram can be selected. Distributions by city, state, vendor name, and job name are a few of the limitless applications.

The user-provided information is as follows:

Field that is the object of the distribution

Field to be itemized

Number of items

Standard report (optional)

Histogram (optional): count and value

Simple Interval Sampling

Chooses a sample based on a user-specified interval. The last item in each interval is selected. A maximum sample size can be specified.

The user-provided information is as follows:

Interval size

Starting number

Maximum sample size (optional)

Simple Random Sampling (Non-Stratified) Known Population

This subsystem chooses a sample completely at random. A seed number can be specified.

The user-provided information is as follows:

Population size

Sample size

Seed number (optional)

Page 648: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

D–4 Reference Guide

Simple Random Sampling (Non-Stratified) Unknown Population

This subsystem chooses a sample completely at random. A seed number can be specified.

The user-provided information is as follows:

Percent of population

Seed number (optional)

Stop or Go Sampling (Non-Stratified)

This subsystem chooses multiple samples completely at random. A seed number can be specified for each sample.

The user-provided information is as follows:

Population size

Sample size

Seed number (optional)

Attribute Estimation Sampling

This subsystem calculates the statistically correct sample size and chooses a random sample that can be used in estimating the number of characteristic items within the population. The accuracy of the estimation is determined by the user-specified confidence level and precision. A seed number can be specified.

The user-provided information is as follows:

Population size

Confidence level: one- or two-sided

Precision

Maximum tolerable rate in population

Worksheet options (optional)

Seed number (optional)

Page 649: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

Appendix D: Summary of Advantage VISION:Excel Features D–5

Discovery Sampling

This subsystem calculates the statistically correct sample size and chooses a random sample that contains at least one of the characteristic items provided that the population does not have less than the maximum tolerable number of occurrences. A seed number can be specified.

The user-provided information is as follows:

Population size

Confidence level: one- or two-sided

Maximum tolerable number of occurrences in population

Worksheet options (optional)

Seed number (optional)

Acceptance Sampling

This subsystem calculates the statistically correct sample size and acceptance number and chooses a random sample that can be used in accepting or rejecting the population. A seed number can be specified.

The user-provided information is as follows:

Population size

Acceptable rate of occurrence in the population

Maximum rate of occurrence in the population

Risk of overauditing

Risk of unwarranted reliance

Seed number (optional)

Proportional Sampling

Also known as monetary, CMA, or dollar value sampling. Calculates the statistically correct sampling interval and selects a systematic sample whose evaluation determines the upper bound of error within a user-specified reliability level and precision limit.

The user-provided information is as follows:

Monetary total of recorded population

Reliability level

Precision limit

Amount field

Page 650: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

D–6 Reference Guide

Random restart value (optional)

Proportional worksheet (optional)

Estimation Sampling of Values

This subsystem calculates the statistically correct sample size and chooses a random sample whose mean value does not exceed the mean value of the originating population by more than the user-specified precision limit within a specified confidence level. A seed number can be specified.

The user-provided information is as follows:

Population size

Confidence level: one- or two-sided

Unit precision limit

Standard deviation

Amount field

Seed number (optional)

Dollar Unit Sampling

This subsystem selects a random sample whose evaluation determines the upper bound of monetary error. A seed number can be specified.

The user-provided information is as follows:

Amount field

Cell width

Duplicate check field (optional)

Key records flag (optional)

Lower physical unit stratum zero values (optional)

Lower physical unit stratum small values (optional)

Seed number (optional)

Page 651: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

Appendix D: Summary of Advantage VISION:Excel Features D–7

Simple Percentage (Stratified Sampling)

This subsystem stratifies a population and systematically selects user-specified percentages of each stratum as the sample. The Advantage VISION:Excel sampling reports are automatically generated. The upper limits for strata (1 - n) can be positive, negative, fractional, or zero.

The user-provided information is as follows:

Field to be stratified

Upper limits for strata 1 - n

Percent of stratum (1 - n) to select

Simple Random (Stratified Sampling)

This subsystem stratifies a population and selects a random sample from each stratum. The Advantage VISION:Excel sampling reports are automatically provided. The upper limits for strata(1 - n) can be positive, negative, or zero. Seed numbers for each stratum can be specified.

The user-provided information is as follows:

Field to be stratified

Upper limits for strata 1 - n

Number of items in strata 1 - n

Number of items to select from strata 1 - n

Seed numbers for each stratum (optional)

Mean Estimation (Stratified Sampling)

This subsystem stratifies a population, calculates the statistically correct sample size for each stratum based upon the specified confidence level and unit precision limit, and selects a random sample from each stratum. The combined sample can be used to estimate the total value of the population. Advantage VISION:Excel automatically generates stratified sampling reports. A seed number can be specified.

The user-provided information is as follows:

Field to be stratified

Upper limits for strata 1 - n

Population size

Confidence level: one- or two-sided

Unit precision limit

Page 652: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subsystems

D–8 Reference Guide

Number of item in strata 1 - n

Standard deviation of strata 1 - n

Seed number (optional)

Regression Analysis – Linear Regression, Trend Line Analysis, and Scatter Diagrams

This subsystem calculates the slope and Y-intercept of the regression line that relates a dependent variable to an independent variable. Optionally, the dependent variable can be plotted against the independent variable within a scatter diagram.

The user-provided information is as follows:

For Linear Regression or Trend Line Analysis alone:

– Name of field containing independent (x) variable

– Name of field containing dependent (y) variable

For optional Scatter Diagram:

– Scaling factor for x axis

– Starting value for x axis

– Unit value for x axis

– Number of intervals on x axis

– Scaling factor for y axis

– Starting value for y axis

– Unit value for y axis

– Number of intervals on y axis

Page 653: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Copy Function

Appendix D: Summary of Advantage VISION:Excel Features D–9

Copy Function Advantage VISION:Excel contains many specialized routines written with the auditor in mind. Each specialized routine utilizes the COPY function. The COPY function:

Allows you to code your own specialized routines.

Provides you with symbolic substitution in commonly used routines (default values are allowed), as well as a conditional statement facility.

Allows you to keep frequently called applications in a library, yet enables you to dynamically change variables in the statements at execution time.

Contains symbols, which:

– Are represented by the pound sign (#) followed by a numeric or alphabetic (0-9, A-Z) character.

– Can be assigned values either in the COPY statements, the DEFAULT statements, or both.

– Are not positional; they are free-form and can be specified in any order.

Allows continuation on both the COPY and DEFAULT statements.

Example:

COPY FQPAY #1 = BALANCE #2 = $0.00

#3 = $10.00 #4 = 30

COPY Routine:

FREQ 01 EQUAL DISTFIELD #1 START #2

INTERVALSIZE #3 INTERVALNO #4

For more information about the COPY function, see the Advantage VISION:Excel Toolkit Reference Guide. Advantage VISION:Excel also has a MACRO facility that can be used to encode and save numerous specialized macro routines.

Page 654: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–10 Reference Guide

SMF/RMF Reporting System Advantage VISION:Excel provides the following COPY functions for System Management Facilities and Resource Measurement Facility (SMF/RMF) reporting.

DYRMF70

Prints RMF70 — RMF DATA CPU ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYRMF71

Prints RMF71 — RMF PAGING ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

Page 655: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–11

Param Requirements Default values

#X With NULL, 4-digit year format 2-digit year format

Note: For additional information, see the Advantage VISION:Excel SMF/RMF Reporting Guide.

DYRMF72

Prints RMF72 — RMF WORKLOAD ACTIVITY AND STORAGE DATA records in report\ format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYRMF73

Prints RMF73 — RMF CHANNEL PATH ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

Page 656: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–12 Reference Guide

Param Requirements Default values

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYRMF74

Prints RMF74 — RMF DEVICE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYRMF75

Prints RMF75 — RMF PAGE/SWAP ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 657: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–13

DYRMF76

Prints RMF76 — RMF TRACE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF0

Prints SMF0 — IPL records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort Fields "SMF0SID SMF0DTE SMF0TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 658: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–14 Reference Guide

DYSMF2

Prints SMF2 — Dump Header records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF02SID SMF02DTE SMF02TME"

#6 Additional Sort fields NULL

#7 Additional Sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF3

Prints SMF3 — Dump Trailer records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF03SID SMF03DTE SMF03TME"

#6 Additional Sort fields NULL

#7 Additional Sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

Page 659: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–15

Param Requirements Default Values

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF4

Prints SMF4 — STEP TERMINATION records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF4JBN SMF4STN SMF4STID"

#6 Additional sort fields "SMF4SIT SMF4DTE SMF4TME"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF5

Prints SMF5 — JOB TERMINATION records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF5JBN SMF5JICL SMF5NST"

Page 660: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–16 Reference Guide

Param Requirements Default values

#6 Additional sort fields "SMF5JID SMF5JIT"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF6

Prints SMF6 — SYSOUT PROCESSING records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF6JBN SMF6JNM SMF6OWC"

#6 Additional sort fields "SMF6JID SMF6JIT"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 661: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–17

DYSMF7

Prints SMF7 — SMF DATA LOST records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF7SID SMF7DTE SMF7TME"

#6 Additional sort fields "SMF7STD SMF7STM"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF14

Prints SMF14 — INPUT OR RDBACK DATA SET ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF14JBN SMF14DTE SMF14TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

Page 662: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–18 Reference Guide

Param Requirements Default values

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF15

Prints SMF15 — OUTPUT, UPDAT, INOUT, OR OUTIN DATA SET ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF15JBN SMF15DTE SMF15TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 663: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–19

DYSMF17

Prints SMF17 — SCRATCH DATA SET STATUS records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF17JBN SMF17DSN SMF17DTE"

#6 Additional sort fields "SMF17TME"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF18

Prints SMF18 — RENAME DATA SET STATUS records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF18JBN SMF18DTE SMF18TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

Page 664: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–20 Reference Guide

Param Requirements Default values

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF19

Prints SMF19 — DIRECT ACCESS VOLUME records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF19VOL"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF20

Prints SMF20 — JOB INITIATION records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

Page 665: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–21

Param Requirements Default values

#5 Sort fields "SMF20JBN SMF20DTE SMF20TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF21

Prints SMF21 — ERROR STATISTICS BY VOLUME records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF21VOL SMF21DTE SMF21TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 666: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–22 Reference Guide

DYSMF26

Prints SMF26 — JES2 OUTPUT WRITER records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF26JBN SMF26JNM SMF26DTE"

#6 Additional sort fields "SMF20TME"

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF30

Prints SMF30 — COMMON ADDRESS SPACE WORK RECORD records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 667: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–23

DYSMF32

Prints SMF32 — TSO/E User Work Accounting records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF32SID SMF32DTE SMF32TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF34

Prints SMF34 — TSO STEP TERMINATION records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "TIVUIF TIVRCDTE TIVRCDTS"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

Page 668: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–24 Reference Guide

Param Requirements Default values

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF35

Prints SMF35 — LOGOFF records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "TLGUIF"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 669: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–25

DYSMF40

Prints SMF40 — DYNAMIC DD records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "TDDUIF TDDINVSQ"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF43

Prints SMF43 — JES2/JES3 Start records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF43SID SMF43DTE SMF43TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

Page 670: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–26 Reference Guide

Param Requirements Default Values

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF45

Prints SMF45 — JES2 Withdrawal/JES3 Stop records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF45SID SMF45DTE SMF45TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 671: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–27

DYSMF47

Prints SMF47 — JES2/JES3 Sign On/Start Line records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF47SID SMF47DTE SMF47TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 672: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–28 Reference Guide

DYSMF48

Prints SMF48 — JES2/JES3 Sign Off/Stop Line records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF8SID SMF48DTE SMF48TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF49

Prints SMF49 — JES2 INTEGRITY (BSC only) records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF49SID SMF49DTE SMF49TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

Page 673: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–29

Param Requirements Default values

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF52

Prints SMF52 — JES2 Logon/Start Line records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF52SID SMF52DTE SMF52TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 674: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–30 Reference Guide

DYSMF53

Prints SMF53 — JES2 Logoff/Stop Line records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF53SID SMF53DTE SMF53TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 675: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–31

DYSMF54

Prints SMF54 — JES2 INTEGRITY (SNA only) records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF54SID SMF54DTE SMF54TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF55

Prints SMF55 — JES2 Network Signon records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF55SID SMF55DTE SMF55TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

Page 676: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–32 Reference Guide

Param Requirements Default Values

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF56

Prints SMF56 — JES2 Network Integrity records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF56SID SMF56DTE SMF56TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 677: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–33

DYSMF58

Prints SMF58 — JES2 Network Signoff records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF58SID SMF58DTE SMF58TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 678: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–34 Reference Guide

DYSMF60

Prints SMF60 — VSAM VOLUME DATA SET UPDATED records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF60CPU SMF60DTE SMF60TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF61

Prints SMF61 — INTEGRATED CATALOG FACILITY DEFINE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF61CPU SMF61DTE SMF61TME"

Page 679: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–35

Param Requirements Default values

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF62

Prints SMF62 — VSAM COMPONENT OR CLUSTER OPENED records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF62JBN SMF62DTE SMF62TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 680: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–36 Reference Guide

DYSMF63

Prints SMF63 — VSAM CATALOG ENTRY DEFINED records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF63JBN SMF63DTE SMF63TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF64

Prints SMF64 — VSAM COMPONENT OR CLUSTER STATUS records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF64JNM SMF64DTE SMF64TME"

Page 681: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–37

Param Requirements Default values

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF65

Prints SMF65 — INTEGRATED CATALOG FACILITY DELETE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF65DTE SMF65TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 682: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–38 Reference Guide

DYSMF66

Prints SMF66 — INTEGRATED CATALOG FACILITY ALTER ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF66DTE SMF66TME"

#6 From date (MM/DD/YYYY) 00/00/0000

#7 To date (MM/DD/YYYY) 99/99/9999

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF67

Prints SMF67 — VSAM ENTRY DELETED records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF67JBN SMF67CNM SMF67DEN"

#6 Additional sort fields NULL

Page 683: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–39

Param Requirements Default values

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF68

Prints SMF68 — VSAM ENTRY RENAMED records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF68JBN"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 684: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–40 Reference Guide

DYSMF70

Prints SMF70 — SMF (MF1) CPU ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF71

Prints SMF71 — SMF (MF1) PAGING ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 685: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–41

DYSMF72

Prints SMF72 — SMF (MF1) WORKLOAD ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF73

Prints SMF73 — SMF (MF1) CHANNEL PATH ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 686: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–42 Reference Guide

DYSMF74

Prints SMF74 — SMF (MF1) DEVICE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF75

Prints SMF75 — SMF (MF1)PAGE/SWAP DATA SET ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 687: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–43

DYSMF76

Prints SMF76 — SMF (MF1) TRACE ACTIVITY records in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 From date (MM/DD/YYYY) 00/00/0000

#6 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF80

Prints SMF80 — RACF® PROCESSING RECORDS in report format.

Param Requirements Default values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF80USR SMF80DTE SMF80TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 688: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

SMF/RMF Reporting System

D–44 Reference Guide

DYSMF81

Prints SMF81 — RACF Initialization records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#5 Sort fields "SMF81USR SMF81DTE SMF81TME"

#6 Additional sort fields NULL

#7 More sort fields NULL

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

DYSMF90

Prints SMF90 — System Status records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Page 689: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–45

DYSMF101

Prints SMF101 — Database 2 Accounting records in report format.

Param Requirements Default Values

#1 From date (MM/DD/YY) 00/00/00

#2 From time (HH:MM:SS) 00:00:00

#3 To date (MM/DD/YY) 99/99/99

#4 To time (HH:MM:SS) 99:99:99

#8 From date (MM/DD/YYYY) 00/00/0000

#9 To date (MM/DD/YYYY) 99/99/9999

#L Long format NULL

#S Short format YES

#X With NULL, 4-digit year format 2-digit year format

Generalized Advantage VISION:Excel Routines This section describes the generalized Advantage VISION:Excel routines.

DYCHANEL

Defines the channel positions for two-up letter writing. The associated keyword, OPTIMIZE, causes a minimum number of lines to print.

Param Requirements Default values

#N Application Number 01

#1 Line Number for channel 1 0

#2 Line Number for channel 2 0

#3 Line Number for channel 3 0

#4 Line Number for channel 4 0

#5 Line Number for channel 5 0

#6 Line Number for channel 6 0

#7 Line Number for channel 7 0

Page 690: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

D–46 Reference Guide

DYLABEL

Generates 1-, 2-, 3-, 4-up, and so on, labels.

#8 Line Number for channel 8 0

#9 Line Number for channel 9 0

#A Line Number for channel 10 0

#B Line Number for channel 11 0

#C Line Number for channel 12 0

Param Requirements Default values

#1 Number of labels across page 4-up

#2 Number of lines per label 6

#3 Label width in bytes 33

#4 Width of label form in bytes 132

#5 Spacing after last label lineNo blank line before printing first line of next set of labels.

1

#6 N for print every Nth record Every record is selected for label printing.

1

#7 Maximum Number of labels Maximum value is 999,999,999.

NULL

#8 Field containing line 1 No default

#9 Field containing line 2 No default

#A Field containing line 3 No default

#B Field containing line 4 No default

#C Field containing line 5 No default

#D Field containing line 6 No default

#E Field containing line 7 No default

#F Field containing line 8 No default

#G Field containing line 9 No default

Page 691: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–47

DYLAGEDT

Computes the age in days of a particular transaction, given the audit date and the transaction date. Optionally, a report itemizing the branch number, account number, balance, transaction date, and age in days can be requested.

Param Requirements Default values

#1 Transaction date field (MMDDYY) BILLNGDATE

#2 Audit date field (MM/DD/YY) DYLDATE

#3 Number of days field NODAYS

#4 Branch field BRANCH

#5 Account number field ACCTNO

#6 Amount field BALANCE

#7 Error branch tagname REJECT

#8 After computation branch tagname NULL

#9 Report switch YES

DYLBRCTG

Produces a report summarized for each branch or division. Itemizes total balances, average amount, highest amount, lowest amount, total number of accounts, number of positive accounts, number of negative accounts, and number of zero accounts for each branch.

Param Requirements Default values

#1 Branch field BRANCH

#2 Size of branch field 2

#3 Amount field BALANCE

#4 Size of amount field 11

#5 Number of digits to the right of the decimal point in amount field

2

#6 File name of input file FILEA

Page 692: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

D–48 Reference Guide

DYLCOMP

Compares the records on two files that are kept in-step by a key field. A hexadecimal dump is produced of record pairs that do not match and the parts of the records that donot agree are flagged.

Param Requirements Default values

#1 Primary file FILEA

#2 Key field in primary file AACTNO

#3 Secondary file FILEB

#4 Key field in secondary file BACCTNO

#5 Number of bytes to compare NULL

#6 Maximum number of mismatches 20

#7 File sequence: GT—ascending sequence, LT—descending sequence.

GT

DYLDATDF

Computes the difference in days between two dates. Optionally, a report listing the two dates and the difference can be requested.

Param Requirements Default values

#1 From Date field (MMDDYY) LSTPYMTDAT

#2 To Date field (MMDDYY) BILLNGDATE

#3 Difference field NODAYS

#4 Error branch tagname REJECT

#5 After computation branch tagname NULL

#6 Report switch NULL

Page 693: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–49

DYLGENFL

Generates a brief, general file statistics report based on a particular amount field in each record. The report includes the number of positive, negative, and zero records and their related total values, plus the highest value, lowest value, and the average value of the file.

Param Requirements Default values

#1 Amount field BALANCE

#2 Size of amount field 11

#3 Number of digits to the right of the decimal pointing the amount field

2

#4 File name of input file FILEA

DYLNEGAN

Lists records with a negative amount within a particular amount field. The account number, name, and amount are printed for each negative record.

Param Requirements Default values

#1 Amount field BALANCE

#2 Size of amount field 11

#3 Number of digits to the right of the decimal point in the amount field

2

#4 Account number field ACCTNO

#5 Size of account number field 7

#6 Name field NAME

#7 Size of name field 25

#8 File name of input file FILEA

#9 Sort sequence: A— ascending sequence, D—descending sequence.

A

Page 694: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

D–50 Reference Guide

DYLPOSAC

Summarizes and reports all positive accounts on a file by branch or division based upon a particular amount field in each record. A record count and total value of positive accounts are accumulated and listed for each branch or division.

Param Requirements Default values

#1 Branch field BRANCH

#2 Size of branch field 2

#3 Amount field BALANCE

#4 Size of amount field 11

#5 Number of digits to the right of the decimal point in the amount field

2

#6 File name of input file FILEA

DYLPSLPC-DYLPSEVC

Generates a compliance proportional sampling evaluation report.

DYLPSLPC

Param Requirements Default values

#1 Data type of item value field PD — packed decimal

#2 Size of reference number field 10

#3 Size of the hold table 1000

#4 Work field prefix DYC

#5 Number of digits to the right of the decimal point

2

Page 695: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–51

DYLPSEVC

Param Requirements Default values

#1 Recorded monetary total of population

#2 Specified precision

#3 Reliability level

#4 Sampling interval

#5 Reference number field

#6 Item value field

#7 Name of the print file PRTFILE

#8 Work field prefix DYC

#9 Communications block DYCPSLABS

#A Tagname prefix PC

DYLPSLPS- DYLPSEVS

Generates a substantive proportional sampling evaluation report.

DYLPSLPS

Param Requirements Default values

#1 Data type of item value field PD — packed decimal

#2 Size of reference number field 10

#3 Size of the hold table 2000

#4 Work field prefix DYS

#5 Number of digits to the right of the decimal point

2

Page 696: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

D–52 Reference Guide

DYLPSEVS

DYLRAND

Generates random numbers ranging from 1–2,147,483,643.

Param Requirements Default values

#1 Random number field

#2 Maximum random number to be generated

2,147,483,643

#3 Seed number (optional) NULL

Param Requirements Default values

#1 Recorded monetary total of population

#2 Specified precision

#3 Reliability level

#4 Sampling interval

#5 Reference number field

#6 Unaudited value field

#7 Audited value field

#8 Retroactive monetary adjustment 0

#9 Name of the print file PRTFILE

#A Work field prefix DYS

#B Communications block DYSPSLABS

#C Tagname prefix PS

Page 697: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–53

DYLRNSEQ

Generates the ordinal numbers in random sequence.

Param Requirements Default values

#1 Limiting value

#2 Field that contains the seed number NULL

#3 Hold area field

#4 Field in which the generated number will be returned

DYLSEQCK

Sequence checks a file based upon a numeric field in each record of the file. Missing numbers and duplicated numbers are reported.

Param Requirements Default values

#1 Sort option: S—sort file, NULL—no sort. NULL

#2 Record area INPFILE

#3 Processing option: M—check for missing numbers only, D—check for duplicates, B—check for both.

B

#4 Field to be checked NUMBER

#5 Maximum number of lines to be printed

If NULL, no report is generated.

99

#6 File option

A–H or NULL for no file generated.

NULL

#7-#C Optional fields to be printed on report NULL

#D Length of the record NULL

Page 698: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

D–54 Reference Guide

DYLSNDCD

Converts an alphabetic name to a unique alphanumeric code based on the Russell Soundex Code System.

Param Requirements Default values

#1 Field to be encoded

#2 Length of field to be encoded 10

#3 Field to contain converted code

#4 Length of the converted field 10

DYLSQRT

Calculates the square root of any positive amount that does not exceed 27 digits.

Param Requirements Default values

#1 Original number field

#2 Number of digits to the right of the decimal point in #1

0

#3 Number of digits to the right of the decimal point in square root

0

#4 Square root field

#5 Error field

DYLSTMDY

Summarizes and reports the number of accounts/records and the day's balance total for each statement day.

Param Requirements Default values

#1 Day field DAY

#2 Amount field BALANCE

#3 Size of the amount field 11

Page 699: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Generalized Advantage VISION:Excel Routines

Appendix D: Summary of Advantage VISION:Excel Features D–55

Param Requirements Default values

#4 Number of digits to the right of the decimal point in amount field

2

#5 File name of input file FILEA

DYLTRIAL

Generates a trial balance and planning report.

Param Requirements Default values

#1 Branch field BRANCH

#2 Size of branch field 2

#3 Account number field ACCTNO

#4 Size of account number field 7

#5 Name field NAME

#6 Size of name field 25

#7 Previous balance field PRBALANCE

#8 Size of previous balance field 5

#9 Data type and number of digits to the right of the decimal point of balance fields

PD 2 — packed decimal with two decimal places.

#A Current balance field BALANCE

#B Size of current balance field 5

#C Size of work area to sort 50

#D File name of input file FILEA

Page 700: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Subroutines

D–56 Reference Guide

DYLTSORT

Sorts entries in a table on one field in either ascending or descending sequence.

Param Requirements Default values

#1 Table name

#2 Number of entries in the table

#3 Size of each entry

#4 Beginning position of sort field

#5 Size of sort field

#6 Sort sequence: A — ascending sequence, D—descending sequence.

A

#7 Type of sort field: B — binary or character field, P—packed field.

B

Advantage VISION:Excel Subroutines For more information about the following subroutines, see the chapter "Introducing the Toolkit" in the Advantage VISION:Excel Toolkit Reference Guide.

Subroutine Description

DYLADAYS Addition or subtraction of days to or from a date

DYLADBM Double declining balance method depreciation

DYLASDM Sum-of-the-year digit method depreciation

DYLBETDT Difference between two dates

DYLDATE Julian to Gregorian, Gregorian to Julian date conversion

DYLDAYWK Day of the week determination

DYLFMTJG Julian or Gregorian to calendar date conversion

DYLGSDV Group items standard deviation

DYLPSEVC Proportional sampling compliance evaluation

DYLPSEVS Proportional sampling substantive evaluation

Page 701: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Additional Subroutines Used by the SMF and RMF Reporting System

Appendix D: Summary of Advantage VISION:Excel Features D–57

Subroutine Description

DYLRAND Random number generator — no restart

DYLRAND2 Random number generator with restart

DYLRNSEQ Random number generator — no duplicates until cycle completed

DYLSNDCD Phonetic alphabetic conversion

DYLSQRT Square root calculation

DYLSTDV Single non-grouped items standard deviation

DYLTSORT Table sort

Additional Subroutines Used by the SMF and RMF Reporting System

For additional information on the following subroutines, see the Advantage VISION:Excel SMF/RMF Reporting Guide.

Subroutine Description

DYLBINED Edits a 1-4 byte binary field into a 14-byte character field, inserting commas, decimal point, and sign.

DYLBTP Converts a 1-12 byte binary field to a 16-byte packed field.

DYLHEX Converts the contents of a field to printable hexadecimal representation in 2 formats; two-up hexadecimal or side-by-side hexadecimal.

DYLMOD1 Defines literal constants used in describing DCB and JFCB fields.

DYLSELDT Determines by date and time when a record should be included in the report.

DYLSMFTC Converts time expressed in hundredths of seconds to HH:MM:SS.SS format.

DYLSWAP Matches a 1-255 byte input field with an equal number of bytes from a table and returns a 1-255 byte field to be used as displacements.

DYLTRNTB Translates all nonprintable characters to blanks.

DYLUCB Defines literal constants used in describing UCB fields.

DYUCBDEF Defines literal constants used in describing UCB fields.

Page 702: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 703: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix E: Fixed Form and Positional Free-Form Summary E–1

Appendix E: Fixed Form and Positional Free-Form Summary

This appendix describes the various types of statements available for Advantage VISION: Excel/Advantage VISION:Results users.

Advantage VISION:Excel/Advantage VISION:Results Considerations

Advantage VISION:Excel provides Advantage VISION:Results users with fixed form, as well as positional free-form statements. Most fields are free-form within their boundaries; left-aligned, right-aligned, or centering is permissible on the fixed form statements.

All dollar fields can contain, for documentation purposes or clarification, a dollar sign, commas, and a decimal point. The positional free-form syntax format is explained in Advantage VISION:Excel Positional Free-form Requirements.

Negative signs are allowed; they must always precede the amount. For example:

-2000

Preprinted decimal points are required entries for all fields requesting a percent value.

For example:

Confidence Level 87.5

Random seed entry (RN or RS) application numbers must be the same as their associated functions. For example:

SP01RN..... or SP/01/RN..... SP01SR..... or SP/01/SR.....

Page 704: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–2 Reference Guide

Valid Application Numbers

The following table lists the valid numbers for each application code.

Application Code

Valid Numbers Description

SP 1–99 Sampling

FQ 1–99 Frequency Distribution / Histograms

AG 1–9 Aging Analysis

CN 0–99 Letter Writing

LR 1–99 Linear Regression Analysis / Trend Line Analysis / Scatter Diagrams

Sampling Decision Table

The following table lists the sampling decisions.

Sampling Parameter (SP)

Non-Stratified Sampling

Stratified Sampling

Statistically Oriented

Random Number Seed (RN)

Basic Informa-tion (BI)

Random Number Seed (RS)

Simple Interval (SI)

Yes N/A N/A N/A N/A N/A

Simple Random (SR)

Yes N/A N/A Optional N/A N/A

Discovery (DV)

Yes N/A Yes Optional N/A N/A

Acceptance (AC)

Yes N/A Yes Optional N/A N/A

Attribute (AT)

Yes N/A Yes Optional N/A N/A

Estimation of Values (EV)

Yes N/A Yes Optional N/A N/A

Proportional (PS)

N/A N/A Yes N/A N/A N/A

Page 705: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–3

Sampling Parameter (SP)

Non-Stratified Sampling

Stratified Sampling

Statistically Oriented

Random Number Seed (RN)

Basic Informa-tion (BI)

Random Number Seed (RS)

Dollar Unit Sampling (DU)

Yes N/A Yes Optional N/A N/A

Random Method (RM)

N/A Yes N/A N/A Required Optional

Percentage Method (PC)

N/A Yes N/A N/A Required N/A

Mean Estimation Method (ME)

N/A Yes Yes N/A Required Optional

Note: The Random Number Seed (RN), Basic Information (BI), and Random Number Seed (RS) columns refer to additional statements.

Statement Sequence

Advantage VISION:Excel Statements AG, CN, FQ, LR, and SP statements must always precede any Advantage VISION:Results statements, with the exception of the Advantage VISION:Results OPTION statement.

JOB STATEMENT

VISION:EXCEL JCL

VISION:RESULTS OPTION STATEMENT (Optional)

VISION:EXCEL PARM STATEMENT (Optional)

.

.

.

VISION:RESULTS STATEMENTS

and

VISION:EXCEL STATEMENTS

.

.

.

FIN

INSTREAM DATA (If any)

Page 706: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–4 Reference Guide

Commands

The following table lists valid commands.

Command Description

AGING Aging Analysis

LETTER Letter Writing

FREQUENCY Frequency Distribution and Histograms

IF SAMPLING Sampling

REGRESSION Linear Regression/Trend Line Analysis and Scatter Diagrams

Valid Function Combinations

The following table lists valid function combinations.

In the Aging (AG) column and Aging (AG) row, multiple aging analyses are allowed, but only one standard report. In the Report Writing column and Aging (AG) row, aging analysis uses the Report Writer to produce its standard report; however, the Report Writer can be used if the aging analysis standard report is not requested.

Application Code

Sampling

(SP)

Frequency

(FQ)

Aging

(AG)

Letter writing

(CN)

Linear Regression(LR)

Report Writing (RS)

Selection Capabilities

Sampling (SP)

Yes Yes Yes Yes Yes Yes Yes

Frequency(FQ)

Yes Yes Yes Yes Yes Yes Yes

Aging (AG)

Yes Yes Yes Yes Yes Yes Yes

Letter Writing (CN)

Yes Yes Yes Yes Yes Yes Yes

Linear Regression (LR)

Yes Yes Yes Yes Yes Yes Yes

Page 707: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–5

MVS Procedure

The following table shows symbolic parameters used in the MVS Advantage VISION:Excel/Advantage VISION:Results procedure.

Those definitions marked with an asterisk (*) contain symbolic parameters most likely to be specified by the user, thereby overriding the default value provided in the PROC statement.

Default(s) Definition(s)

ACRL=80, RECORD LENGTH OF AUDEPF DATA SET

ACRM=0, BLOCKING FACTOR FOR AUDEPF -- 0 = 10X, 00 = 100X, and so on

AP=DYL280, Advantage VISION:EXCEL (STEP 1) PROGRAM NAME

APM='WA=20', PARAMETER STRING FOR Advantage VISION:EXCEL

AR=300K, Advantage VISION:EXCEL MVS REGION SIZE

AT='(,40)', Advantage VISION:EXCEL EXECUTION TIME LIMIT

AUDM=DUMMY, Advantage VISION:EXCEL STORAGE DUMP DESTINATION

AWS=TRK, Advantage VISION:EXCEL AUDWORK DASD SPACE LASS

AWSP=10, Advantage VISION:EXCEL AUDWORK DASD SPACE CLASS PRIMARY ALLOC.

AWSS=5, Advantage VISION:EXCEL AUDWORK DASD SPACE CLASS SECONDARY ALLOC.

AWU=SYSDA, Advantage VISION:EXCEL UNIT CLASS FOR TEMPORARY DATA SETS

BDCB=8, Advantage VISION:RESULTS SECOND INPUT DATA SET DCB PARAMETERS

BDSN=NULLFILE, Advantage VISION:RESULTS SECOND INPUT DATA SET NAME

BDSP=SHR, Advantage VISION:RESULTS SECOND INPUT DATA SET DISPOSITION

BLBL='(,SL)', Advantage VISION:RESULTS SECOND INPUT DATA SET LABEL TYPE

BUNT=, Advantage VISION:RESULTS SECOND INPUT DATA SET UNIT CLASS

BVOL=, Advantage VISION:RESULTS SECOND INPUT DATA SET 'VOL =' PARAMETER

Page 708: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–6 Reference Guide

Default(s) Definition(s)

COPY='YOUR.EXCEL.COPY.LIBRARY',

Advantage VISION:EXCEL/Advantage VISION:RESULTS COPY - COPYE LIBRARY.

DSI='YOUR.RESULTS.LOAD.LIBRARY',

Advantage VISION:RESULTS STEPLIB DATA SET NAME

DS2='YOUR.EXCEL.LOAD.LIBRARY',

Advantage VISION:EXCEL STEPLIB DATA SET NAME (CONCATENATION)

DWS=TRK, Advantage VISION:RESULTS WORKFILE DASD SPACE CLASS

DWSP=10, Advantage VISION:RESULTS WORKFILE DASD SPACE CLASS PRIMARY ALLOC.

DWSS=5, Advantage VISION:RESULTS WORKFILE DASD SPACE CLASS SECONDARY ALLOC.

DWU=SYSDA, Advantage VISION:RESULTS UNIT CLASS FOR TEMPORARY DATA SETS

KDCB=, Advantage VISION:RESULTS SECOND OUTPUT DATA SET DCB PARAMETERS

KDSN=NULLFILE, Advantage VISION:RESULTS SECOND OUTPUT DATA SET NAME

KDSP=SHR, Advantage VISION:RESULTS SECOND OUTPUT DATA SET DISPOSITION

KLBL='(,SL)', Advantage VISION:RESULTS SECOND OUTPUT DATA SET LABEL TYPE

KSP=, Advantage VISION:RESULTS SECOND OUTPUT DATA SET DASD SPACE PARAMETER

KUN=, Advantage VISION:RESULTS SECOND OUTPUT DATA SET UNIT CLASS

PDCB=, Advantage VISION:RESULTS INPUT POPULATION DATA SET DCB PARAMETERS

PDSN=NULLFILE, Advantage VISION:RESULTS INPUT POPULATION DATA SET NAME

PDSP=SHR, Advantage VISION:RESULTS INPUT POPULATION DATA SET DISPOSITION

PLBL='(,SL)', Advantage VISION:RESULTS INPUT POPULATION DATA SET LABEL TYPE

PUNT=, Advantage VISION:RESULTS INPUT POPULATION DATA SET UNIT CLASS

Page 709: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–7

Default(s) Definition(s)

PVOL=, Advantage VISION:RESULTS INPUT POPULATION DATA SET 'VOL =' PARAMETER

ROUT=A, Advantage VISION:RESULTS REPORT OUTPUT DESTINATION

SDCB=, Advantage VISION:RESULTS SELECTED SAMPLE DATA SET DCB PARAMETERS

SDSN=NULLFILE, Advantage VISION:RESULTS SELECTED SAMPLE DATA SET NAME

SDSP=SHR, Advantage VISION:RESULTS SELECTED SAMPLE DATA SET DISPOSITION

SLBL='(,SL)', Advantage VISION:RESULTS SELECTED SAMPLE DATA SET LABEL TYPE

SOUT=A, Advantage VISION:RESULTS PRINTED OUTPUT DESTINATION

SRTLB='SYS1.SORTLIB',

SORT LIBRARY FOR INSTALLATION

SRTSC=CYL, SORT SPACE CLASS (TRK, CYL, and so forth)

SRTUNIT=SYSDA, UNIT CLASS FOR SORTWORK DATASETS

SRTWRK=5, AMOUNT OF SPACE TO BE ALLOCATED (IN TRACKS)

SSP=, Advantage VISION:RESULTS SELECTED SAMPLE DATA SET DASD SPACE PARAMETER

SRTUNIT=SYSDA, UNIT CLASS FOR SORTWORK DATASETS

SRTWRK=5, AMOUNT OF SPACE TO BE ALLOCATED (IN TRACKS)

SSP=, Advantage VISION:RESULTS SELECTED SAMPLE DATA SET DASD SPACE PARAMETER

SUN= Advantage VISION:RESULTS SELECTED SAMPLE DATA SET UNIT CLASS

Page 710: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–8 Reference Guide

Execution of Procedure

An example of the MVS Advantage VISION:Excel procedure for Advantage VISION:Excel with Advantage VISION:Results and Advantage VISION:Eighty™ is shown as follows.

Col. 11 16

| |

//STEP1 EXEC DYAUD280,

// PDSN='STERLING.TESTFILE',

// SDSN='SAMPLE.OUTFILE',

// SDCB='(RECFM=FB,LRECL=352,BLKSIZE=5280)',

// SUN=TAPE,

// SDSP='(NEW,CATLG,DELETE)'

//SYSIN DD *

.

.

your program

.

.

//

MVS ddnames/File Definitions

The following table lists valid ddnames used by Advantage VISION:Excel.

ddname used by Advantage VISION:Excel

Description

AUDPRINT Printed statements, totals, statistics, summary report(s), frequency distribution reports, linear regression, scatter diagrams, and letter writing output.

AUDCBF Control blocks, letter writing text, and security number.

AUDEPF Expanded statement file.

AUDWORK Advantage VISION:Excel work file.

SYSIN Used for statement card input and, optionally, card file input.

SYS280R Print report output.

SYSPRINT Print statements, totals, and file print.

SYS280FZ Freeze module object library.

Page 711: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–9

ddname used by Advantage VISION:Excel

Description

SYSCOPY Partitioned data set library containing copy code.

SYS004 Advantage VISION: Results work file.

filename File input or output as specified in the Advantage VISION:Excel program. The ddname corresponds to the file name specified in the program.

MVS PARM in the EXEC Statement

This is not a required parameter in the Advantage VISION:Excel JCL EXEC statement. It can be necessary to use this parameter in the following situations:

You have exhausted the working storage allocation of Advantage VISION:Excel.

You want to limit the number of lines per printed page.

Your Advantage VISION:Excel System is password protected.

An example of the Advantage VISION:Excel EXEC statement with the MVS PARM is shown as follows.

//TEST EXEC DYAUD280,

// APM=`WA=0,LMAX=AA,PW=BBB'

Where:

Command Description

APM The keyword parameter for the Advantage VISION:Excel JCL procedure.

WA Working storage allocation; default is the lesser of 300K or the remaining memory space in the region.

LMAX Maximum number of lines per printed page.

AA = integer value 1-99.

PW Password. BBB — any three character password set by the user.

Page 712: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–10 Reference Guide

VSE System Numbers and File Definitions

The following table lists the valid VSE system number/file names.

System Number / File Name

I/O

Device CTL Description Type

SYSIPT/IJSYSIN I C, D, TU Both Used for data input

SYSLST/IJSYSLS O P, TU Results Advantage VISION:Excel/Advantage VISION:Results printed statement totals, file print, and report output

SYSPCH/IJSYSPH O C, D, TU Results Advantage VISION:Results freeze module

SYS004/IJSYS04 W D Results Advantage VISION:Results work file

SYS008/SYS008 W C, D, TU Both Expanded Advantage VISION:Results statements

SYS009/SYS009 O D*, T* Excel Advantage VISION:Excel summary reports, frequency distribution reports, linear regression analysis, scatter diagrams, and letter writing output

SYS010/SYS010 W D, TS Excel Control blocks, letter writing text, and security number

SYS011/SYS011 W D, TS Excel Advantage VISION:Excel work file

The following table describes the keywords used in the previous table.

Key Description

I Input

O Output

W Work

C Card image

D Disk - 2311, 2314, 3330, 3340, 3350, 3375, 3380,or FBA

D* Disk - 2311, 2314, 3330, 3340, 3350, 3375, 3380,or FBA created 133 characters per record, 10 records per block

Page 713: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–11

Key Description

P Printer

TS Standard labeled tape

TU Unlabeled tape

TU* Unlabeled tape, created 133 characters per record, 10 records per block

Results Advantage VISION:Results controls the file

Excel Advantage VISION:Excel controls the file

Both Advantage VISION:Excel and Advantage VISION:Results both control the file

System Number Device Type JCL for Device Assigned

SYS008 Disk // ASSGN SYS008,X’Disk device’

// DLBL SYS008,’EXCEL EXPANDED FILE’,0

// EXTENT SYS008,Extent information...

SYS009 Disk // ASSGN SYS009,X’Disk device’

// DLBL SYS009,’EXCEL SYSLST’,0

// EXTENT SYS009,Extent information...

Tape // ASSGN SYS009,X’Tape device’

SYS010 Disk // ASSGN SYS010,X’Disk device’

// DLBL SYS010,’EXCEL CONTROL BLOCKS FILE’,0

// EXTENT SYS010,Extent information...

Tape // TLBL SYS010,’EXCEL CONTROL BLOCKS FILE’,0

// ASSGN SYS010,X’Tape device’

SYS011 Disk // ASSGN SYS011,X’Disk device’

// DLBL SYS011,’EXCEL WORK FILE’,0

// EXTENT SYS011,Extent information...

Tape // ASSGN SYS011,X’Tape device’

// TLBL SYS011,’EXCEL WORK FILE’,0

Page 714: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

E–12 Reference Guide

VSE PARM Statement

This is not a required parameter statement. It can be necessary in the following situations:

You have exhausted the working storage allocation of Advantage VISION:Excel.

You are using a disk space allocation system that does not update the LUB entries until after the OPEN has occurred.

Your installation has predefined system number assignments that conflict with those of Advantage VISION:Excel.

You want to limit the number of lines per printed page.

Your Advantage VISION:Excel System is password protected.

An example of the VSE PARM statement is shown as follows.

PARM='WA=0,DEVICE=(ABCD),SYSNUM=(E,F,G,H),LMAX=II,PW=JJJ'

The following table explains the keywords for the VSE PARM statement.

Keyword Description

PARM Required and must begin in column 1.

WA Working storage allocation, default is the lesser of 300K or the remaining memory space in the partition.

DEVICE Parentheses are required to enclose the device type codes.

1 = 2311 2 = 2314

3 = 3330 4 = 3340

5 = 3350 7 = 3375

8 = 3380 C = CARD

T = TAPE P = PRINTER

S = FBA

SYSNUM Used for overriding system number assignments per your installation. File name is changed correspondingly. System numbers can be SYS000–SYS254. Parentheses are required to enclose the system numbers. Commas are required as delimiters.

Page 715: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Results Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–13

Keyword Description

A — Expanded parameter file; can be C, T, 1, 2, 3, 4, 5, 7, 8, or S

B — Control blocks file (output); can be T, 1, 2, 3, 4, 5, 7, 8, or S

C — Work file; can be T, 1, 2, 3, 4, 5, 7, 8, or S

D — Letter writing/summary sheets print file; can be P, T, 1, 2, 3, 4, 5, 7, 8, or S

PARM = 'DEVICE = (5555)'

PARM = 'DEVICE = (b/b/Tb/)' or

PARM = 'DEVICE = (b/b/b/T)'

E — Same as A; default is 008

F — Same as B; default is 010

G — Same as C; default is 011 E — Same as A; default is 008

F — Same as B; default is 010

G — Same as C; default is 011

H — Same as D; default is 009

PARM = 'SYSNUM = (030, 031, 032, 033)'

PARM = 'SYSNUM = (,031,, 031)'

PARM = 'SYSNUM = (030,, 032, 033)' or

PARM = 'SYSNUM = (030,, 032,)'

LMAX Maximum number of lines per printed page.

PW Password.

Page 716: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–14 Reference Guide

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Because Advantage VISION:Excel uses the Reformat Area, never use the Advantage VISION:Sixty user tag CLR.

Most fields are free-form within their boundaries; left-aligned, right-aligned, or centering is permissible. All dollar fields can contain, for documentation purposes or clarification, a dollar sign, commas, and a decimal point.

Negative amounts are allowed when appropriate; they must always precede the amount. For example:

-2000

Preprinted decimal points are required entries for all fields requesting a percent value.

For example:

Confidence Level 87.5

Random seed entry (R or RS) application numbers must be the same as their associated function. For example:

SP01SR

SP01RN

Valid Application Numbers

The following table lists application numbers used by Advantage VISION:Excel.

Application Code Valid Numbers Description

SP 1–99 Sampling

FQ 1–99 Frequency Distribution / Histograms

AG 1–99 Aging Analysis

CN 0–99 Letter Writing

LR 1–99 Linear Regression Analysis / Trend Line Analysis / Scatter

Page 717: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–15

Sampling Decision Table

The following table lists sampling decisions.

Sampling Parameter (SP)

Non-Stratified Sampling

Stratified Sampling

Statistically Oriented

Random Number Seed (RN)

Basic Information (BI)

Random Number Seed (RS)

Simple Interval (SI)

Yes N/A N/A N/A N/A N/A

Simple Random (SR)

Yes N/A N/A Optional N/A N/A

Discovery (DV)

Yes N/A Yes Optional N/A N/A

Acceptance (AC)

Yes N/A Yes Optional N/A N/A

Attribute (AT)

Yes N/A Yes Optional N/A N/A

Estimation of Values (EV)

Yes N/A Yes Optional N/A N/A

Proportional (PS)

N/A N/A Yes N/A N/A N/A

Dollar Unit Sampling (DU)

Yes N/A Yes Optional N/A N/A

Random Method(RM)N/A

N/A Yes N/A N/A Required Optional

Percentage Method (PC) N/A

N/A Yes N/A N/A Required N/A

Mean Estimation Method (ME)

N/A Yes Yes N/A Required Optional

Note: The Random Number Seed (RN), Basic Information (BI), and Random Number Seed (RS) columns refer to additional statements.

Page 718: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–16 Reference Guide

Parameter Sequence

AG, CN, FQ, LR, and SP parameters must always precede any Advantage VISION:Sixty parameters.

AG

CN

FQ

LR

C

F

L

D

R

T

P

Advantage VISION:Excel Parameters: AG CN FQ LR SP

Advantage VISION:Sixty Parameters: C F L D R T P

Macro Operation Codes

The macro operation codes are as follows:

AG — Aging Analysis

CN — Letter Writing

FQ — Frequency Distribution and Histograms

SP — Sampling

LR — Linear Regression, Trend Line Analysis, and Scatter Diagrams

Page 719: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–17

Valid Function Combinations

The following table lists valid function combinations.

Application Code

Sampling

(SP)

Frequency

(FQ)

Aging

(AG)

Letter writing

(CN)

Linear Regression(LR)

Report Writing (RS)

Selection Capabilities

Sampling (SP)

Yes Yes Yes Yes Yes Yes Yes

Frequency (FQ)

Yes Yes Yes Yes Yes Yes Yes

Aging (AG)

Yes Yes Yes Yes Yes Yes Yes

Letter Writing (CN)

Yes Yes Yes Yes Yes Yes Yes

Linear Regression (LR)

Yes Yes Yes Yes Yes Yes Yes

Note: In the Aging (AG) column and Aging (AG) row, multiple aging analyses are allowed, but only one standard report.

In the Linear Regression (LR) column and Aging (AG) row, aging analysis uses the Report Writer to produce its standard report; however, the Report Writer can be used if the aging analysis standard report is not requested.

MVS Procedure

The following table shows symbolic parameters used in the MVS™ Advantage VISION:Excel/Advantage VISION:Sixty procedure.

Default Definition

ACRM=0, BLOCKING FACTOR FOR AUDEPF -- 0 = 10X, 00 = 100X, and so on

AP=DYLAUDIT, Advantage VISION:EXCEL (STEP 1) PROGRAM NAME

APM='WA=0' , PARAMETER STRING FOR Advantage VISION:EXCEL

AR=300K, Advantage VISION:EXCEL MVS REGION SIZE

AS=’YOUR.EXCEL.LOADLIB’

Advantage VISION:EXCEL STEPLIB DATA SET NAME

Page 720: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–18 Reference Guide

Default Definition

AT='(,40)', Advantage VISION:EXCEL EXECUTION TIME LIMIT

AUDM=DUMMY, Advantage VISION:EXCEL STORAGE DUMP DESTINATION

AWS=TRK, Advantage VISION:EXCEL AUDWORK DASD SPACE CLASS

AWSP=10, Advantage VISION:EXCEL AUDWORK DASD SPACE CLASS PRIMARY ALLOC.

AWSS=5, Advantage VISION:EXCEL AUDWORK DASD SPACE CLASS SECONDARY ALLOC.

AWU=SYSDA, Advantage VISION:EXCEL UNIT CLASS FOR PASSED DATA SETS

BDCB=, Advantage VISION:SIXTY SECOND INPUT DATA SET DCB PARAMETERS

BDSN=NULLFILE, Advantage VISION:SIXTY SECOND INPUT DATA SET NAME

BDSP=SHR, Advantage VISION:SIXTY SECOND INPUT DATA SET DISPOSITION

BLBL='(,SL)', Advantage VISION:SIXTY SECOND INPUT DATA SET LABEL TYPE

BUNT=, Advantage VISION:SIXTY SECOND INPUT DATA SET UNIT CLASS

BVOL=, Advantage VISION:SIXTY SECOND INPUT DATA SET 'VOL =' PARAMETER

COPY='YOUR.EXCEL.COPY.LIB',

Advantage VISION:EXCEL/Advantage VISION:SIXTY COPY - COPYE LIBRARY.

DC='(0,NE,S01)', Advantage VISION:SIXTY (STEP 2) CONDITION PARAMETER

DP=DYL260, Advantage VISION:SIXTY PROGRAM NAME

DPM='WA=0', PARAMETER STRING FOR Advantage VISION:SIXTY

DR=300K, Advantage VISION:SIXTY OS REGION SIZE

DSI='YOUR.SIXTY.LOAD.LIBRARY',

Advantage VISION:SIXTY STEPLIB DATA SET NAME

DS2='YOUR.EXCEL.LOAD.LIBRARY',

Advantage VISION:EXCEL STEPLIB DATA SET NAME (CONCATENATION)

DT=1, Advantage VISION:SIXTY EXECUTION TIME LIMIT

Page 721: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–19

Default Definition

KDCB=, Advantage VISION:SIXTY SECOND OUTPUT DATA SET DCB PARAMETERS

KDSN=NULLFILE, Advantage VISION:SIXTY SECOND OUTPUT DATA SET NAME

KDSP=SHR, Advantage VISION:SIXTY SECOND OUTPUT DATA SET DISPOSITION

KLBL='(,SL)', Advantage VISION:SIXTY SECOND OUTPUT DATA SET LABEL TYPE

KSP=, Advantage VISION:SIXTY SECOND OUTPUT DATA SET DASD SPACE PARAMETER

KUN=, Advantage VISION:SIXTY SECOND OUTPUT DATA SET UNIT CLASS

PDCB=, Advantage VISION:SIXTY INPUT POPULATION DATA SET DCB PARAMETERS

PDSN=NULLFILE, Advantage VISION:SIXTY INPUT POPULATION DATA SET NAME

PDSP=SHR, Advantage VISION:SIXTY INPUT POPULATION DATA SET DISPOSITION

PLBL='(,SL)', Advantage VISION:SIXTY INPUT POPULATION DATA SET LABEL TYPE

PUNT=, Advantage VISION:SIXTY INPUT POPULATION DATA SET UNIT CLASS

PVOL=, Advantage VISION:SIXTY INPUT POPULATION DATA SET 'VOL =' PARAMETER

ROUT=A, Advantage VISION:SIXTY REPORT OUTPUT DESTINATION

SDCB=, Advantage VISION:SIXTY SELECTED SAMPLE DATA SET DCB PARAMETERS

SDSN=NULLFILE, Advantage VISION:SIXTY SELECTED SAMPLE DATA SET NAME

SDSP=SHR, Advantage VISION:SIXTY SELECTED SAMPLE DATA SET DISPOSITION

SLBL='(,SL)', Advantage VISION:SIXTY SELECTED SAMPLE DATA SET LABEL TYPE

SOUT=A, Advantage VISION:SIXTY PRINTED OUTPUT DESTINATION

Page 722: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–20 Reference Guide

Default Definition

SRTLB='SYS1.SORT LIBRARY',

SORT LIBRARY FOR INSTALLATION

SRTSC=CYL, SORT SPACE CLASS (TRK, CYL, and so forth)

SRTUNIT=SYSDA, UNIT CLASS FOR SORTWORK DATASETS

SRTWRK=5, AMOUNT OF SPACE TO BE ALLOCATED (IN TRACKS)

SSP=, Advantage VISION:SIXTY SELECTED SAMPLE DATA SET DASD SPACE PARAMETER

SUN= Advantage VISION:SIXTY SELECTED SAMPLE DATA SET UNIT CLASS

Note: Those definitions marked with an asterisk (*) contain symbolic parameters most likely to be specified by the user, thereby overriding the default value provided in the PROC statement.

Execution of Procedure

An example of the MVS Advantage VISION:Excel procedure for Advantage VISION:Excel with Advantage VISION:Sixty is shown as follows.

Col. 11 16

| |

//STEP1 EXEC DYLAUDIT,

// PDSN='STERLING.TESTFILE',

// SDSN='SAMPLE.OUTFILE',

// SDCB='(RECFM=FB,LRECL=352,BLKSIZE=5280)',

// SUN=TAPE,

// SDSP='(NEW,CATLG,DELETE)'

//S01.AUDIN DD *

.

.

your program

.

.

//

Page 723: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–21

Preprocessor ddnames/File Definitions

The preprocessor ddnames/file definitions, used by Advantage VISION:Excel are described in the following table.

ddname used by Advantage VISION:Excel

Description

AUDPRINT Printed parameters, totals, and statistics.

AUDIN Used for parameter card input.

AUDCOPY MVS copy library input.

AUDCBF Control blocks, letter writing text, and security number.

AUDEPF Expanded Advantage VISION:Sixty parameters.

AUDWORK Advantage VISION:Excel Work file.

Post Processor ddnames/File Definitions

The post processor ddnames/file definitions, used by Advantage VISION:Excel are described in the following table.

ddname used by Advantage VISION:Excel

Description

AUDPRINT Printed summary reports, frequency distribution reports, linear regression, scatter diagrams, and letter writing output.

AUDCBF Control blocks, letter writing text, and security number.

SYSIN Used for parameter card input and, optionally, card file input.

SYS260A-H Input files A-H.

SYS260J-Q Output Files J-Q.

SYS260R Print report output.

SYSPRINT Printed parameters, totals, and file print.

SYS260FZ Freeze module.

Page 724: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–22 Reference Guide

MVS PARM in the EXEC Statement

This is not a required parameter in the Advantage VISION:Excel JCL EXEC statement. It can be necessary to use this parameter in the following situations:

You have exhausted the working storage allocation of Advantage VISION:Excel.

You want to limit the number of lines per printed page.

Your Advantage VISION:Excel System is password protected.

An example of the Advantage VISION:Excel EXEC statement with the MVS PARM is shown as follows.

//TEST EXEC DYLAUD280,

// APM=`WA=0,LMAX=AA,PW=BBB'

The following table explains the keywords for the MVS PARM statement.

Parameter Definition

APM The keyword parameter for the Advantage VISION:Excel JCL procedure.

WA Working storage allocation; default is the less or of 300K or the remaining memory space in the region.

LMAX Maximum number of lines per printed page.

AA = integer value 1-99

PW Password. BBB — any three character password set by the user.

Page 725: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–23

VSE Job Control Language Requirements — Example

The sample statements that demonstrate the JCL requirements for VSE as shown as follows:

// JOB DYLAUDIT VISION:Excel JCL.

// OPTION LOG

* STEP 1 - VISION:Excel -- VISION:Sixty

// ASSGN SYS004,X'131' VISION:Sixty WORK FILE.

// DLBL IJSYS04,'SIXTY WORK FILE',O

// EXTENT SYS004,111111,1,0,40,20

// ASSGN SYS008,X'131' EXPANDED STATEMENTS.

// DLBL SYS008,'EXCEL EXPANDED FILE',0

// EXTENT SYS008,111111,1,0,60,20

// ASSGN SYS009,X'131' VISION:Excel SYSLST

// DLBL SYS009,'EXCEL SYSLST',0

// EXTENT SYS009,111111,1,0,80,40

// ASSGN SYS010,X'131' CONTROL BLOCKS FILE

// DLBL SYS010,'EXCEL CONTROL BLOCKS FILE',0

// EXTENT SYS010,111111,1,0,120,20

// ASSGN SYS011,X'131' VISION:Excel WORK FILE

// DLBL SYS011,'EXCEL WORK FILE',0

// EXTENT SYS011,111111,1,0,140,20

// .

// .Place the JCL that defines your input/output

// files here

// .

// EXEC DYLAUDEX

// .

// .Place your VISION:Excel and VISION:Sixty parameters plus

// instream data here.

// .

/*

/&

Page 726: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–24 Reference Guide

VSE System Numbers and File Definitions

The following table lists the valid VSE system number/file names.

System Number / File Name

I/O Device CTL Description Type

SYSIPT/IJSYSIN I C, D, TU Both Used for data input

SYSLST/IJSYSLS O P, TU Sixty Advantage VISION:Excel/Advantage VISION:sixty printed statement totals, file print, and report output

SYSPCH/IJSYSPH O C, D, TU Sixty Advantage VISION:sixty freeze module

SYS004/IJSYS04 W D Sixty Advantage VISION:sixty work file

SYS008/SYS008 W C, D, TU Both Expanded Advantage VISION:sixty statements

SYS009/SYS009 O D*, T* Excel Advantage VISION:Excel summary reports, frequency distribution reports, linear regression analysis, scatter diagrams, and letter writing output

SYS010/SYS010 W D, TS Excel Control blocks, letter writing text, and security number

SYS011/SYS011 W D, TS Excel Advantage VISION:Excel work file

Page 727: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–25

The following table describes the keywords used in the previous table.

Key Description

I Input

O Output

W Work

C Card image

D Disk - 2311, 2314, 3330, 3340, 3350, 3375, 3380, or FBA

D* Disk - 2311, 2314, 3330, 3340, 3350, 3375, 3380, or FBA created 133 characters per record, 10 records per block

P Printer

TS Standard labeled tape

TU Unlabeled tape

TU* Unlabeled tape, created 133 characters per record, 10 records per block

Results Advantage VISION:Results controls the file

Excel Advantage VISION:Excel controls the file

Both Advantage VISION:Excel and Advantage VISION:Results both control the file

System Number Device Type JCL for Device Assigned

SYS008 Disk // ASSGN SYS008,X’Disk device’

// DLBL SYS008,’EXCEL EXPANDED FILE’,0

// EXTENT SYS008,Extent information...

SYS009 Disk // ASSGN SYS009,X’Disk device’

// DLBL SYS009,’EXCEL SYSLST’,0

// EXTENT SYS009,Extent information...

Tape // ASSGN SYS009,X’Tape device’

SYS010 Disk // ASSGN SYS010,X’Disk device’

// DLBL SYS010,’EXCEL CONTROL BLOCKS FILE’,0

// EXTENT SYS010,Extent information...

Page 728: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

E–26 Reference Guide

System Number Device Type JCL for Device Assigned

Tape // TLBL SYS010,’EXCEL CONTROL BLOCKS FILE’,0

// ASSGN SYS010,X’Tape device’

SYS011 Disk // ASSGN SYS011,X’Disk device’

// DLBL SYS011,’EXCEL WORK FILE’,0

// EXTENT SYS011,Extent information...

Tape // ASSGN SYS011,X’Tape device’

// TLBL SYS011,’EXCEL WORK FILE’,0

VSE PARM Statement

This is not a required parameter statement. It can be necessary in the following situations:

You have exhausted the working storage allocation of Advantage VISION:Excel.

You are using a disk space allocation system that does not update the LUB entries until after the OPEN has occurred.

Your installation has predefined system number assignments that conflict with those of Advantage VISION:Excel.

You want to limit the number of lines per printed page.

Your Advantage VISION:Excel System is password protected.

An example of the VSE PARM statement is shown as follows.

PARM='WA=0,DEVICE=(ABCD),SYSNUM=(E,F,G,H),LMAX=II,PW=JJJ',SPOOL

Page 729: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel/Advantage VISION:Sixty Considerations

Appendix E: Fixed Form and Positional Free-Form Summary E–27

The following table explains the VSE PARM statement.

Keyword Description

PARM Required and must begin in column 1.

WA Working storage allocation; default is the lesser of 300K or the remaining memory space in the partition.

DEVICE Parentheses are required to enclose the device type codes.

1 = 2311 2 = 2314

3 = 3330 4 = 3340

5 = 3350 7 = 3375

8 = 3380 C = CARD

T = TAPE P = PRINTER

S = FBA

SYSNUM Used for overriding system number assignments per your installation. File name is changed correspondingly. System numbers can be SYS000–SYS254. Parentheses are required to enclose the system numbers. Commas are required as delimiters.

A — Expanded parameter file; can be C, T, 1, 2, 3, 4, 5, 7, 8, or S

B — Control blocks file (output); can be T, 1, 2, 3, 4, 5, 7, 8, or S

C — Work file; can be T, 1, 2, 3, 4, 5, 7, 8, or S

D — Letter writing/summary sheets print file; can be P, T, 1, 2, 3, 4, 5, 7, 8, or S

PARM = 'DEVICE = (5555)'

PARM = 'DEVICE = (b/b/Tb/)' or

PARM = 'DEVICE = (b/b/b/T)'

E — Same as A; default is 008

F — Same as B; default is 010

G — Same as C; default is 011 E — Same as A; default is 008

F — Same as B; default is 010

G — Same as C; default is 011

H — Same as D; default is 009

PARM = 'SYSNUM = (030, 031, 032, 033)'

PARM = 'SYSNUM = (,031,, 031)'

PARM = 'SYSNUM = (030,, 032, 033)' or

PARM = 'SYSNUM = (030,, 032,)'

LMAX Maximum number of lines per printed page.

PW Password.

Page 730: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Advantage VISION:Excel Positional Free-form Requirements

E–28 Reference Guide

Keyword Description

SPOOL Tells Advantage VISION:Excel to ignore the automatic printing of the SYS009 file and to queue it for later printing.

Advantage VISION:Excel Positional Free-form Requirements Available only for Advantage VISION:Eighty and Advantage VISION:Results.

Each field in the positional free-form Advantage VISION:Excel statement is delimited by a slash (/). For example, the following fixed format Advantage VISION:Excel parameters:

Card 1 Image Card 2 Image

0 0 1 1 2 0 0 1 1 2

COL 1....5....0....5....0 COL 1...5....0....5…...0

SP01SR 1,000,000 180 SP RN

SP01AR 15.5

could be coded in positional free-form as:

SP/01/SR/1,000,000/180

Intervening blank characters are ignored. Null fields must be delimited by a slash. Positional free-form Advantage VISION:Excel statements can overflow onto as many continuation lines as necessary. The rules for continuation are:

The first line must have at least the function code (SP) and application number in it. The function code must be in columns 1 and 2 of the line.

A field must be wholly contained in one line; it cannot be split between lines.

The last field on a line is not delimited by a slash.

The first non-blank character on a continuation line must be a slash.

The above parameter could be coded as:

SP/01/SR

/1,000,000

/180

All Advantage VISION:Excel parameters (FQ, AG, LR, SP, CNH), except the letter writing detail statement (CN), can be coded in free-form.

Page 731: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix F: Proportional Sampling Manual Method Evaluation F–1

Appendix F: Proportional Sampling Manual Method Evaluation

This appendix describes evaluating a proportional sample manually, which is same as the procedure automated by the DYLPSLPC, DYLPSEVC, DYLPSLPS, and DYLPSEVSCOPY functions. The purpose of describing the process of manual evaluation of a proportional sample is to understand—”how these COPY functions work.”

Sample Examination and Evaluation After Advantage VISION:Excel selects your proportional sample, you must examine it, searching for compliance errors, substantive errors, or both, depending on your original sampling objectives. An evaluation sheet is provided to help you organize the manual sample evaluation and to make thee valuation procedure a step-by-step process.

The table that correlates reliability levels with reliability factors and related precision adjustment factors is important to the manual evaluation effort. Therefore, the table from the chapter "Proportional Sampling" is reproduced here.

The Rank of Errors column refers to the rank of extrapolated errors (E0). Errors of over statement and of understatement should be ranked separately and, within each group the ranking, should be from the largest to the smallest amount of error.

In the For Errors of Overstatement/ Understatement of Population Items columns, the distinction between errors of overstatement and of understatement should be based on their effect on the population from which the sample was drawn. If this is a reciprocal population to the one of primary audit interest, as in sampling subsequent invoices in a search for understatement of recorded liabilities, errors will have an opposite effect on the population of primary audit interest.

Page 732: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sample Examination and Evaluation

F–2 Reference Guide

Reliability Factors and Related Precision Adjustment Factors Table

Reliability Factor (R)

0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.6 2.0 2.3 3.0 4.6

Reliability Levels

50% 55% 59% 63% 66% 69% 72% 75% 80% 86% 90% 95% 99%

Precision Adjustment Factors (p) for Evaluating Samples at Reliability Levels Shown Above

Rank of Errors

For Errors of Overstatement of Population Items

1 1.01 1.05 1.11 1.15 1.20 1.24 1.28 1.32 1.39 1.51 1.59 1.75 2.04

2 1.01 1.04 1.08 1.12 1.15 1.18 1.21 1.24 1.28 1.38 1.44 1.56 1.77

3 1.00 1.04 1.07 1.10 1.13 1.15 1.17 1.20 1.24 1.31 1.36 1.46 1.64

4 1.00 1.03 1.06 1.09 1.11 1.13 1.15 1.17 1.21 1.27 1.32 1.40 1.56

5 1.00 1.03 1.05 1.08 1.10 1.12 1.14 1.16 1.19 1.25 1.29 1.36 1.50

6 1.00 1.03 1.05 1.07 1.09 1.11 1.13 1.14 1.17 1.23 1.26 1.33 1.46

7 1.00 1.02 1.04 1.07 1.09 1.10 1.12 1.13 1.16 1.21 1.24 1.31 1.43

8 1.00 1.02 1.04 1.06 1.08 1.10 1.11 1.12 1.15 1.20 1.23 1.29 1.40

9 1.00 1.02 1.04 1.06 1.08 1.09 1.10 1.12 1.14 1.19 1.22 1.28 1.38

10 1.00 1.02 1.04 1.06 1.07 1.09 1.10 1.11 1.14 1.18 1.21 1.26 1.36

11 1.00 1.02 1.04 1.05 1.07 1.08 1.10 1.11 1.13 1.17 1.20 1.25 1.35

12 1.00 1.02 1.03 1.05 1.07 1.08 1.09 1.10 1.13 1.16 1.19 1.24 1.34

13 1.00 1.02 1.03 1.05 1.06 1.08 1.09 1.10 1.12 1.16 1.18 1.23 1.33

14 1.00 1.02 1.03 1.05 1.06 1.07 1.08 1.10 1.12 1.15 1.18 1.22 1.32

15-19 1.00 1.02 1.03 1.05 1.06 1.07 1.08 1.09 1.11 1.15 1.17 1.22 1.31

20-24 1.00 1.01 1.03 1.04 1.05 1.06 1.07 1.08 1.10 1.13 1.15 1.19 1.26

25-29 1.00 1.01 1.03 1.04 1.05 1.06 1.06 1.07 1.09 1.11 1.13 1.17 1.24

30-39 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.06 1.08 1.10 1.12 1.15 1.22

40-49 1.00 1.01 1.02 1.03 1.04 1.05 1.05 1.06 1.07 1.09 1.10 1.13 1.19

50-74 1.00 1.01 1.02 1.03 1.04 1.04 1.05 1.05 1.06 1.08 1.09 1.12 1.17

75-99 1.00 1.01 1.02 1.02 1.03 1.03 1.04 1.04 1.05 1.07 1.08 1.10 1.14

100 and Over

1.00 1.01 1.02 1.02 1.03 1.03 1.04 1.04 1.04 1.06 1.07 1.09 1.12

Page 733: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sample Examination and Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–3

Reliability Factor (R)

0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.6 2.0 2.3 3.0 4.6

Reliability Levels

50% 55% 59% 63% 66% 69% 72% 75% 80% 86% 90% 95% 99%

Precision Adjustment Factors (p) for Evaluating Samples at Reliability Levels Shown Above

Rank of Errors

For Errors of Understatement of Population Items

1 0.67 0.58 0.49 0.45 0.40 0.35 0.31 0.28 0.22 0.14 0.10 0.05 0.00

2 0.96 0.92 0.87 0.82 0.78 0.74 0.70 0.66 0.60 0.49 0.42 0.30 0.14

3 0.99 0.95 0.91 0.88 0.84 0.81 0.78 0.76 0.71 0.62 0.57 0.46 0.29

4 0.99 0.95 0.92 0.90 0.87 0.85 0.82 0.80 0.76 0.69 0.64 0.54 0.39

5 0.99 0.96 0.93 0.91 0.89 0.87 0.85 0.83 0.79 0.73 0.68 0.60 0.45

6 0.99 0.96 0.94 0.92 0.90 0.88 0.86 0.84 0.81 0.75 0.71 0.64 0.51

7 0.99 0.97 0.95 0.93 0.91 0.89 0.87 0.86 0.83 0.77 0.74 0.67 0.54

8 0.99 0.97 0.95 0.93 0.91 0.90 0.88 0.87 0.84 0.79 0.76 0.69 0.57

9 0.99 0.97 0.95 0.94 0.92 0.90 0.89 0.88 0.85 0.80 0.77 0.71 0.60

10 0.99 0.97 0.96 0.94 0.92 0.91 0.90 0.88 0.86 0.81 0.78 0.73 0.62

11 1.00 0.98 0.96 0.94 0.93 0.91 0.90 0.89 0.86 0.82 0.79 0.74 0.64

12 1.00 0.98 0.96 0.94 0.93 0.92 0.90 0.89 0.87 0.83 0.80 0.75 0.65

13 1.00 0.98 0.96 0.95 0.93 0.92 0.91 0.90 0.87 0.84 0.81 0.76 0.66

14 1.00 0.98 0.96 0.95 0.94 0.92 0.91 0.90 0.88 0.84 0.82 0.77 0.67

15-19 1.00 0.98 0.96 0.95 0.94 0.93 0.91 0.90 0.88 0.85 0.83 0.78 0.68

20-24 1.00 0.98 0.96 0.96 0.95 0.94 0.93 0.92 0.90 0.87 0.85 0.81 0.73

25-29 1.00 0.98 0.97 0.96 0.95 0.94 0.93 0.93 0.91 0.89 0.87 0.83 0.76

30-39 1.00 0.98 0.97 0.96 0.96 0.95 0.94 0.93 0.92 0.90 0.88 0.85 0.78

40-49 1.00 0.99 0.98 0.97 0.96 0.95 0.95 0.94 0.93 0.91 0.90 0.87 0.80

50-74 1.00 0.99 0.98 0.97 0.96 0.96 0.95 095 0.94 0.92 0.91 0.88 0.83

75-99 1.00 0.99 0.98 0.98 0.97 0.97 0.96 0.96 0.95 0.93 0.92 0.90 0.86

100 and Over

1.00 0.99 0.98 0.98 0.97 0.97 0.96 0.96 0.96 0.94 0.93 0.91 0.88

Reprinted by permission of Deloitte & Touche.

Page 734: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sample Examination and Evaluation

F–4 Reference Guide

Proportional Sampling Evaluation Worksheet

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Compliance Errors Page 1

(A) Recorded (Unaudited) Monetary Total of Population ___________

(B) Desired Compliance Precision ___________

(C) Compliance Reliability Level ___________

(D) Compliance Reliability Factor ___________

(E) Sampling Interval ___________

Ref Item Top Precision No. Value Stratum Adjustment Error Factor Values (F) (G) (H) (I)

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

Total ____________ ___________ ___________

(J) (K) (L)

(M) Total Amount of Estimated Population Errors J+(L*E) ___________

(N) Ratio of Estimated Population Errors to the Monetary Total of the Population (100*M)/A ___________

(O) Precision Adjusted Population Errors J+(K*E) ___________

(P) Revised Compliance Precision O+(D*E) ___________

(Q) Ratio of the Desired Compliance Precision to the Monetary Total of the Population (100*B)/A ___________

(R) Ratio of the Revised Compliance Precision to the Monetary Total of the Population (100*P)/A ___________

Page 735: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sample Examination and Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–5

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Substantive Errors Page 2

(a) Recorded (Unaudited) Monetary Total of Population ___________

(b) Desired Substantive Monetary Precision ___________

(c) Substantive Reliability Level ___________

(d) Substantive Reliability Factor ___________

(e) Sampling Interval ___________

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision No. Value Stratum Stratum Error Column Adj. Adjusted Error Error (i*e)/g j Fact. Error Value Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(n) ___________ (o) ___________ (p) ____________

(n) Total Amount of Top Stratum Overstatement Errors

(Sum Column h) ____________

(o) Total Estimate of Non-Top Stratum Overstatement Errors

(Sum Column j) ____________

(p) Precision Adjusted Upper Bound of Overstatement Errors

(Sum Column m) ____________

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Page 736: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Sample Examination and Evaluation

F–6 Reference Guide

Analysis for Substantive Errors Page 3

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision No. Value Stratum Stratum Error Column Adj. Adjusted Error Error (i*e)/g j Fact. Error Value Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(q) ___________ (r) ___________ (s) ____________

(q) Total Amount of Top Stratum Understatement Errors

(Sum Column h) ____________

(r) Total Estimate of Non-Top Stratum Understatement Errors

(Sum Column j) ____________

(s) Precision Adjusted Upper Bound of Understatement Errors

(Sum Column m) ____________

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Page 737: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Compliance Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–7

Analysis for Substantive Errors Page 4

(t) Retroactive Monetary Adjustments ___________

(u) Total Estimated Population Errors n+o-q-r-t ___________

(v) Ratio of Total Estimated Population Errors to the

Monetary Total of the Population (100*u)/a ___________

(w) Total Substantive Precision Adjusted Errors p-s ___________

(x) Revised Substantive Precision (d*e)+w-t ___________

(y) Ratio of the Desired Substantive Precision to the

Monetary Total of the Population (100*b)/a ___________

(z) Ratio of the Revised Substantive Precision to the

Monetary Total of the Population (100*x)/a ___________

In this appendix, the evaluation description is for dual-purpose testing. If you want to only perform compliance testing, ignore the portions relating to substantive testing. Conversely, if you want to only perform substantive testing, ignore the portions pertaining to compliance testing.

Compliance Evaluation When dual-purpose testing is performed, the evaluation of compliance errors is performed first. If no compliance errors are found in the sample, you can start substantive evaluation immediately after making the following statement:

“I am R percent certain that the total value of compliance-related sampling errors in the population does not exceed MP.”

Where:

R is the compliance reliability level.

MP is the compliance upper monetary precision limit. MP is calculated by multiplying the sampling interval in the Advantage VISION:Excel Sampling List (see Advantage VISION: Excel Sampling List) by the reliability factor (see the Proportional Sampling Table) that corresponds to the compliance reliability level.

However, if the sample contained one or more errors, the Proportional Sampling Evaluation Worksheet is used to evaluate compliance errors.

Page 738: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Compliance Evaluation

F–8 Reference Guide

Proportional Sampling Evaluation Worksheet: Step 1

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Compliance Errors Page 1

(A) Recorded (Unaudited) Monetary Total of Population ____________

(B) Desired Compliance Precision ____________

(C) Compliance Reliability Level ____________

(D) Compliance Reliability Factor ____________

(E) Sampling Interval ____________

To fill out the compliance evaluation sheet

Enter the values at the top of page 1 of 4, as follows:

Enter the value for (A) Recorded (Unaudited) Monetary Total of Population — the value for this field can be found in the Advantage VISION:Excel Sampling List.

Enter the value for (B) Desired Compliance Precision — enter the value determined when the sample objectives were determined.

Enter the value for (C) Compliance Reliability Level — enter the value determined when the sample objectives were determined.

Enter the value for (D) Compliance Reliability Factor — enter the value of the Reliability Factor that corresponds to the Compliance Reliability Level (see the Reliability Factors and Related Precision Adjustment Factors Table). For example, 75 percent is 1.4, 86 percent is 2.0, and 99 percent is 4.6.

Enter the value for (E) Sampling Interval — the value for this field can be found in the Advantage VISION:Excel Sampling List. This is the actual sampling interval used in the selection process.

Page 739: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Compliance Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–9

Proportional Sampling Evaluation Worksheet: Step 2

Ref Item Top Precision No. Value Stratum Adjustment Error Factor Values

(F) (G) (H) (I)

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

Total ____________ ___________ ___________

(J) (K) (L)

Enter the values in the middle of page 1 of 4, as follows:

When you find an item with a compliance error, enter its reference number into column (F) and its total recorded value into column (G). Continue examining the sample, listing all items with compliance errors in this manner.

Move all items in column (G) that equal or exceed the Sampling Interval (E) into the Top Stratum Error Values column (H).

For each item in column (G) that is less than the Sampling Interval (E), enter a Precision Adjustment Factor into column (I) (see the Reliability Factors and Related Precision Adjustment Factors Table). Start with the first precision adjustment factor in the overstatements column corresponding to the Compliance Reliability Level (C) and proceed down the list.

Enter the sum of columns (H) and (I) in fields (J) and (K), respectively.

Count the number of Precision Adjustment Factors in column (I) and place this number into field (L).

Page 740: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Compliance Evaluation

F–10 Reference Guide

Proportional Sampling Evaluation Worksheet: Step 3

(M) Total Amount of Estimated Population Errors J+(L*E) ___________

(N) Ratio of Estimated Population Errors to the

Monetary Total of the Population (100*M)/A ___________

(O) Precision Adjusted Population Errors J+(K*E) ___________

(P) Revised Compliance Precision O+(D*E) ___________

(Q) Ratio of the Desired Compliance Precision to

the Monetary Total of the Population (100*B)/A ___________

(R) Ratio of the Revised Compliance Precision to the

Monetary Total of the Population (100*P)/A ___________

Enter the values on the bottom of the page 1 of 4, as follows:

Multiply the number of Precision Adjustment Factors (L) by the Sampling Interval (E) and add the sum of the Top Stratum Error Values (J); place this value in field (M), as shown in the following equation:

M =( L × E ) +J

Multiply the Total Amount of Estimated Population Errors (M) by 100 and divide the result by the Recorded Monetary Total of the Population (A); place this value in field (N), as shown in the following equation:

N =( M × 100 ) ÷ A

Multiply the sum of the Precision Adjustment Factors (K) by the Sampling Interval (E) and add the sum of the Top Stratum Values (J); place this value in field (O), as shown in the following equation:

O =( K × E ) + J

Multiply the Compliance Reliability Factor (D) by the Sampling Interval (E) and add the Precision Adjusted Population Errors (O); place this value in field (P), as shown in the following equation:

P = ( D × E ) + O

Multiply the Desired Compliance Precision (B) by 100 and divide the result by the Recorded Monetary Total of the Population (A); place this value in field (Q), as shown in the following equation:

Q =( B × 100 )÷ A

Multiply the Revised Compliance Precision (P) by 100 and divide the result by the Recorded Monetary Total of the Population (A); place this value in field (R), as shown in the following equation:

R =( P × 100 ) ÷ A

Page 741: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Substantive Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–11

If the revised compliance precision ratio (R) is less than or equal to the desired compliance precision ratio (Q), the compliance test is deemed satisfactory.

In dual-purpose testing, when the revised compliance precision ratio (R) exceeds The desired compliance precision ratio (Q), the Substantive Reliability Level (c) in Proportional Sampling Evaluation Worksheet is adjusted upwards, because less reliance can be placed on the effectiveness of the internal control procedures.

Substantive Evaluation If no substantive errors are found in the sample, you can state immediately:

“I am R percent certain that the total value of substantive-related sampling errors in the population does not exceed MP.”

Where:

R is the substantive reliability level.

MP is the substantive upper monetary precision limit. MP is calculated by multiplying the sampling interval in the Advantage VISION:Excel Sampling List by the reliability factor (see the Reliability Factors and Related Precision Adjustment Factors Table) that corresponds to the Substantive Reliability Level.

If substantive errors are found in the sample, you can use the Proportional Sampling Evaluation Worksheet for evaluating the substantive errors.

Page 742: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Substantive Evaluation

F–12 Reference Guide

Proportional Sampling Evaluation Worksheet: Step 4

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Substantive Errors Page 2

(a) Recorded (Unaudited) Monetary Total of Population ___________

(b) Desired Substantive Monetary Precision ___________

(c) Substantive Reliability Level ___________

(d) Substantive Reliability Factor ___________

(e) Sampling Interval ___________

Enter the values at the top of page 2 of 4, as follows:

Enter the value for (a) Recorded (Unaudited) Monetary Total of Population — the value for this field can be found in the Advantage VISION:Excel Sampling List.

Enter the value for (b) Desired Compliance Precision — enter the value determined when the sample objectives were determined.

Enter the value for (c) Compliance Reliability Level — enter the value determined when the sample objectives were determined or as adjusted by compliance evaluation results.

Enter the value for (d) Compliance Reliability Factor — enter the value of the Reliability Factor that corresponds to the Compliance Reliability Level (see the Reliability Factors and Related Precision Adjustment Factors Table). For example, 86 percent is 2.0 and 95 percent is 3.0.

Enter the value for (e) Sampling Interval — the value for this field can be found in the Advantage VISION:Excel Sampling List. This is the actual sampling interval used in the selection process.

Page 743: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Substantive Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–13

Proportional Sampling Evaluation Worksheet: Step 5

Analysis of Over/Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(n) ___________ (o) ___________ (p) ____________

(q) ___________ (r) ___________ (s) ____________

(n) Total Amount of Top Stratum Overstatement Errors

(Sum Column h) ____________

(o) Total Estimate of Non-Top Stratum Overstatement Errors ____________

(Sum Column j) ____________

(p) Precision Adjusted Upper Bound of Overstatement Errors

(Sum Column m) ____________

(q) Total Amount of Top Stratum Understatement Errors

(Sum Column h) ____________

(r) Total Estimate of Non-Top Stratum Understatement Errors

(Sum Column j) ____________

(s) Precision Adjusted Upper Bound of Understatement Errors

(Sum Column m) ____________

Enter the values in the middle of page 2 or 3 of 4, as follows.

When you find an item with a monetary error, determine if the unaudited value is overstated or understated as compared to the audited value. If it is an overstatement error, use the Proportional Sampling Evaluation Worksheet. Enter the reference number of the item in column (f).

Enter the unaudited value of the item into column (g). Enter the positive amount by which the item is in error in column (i) if the item value (g) is less than the Sampling Interval (e); these are non-top stratum items; if the item value (g) is greater than or equal to the Sampling Interval (e), enter the positive error amount in column (h); these are top stratum items. Perform these steps for all items in the sample with monetary errors.

Page 744: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Substantive Evaluation

F–14 Reference Guide

Move the values in column (h) to column (m).

Multiply each value in column (i) by the Sampling Interval (e), divide by the value in column (g), and place the resulting value in column (j), as shown in the following equation:

j = ( i × e ) ÷ g

In column (k), rank the values in column (j) in descending order (with the greatest value first).

In the Reliability Factors and Related Precision Adjustment Factors Table, find the column that corresponds to the Substantive Reliability Level, (c) (if necessary, adjusted based on the compliance test results). For overstatements, take the upper table; for understatements, take the lower table. For all items in column (k), serially place the precision adjustment factors into column (l), starting with the first precision adjustment factor.

For each entry, multiply the value in column (k) by the value in column (l) and enter the result into column (m).

Sum columns (h), (j), and (m) in Proportional Sampling Evaluation Worksheet giving (n), (o), (p), (q), (r), and (s), respectively.

Note: In order for this equation to be valid, you must assume that the proportion of error within the item is the same proportion by which the sampling interval is in error. Therefore, if the item is 5 percent in error, also assume the sampling interval to be 5 percent in error.

Proportional Sampling Evaluation Worksheet: Step 6

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Substantive Errors Page 4

(t) Retroactive Monetary Adjustments ___________

(u) Total Estimated Population Errors n+o-q-r-t ___________

(v) Ratio of Total Estimated Population Errors to the

Monetary Total of the Population (100*u)/a ___________

(w) Total Substantive Precision Adjusted Errors p-s ___________

(x) Revised Substantive Precision (d*e)+w-t ___________

(y) Ratio of the Desired Substantive Precision to the

Monetary Total of the Population (100*b)/a ___________

(z) Ratio of the Revised Substantive Precision to the

Monetary Total of the Population (100*x)/a ___________

Page 745: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Substantive Evaluation

Appendix F: Proportional Sampling Manual Method Evaluation F–15

Enter the values on page 4 of 4, as follows.

If a retroactive monetary adjustment must be made, enter the amount into field (t) (reference BAI).

Calculate the Total Estimated Population Errors (u) by adding the Total Amount of Top Stratum Overstatement Errors (n) to the Total Estimate of Non-Top Stratum Overstatement Errors (o) and subtracting from that result the Total Amount of Top Stratum Understatement Errors (q), the Total Estimate of Non-Top Stratum Understatement Errors (r) and the Retroactive Monetary Adjustments (t), as shown in the following equation:

u= (n +o ) – ( q + r + t )

To calculate the estimated percentage of error in the population, multiply the Total Estimated Population Errors (u) by 100, divide by the Recorded Monetary Total of the Population (a), and place the result in field (v), as shown in the following equation:

v =( u × 100 ) ÷ a

Calculate the Total Substantive Precision Adjusted Errors (w) by subtracting the Precision Adjusted Lower Bound of Understatement Errors (s) from the Precision Adjusted Upper Bound of Overstatement Errors (p), as shown in the following equation:

W = p – s

Calculate the Revised Substantive Precision (x) by multiplying the Substantive Reliability Factor (d) by the Sampling Interval (e) and adding the Total Substantive Precision Adjusted Errors (w) and subtracting the Retroactive Monetary Adjustments (t), as shown in the following equation:

x =(d × e ) + w – t

Multiply the Desired Substantive Monetary Precision (b) by 100, divide by the Recorded Monetary Total of the Population (a) and place the result in field (y), as shown in the following equation:

y= ( b × 100 ) ÷a

Multiply the Revised Substantive Precision (x) by 100, divide by the Recorded Monetary Total of the Population (a), and place the result in field (z), as shown in the following equation:

z =( x × 100 ) ÷a

If the Ratio of the Revised Substantive Precision to the Monetary Total of the Population (z) does not exceed the Ratio of the Desired Substantive Precision to the Monetary Total of the Population (y), you can conclude:

“I am c percent certain that the total value of monetary sampling error in the population does not exceed x.”

Page 746: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

F–16 Reference Guide

Where,

c is the Substantive Reliability Level in Proportional Sampling Evaluation Worksheet.

x is the Revised Substantive Precision in Proportional Sampling Evaluation Worksheet.

Note: If the Ratio of the Revised Substantive Precision to the Monetary Total of the Population (z) exceeds the Ratio of the Desired Substantive Precision to the Monetary Total of the Population (y), other steps can be required in examining the population.

A negative value indicates that the estimated error is an understatement.

Proportional Sampling Evaluation Example The loan file of the Freedom Savings and Loan Association is to be audited to determine whether its loan balances recorded (unaudited) total of $72,807,205.61 is reasonable.

Proportional sampling is used to determine the upper bound of error in the recorded loan balance total. For each item in the sample chosen, compliance testing is performed against the originating loan document, while substantive testing is performed by sending confirmation notices to the appropriate borrowers.

The pertinent information for both compliance and substantive testing is:

Compliance Testing

Desired Upper Monetary Precision Limit

1,456,145.00%

Reliability Level 95.0%

Reliability Factor (see the Reliability Factors and Related Precision Adjustment Factors Table)

3.0

1,456,145.00 divided by 3.0 485,381.66

Page 747: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

Appendix F: Proportional Sampling Manual Method Evaluation F–17

Substantive Testing

Desired Upper Monetary Precision Limit

364,036.00%

Reliability Level 86.0%

Reliability Factor (see the Reliability Factors and Related Precision Adjustment Factors Table)

2.0%

364,036.00 divided by 2.0 182,018.00%

Advantage VISION:Excel was used to select the sample and it generated the Sampling List. After correlating the items in the sample with the original loan documents, the following compliance errors were found:

%

Loan Number Recorded Loan Balance

18523 4461.00

22311 18692.77

Advantage VISION: Excel Sampling List

11/30/97 VISION:EXCEL SAMPLING LIST PAGE 1

APPLICATION 1 - PROPORTIONAL SAMPLING

RECORDED (UNAUDITED) MONETARY TOTAL OF POPULATION 72,807,205.61

RELIABILITY LEVEL 86.0%

DESIRED UPPER MONETARY PRECISION LIMIT 364,036.00

CALCULATED RELIABILITY FACTOR 2.0

CALCULATED SAMPLING INTERVAL 182,018.00

CALCULATED SAMPLE SIZE 401

RANDOM RESTART NUMBER 43,937.88

LABEL OF FIELD CONTAINING AMOUNT ALOANBAL

From the returned confirmation notices, the following substantive errors were found:

Page 748: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

F–18 Reference Guide

Loan Number Recorded Loan Balance

Audited Loan Balance Difference

15741 $28,299.81 $29,298.81 $-999.00

18313 3,533.53 $3,353.53 $180.00

19315 $31,733.36 $33,733.16 -1,999.80

21672 246,624.54 246,426.54 $198.00

The completed evaluation sheets are shown as follows.

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Compliance Errors Page 1

(A) Recorded (Unaudited) Monetary Total of Population ` 72,807,205.61

(B) Desired Compliance Precision 1,456,145.00

(C) Compliance Reliability Level 95.0%

(D) Compliance Reliability Factor 3.0

(E) Sampling Interval 182,018.00

Ref Item Top Precision No. Value Stratum Adjustment Error Factor Values (F) (G) (H) (I) _____ _________ ____________ ___________

18523 4,461.00 ____________ 1.75

22311 18,692.77 ____________ 1.56

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

Total ____________ ____3.31 ____ ______2 ______

(J) (K) (L)

Page 749: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

Appendix F: Proportional Sampling Manual Method Evaluation F–19

(M) Total Amount of Estimated Population Errors J+(L*E) 364,036.00

(N) Ratio of Estimated Population Errors to the Monetary Total of the Population (100*M)/A .50%

(O) Precision Adjusted Population Errors J+(K*E) 602,479.58

(P) Revised Compliance Precision O+(D*E) 1,148,533.58

(Q) Ratio of the Desired Compliance Precision to the Monetary Total of the Population (100*B)/A 2.0%

(R) Ratio of the Revised Compliance Precision to the Monetary Total of the Population (100*P)/A 1.6%

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Compliance Errors Page 2

(a) Recorded (Unaudited) Monetary Total of Population 72,807,205.61

(b) Desired Substantive Monetary Precision 509,605.44

(c) Substantive Reliability Level 86.0%

(d) Substantive Reliability Factor 2.0

(e) Sampling Interval 182,018.00

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 180.00 9,272.10 9,272.10 1.51 14,000.87

21672 246,624.54 198.00 198.00

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

Page 750: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

F–20 Reference Guide

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(n) ___198.00___ (o) __9,272.10__ (p) ___14,198.87__

(n) Total Amount of Top Stratum Overstatement Errors

(Sum Column h) 198.00

(o) Total Estimate of Non-Top Stratum Overstatement Errors

(Sum Column j) 9,272.10

(p) Precision Adjusted Upper Bound of Overstatement Errors

(Sum Column m) 14,198.87

PROPORTIONAL SAMPLING EVALUATIOfN WORKSHEET

Analysis for Substantive Errors Page 3

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

15741 28,299.81 999.00 6,425.00 11,470.57 .14 1,605.88

19315 31,733.36 1,999.80 11,470.57 6,425.34 .49 3,148.42

_____ _________ ___________ ___________ ___________ _________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

Page 751: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

Appendix F: Proportional Sampling Manual Method Evaluation F–21

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(q) (r) 17,895.91 (s) 4,754.30

(q) Total Amount of Top Stratum Understatement Errors

(Sum Column h) ____________

(r) Total Estimate of Non-Top Stratum Understatement Errors

(Sum Column j) 17,895.91

(s) Precision Adjusted Upper Bound of Understatement Errors

(Sum Column m) 4,754.30

(t) Retroactive Monetary Adjustments ___________

(u) Total Estimated Population Errors n+o-q-r-t -8,425.81

(v) Ratio of Total Estimated Population Errors to the

Monetary Total of the Population (100*u)/a -.0116%

(w) Total Substantive Precision Adjusted Errors p-s 9,444.57

(x) Revised Substantive Precision (d*e)+w-t 373,480.57

(y) Ratio of the Desired Substantive Precision to the

Monetary Total of the Population (100*b)/a .70%

(z) Ratio of the Revised Substantive Precision to the

Monetary Total of the Population (100*x)/a .51%

You would perform the following steps to complete the evaluation procedure in this example.

1. Analyze the compliance errors using the Proportional Sampling Evaluation Worksheet.

Fill out the information at the top of page 1 of 4.

Obtain the Sampling Interval value (E) from the Advantage VISION:Excel Sampling List.

Page 752: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Proportional Sampling Evaluation Example

F–22 Reference Guide

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Compliance Errors Page 1

(A) Recorded (Unaudited) Monetary Total of Population 72,807,205.61

(B) Desired Compliance Precision 1,456,145.00

(C) Compliance Reliability Level 95.0%

(D) Compliance Reliability Factor 3.0

(E) Sampling Interval 182,018.00

2. Fill out the information in the middle of page 1 of 4.

Because none of the values in column (G) exceeds the Sampling Interval (E), leave column (H) blank.

Turn to the 95 percent overstatement column in the Reliability Factors and Related Precision Adjustment Factors Table to obtain a value for column (I).

Ref Item Top Precision

No. Value Stratum Adjustment

Error Factor

Values

(F) (G) (H) (I)

_____ _________ ____________ ___________

18523 4,461.00 _____________ 1.75

22311 18,692.77 _____________ 1.56

_____ _________ ____________ ___________

_____ _________ ____________ ___________

_____ _________ ____________ ___________

3. Complete the evaluation for compliance errors.

Fill out the information in the middle and at the bottom of page 1 of 4.

Ref Item Top Precision No. Value Stratum Adjustment Error Factor Values (F) (G) (H) (I)

_____ _________ ____________ ___________

18523 4,461.00 _____________ 1.75

22311 18,692.77 _____________ 1.56

_____ _________ ____________ ___________

_____ _________ ____________ ___________ _____ _________ ____________ ___________ Total _________ ___3.31_____ ____2______

(J) (K) (L)

(M) Total Amount of Estimated Population Errors J+(L*E) 364,036.00

Page 753: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Overstatements

Appendix F: Proportional Sampling Manual Method Evaluation F–23

(N) Ratio of Estimated Population Errors to the

Monetary Total of the Population (100*M)/A .50%

(O) Precision Adjusted Population Errors J+(K*E) 602,479.58

(P) Revised Compliance Precision O+(D*E) 1,148,533.58

(Q) Ratio of the Desired Compliance Precision to

the Monetary Total of the Population (100*B)/A 2.0%

(R) Ratio of the Revised Compliance Precision to the

Monetary Total of the Population (100*P)/A 1.6%

Because 1.6 percent is less than 2.0 percent (the compliance monetary precision originally desired), the compliance test is deemed acceptable and you can allow the substantive Reliability Level to remain at 86.0 percent.

4. Evaluate the substantive errors using the Proportional Sampling Evaluation Worksheet.

Fill out the information at the top of page 2 of 4.

Obtain the Sampling Interval value (e) from the Advantage VISION:Excel Sampling List.

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Substantive Errors Page 2

(a) Recorded (Unaudited) Monetary Total of Population 72,807,205.61

(b) Desired Substantive Monetary Precision 509,605.44

(c) Substantive Reliability Level 86.0%

(d) Substantive Reliability Factor 2.0

(e) Sampling Interval 182,018.00

Monetary Overstatements Monetary overstatements must be handled separately from monetary understatements. You would perform the following steps for this example:

1. Evaluate the overstatements by filling in the reference number, item value, and error value for each overstated item on the middle of page 2 of 4. If the item value is equal to or greater than the sampling interval, 182,018.00, place the error value into column (h) (top stratum items);otherwise, place the error value into column (i). Therefore, for item 21672, place 198.00 into column (h).

Page 754: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Overstatements

F–24 Reference Guide

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 ___________ 180.00 ___________ __________ _________ ____________

21672 246,624.54 198.00 ___________ ___________ __________ __________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

2. Transfer all values in column (h) immediately to column (m). These items are called top stratum items.

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 ___________ 180.00 ___________ __________ _________ ____________

21672 246,624.54 198.00 ___________ ____________ __________ _________ 198.00

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

3. For non-top stratum items, fill in columns (j), (k), (l), and (m).

Extrapolate the percentage of error in the item to the same percentage of error in the sampling interval.

In item 18313, $180.00 is 5.094056 percent of $3533.53; consequently, assume that 5.094056 percent of the sampling interval of $182,018.00 is in error, giving $9,272.10 in error for the sampling interval.

Page 755: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Overstatements

Appendix F: Proportional Sampling Manual Method Evaluation F–25

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 180.00 9,272.10 9,272.10 1.51 14,000.87

21672 246,624.54 ___198.00___ ____________ ___________ __________ __________ ____198.00__

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

4. Complete filling out the middle of page 2 of 4.

Rank the values in column (j) in descending sequence (greatest value first, lowest value last) and place them in column (k).

Turning to the 86 percent overstatements column in the Reliability Factors and Related Precision Adjustment Factors Table, fill in column (l).

Multiply the value in column (k) by column (l) to determine the precision adjusted error.

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 ___________ ___180.00__ ___9,272.10_ __9,272.10_ __1.51___ ___14,000.87_

21672 246,624.54 ___________ ___198.00__ ____________ __________ __________ ______________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

Page 756: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Understatements

F–26 Reference Guide

5. To complete the overstatements evaluation, total columns (h), (j), and (m) to obtain the value for fields (n), (o), and (p), respectively.

Analysis of Overstatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

18313 3,533.53 180.00 9,272.10 9,272.10 1.51 14,000.87

21672 246,624.54 198.00 198.00

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(n) __198.00___ (o) __9,272.10_ (p) __14,198.87_

(n) Total Amount of Top Stratum Overstatement Errors

(Sum Column h) 198.00

(o) Total Estimate of Non-Top Stratum Overstatement Errors

(Sum Column j) 9,272.10

(p) Precision Adjusted Upper Bound of Overstatement Errors

(Sum Column m) 14,198.87

Monetary Understatements The evaluation for understatements is very similar to the evaluation for overstatements.

You would perform the following steps for this example:

1. Evaluate the understatements by filling in the reference number, the item value and error value for each understated item in the middle of page 3 of 4. If the item value is greater than or equal to the sampling interval, 182,018.00, place the error value into column (h); otherwise, place the error value into column (i).

Page 757: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Understatements

Appendix F: Proportional Sampling Manual Method Evaluation F–27

PROPORTIONAL SAMPLING EVALUATION WORKSHEET

Analysis for Substantive Errors Page 3

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

15741 28,299.81 ___________ ___999.00__ ___________ __________ _________ ____________

19315 37,733.36 ___________ __1,999.80_ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

2. Transfer the error values for the top stratum items immediately to column (m) from column (h) (there are no top stratum understated items in this example). The percentage by which the item is in error is extended to the sampling interval. For example, item 15741 is 3.530059 percent (999.00/28,299.81) in error; therefore, the sampling interval ($182,018.00) is also 3.530059 percent in error, giving an error value of $6,425.34.

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

15741 28,299.81 ___________ 999.00 6,425.00 __________ _________ ____________

19315 37,733.36 ___________ 1,999.80 11,470.57 6,425.34 .49 3,148.42

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

Page 758: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Understatements

F–28 Reference Guide

3. Complete filling in the middle of page 3 of 4.

Take the values in column (j) and place them in descending sequence in column (k); therefore, move 11,470.57 to the top row and 6,425.34 to the bottom row.

Turning to the 86% column of the understatements in the Reliability Factors and Related Precision Adjustment Factors Table, fill in column (l).

Multiply the value in column (k) by the value in column (l) to determine the value in column (m).

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

15741 28,299.81 ___________ 999.00 6,425.00 11,470.57 .14 1,605.88

19315 37,733.36 ___________ 1,999.80 11,470.57 6,425.34 .49 3,148.42

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________ _____ _________ ___________ ___________ ___________ __________ _________ ____________ _____ _________ ___________ ___________ ___________ __________ _________ ____________

Page 759: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Understatements

Appendix F: Proportional Sampling Manual Method Evaluation F–29

4. Fill in the bottom of page 3 of 4 by adding the values in columns (h), (j), and (m) to determine the value for fields (q), (r), and (s), respectively.

Analysis of Understatement Errors

Ref Item Top Non-Top Stratum Rank Prec. Precision

No. Value Stratum Stratum Error Column Adj. Adjusted

Error Error (i*e)/g j Fact. Error Value

Value Value (k*l)

(f) (g) (h) (i) (j) (k) (l) (m)

_____ _________ ___________ ___________ ___________ __________ _________ ____________

15741 28,299.81 ___________ 999.00 6,425.00 11,470.57 .14 1,605.88

19315 37,733.36 ___________ 1,999.80 11,470.57 6,425.34 .49 3,148.42

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

_____ _________ ___________ ___________ ___________ __________ _________ ____________

(q) ___________ (r) 17,895.91 (s) 4,754.30

(q) Total Amount of Top Stratum Understatement Errors

(Sum Column h) ____________

(r) Total Estimate of Non-Top Stratum Understatement Errors

(Sum Column j) 17,895.91

(s) Precision Adjusted Upper Bound of Understatement Errors

(Sum Column m) 4,754.30

(t) Retroactive Monetary Adjustments ___________

(u) Total Estimated Population Errors n+o-q-r-t -8,425.81

(v) Ratio of Total Estimated Population Errors to the

Monetary Total of the Population (100*u)/a -.0116%

(w) Total Substantive Precision Adjusted Errors p-s 9,444.57

(x) Revised Substantive Precision (d*e)+w-t 373,480.57

(y) Ratio of the Desired Substantive Precision to the

Monetary Total of the Population (100*b)/a .70%

(z) Ratio of the Revised Substantive Precision to the

Monetary Total of the Population (100*x)/a .51%

5. Complete the substantive evaluation.

Because 0.51 percent is less than 0.70 percent, you can finally conclude with 86 percent confidence that the recorded total of the loan balance file is not overstated by more than $373,480.57. This is satisfactory.

Page 760: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:
Page 761: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Appendix G: Bibliography G–1

Appendix G: Bibliography

Arkin, Herbert. Handbook of Sampling for Auditing and Accounting. New York: McGraw-Hill Book Company, 1974.

Burington, Richard S, and Donald C. May. Handbook of Probability and Statistics with Tables. New York: McGraw-Hill Book Company, 1970.

Cochran, William G. Sampling Techniques. New York: John Wiley & Sons, 1977.

Dwight, Herbert. Tables of Integrals and Other Mathematical Data. New York: Macmillan Publishing Co., Inc., 1961.

Hamming, R.W. Numerical Methods for Scientists and Engineers. New York: McGraw-Hill Book Company, 1973.

Hoel, Paul G., Sidney C. Port, and Charles J. Stone. Introduction to Probability Theory. Boston: Houghton Mifflin Company, 1971.

Holmes, Arthur W. Auditing Principles and Procedure. Homewood, Illinois: Richard D. Irwin, Inc., 1962.

Institute of Internal Auditors. Sampling Manual for Auditors. New York: Institute of Internal Auditors, 1967.

Kimble, Gregory R. How to Use (and Misuse) Statistics. Englewood Cliffs, New Jersey: Prentice-Hall, Inc., 1978.

Knuth, Donald E. The Art of Computer Programming — Seminumerical Algorithms. Reading, Massachusetts: Addision-Wesley Publishing Company, 1969.

Leslie, Donald A., Albert D. Teitlebaum, and Rodney J. Anderson. Dollar-Unit Sampling A Practical Guide for Auditors. London, England: Pitman Publishing Limited, 1980.

Lieberman, Gerald J., and Donald B. Owen. Tables of the Hypergeometric Probability Distribution. Stanford, California: Stanford University Press, 1961.

Page 762: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Monetary Understatements

G–2 Reference Guide

Longley-Cook, L.H. Statistical Problems and How to Solve Them. New York: Barnes & Noble Books, 1971.

McRae, T.W. Statistical Sampling for Audit and Control. New York: John Wiley & Sons,1974.

Roberts, Donald M. Statistical Auditing. New York: American Institute of Certified Public Accountants, 1978.

Sterling, Theodor D., and Seymour V. Pollack. Introduction to Statistical Data Processing. Englewood Cliffs, New Jersey: Prentice-Hall, Inc., 1968.

Page 763: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Index–1

Index

A

Acceptance sampling, 10-1 examining and evaluating, 10-13 Generated Output, 10-12 IF SAMPLING command, 10-11 implementation, 10-9 Non-Stratified Sampling Summary Report, 10-20 objective, 10-1 reports, 10-18 statement listing, 10-18 syntax for acceptance sampling, 10-9

additional Frequency Distribution, 4-13

aging analysis, 2-1 aging date, 2-32 Detail Report, 2-18 LISTAG command, 2-33 statements for aging analysis, 2-10 Summary Report, 2-17

aging analysis methods, 2-6

Aging Analysis syntax, 2-3

Aging example, 2-14

Aging Summary Report, 2-13

alphanumeric frequency distribution, 4-42

Attribute estiation sampling guidelines, 8-15

Attribute estimation sampling, 8-1 flowchart, 8-16 program, 8-18 selected records, 8-23

Attribute Sampling Techniques, 5-5

C

channel skipping, 3-21 COPY DYCHANEL statements, 3-21

conventions, 1-5

D

Definition of discovery sampling, 9-1

Discovery sampling flowchart, 9-18 generated reports, 9-20 inferences, 9-3 Input Statements, 9-19 Non-Stratified Sampling Summary Report, 9-24 percentage of occurrences and probability, 9-4 sample size and probability, 9-8 Sampling List, 9-22 steps, 9-16 strong inferences, 9-7 syntax for discovery sampling, 9-10 syntax for IF SAMPLING, 9-14 weak inferences, 9-8

Discovery Sampling Worksheet, 9-13

Dispersion, 4-5 deviation, 4-5 non-symmetrical, 4-5

E

Equal Interval Frequency Distribution, 4-36

example, 8-15

example of attribute estimation sampling, 8-15

F

field definition statements, 2-11, 5-12

FILE statement, 2-10, 5-12

File Statistics, 5-16

frequency distribution, 4-1, 4-9 properties of, 4-3

Page 764: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Index–2 Reference Guide

frequency distribution reporting, 4-1

functional components, 1-3

G

goals of VISION, 1-2

H

histogram VALUE histogram, 4-16

HISTOGRAM BOTH, 4-44

I

IF SAMPLING command, 5-13

implement discovery sampling, 9-10

implementing attribute estimation, 8-3

implementing discovery sampling, 9-10

implementing letter writing additional LTD statement, 3-13

Implementing letter writing document definition statements, 3-3 Input statements, 3-2

K

kurtosis Mesokurtic, 4-7 Platykurtic, 4-7

Kurtosis, 4-7 Leptokurtic, 4-7

L

laser option, 3-18

LETTER command, 3-18

Letter writing

features, 3-1 generating the address labels, 3-30 LTD input statements, 3-8 LTH header statement, 3-4 printing with laser option, 3-38 range of letter, 3-34 specifying print length, 3-32 two-up letters, 3-39 using the keyword OPTIMIZE, 3-22 Using TWOUP, 3-39 valid edit codes, 3-14

logarithmic frequency distribution, 4-39

M

maximum tolerable rate of occurrence, 8-7

N

negatively skewed, 4-7

non-stratified sampling technique, 5-6

O

one-sided confidence level, 8-14

P

Positively Skewed Distribution, 4-6

Properties of frequency distributions Central tendency, 4-4

R

Random selection known universe, 7-2 Syntax for unknown universe, 7-4 unknown universe, 7-3

Random Selection input statements, 7-7

Page 765: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION:

Index–3

records selected, 8-23

reporting options, 4-17

S

Sampling, 5-2

sampling functions, 5-9

sampling techniques, 10-2

Simple interval example, 6-4

Simple interval sampling reports, 6-6

Simple interval sampling,, 6-1

simple random sampling, 7-1

Simple random sampling flowchart, 7-6 output and reports, 7-13

Statistical sampling techniques, 5-2

stratified mean estimation sampling, 17-1

Stratified sampling, 14-1 Mean Estimation Method, 14-2 n Simple Random Method, 14-2 Simple Percentage Method, 14-2

stratified sampling technique, 5-6

stratified simple percentage sampling, 16-1

syntax for stratified simple percentage sampling, 16-3

Stratified Simple Random Sampling, 16-5

syntax for attribute estimation, 8-4

syntax for simple interval sampling, 6-3

T

two-sided confidence level, 8-8

types of histograms, 4-14

types of letters, 3-23

Types of random selection, 7-1

V

valid edit codes OPTIMIZE and NOOPTIMIZE, 3-21

Value Sampling Techniques, 5-5

VISION Excel features

functions and features, 1-1 Excel frequency distribution, 4-9

VISION: Results, 1-3

VISION:Results automatic composition, 2-9

Page 766: Advantage VISION: Excel for z/OS - CA Technologies Reference Guide Implementation of Acceptance Sampling10-9 Advantage VISION:Excel Acceptance Sampling Statement10-9 Advantage VISION: