Copying and replacing dates
Data Solutions has a powerful aging function that copies the file and ages the data or ages selected records from any MVS file. The input file and the output file can be different file types (for example, from VSAM to PDS member). The Aging function provides this ability and has special features for copying partitioned datasets (PDS) including member selection based on ISPF statistics like “last changed date”.
This section gives you practice using Data Solutions to age records and copy them to a new file. This example uses the “New” data set allocation feature and the “replace date” function of the aging feature. This example replaces all employee birth dates’ century and year with “2001”.
Accessing aging (Option 1)
The Aging function is located on Data Solutions’ Primary Option Menu as function number 1, as shown in the following figure.
File-AID/Data Solutions Primary Option Menu
OPTION ===> 1
0 Parameters - Data Solutions Parameters USERID - USERID1
1 Date Aging - Date Aging Solutions DATE - 20/12/09
2 Euro Tools - Currency Conversions TIME - 08:39
3 Data Analyzer - Analysis Solutions TERMINAL - 3290A
4 Translator - Data Translator CCSID - 00037
5 Generation - Data Generation Solutions
6 Field Exits - Formatted Field Exits
7 Encryption - Data Encryption
8 Replace - Data Replace
D Data Privacy - Dynamic Privacy Rules
U Utilities - Print and File Override Utilities
S Criteria Sets - Create or modify Criteria sets
R XREF - Create or change record layout cross reference
T Tutorial - Display information about Data Solutions
X Exit - Terminate Data Solutions and return to ISPF
Product Update History: https://support.compuware.com/s/product-updates
Online Technical Support available at: https://support.compuware.com
(c) Copyright 1997-2021 BMC Software, Inc.
- From the Data Solutions Primary Option Menu, select Data Solutions option 1 to access Aging Tools Menu.
- From the Aging Tools Menu, select option 1 to access Input Dataset Specification screen.
Aging Tools Menu
OPTION ===> 1
1 Aging - Date Aging
2 Calculator - Date Calculator
3 Rules - Edit Business Rules
Use END to return to Primary Options Menu
Defining your request
The Input Dataset Specification screen, shown in the below figure, captures:
- Input Dataset
- Record layout and XREF dataset information
- Change Criteria usage (and optionally, Change criteria dataset and member name).
Input Dataset Specification screen
File-AID/Data Solutions - Input Dataset Specification -------------------------
COMMAND ===>
Specify Input Dataset Information:
Dataset name ===> DASAMP.EMPLOYEE
Member name ===> (Blank or pattern for member list)
Disposition ===> OLD
(OLD or SHR)
I/O exit name ===>
Specify Record Layout Information:
Record layout usage ===> S (S = Single; X = XREF)
Record layout dataset ===> DASAMP.LAYOUTS
Member name ===> EMPLOYEE (Blank or pattern for member list)
XREF dataset name ===>
Member name ===> (Blank or pattern for member list)
Specify Criteria Information:
Use existing criteria ===> N (Y = Yes; N = No)
Criteria dataset name ===>
Member name ===> (Blank or pattern for member list)
Specify Business Rules or Field Exits Dataset Information:
Dataset name ===>
- Type DASAMP.EMPLOYEE in the Input Dataset name field.
- Specify S in the Record layout usage field.
- Type DASAMP.LAYOUTS in the Record layout dataset field.
- Type EMPLOYEE in the Member name field.
- Press <Enter>.
Specifying aging criteria
File-AID/Data Solutions displays the Aging Criteria screen, as shown in the following figure.
Aging Criteria Screen
-------------------------------------------------------------------------------
File-AID/Data Solutions ------- Aging Criteria ----------- CREATE NEW CRITERIA
COMMAND ===> SCROLL ===> PAGE
RULES ===> ("*" or pattern for member list)
SET 1 OF 1 EMPLOYEE-MASTER-FILE GBL = N SEL = N
---- FIELD LEVEL/NAME ------- -FORMAT- RO -C- -Y- -M- --D-- --DATE PATTERN-- R
******************************* TOP OF DATA ***********************************
5 EMP-NUMBER 5/AN
5 EMP-LAST-NAME 15/AN
5 EMP-FIRST-NAME 10/AN
5 EMP-MID-INIT 1/AN
5 FILLER 2/AN
5 EMP-TITLE 30/AN
5 EMP-PERSONAL-INFO SYNC 23/GRP
10 EMP-NATL-ID-NUMBER 9/NUM
10 FILLER 1/AN
10 EMP-DATE-OF-BIRTH 6/AN R
20 01
10 EMP-DOB-REDEF REDEFINES EMP-DATE-OF-BIRTH
10 EMP-DOB-REDEF SYNC 6/GRP
15 EMP-DOB-MM 2/NUM
15 EMP-DOB-DD 2/NUM
Valid RO: +, -, R, FM - For list of patterns,leave PATTERN blank.
Commands: SELect, View
Type R (Replace) in the RO column next to EMP-DATE-OF-BIRTH.
- Type 20 in the -C- (Century) column.
- Type 01 in the -Y- (Year) column.
- Press <Enter>.
Selecting the date pattern
File-AID/Data Solutions displays the Available Date Patterns screen, as shown in the following figure. Select a date pattern that matches the date in the record layout.
Available Date Patterns Screen
- Type S to the left of the MMDDYY date pattern.
- Press <Enter>.
File-AID/Data Solutions redisplays the Aging Criteria screen, as shown in the following figure, with the selected date pattern in the DATE PATTERN field. If necessary, you may overtype the date pattern or blank it out to select another date pattern.
Aging Criteria Screen with Criteria and Date Pattern
-------------------------------------------------------------------------------
File-AID/Data Solutions ------- Aging Criteria --------------------------------
COMMAND ===> SCROLL ===> PAGE
RULES ===> ("*" or pattern for member list)
SET 1 OF 1 EMPLOYEE-MASTER-FILE GBL = N SEL = N
---- FIELD LEVEL/NAME ------- -FORMAT- RO -C- -Y- -M- --D-- --DATE PATTERN-- R
******************************* TOP OF DATA ***********************************
5 EMP-NUMBER 5/AN
5 EMP-LAST-NAME 15/AN
5 EMP-FIRST-NAME 10/AN
5 EMP-MID-INIT 1/AN
5 FILLER 2/AN
5 EMP-TITLE 30/AN
5 EMP-PERSONAL-INFO SYNC 23/GRP
10 EMP-NATL-ID-NUMBER 9/NUM
10 FILLER 1/AN
10 EMP-DATE-OF-BIRTH 6/AN R 20 01 MMDDYY N
10 EMP-DOB-REDEF REDEFINES EMP-DATE-OF-BIRTH
10 EMP-DOB-REDEF SYNC 6/GRP
15 EMP-DOB-MM 2/NUM
15 EMP-DOB-DD 2/NUM
Valid RO: +, -, R, FM - For list of patterns,leave PATTERN blank.
Commands: SELect, View
Step:
- Press <PF3> (END) to process.
File-AID/Data Solutions displays the Criteria Menu, as shown in the following figure. You may select another criteria option or press <Enter> to process the current criteria.
Change Criteria Menu
OPTION ===>
- Status -
0 OPTIONS - Selection criteria options default
G GLOBAL - GLOBAL Fields 0 fields
1 DATE AGING - Aging criteria 1 sets
2.1 EURO CONVERSION - Euro Conversion criteria 0 sets
2.2 TRIANGULATION - Currency Triangulation 0 sets
3.1 DATE PATTERN ANALYSIS - Date Pattern criteria 0 sets
3.2 VALIDATION - Validate criteria 0 sets
3.3 DATA ANALYSIS - Data Analysis criteria 0 sets
4 TRANSLATOR - Data Translator criteria 0 sets
5.1 GENERATOR - Data Generator criteria 0 sets
5.2 PATTERN - Pattern Data Generation 0 sets
6 FIELD EXITS - Utilities criteria 0 sets
7 DATA ENCRYPTION - Data Encryption Criteria 0 sets
8 REPLACE - Data Replace Criteria 0 sets
Member list description ===> ______________________________
Long ===> ______________________________________________________________
Description ===> ______________________________________________________________
Commands: VIEW, SAVE, END, CANCEL, ENTER to continue
Press <Enter> to process.
Specifying output
File-AID/Data Solutions displays the Output Specification screen, shown in the following figure. The screen displays the input dataset name previously specified.
Output Specification Screen
COMMAND ===>
Input dataset: USERID1.DASAMP.EMPLOYEE
Specify Output Processing Option:
Option ===> C (A=ANALYZE; C=COPY; U=UPDATE/PREVIEW)
Create audit trail ===> N (Y=Yes; N=No - Valid for UPDATE only)
Audit trail prefix ===>
Specify Output Dataset Information (COPY ONLY):
Dataset name ===> DASAMP.NEWEMPL
Disposition ===> OLD (OLD or SHR)
New VSAM Type ===> (K=KSDS,E=ESDS,R=RRDS,L=LDS,Z=ZFS)
(Blank = Input Dataset Type)
Specify PDS(E) COPY options:
Copy empty members from input ===> NO (Y = Yes; N = No)
Replace like-named members ===> YES (Y = Yes; N = No)
Rename copied members mask ===>
Use ENTER to continue or END to return to Criteria Menu
Use VIEW command to display criteria summary
Use SAVE command to write criteria request
Use CANCEL to restart at Input Specification Panel
- Type C in the Output Processing Option field.
- Type DASAMP.NEWEMPL in the Specify Output Dataset Information (COPY ONLY) field.
- Specify NEW in the Disposition field.
Allocating the output data set for copying
File-AID/Data Solutions displays the Allocate New VSAM Cluster screen, as shown in the following figure. Data Solutions models the new output data set type and allocation parameters on those of the input data set.
Allocate New VSAM Cluster Screen
. COMMAND ===> .
. .
. .
. Component names: .
. Cluster: 'USERID1.DASAMP.NEWEMPL' .
. Data component ===> 'USERID1.DASAMP.NEWEMPL.DATA' .
. Index component ===> 'USERID1.DASAMP.NEWEMPL.INDEX' .
. Dataset type ===> KSDS .
. Owner ID ===> .
. Specify SMS Class Information: .
. Storage ===> STDDODFW .
. Data ===> .
. Management ===> SAMPLE@S .
. .
. Space Allocation: DATA Component INDEX Component (Blank for default) .
. Volume serial ===> PRD914 ===> PRD914 .
. Units ===> TRKS ===> TRKS (TRKs; CYLs; RECs; K; M) .
. Primary ===> 1 ===> 1 (Amount in above units) .
. Secondary ===> 1 ===> 1 (Amount in above units) .
. .
. Key length ===> 5 (1-255) .
. Key position ===> 0 (0-max) .
. Average Recordsize ===> 198 .
. Maximum Recordsize ===> 198 .
. Data Control Interval Size ===> 2048 .
. Index Control Interval Size ===> 2048 .
. Buffer Space ===> 6144 .
. Control Interval Percent Free ===> 0 .
. Control Area Percent Free ===> 0 .
. .
. Allocation Options: .
. Expiration date ===> (YYYY/MM/DD or blank) .
. Reusable ===> YES (Y = Yes; N = No) .
. Region share option ===> 3 (1; 2; 3; 4) .
. System share option ===> 3 (3; 4) .
. Write check ===> NO (Y = Yes; N = No) .
. Erase on delete ===> NO (Y = Yes; N = No) .
. Extended Attributes ===> (EATTR: O = Opt; N = No) .
. Exception-Exits .
. Data Component ===> .
. Index Component ===> .
. Load option ===> RECOV (S = Speed; R = Recovery) .
. Spanned records ===> NO (Y = Yes; N = No) .
. RLS ===> (E=RLSENABLE; Q=RLSQUIESCE) .
. LOGREPLICATE ===> (L=LOGREPLICATE; N=NOLOGREPLICATE) .
. LOG ===> (N=NONE; U=UNDO; A=ALL) .
. LOGSTREAMID .
. (Fully Qualified Name) ===> .
. Encryption: .
. Keylabel (Name of the Key Label to be used for encryption) .
. ===> .
. Account Information ===> .
. FRLOG (Batch Logging) ===> (N=NONE; U=UNDO; R=REDO; A=ALL) .
. BWO (Backup While Open) ===> (C=TYPECICS; I=TYPEIMS; N=NO) .
. .
. Multiple Volumes ===> NO (Y = Yes; N = No) .
. .
. Use ENTER to Allocate Dataset, END to cancel request .
. .
You can modify the allocation parameters by overtyping them. Then press <Enter>.
Specifying the copy execution options
File-AID/Data Solutions displays the Copy Execution Options screen, as shown in the following figure. You may perform the Copy processing online at your terminal or generate JCL for Batch execution to run your request as a background job in MVS.
The Maximum invalid fields field allows you to specify the number of invalid dates to allow Data Solutions to discard (skip) before cancelling the aging process. If 1 (one) is specified, Data Solutions stops when it encounters the first invalid date. 0 (zero) or All processes the entire file and discards (skips) all invalid dates.
In addition, you can save the change criteria that you just specified. Specify Y in the Save change criteria field and enter a change criteria dataset and member name. You can enter an optional member description that Data Solutions displays on the change criteria dataset member list. The longer description field information is added as comments to the change criteria member.
COPY Execution Options Screen
COMMAND ===>
Specify Execution Options:
Process online or batch ===> O (O = Online; B = Batch)
Maximum invalid fields ===> ALL (All or number of invalid fields)
Display invalid fields ===> Y (Y = Yes; N = No)
Maximum changes ===> ALL (All or number of changes)
Specify Change Criteria Information:
Save change criteria ===> Y (Y = Yes; N = No)
Change criteria dataset ===> DASAMP.CHGCRIT
Member name ===> REPBDAY (Blank or pattern for memberlist)
Member description ===> ______________________________
Long ===> ______________________________________________________________
Description ===> ______________________________________________________________
Use ENTER to execute COPY
Use VIEW command to display criteria summary
Use END to return to Output Specification Panel
Use CANCEL command to restart at Input Specification Panel
- Type Y in the Save change criteria field.
- Type DASAMP.CHGCRIT in the Change criteria dataset field.
- Type REPBDAY in the Member name field.
Press <Enter>.
Message Criteria REPBDAY added confirms that a new Change Criteria member has been added.
- Press <Enter> to continue.
A report screen opens displaying the number of records read and selected, the number of fields changed, and the number of invalid items. See the following figure.
Copy Report Screen
-------------------------------------------------------------------------------
BROWSE USERID1.DASOLUTN.WF.D04050.T084456 50 RECORDS COPIED
Command ===> Scroll ===> PAGE
********************************* Top of Data **********************************
SET 1 DAGE-====================================================================
SET 1 DAGE-Records Read 50, Selected 50, Fields Changed 50, Invalid 0
******************************** Bottom of Data ********************************
Press <PF3> (END) to process.
File-AID/Data Solutions displays the Copy Print Report screen, as shown in the following figure.
Copy Print Report Screen
COMMAND ===>
Print execution report ===> N (Y = Yes; N = No)
Instructions:
Use ENTER to perform above action and return to the initial screen
Use END to exit without PRINT
Press <PF3> (END) to finish.
Related topics