450 likes | 1.57k Views
An Overview of Advantage CA-Culprit for CA-IDMS. Brock Shaw (Author Carla Pereira, CA).
E N D
An Overview of Advantage CA-Culprit for CA-IDMS Brock Shaw (Author Carla Pereira, CA) (c) 2003 Computer Associates International, Inc.(CA) All trademarks, trade names, service marks and logos herein belong to their respective referenced companies. CA confidential and proprietary information for CA internal use only. No unauthorized copying or distribution permitted.
Topics of Discussion • What is Advantage CA-Culprit forCA-IDMS? • Processing Phases • Basic Parameter Types • Advantage CA-IDMS Database Access • JCL Considerations • Debugging
IDD VSAM Sequential IDMS CARD CARD CULPRIT VSAM IDMS Sequential Advantage CA-Culprit for CA-IDMS INPUT DATABASES INPUT FILES OUTPUT FILES STORED TABLES PRINTED REPORTS SPECIAL FORMS
PARAMETERS COPIED PARAMETERS Sequential Parameter Listing Precompile Phase (CULP0) PARAMETER VALIDATION PARAMETER SORT Parameter Sort Input Parameter Listing Compile Phase (CULL) BUILD CODE Run-Time Messages Extract Phase (CULL) INPUT EXTRACT DATA Processing Phases
NO YES Sort Required? Unsorted Extracted Items and Statistics No Sort Extracted Items SORT Data Sort Sorted Extracted Items and Statistics Edit and Total Processing Output Phase (CULE) REPORTS Processing Phases (cont.)
General Coding Considerations • All parameters must be in uppercase • Column 1 blank • Columns 72-80 ignored • Continuation denoted by * in column 1 • Comments denoted by $ • Blank and comma interchangeable are delimiters
Input Parameters • PROFILE • Used on a run-by-run basis to override system defaults • INPUT • Describes each input file • REC • Defines the fields in the input file • Automatically generated for database records
Input Parameters (cont.) • SELECT • Used when all reports in a single run want the same subset of records • Can apply to specific INPUT files or database PATHs
Output Parameters • OUTPUT • Describes output report or file • SORT • Specifies order of detail lines in each report • Specifies control breaks (subtotals) • TITLE • Describes 1 to 50 character title line printed at the top of each page
Output Parameters (cont.) • Edit (4,5,6) • Defines output lines for each report • Header (type 4) • Detail (type 5) • Total (type 6) • At least one detail (5) per report required • Specifies output items, location and editing options
Output Parameters (cont.) • Process (7,8) • Logic for processing the data • Type 7 executed against the input file to create the extract file • Type 8 executed against the sorted extract file when a control break occurs • LEVL indicates current subtotal level in Type 8 logic
Control PERFORM/RETURN CALL PICK/UNPICK RELS TAKE DROP Type 7 Operations Arithmetic ADD (+) MINUS (S) (-) TIMES (X) DIVIDE (/) COMPUTE (C) • Conditional • IF • EOF • B (GOTO) • Assignment MOVE CONVERT
Other Basic Parameters • Work field (0) • Defines new fields not found in input file • Alphanumeric or numeric • =MACRO, =COPY, USE • Copy stored code into parameter stream from • IDD • PDS • Source Statement Library • AllFusion Panvalet Library • AllFusion Librarian Library
Other Basic Parameters (cont.) • CALL • Used to invoke a procedure module from processing logic (type 7) • CA-supplied user modules or user-written • US12 • Century date conversion routine • US00 • Interface to routine which was not written specifically for Advantage CA-Culprit • LO91988(MVS) or LO92554(VSE): modules called via US00 can be RMODE 31 and do not need RTEREUS=YES
Advantage CA-IDMS Database Retrieval • DATABASE Parameter • INPUT Parameter • PATH Parameter • KEY/KEYFILE Parameter • DB-EXIT Facility • Miscellaneous Structures
DATABASE Parameter • Optional, but if specified must precede all other parameters • DICTNAME • DICTNODE • DBNAME • DBNODE
INPUT Parameter • Database options • DB(D) • SS=subschema (schema) (version)
PATH Parameter • Describes the records and order of their retrieval from the database • Establishes a common entry record • Specifies set relationships • Allows Advantage CA-Culprit to process incomplete paths • Indicates whether an index set will be used
Rules for Coding PATHs • The entry record can be any record type, and the path can proceed from owner to member of member to owner • When a record is retrieved using an owner to member traversal, the next record on the path must be related directly to the member record • When a record is retrieved using a member to owner traversal, the next record can be related directly to the owner record or to any previous record on the path as long as that previous record, and any intervening records, were retrieved in a member to owner traversal
PATHB5 DEPARTMENT JOB PATHRR DEPARTMENT EMPLOYEE OFFICE PATHM1 EMPLOYEE EXPERTISE SKILL OFFICE PATH22 EXPERTISE EMPLOYEE OFFICE SKILL Rules for Coding PATHs (cont.) • Based on the data structure diagram, are the following PATHs valid?
Multiple PATH Parameters • Allows navigation of the database in more than one way • Entry record must be the same on each path
PATHZZ DEPARTMENT EMPLOYEE *EMPOSITION JOB PATHYY DEPARTMENT EMPLOYEE PATHZZ DEPARMENT EMPLOYEE *EMPOSITION JOB Multiple PATH Parameters (cont.) • In this path, not all employees will be retrieved • An additional path will need to be coded
PATHYY DEPARTMENT EMPLOYEE(Y2)*EMPOSITION(Y3) JOB Alternate PATH-ID • Allows incomplete paths to be returned
KEY/KEYFILE • Limits access to the database by limiting retrieval of the entry record • KEYs must be a CALC, Index or dbkey • Can specify a value or range of values • KEY statement coded directly in report • KEYFILE contains a file of keys and optionally other fields to be used by report
DB-EXIT • Access database record from 7 logic • Define dummy path (PATH --) • IDMS-STATUS contains Advantage CA-IDMS return code • For invalid call, IDMS-STATUS set to *00n • Can be used in conjunction with automatic path or alone
Miscellaneous Structures • Indexed records • Qualify the record on path with index set name • Bill of material (nested) structure • Qualify fields with occurrence number • Multiple-Member sets • ALL-MEMBERS option • Logical Records • Can specify where clause on path
Advantage CA-IDMS Database SQL Option • Advantage CA-Culprit can perform for the following operations on an Advantage CA-IDMS SQL defined-database • Read rows • Add/Update/Delete rows • Create tables • Drop tables
Parameter Considerations for SQL • INPUT • DB(Q), SQL=(FIPS,ANSI,CAX) • SQL • Specify the SQL query • REC • Automatically generated • fieldname_NULL_IND for NULL indicators • OUTPUT • SQLTABLE= • TYPE=CREATE/ADD/REPLACE/DROP
JCL Considerations • One-step JCL • Five-step JCL • Default file assignments
Debugging • Listings • Forced Buffer Dump • CULLUS48 • Display Intermediate Results • Advantage CA-Culprit Manuals
Listings • PARAM=LIST/NOLIST • Sequential Parameter Listing • Input Parameter Listing • Run Time Messages
010 ZERO 0 017 ZERO / ZERO ZERO Forced Buffer Dump • Issue divide by zero in 7-logic
017 CALL US48(‘0Entering this logic %%’) CULLUS48 • Add your own messages to the Run-time Message section • The message can be an alphanumeric work field up to 132 characters • The message must begin with a carriage control character and end with %%
Advantage CA-Culprit Manuals • Reference • User Guide • User Module Manual • Error Codes and Messages
Session Summary • Advantage CA-Culprit is a powerful tool for creating reports from sequential files and Advantage CA-IDMS databases.