In this section: |
In FOCUS 7.6.12, a new version of AUTOIDMS is available that enables you to choose whether to create OCCURS segments for repeating fields with a fixed number of occurrences. In addition, DB2 Version 10 runtime software is available and can be used with any supported version of FOCUS.
How to: |
AUTOIDMS automatically creates Master Files and Access Files for CA-IDMS network and LRF records, based on information stored in the IDMS Integrated Data Dictionary and user selections.
In prior releases, when the IDMS record contained a repeating field, AUTOIDMS always created a separate child segment in the Master File, called an OCCURS segment, to describe the portion of the record containing the repeating field. Starting in Version 7.6.12, you can specify whether AUTOIDMS should create an OCCURS segment for repeating fields with a fixed number of occurrences, or whether the repetitions should be described as individual fields in the parent segment.
All of the prerequisites for running AUTOIDMS are the same as those described in the CA-IDMS Data Adapter User’s Manual (DN1000049.0701). Please refer to that manual for a complete description of AUTOIDMS processing.
To start AUTOIDMS, enter the FOCUS environment and issue the following command at the FOCUS prompt:
EX AUTOIDMS
The Main Menu opens:
Main Menu Master File Generation Facility for IDMS/R Information Builders, Inc. IDMS Subschema Name to be Used =====> Master Filename ====================> DBName ====> DictName ====> Secondary Dictionary=> ( ) Description will be a member of: Master Target PDS => USERID.MASTER.DATA Access Target PDS => USERID.FOCIDMS.DATA Replace Existing Description? ===> N (Y/N) Exclude Comments from MFD? ===> N (Y/N) Exclude Description from MFD? ===> N (Y/N) Include Occurs in MFD? ===> Y (Y/N) Field Information Use Record ID Suffix in Name? ===> Y (Y/N) Start with Element Name Position => 1 (1-32) for a Total Length of => 32 (1-32) Describe Numeric Displays as => A (N-Numeric,A-A lpha) Parm File => USERID.FOCIDMS.DATA PF1=Help PF3=Exit PF4=Log PF5=TED MFD PF6=TED AFD PF9=Picture PF10=List
The new option is represented by the following line:
Include Occurs in MFD? ===> Y (Y/N)
The default (Y) creates OCCURS segments for all repeating fields. The non-repeating fields in the record are described in a parent segment, and the repeating fields are described in a child segment with the OCCURS attribute.
If you change the value to N, when a repeating field has a fixed number of occurrences, separate fields are generated for each repetition in the same segment as the non-repeating fields.
This sample session creates a Master File in which repeating fields with a fixed number of repetitions are listed as a separate OCCURS segment in the Master File.
Enter the following information:
Also, to make the Master File shorter and more readable, change the following default entries:
Note: If you want to save these selections, press PF4 after entering them in order to save them to your log file.
The following shows the main menu with the choices specified:
Main Menu Master File Generation Facility for IDMS/R Information Builders, Inc. IDMS Subschema Name to be Used =====> EMPSS01 Master Filename ====================> EMPFULL1 DBName ====> EMPDEMO DictName ====> APPLDICT Secondary Dictionary=> ( ) Description will be a member of: Master Target PDS => USERID.MASTER.DATA Access Target PDS => USERID.ACCESS.DATA Replace Existing Description? ===> Y (Y/N) Exclude Comments from MFD? ===> Y (Y/N) Exclude Description from MFD? ===> Y (Y/N) Include Occurs from MFD? ===> Y (Y/N) Field Information Use Record ID Suffix in Name? ===> N (Y/N) Start with Element Name Position => 1 (1-32) for a Total Length of => 32 (1-32) Describe Numeric Displays as => A (N-Numeric,A-A lpha) Parm File => USERID.FOCIDMS.DATA PF1=Help PF3=Exit PF4=Log PF5=TED MFD PF6=TED AFD PF9=Picture PF10=Lis
Press Enter. The following message displays:
**======================================================** ** AUTOIDMS is retrieving information from IDD ** ** Please wait... ** **======================================================**
When AUTOIDMS finishes retrieving information from the IDD, the Root Record Selection screen opens.
Select COVERAGE to be the root segment in the generated Master File:
Subschema :EMPSS01 Master File Generation Facility for IDMS/R Master :EMPFULL1 ==Root Record Selection== Dictionary: Place an 'X' next to the record to be the root of the Master X Record Name Index Type Calc? ID - ----------- ---------- ----- -- X COVERAGE NONE N 0400 DENTAL-CLAIM NONE N 0405 DEPARTMENT NONE Y 0410 EMPLOYEE INTEGRATED Y 0415 EMPOSITION NONE N 0420 EXPERTISE NONE N 0425 HOSPITAL-CLAIM NONE N 0430 INSURANCE-PLAN NONE Y 0435 JOB INTEGRATED Y 0440 NON-HOSP-CLAIM NONE N 0445 OFFICE NONE Y 0450 SKILL INTEGRATED Y 0455 PF1=Help PF3=End PF7=Up PF8=Down
When you press Enter, the Record/Set Selection screen opens. Select DENTAL-CLAIM, HOSPITAL-CLAIM, NON-HOSP-CLAIM, and EMPLOYEE to be the descendants of COVERAGE:
Subschema :EMPSS01 Master File Generation Facility for IDMS/R Segments Dictionary: Place an 'X' next to each record/set to be a descendant of SEGNAME: S0400_001 Record: COVERAGE Parent: Set: Owner/ Own No. X Record Name Set Name Member Ptr Occ - ----------- -------- ------ --- --- X DENTAL-CLAIM COVERAGE-CLAIMS M N 1 X HOSPITAL-CLAIM COVERAGE-CLAIMS M N 1 X NON-HOSP-CLAIM COVERAGE-CLAIMS M N 2 X EMPLOYEE EMP-COVERAGE O Y PF1=Help PF2=Restart PF3=End PF4=None PF5=Picture PF7=Up PF8=Down
When you press Enter, the Record/Set Selection screen opens so you can select descendants for EMPLOYEE. Select DEPARTMENT, EMPOSITION, EXPERTISE, STRUCTURE (from the MANAGES set), AND OFFICE:
Subschema :EMPSS01 Master File Generation Facility for IDMS/R Segments Dictionary: Place an 'X' next to each record/set to be a descendant of SEGNAME: S0415_005 Record: EMPLOYEE Parent: COVERAGE Set: EMP-COVERAGE Owner/ Own No. X Record Name Set Name Member Ptr Occ - ----------- -------- ------ --- --- X DEPARTMENT DEPT-EMPLOYEE O Y X EMPOSITION EMP-EMPOSITION M Y X EXPERTISE EMP-EXPERTISE M Y X STRUCTURE MANAGES M Y X OFFICE OFFICE-EMPLOYEE O Y 1 STRUCTURE REPORTS-TO M Y PF1=Help PF2=Restart PF3=End PF4=None PF5=Picture PF7=Up PF8=Down
Next Select JOB as the descendant of EMPOSITION:
Subschema :EMPSS01 Master File Generation Facility for IDMS/R Segments Dictionary: Place an 'X' next to each record/set to be a descendant of SEGNAME: S0420_007 Record: EMPOSITION Parent: EMPLOYEE Set: EMP-EMPOSITION Owner/ Own No. X Record Name Set Name Member Ptr Occ - ----------- -------- ------ --- --- X JOB JOB-EMPOSITION O Y 3 PF1=Help PF2=Restart PF3=End PF4=None PF5=Picture PF7=Up PF8=Down
Select SKILL as the descendant of EXPERTISE:
Subschema :EMPSS01 Master File Generation Facility for IDMS/R Segments Dictionary: Place an 'X' next to each record/set to be a descendant of SEGNAME: S0425_008 Record: EXPERTISE Parent: EMPLOYEE Set: EMP-EXPERTISE Owner/ Own No. X Record Name Set Name Member Ptr Occ - ----------- -------- ------ --- --- X SKILL SKILL-EXPERTISE O Y PF1=Help PF2=Restart PF3=End PF4=None PF5=Picture PF7=Up PF8=Down
Next, the Record/Set Selection screen for EMPLOYEE displays again. There are no descendant segments, so press PF4.
When you press PF4, AUTOIDMS creates the Master and Access Files. The main menu displays with the message DESCRIPTION CREATED at the bottom:
Main Menu Master File Generation Facility for IDMS/R Information Builders, Inc. IDMS Subschema Name to be Used =====> EMPSS01 Master Filename ====================> EMPFULL1 DBName ====> EMPDEMO DictName ====> APPLDICT Secondary Dictionary=> ( ) Description will be a member of: Master Target PDS => USERID.MASTER.DATA Access Target PDS => USERID.ACCESS.DATA Replace Existing Description? ===> Y (Y/N) Exclude Comments from MFD? ===> Y (Y/N) Exclude Description from MFD? ===> Y (Y/N) Include Occurs from MFD? ===> Y (Y/N) Field Information Use Record ID Suffix in Name? ===> N (Y/N) Start with Element Name Position => 1 (1-32) for a Total Length of => 32 (1-32) Describe Numeric Displays as => A (N-Numeric,A-A lpha) Parm File => USERID.FOCIDMS.DATA DESCRIPTION CREATED - 82 DUPLICATE FIELDNAMES FOUND PF1=Help PF3=Exit PF4=Log PF5=TED MFD PF6=TED AFD PF9=Picture PF10=List
To view or edit the generated Master File using TED from within AUTOIDMS, press PF5. A partial listing of the Master File follows. The segment OCC003_01 has two occurrences of the DIAGNOSIS field. The position of the OCCURS segment is after the DISCHARGE_DAY field:
GROUP=DISCHARGE_DATE ,ALIAS=F0430_26 ,A8 ,A8 FIELD=DISCHARGE_YEAR ,ALIAS=F0430_27 ,A4 ,A4 FIELD=DISCHARGE_MONTH ,ALIAS=F0430_28 ,A2 ,A2 FIELD=DISCHARGE_DAY ,ALIAS=F0430_29 ,A2 ,A2 FIELD=S003_OCC01 ,ALIAS= ,A120 ,A120 . . . GROUP=OTHER_CHARGES ,ALIAS=F0430_41 ,A24 ,A15 FIELD=DELIVERY_COST ,ALIAS=F0430_42 ,P11.2 ,P5 FIELD=ANESTHESIA_COST ,ALIAS=F0430_43 ,P11.2 ,P5 FIELD=LAB_COST ,ALIAS=F0430_44 ,P11.2 ,P5 FIELD=S0430_003_KEY ,ALIAS=DBKEY ,I11 ,I4 SEGNAME=OCC003_01,SEGTYPE=S,PARENT=S0430_003, OCCURS=0002,POSITION=S003_OCC01,$ FIELD=DIAGNOSIS ,ALIAS=F0430_30 ,A60 ,A60 FIELD=OCC003_01 ,ALIAS=ORDER ,I9 ,I4 SEGNAME=S0445_004,SEGTYPE=S,PARENT=S0400_001,$ GROUP=CLAIM_DATE ,ALIAS=F0445_1 ,A8 ,A8 FIELD=CLAIM_YEAR ,ALIAS=F0445_2 ,A4 ,A4 FIELD=CLAIM_MONTH ,ALIAS=F0445_3 ,A2 ,A2 FIELD=CLAIM_DAY ,ALIAS=F0445_4 ,A2 ,A2 GROUP=PATIENT_NAME ,ALIAS=F0445_5 ,A25 ,A25 FIELD=PATIENT_FIRST_NAME ,ALIAS=F0445_6 ,A10 ,A10 FIELD=PATIENT_LAST_NAME ,ALIAS=F0445_7 ,A15 ,A15 GROUP=PATIENT_BIRTH_DATE ,ALIAS=F0445_8 ,A8 ,A8
In order to list repeating fields with a fixed number of occurrences as separate fields, change the following entries and execute AUTOIDMS again with the same selections:
Main Menu Master File Generation Facility for IDMS/R Information Builders, Inc. IDMS Subschema Name to be Used =====> EMPSS01 Master Filename ====================> EMPFULL2 DBName ====> EMPDEMO DictName ====> APPLDICT Secondary Dictionary=> ( ) Description will be a member of: Master Target PDS => USERID.MASTER.DATA Access Target PDS => USERID.ACCESS.DATA Replace Existing Description? ===> Y (Y/N) Exclude Comments from MFD? ===> Y (Y/N) Exclude Description from MFD? ===> Y (Y/N) Include Occurs from MFD? ===> N (Y/N) Field Information Use Record ID Suffix in Name? ===> N (Y/N) Start with Element Name Position => 1 (1-32) for a Total Length of => 32 (1-32) Describe Numeric Displays as => A (N-Numeric,A-A lpha) Parm File => USERID.FOCIDMS.DATA PF1=Help PF3=Exit PF4=Log PF5=TED MFD PF6=TED AFD PF9=Picture PF10=List
Making the same selections as before, the new partial Master File follows. Now, instead of a segment for the two DIAGNOSIS fields, there are two separate field names, DIAGNOSIS01 and DIAGNOSIS02. Just as before, they are positioned following the DISCHARGE_DAY field:
GROUP=DISCHARGE_DATE ,ALIAS=F0430_26 ,A8 ,A8 FIELD=DISCHARGE_YEAR ,ALIAS=F0430_27 ,A4 ,A4 FIELD=DISCHARGE_MONTH ,ALIAS=F0430_28 ,A2 ,A2 FIELD=DISCHARGE_DAY ,ALIAS=F0430_29 ,A2 ,A2 FIELD=DIAGNOSIS01 ,ALIAS=F0430_3001 ,A60 ,A60 FIELD=DIAGNOSIS02 ,ALIAS=F0430_3002 ,A60 ,A60 GROUP=HOSPITAL_CHARGES ,ALIAS=F0430_31 ,A72 ,A41 GROUP=ROOM_AND_BOARD ,ALIAS=F0430_32 ,A48 ,A26 GROUP=WARD ,ALIAS=F0430_33 ,A24 ,A13 FIELD=WARD_DAYS ,ALIAS=F0430_34 ,P6 ,P3 FIELD=WARD_RATE ,ALIAS=F0430_35 ,P11.2 ,P5 FIELD=WARD_TOTAL ,ALIAS=F0430_36 ,P11.2 ,P5 GROUP=SEMI_PRIVATE ,ALIAS=F0430_37 ,A24 ,A13 FIELD=SEMI_DAYS ,ALIAS=F0430_38 ,P6 ,P3 FIELD=SEMI_RATE ,ALIAS=F0430_39 ,P11.2 ,P5 FIELD=SEMI_TOTAL ,ALIAS=F0430_40 ,P11.2 ,P5 GROUP=OTHER_CHARGES ,ALIAS=F0430_41 ,A24 ,A15 FIELD=DELIVERY_COST ,ALIAS=F0430_42 ,P11.2 ,P5 FIELD=ANESTHESIA_COST ,ALIAS=F0430_43 ,P11.2 ,P5
The DB2 version 10 run-time software library is named DSNA10.SDSNLOAD. In your JCL for running the Adapter for DB2, this software library must be concatenated to the datasets allocated to DDNAME STEPLIB.
For batch access, you must submit JCL that allocates the required libraries. If the adapter was installed with the Call Attachment Facility, you can use the following sample JCL after editing it to conform to your site’s standards and adding a JOB card:
//JOB card goes here //BATCAF EXEC PGM=FOCUS //STEPLIB DD DISP=SHR,DSN=prefix.FOCSQL.LOAD // DD DISP=SHR,DSN=prefix.FOCLIB.LOAD // DD DISP=SHR,DSN=prefix.FUSELIB.LOAD // DD DISP=SHR,DSN=DSNA10.SDSNLOAD //ERRORS DD DISP=SHR,DSN=prefix.ERRORS.DATA //FOCEXEC DD DISP=SHR,DSN=user.FOCEXEC.DATA // DD DISP=SHR,DSN=prefix.FOCEXEC.DATA //MASTER DD DISP=SHR,DSN=user.MASTER.DATA // DD DISP=SHR,DSN=prefix.MASTER.DATA //FOCSQL DD DISP=SHR,DSN=user.FOCSQL.DATA // DD DISP=SHR,DSN=prefix.FOCSQL.DATA //SYSPRINT DD SYSOUT=A //SYSIN DD * [SQL DB2 SET SSID ssid ] [SQL DB2 SET PLAN plan ] TABLE FILE db2table. . . END FIN /*
where:
Is the high-level qualifier for your site’s FOCUS production libraries.
Is the high-level qualifier for your private version of a library.
Is the DB2 subsystem identifier, used to access a subsystem other than the default.
Is the name of the adapter application plan, required to use a plan other than the default plan.
Is the name of the Master File for the DB2 table or view.
If the adapter was installed to use the TSO Attachment Facility, execute the TSO batch program, IKJEFT01, which in turn calls FOCUS. You can use the following sample JCL after editing it to conform to your site’s standards and adding a JOB card
//JOB card goes here //BATTSO EXEC PGM=IKJEFTO1 //STEPLIB DD DISP=SHR,DSN=prefix.FOCSQL.LOAD // DD DISP=SHR,DSN=prefix.FOCLIB.LOAD // DD DISP=SHR,DSN=prefix.FUSELIB.LOAD // DD DISP=SHR,DSN=DSNA10.SDSNLOAD //ERRORS DD DISP=SHR,DSN=prefix.ERRORS.DATA //FOCEXEC DD DISP=SHR,DSN=user.FOCEXEC.DATA // DD DISP=SHR,DSN=prefix.FOCEXEC.DATA //MASTER DD DISP=SHR,DSN=user.MASTER.DATA // DD DISP=SHR,DSN=prefix.MASTER.DATA //FOCSQL DD DISP=SHR,DSN=user.FOCSQL.DATA // DD DISP=SHR,DSN=prefix.FOCSQL.DATA //SYSPRINT DD SYSOUT=A //SYSTSPRT DD SYSOUT=A //SYSTSIN DD * DSN SYSTEM(ssid) RUN PROGRAM(FOCUS) PLAN(plan) LIBRARY('prefix.FOCLIB.LOAD') END //SYSIN DD * TABLE FILE db2table. . . END FIN /*
where:
Is the high-level qualifier for your site’s FOCUS production libraries.
Is the high-level qualifier for your private version of a library.
Is the DB2 subsystem identifiert.
Is the name of the adapter application plan.
Is the name of the Master File for the DB2 table or view.
To run FOCUS interactively, you invoke a CLIST from TSO using standard FOCUS allocations for DDNAMEs FOCEXEC, ERRORS, and MASTER. Also include allocations for DDNAMEs FOCSQL, USERLIB, TASKLIB, and FOCLIB. Allocate FOCSQL to the library containing FOCUS Access Files; allocate FOCLIB to the FOCUS product load library. Add the allocations for the FOCUS and adapter load libraries to USERLIB; allocate TASKLIB to the DB2 runtime software library. You can allocate the FOCUS and adapter load libraries (both from the same release and Maintenance Level of FOCUS) directly in your CLIST, or your site may choose to allocate them to DDNAME STEPLIB in your TSO logon procedure.
If the FOCUS load libraries are not allocated in your TSO logon procedure, use the following CLIST after editing it to conform to your site’s standards. This CLIST assumes that the adapter was installed with the Call Attachment Facility (CAF)
PROC 0 CONTROL MSG NOLIST NOFLUSH VYCSTEP RESET ALLOC F(TASKLIB) DA('DSNA10.SDSNLOAD') SHR REU VYCSTEP SET(TASKLIB) ALLOC F(FOCEXEC) DA('user.FOCEXEC.DATA' - 'prefix.FOCEXEC.DATA') SHR REUSE ALLOC F(MASTER) DA('user.MASTER.DATA' - 'prefix.MASTER.DATA') SHR REUSE ALLOC F(FOCSQL) DA('user.FOCSQL.DATA' - 'prefix.FOCSQL.DATA') SHR REUSE ALLOC F(TRF) DA('user.TRF.DATA' - 'prefix.FOCSQL.DATA') SHR REUSE ALLOC F(ERRORS) DA('prefix.ERRORS.DATA') SHR REUSE ALLOC F(USERLIB) DA('prefix.FOCSQL.LOAD' - 'prefix.FOCLIB.LOAD' - 'prefix.FUSELIB.LOAD') SHR REUSE ALLOC F(FOCLIB) DA('prefix.FOCLIB.LOAD') SHR REUSE CALL 'prefix.FOCLIB.LOAD(FOCUS)'
where:
Is the high-level qualifier for your site’s FOCUS production libraries.
Is the high-level qualifier for your private version of a library.
Note: The allocation for DDNAME TRF (a FOCUS Window Transfer File PDS) is included because it is required for the FOCUS EXPLAIN utility.
If the adapter was installed to use TSO Attachment, replace the CALL statement in the previous CLIST with the following lines
DSN SYSTEM(ssid) RUN PROGRAM(FOCUS) PLAN(plan) LIBRARY('prefix.FOCLIB.LOAD') END
where:
Is the DB2 subsystem identifier.
Is the name of the adapter Application Plan.
Is the high-level qualifier for your site’s FOCUS production libraries.
Your DB2 database administrator can supply the parameters and the attachment facility chosen at the time the adapter was installed.
If you want to allocate the FOCUS and adapter load libraries in the TSO logon procedure, use the following JCL as a model. Alter the preceding CLIST to eliminate the allocations for DDNAMEs FOCLIB, TASKLIB, and USERLIB. Concatenate the libraries to DDNAME STEPLIB as in the following sample:
//LOGON EXEC PGM=IKJEFT01,DYNAMNBR=25 //STEPLIB DD DSN=prefix.FOCSQL.LOAD,DISP=SHR // DD DSN=prefix.FOCLIB.LOAD,DISP=SHR // DD DSN=prefix.FUSELIB.LOAD,DISP=SHR // DD DSN=DSNA10.SDSNLOAD,DISP=SHR
Information Builders |