• Keine Ergebnisse gefunden

A number of subschemas can be compiled with one c o n t r o l s t a t e m e n t c a l l t o t h e D D L F c o m p i l e r. T h e parameters specified in the control statement apply t o a l l t h e s u b s c h e m a s . T h e s u b s c h e m a l i b r a r y m a i n t e n a n c e o p e r a t i o n s o f c r e a t i n g a s u b s c h e m a l i b r a r y, o f a d d i n g ( d e f a u l t o p e r a t i o n ) s u b s c h e m a s t o t h e s u b s c h e m a l i b r a r y, o f r e p l a c i n g ( R p a r a m eter) subschemas in the library, or of just compil ing (N parameter) subschemas can be used with this f a c i l i t y .

For the compilation of several subschemas with one c o n t r o l s t a t e m e n t c a l l t o t h e D D L F c o m p i l e r, t h e subschema source statements must be contiguous, w i t h n o i n t e r v e n i n g e n d - o f - r e c o r d i n d i c a t o r o r

/SffiBiK

NOS Operating System Job statement

USER control statement CHARGE control statement ATTACH,SCHPAY.

DDLF,F5,SB=SBTST,N,SC=SCHPAY.

End-of-record

DDL Subschema Source Input E n d - o f - i n f o r m a t i o n

NOS/BE Operating System Job statement

ACCOUNT control statement ATTACH,SCHPAY,ID=DDL.

DDLF,F5,SB=SBTST,N,SC=SCHPAY.

End-of-record

DDL Subschema Source Input E n d - o f - i n f o r m a t i o n

Figure 4-18. Compiling a Subschema

NOS Operating System Job statement

USER control statement CHARGE control statement ATTACH,SCHPAY.

DEFINE,SUBSCH/PW=DDL,CT=PU,M=W.

DDLF,F5,SB=SUBSCH,SC=SCHPAY.

End-of-record

DDL Subschema Source Input E n d - o f - i n f o r m a t i o n

NOS/BE Operating System Job statement

ACCOUNT control statement ATTACH,SCHPAY,ID=DDL.

REQAJEST,SUBSCH,PF.

DDLF,F5,SB=SUBSCH,SC=SCHPAY.

CATALOG,SUBSCH,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.

End-of-record

DDL Subschema Source Input End-of-i n fo rmat i on

Figure 4-19. Creating a Subschema Library

/£p^v

e n d - o f - i n f o r m a t i o n i n d i c a t o r. T h e p r o g r a m s o u r c e for each subschema must begin with the SUBSCHEMA statement. Each subsequent SUBSCHEMA statement must immediately follow the END statement of the preceding subschema. Each subschema Is compiled in t u r n u n t i l e n d - o f - i n f o r m a t i o n o r e n d - o f - r e c o r d i s encountered.

Compiling a Subschema and Adding to a Subschema Library

Once the subschema library has been created and made a permanent file (as described in the Creating a Subschema Library subsection), new subschemas can b e a d d e d t o t h e l i b r a r y. T h e f o r m o f t h e D D L F control statement necessary to add a subschema to an existing subschema library is as follows:

DDLF,F5,SB=lfn,SC=lfn.

The SB and SC parameters are optional and have default values. The I, L, and LO parameters must b e s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t a p p l i c a b l e f o r i n p u t a n d o u t p u t fi l e s o r f o r t h e l i s t i n g o p t i o n ( r e f e r t o t h e D D L F C o n t r o l S t a t e m e n t s u b s e c t i o n ) .

Figure 4-20 illustrates a job that adds a subschema to the subschema library created by the example in fi g u r e 4 - 1 9 . T h e s c h e m a d i r e c t o r y i s a t t a c h e d . T h e s u b s c h e m a l i b r a r y i s a l s o a t t a c h e d w i t h t h e applicable password and (for NOS only) access mode M=W specified.

Each subschema stored in the library must have a unique name. If the subschema being added to the library has the same name as a subschema already s t o r e d i n t h e l i b r a r y, a d i a g n o s t i c i s i s s u e d a n d the job is aborted.

Replacing a Subschema

A new subschema can replace one that is stored in t h e s u b s c h e m a l i b r a r y . T h e f o r m o f t h e D D L F control statement necessary to replace a subschema in the subschema library is as follows:

D D L F , F 5 , S B = l f n , R , S C = l f n . | T h e r e p l a c e m e n t p a r a m e t e r ( R ) m u s t b e s p e c i fi e d .

The language version parameter (F5) is optional and | h a s a d e f a u l t v a l u e . T h e S B , S C , 1 , L , a n d L O p a r a m e t e r s a r e o p t i o n a l a n d h a v e d e f a u l t v a l u e s

(refer to the DDLF Control Statement subsection).

F i g u r e 4 - 2 1 i l l u s t r a t e s a j o b t h a t r e p l a c e s a s u b s c h e m a i n t h e s u b s c h e m a l i b r a r y. T h e s c h e m a d i r e c t o r y i s a t t a c h e d . T h e s u b s c h e m a l i b r a r y fi l e is also attached with the applicable password, and ( f o r N O S o n l y ) a c c e s s m o d e M = W i s s p e c i fi e d . I f the subschema to be replaced cannot be found in the s u b s c h e m a l i b r a r y, a n i n f o r m a t i v e d i a g n o s t i c i s i s s u e d a n d t h e n e w s u b s c h e m a i s a d d e d t o t h e l i b r a r y .

Deleting a Subschema

A subschema stored in the subschema library can be d e l e t e d f r o m t h e l i b r a r y. T h e f o r m o f t h e D D L F control statement necessary to purge a subschema from the subschema library is as follows:

DDLF,F5,SB=lfn,P.

T h e p u r g e p a r a m e t e r ( P ) m u s t b e s p e c i fi e d . T h e language version parameter (F5) is optional and has I a default value. The SB, 1, and L parameters are optional and have default values (refer to the DDLF Control Statement subsection).

NOS Operating System NOS/BE Operating System

Job statement Job statement

USER control statement ACCOUNT control statement

CHARGE control statement ATTACH,SCHPAY,ID=DDL.

ATTACH,SCHPAY. ATTACH,SUBSCH,ID=DDL,PU=DDL.

ATTACH,SUBSCH/PU=DDL,M=W. DDLF,F5,SB=SUBSCH.

DDLF,F5,SB=SUBSCH. End-of-record

End-of-record DDL Subschema Source Input

DDL Subschema Source Input End-of-information

End-of-information

Figure 4-20. Compiling a Subschema and Adding to a Subschema Library

NOS Operating System NOS/BE Operating System

Job statement Job statement

USER control statement ACCOUNT control statement

CHARGE control statement ATTACH,SCHPAY,ID=DDL.

ATTACH,SCHPAY. ATTACH,SUBSCH,ID=DDL,PU=DDL.

ATTACH,SUBSCH/PW=DDL,M=W. DDLF,F5,SB=SUBSCH,R.

DDLF,F5,SB=SU8SCH,R. End-of-record

End-of-record DDL Subschema Source Input

DDL Subschema Source Input End-of-information

End-of-information

Figure 4-21. Replacing a Subschema Library

60485200 E 4-17

F i g u r e 4 - 2 2 i l l u s t r a t e s a j o b t h a t p u r g e s a s u b schema from the subschema library. The subschema l i b r a r y fi l e i s a t t a c h e d w i t h t h e a p p l i c a b l e p a s s word and (for NOS only) access mode M=W is speci fi e d . T h e e n d - o f - r e c o r d i n d i c a t o r d e s i g n a t e s t h e end of the control statements.

The control statements are followed by statements t h a t s p e c i f y t h e s u b s c h e m a s t o b e d e l e t e d . T h e subschema name is entered anywhere from column 7 through column 72. If more than one subschema name is entered, a space or a comma must follow each subschema name.

No compilation occurs when a subschema is deleted from the subschema library.

Auditing a Subschema Library

A f t e r a s u b s c h e m a l i b r a r y i s c r e a t e d , i t c a n b e s e a r c h e d a n d a l i s t g e n e r a t e d t h a t i n c l u d e s t h e name of each subschema and the name of the schema i t r e f e r e n c e s , t o g e t h e r w i t h t h e i r c r e a t i o n d a t e s . The form of the DDLF control statement necessary to have the audit listing generated is as follows:

DDLF,F5,SB=lfn,A.

T h e a u d i t p a r a m e t e r ( A ) m u s t b e s p e c i fi e d . T h e I language version parameter (F5) is optional and has a d e f a u l t v a l u e . T h e S B a n d L p a r a m e t e r s a r e optional and have default values (refer to the DDLF Control Statement subsection).

F i g u r e 4 - 2 3 i l l u s t r a t e s a j o b t h a t p r o d u c e s a n a u d i t l i s t i n g o f t h e s u b s c h e m a l i b r a r y . T h e subschema library is attached with the appropriate p a s s w o r d s p e c i fi e d . T h e l i s t i n g p r o d u c e d b y t h e DDLF compiler when the audit is performed is shown

in figure 4-24.

NOS Operating System Job statement

USER control statement CHARGE control statement

ATTACH,SUBSCH/PW=DDL,M=W.

DDLF,F5,SB=SUBSCH,P.

End-of-record PAYROLL NEWHIRES E n d - o f - i n f o r m a t i o n

Compacting a Subschema Library

Subschema library compaction is an optional facil i t y t h a t g e n e r a t e s a n e w s u b s c h e m a l i b r a r y b y copying only the active subschemas from the speci fi e d s u b s c h e m a l i b r a r y . W h e n t h i s f a c i l i t y i s e x e c u t e d , t h e D D L F c o m p i l e r g e n e r a t e s a l i s t i n g t h a t i n c l u d e s t h e n a m e o f e a c h t r a n s f e r r e d s u b schema and the schema it references, together with their creation dates. The form of the DDLF control s t a t e m e n t n e c e s s a r y t o c r e a t e a n e w, c o m p a c t e d

subschema library is as follows:

D D L F , F 5 , S B = l f n , N L = l f n . I The new library parameter (NL) must be specified.

The language version parameter (F5) is optional and | has a default value. The SB and L parameters are optional and have default values (refer to the DDLF Control Statement subsection).

F i g u r e 4 - 2 5 i l l u s t r a t e s a j o b t h a t c r e a t e s a n e w, compacted subschema library. The subschema library i s a t t a c h e d w i t h t h e a p p r o p r i a t e p a s s w o r d . T h e DEFINE and REQUEST/CATALOG control statements s pec i fy the l o cal fi l e n am e of th e ne w s ubs c hema l i b r a r y a n d a s s i g n i t t o a p e r m a n e n t fi l e d e v i c e . A p a s s w o r d s p e c i fi e d i n t h e D E F I N E o r C ATA L O G statement controls subsequent access and use of the s u b s c h e m a l i b r a r y. T h e D D L F c o n t r o l s t a t e m e n t specifies the SB parameter with the local file name of the current subschema library to be compacted, and the NL parameter with the local file name of t h e n e w s u b s c h e m a l i b r a r y. T h e P U R G E c o n t r o l s ta te me n t d e s t ro y s t h e o l d l i b r a r y fil e .

This facility is intended to be used on a subschema library that has had a number of subschemas purged or replaced and, therefore, contains wasted space.

The DDLF compiler eliminates the wasted space in the new subschema library. After the new subschema l i b r a r y i s s t o r e d a s a p e r m a n e n t fi l e , t h e u s e r s h o u l d p u r g e t h e o l d s u b s c h e m a l i b r a r y. T h i s f a cility does not allow for compilation of subschemas.

NOS/BE Operating System Job statement

ACCOUNT control statement ATTACH,SUBSCH,ID=DDL,PW=DDL.

DDLF,F5,SB=SUBSCH,P.

End-of-record PAYROLL NEWHIRES E n d - o f - i n f o r m a t i o n

Figure 4-22. Deleting Subschemas From the Library

NOS Operating System Job statement

USER control statement CHARGE control statement ATTACH,SUBSCH/PW=DDL.

DDLF,F5,SB=SUBSCH,A.

End-of-information

NOS/BE Operating System Job statement

ACCOUNT control statement ATTACH,SUBSCH,ID=DDL,PW=DDL.

DDLF,F5,SB=SUBSCH,A.

End-of-i nformati on

Figure 4-23. Auditing a Subschema Library

* SOURCE LISTING * (82061) DDLF 1.3+564.

BEGIN SUB-SCHEMA FILE MAINTENANCE LIST OF SUB-SCHEMAS IN FILE

SUB-SCHEMA

F5SS-PRODUCT-MANAGEMENT F5SS-TESTS

F5SS-PR0DUCTS F5SS-PROJECTS

F5SS-PRODUCT-EVALUATION F5SS-TESTING

DDLF COMPLETE.

46600B CM USED.

END OF FILE MAINTENANCE 0 DIAGNOSTICS.

0.024 CP SECS.

Figure 4-24. Audit Listing of the Subschema Library

82/04/05. 09.56.13.

CREATION SCHEMA CREATION

DATE TIME

MANUFACTURING-DB

DATE TIME

82089 09.09 82087 14.14

82089 09.09 MANUFACTURING-DB 82087 14.14

82089 09.09 MANUFACTURING-DB 82087 14.14

82089 09.09 MANUFACTURING-DB 82087 14.14

82089 14.41 MANUFACTURING-DB 82087 14.14

82089 14.41 MANUFACTURING-DB 82087 14.14

NOS Operating System NOS/BE Operating System

Job statement Job statement

USER control statement ACCOUNT control statement

CHARGE control statement ATTACH,SUBSCH,ID=DDL,PW=DDL.

ATTACH,SUBSCH/PW=DDL,M=W. REQUEST,NEWSUB,PF.

DEFINE,NEWSUB/PW=DDL,CT=PU,M=W. DDLF,F5,SB=SUBSCH,NL=NEWSUB.

DDLF,F5,SB=SUBSCH,NL=NEWSUB. CATALOG,NEWSUB,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.

PURGE,SUBSCH. PURGE,SUBSCH,RB=1.

End-of-information E n d - o f - i n f o r m a t i o n

Figure 4-25. Compacting a Subschema Library

COMPILATION OUTPUT

A listing of the FORTRAN DDL source program is provided whenever a subschema is compiled. Each l i n e o f t h e l i s t i n g c o r r e s p o n d s t o o n e s o u r c e l i n e i n t h e s o u r c e p r o g r a m . T h e f o r m a t a n d o r d e r o f e a c h l i n e o n t h e l i s t i n g a r e i d e n t i c a l t o t h e f o r m a t a n d o r d e r o f t h e s t a t e m e n t s i n t h e s o u r c e p r o g r a m . F i g u r e 4 - 2 6 i s a s a m p l e c o m p i l a t i o n output listing for a subschema compilation.

The DDLF compiler assigns a line number to each i n p u t s t a t e m e n t b e g i n n i n g w i t h 0 0 0 0 1 . T h e l i n e numbers are printed on the source listing starting in column 16. Diagnostic messages begin in column 3 o f t h e l i s t i n g . A f t e r t h e l a s t i n p u t s t a t e m e n t i s l i s te d , a c o m p i l a ti o n s u m m a r y Is p r i n te d . W h e n r e l a t i o n s t a t i s t i c s a r e a p p l i c a b l e , r e l a t i o n n a m e s and their traversed areas are included.

The source listing can be suppressed by specifying L = 0 o n t h e D D L F c o n t r o l s t a t e m e n t . D i a g n o s t i c messages and the compilation summary are the only

l i s t i n g p r i n t e d .

A c r o s s - r e f e r e n c e l i s t a n d a d a t a m a p a r e n o t printed when the subschema is compiled. When the F O R T R A N a p p l i c a t i o n s p r o g r a m c o n t a i n i n g D M L s t a t e m e n t s i s c o m p i l e d , t h e v a r i a b l e s a n d a r r a y s defined in the subschema or generated by the DML

preprocessor are not listed unless the DS parameter is specified on the DML control statement.

RECOMPILATION GUIDELINES

The DDLF compiler generates a checksum (an identi f y i n g 1 - w o r d a t t r i b u t e ) f o r e a c h a r e a a n d r e l a t i o n in the schema. These checksums are the means for determining the need to recompile a subschema. If a checksum in a recompiled schema is different from the corresponding checksum in the previous schema, any subschema referencing the changed element must b e r e c o m p i l e d . A s u b s c h e m a n o t r e f e r e n c i n g a changed element does not need to be recompiled.

The DDLF compiler generates a single checksum for a subschema. This checksum is used for determining the need to recompile a FORTRAN-DML program. If a checksum of a recompiled subschema differs from the p r e v i o u s c h e c k s u m , a l l a p p l i c a t i o n p r o g r a m s r e f e r encing that subschema must be processed again by t h e D M L p r e p r o c e s s o r a n d r e c o m p i l e d . W h e n t h e FORTRAN-DML program is compiled, the checksum of t h e s u b s c h e m a i t r e f e r e n c e s i s c o p i e d i n t o t h e p r o g r a m b i n a r y o u t p u t . W h e n t h e p r o g r a m i s e x e cuted, that checksum must be the same as a checksum o f a s u b s c h e m a i n t h e m a s t e r d i r e c t o r y. I f t h e program references an invalid checksum, CDCS aborts the program and issues a diagnostic.

i # * \

60485200 E 4-19

F5SS-PR0DU * SOURCE LISTING * (82061) DDLF 1.3+564.

00001 SUBSCHEMA F5SS-PR0DUCT-EVALUATI0N, SCHEMA=MANUFACTURING-DB 00002

00003 ALIAS (REALM) PRODUCT-FILE = DEVELOPMENT-PRODUCTS 00004 ALIAS (RECORD) PRODREC = DEVREC

00005 ALIAS (ITEM) PRODUCT = PRODUCT-ID 00006 ALIAS (ITEM)EVALID = EVAL-ID 00007 ALIAS (ITEM) PROJECT = PROJECT-ID 00008 ALIAS (ITEM) NTESTED = NUM-TESTED 00009 ALIAS (ITEM) AVG = CUM-TEST-AVERAGE 00010 ALIAS (ITEM) STATUS = STATUS-CODE

00011

00012 REALM PRODUCT-FILE, TESTS 00013

00014 RECORD PRODREC

** WITHIN PRODUCT

00015 CHARACTER *10 PRODUCT

** ORDINAL 1

00016 CHARACTER *2 CLASS

** ORDINAL 2

00017 CHARACTER *20 EVALID(10)

** ORDINAL 3

00018 CHARACTER *4 PROJECT

** ORDINAL 4

00019 CHARACTER *1 STATUS

** ORDINAL 5

00020 INTEGER PRICE, NTESTED

** ORDINAL 7

00021 REAL AVG

00022

** ORDINAL 8

00023 RECORD TESTREC

** WITHIN TESTS

00024 INTEGER TESTNO

** ORDINAL 1

00025 CHARACTER *20 TNAME

** ORDINAL 2

00026 CHARACTER *10 PRDCTNO

** ORDINAL 3

00027 INTEGER N, TOTALCT

** ORDINAL 5

00028 REAL PASPROBdOO)

00029

** ORDINAL 6

00030 RELATION TEST-REL

PRIMARY KEY 00015 PR0DUC1■ FOR AREA PRODUCT-FILE ALTERNATE KEY 00018 PR0JEC1' FOR AREA PRODUCT-FILE ALTERNATE KEY 00017 EVALID FOR AREA PRODUCT-FILE PRIMARY KEY 00024 TESTNO FOR AREA TESTS ALTERNATE KEY 00025 TNAME FOR AREA TESTS

* * * * * RECORD MAPPING IS NEEDED FOR REALM - PRODUCT-FILE

* * * * * RECORD MAPPING IS NEEDED FOR REALM - TESTS

00031 RESTRICT PRODREC (STATUS .EQ. »A' .OR. STATUS .EQ. 'R') 00032

00033

END

* * * * * END OF SUB-SCHEMA SOURCE INPUT

* * * * * R E L A T I O N S T A T I S T I C S * * * * * RELATION 001 TEST-REL JOINS AREA - TESTS

AREA - PRODUCT-FILE BEGIN SUB-SCHEMA FILE MAINTENANCE

SUBSCHEMA CHECKSUM

F5SS-PR0DUCT--EVALUATION 41264663066177205611 END OF FILE MAINTENANCE

DDLF COMPLETE. 0 DIAGNOSTICS.

51000B CM USED. 0.322 CP SECS.

y"^$5v

/ s < ^ % y

/ * 5 h ^ V

Figure 4-26. Sample FORTRAN Subschema Compilation Output Listing

SCHEMA AND SUBSCHEMA MAPPING

Reordering of elementary items and group items R e n a m i n g o f e l e m e n t a r y i t e m s , g r o u p i t e m s , tion, or item-level data base procedure processing, a v a l u e i n d i c a t i n g t h e s u b s c h e m a i t e m o r d i n a l f o r the error, as well as the name of the file on which the error occurred, can be obtained by the applica t i o n p r o g r a m t h r o u g h t h e d a t a b a s e s t a t u s b l o c k . The status block, which is described in the CDCS 2 Application Programming reference manual, must have b e e n a c t i v a t e d a t a p r e v i o u s p o i n t i n t h e p r o g r a m application programmer can use the subschema output l i s t i n g t o a s s o c i a t e t h e s u b s c h e m a i t e m o r d i n a l eight Data Description Language (DDL) data classes at both the schema and subschema levels. The data sions performed by CDCS. The conversion routines operate in a source-target mode. The data conver