$ set noverify $!****************************************************************************** $! $! DEMO51.COM $! $! Run with RDB Version 6.1 $! $! Demo created by Marika Barnett $! $! Updated: May 30, 1995 $! $!****************************************************************************** $! $ create color.com $ DECK/DOLLAR="**EOD**" $! $! 241COLOR.COM - instructions at end of file $! $ V = F$VERIFY(0) $ WRI == "Write Sys$Output" $ INQ == "INQUIRE" $ FLAG = 0 $ COUNT = 0 $ BACK = "" $ FORE = "" $ BOLD = "" $ BLINK = "" $ CBACK = "" $ CFORE = "" $ CBOLD = "" $ CBLINK = "" $! $ if P1 .eqs. "" then goto HELP_COLORS $ BACK = P1 $ goto CHECK_BACK $! $HELP_COLORS: $ wri " COLOR TABLE" $ wri "( 1) Aquamarine ( 2) Aquamarine, Medium ( 3) Black (Dark)" $ wri "( 4) Blue ( 5) Blue, Cadet ( 6) Blue, Cornflower" $ wri "( 7) Blue, Dark Slate ( 8) Blue, Light ( 9) Blue, Light Steel" $ wri "(10) Blue, Medium (11) Blue, Medium Slate (12) Blue, Midnight" $ wri "(13) Blue, Navy (14) Blue, Sky (15) Blue, Slate" $ wri "(16) Blue, Steel (17) Coral (18) Cyan" $ wri "(19) Firebrick (20) Gold (21) Goldenrod" $ wri "(22) Goldenrod, Medium (23) Green (24) Green, Dark" $ wri "(25) Green, Olive (26) Green, Forest (27) Green, Lime" $ wri "(28) Green, Medium Forest (29) Green, Medium Sea (30) Green, Medium Spring" $ wri "(31) Green, Pale (32) Green, Sea (33) Green, Spring" $ wri "(34) Green, Yellow (35) Gray, Dark Slate (36) Gray, Dim" $ wri "(37) Gray, Light (38) Khaki (39) Magenta" $ wri "(40) Maroon (41) Orange (42) Orchid" $ wri "(43) Orchid, Dark (44) Orchid, Medium (45) Pink" $ wri "(46) Plum (47) Red (48) Red, Indian" $ wri "(49) Red, Medium Violet (50) Red, Orange (51) Red, Violet" $ wri "(52) Salmon (53) Sienna (54) Tan" $ wri "(55) Thistle (56) Turquoise (57) Turquoise, Dark" $ wri "(58) Turquoise, Medium (59) Violet (60) Violet, Blue" $ wri "(61) Wheat (62) White (63) Yellow (64) Yellow, Green" $ FLAG = 1 $ if COUNT .eq. 1 then goto HELP_BACK $ if COUNT .eq. 2 then goto HELP_FORE $ if COUNT .eq. 3 then goto HELP_BOLD $ if COUNT .eq. 4 then goto HELP_BLINK $! $ASK_BACK: $ inq BACK "Background?" $! $CHECK_BACK: $ COUNT = 1 $ if BACK .ge. 1 .and. BACK .le. 64 then goto DO_FORE $ if FLAG .eq. 1 then wri "Invalid Background color..." $ if FLAG .eq. 0 then goto HELP_COLORS $ goto ASK_BACK $! $DO_FORE: $ COUNT = 2 $ if P2 .eqs. "" .and. FLAG .eq. 0 then goto HELP_COLORS $ IF P2 .EQS. "" THEN GOTO ASK_FORE $ FORE = P2 $ goto CHECK_FORE $! $ASK_FORE: $ inq FORE "Foreground?" $! $CHECK_FORE: $ if FORE .ge. 1 .and. FORE .le. 64 then goto DO_BOLD $ if FLAG .eq. 1 then wri "Invalid Foreground color..." $ if FLAG .eq. 0 then goto HELP_COLORS $ goto ASK_FORE $! $DO_BOLD: $ COUNT = 3 $ if P3 .eqs. "" .and. FLAG .eq. 0 then goto HELP_COLORS $ IF P3 .EQS. "" THEN GOTO ASK_BOLD $ BOLD = P3 $ goto CHECK_BOLD $! $ASK_BOLD: $ inq BOLD "Bolding?" $! $CHECK_BOLD: $ if BOLD .ge. 1 .and. BOLD .le. 64 then goto DO_BLINK $ if FLAG .eq. 1 then wri "Invalid Bolding color..." $ if FLAG .eq. 0 then goto HELP_COLORS $ goto ASK_BOLD $! $DO_BLINK: $ COUNT = 4 $ if P4 .eqs. "" .and. FLAG .eq. 0 then goto HELP_COLORS $ IF P4 .EQS. "" THEN GOTO ASK_BLINK $ BLINK = P4 $ goto CHECK_BLINK $! $ASK_BLINK: $ inq BLINK "Blinking?" $! $CHECK_BLINK: $ if BLINK .ge. 1 .and. BLINK .le. 64 then goto COLOR_SETUP $ if FLAG .eq. 1 then wri "Invalid Blinking color..." $ if FLAG .eq. 0 then goto HELP_COLORS $ goto ASK_BLINK $! $COLOR_SETUP: $ C1 = "AH260L65s60" $ C2 = "AH280L50s60" $ C3 = "D" $ C4 = "B" $ C5 = "AH300L50s25" $ C6 = "AH0L35s25" $ C7 = "AH49L35s60" $ C8 = "AH300L80s25" $ C9 = "AH0L65s25" $ C10 = "AH0L50s60" $ C11 = "AH30L59s100" $ C12 = "AH0L25s25" $ C13 = "AH0L35s60" $ C14 = "AH320L50s60" $ C15 = "AH330L50s100" $ C16 = "AH320L35s60" $ C17 = "AH150L50s100" $ C18 = "C" $ C19 = "AH120L35s60" $ C20 = "AH160L50s60" $ C21 = "AH180L65s60" $ C22 = "AH180L80s60" $ C23 = "G" $ C24 = "AH240L25s25" $ C25 = "AH180L25s25" $ C26 = "AH200L35s60" $ C27 = "AH240L50s60" $ C28 = "AH240L35s60" $ C29 = "AH240L35s25" $ C30 = "Ah210L50s100" $ C31 = "AH240L65s25" $ C32 = "AH280L35s60" $ C33 = "AH270L50s100" $ C34 = "AH220L65s60" $ C35 = "AH300L25s25" $ C36 = "AH0L33s0" $ C37 = "AH0L66s0" $ C38 = "AH180L50s25" $ C39 = "M" $ C40 = "AH80L35s60" $ C41 = "AH120L50s60" $ C42 = "AH60L65s60" $ C43 = "AH40L50s60" $ C44 = "AH20L65s60" $ C45 = "AH120L65s25" $ C46 = "AH60L80s60" $ C47 = "R" $ C48 = "AH120L25s25" $ C49 = "AH100L65s60" $ C50 = "AH90L50s100" $ C51 = "AH80L50s60" $ C52 = "AH120L35s25" $ C53 = "AH160L35s60" $ C54 = "AH140L65s60" $ C55 = "AH60L80s25" $ C56 = "AH300L80s60" $ C57 = "AH340L65s60" $ C58 = "AH300L65s60" $ C59 = "AH60L25s25" $ C60 = "AH60L50s25" $ C61 = "AH160L80s25" $ C62 = "W" $ C63 = "Y" $ C64 = "AH200L50s60" $ BACK = "C"+BACK $ CBACK = &BACK $ FORE = "C"+FORE $ CFORE = &FORE $ BOLD = "C"+BOLD $ CBOLD = &BOLD $ BLINK = "C"+BLINK $ CBLINK = &BLINK $! $ wri "P1p" $ wri "Pp" !Invoke Regis $ wri "S(M0(''CBACK')3(''CBLINK')15(''CBOLD')7(''CFORE'))" !Color commands $ wri "\" !Exit Regis $ V = F$Verify(V) $ SET TERM/BROAD $ exit $HELP_BACK: $ wri "" $ wri "Invalid Background color..." $ goto ASK_BACK $HELP_FORE: $ wri "" $ wri "Invalid Foreground color..." $ goto ASK_FORE $HELP_BOLD: $ wri "" $ wri "Invalid Bolding color..." $ goto ASK_BOLD $HELP_BLINK: $ wri "" $ wri "Invalid Blinking color..." $ got ASK_BLINK $!*************************************************************************** $! $! 241COLOR.COM $! By Claude G. Berube $! June 6, 1985 $! $! This com file changes the color attributes for the Foreground, Background, $! Blink and Blinking colors of the VT241. $! $! define the following in your login.com file $! $! Color :==[default disk]241COLOR.COM $! $! type the following command $! $! Color [background] [foreground] [bold] [blink] $! $! The choices of colors are; $! $! COLOR TABLE $! ( 1) Aquamarine ( 2) Aquamarine, Medium ( 3) Black (Dark) $! ( 4) Blue ( 5) Blue, Cadet ( 6) Blue, Cornflower $! ( 7) Blue, Dark Slate ( 8) Blue, Light ( 9) Blue, Light Steel $! (10) Blue, Medium (11) Blue, Medium Slate (12) Blue, Midnight $! (13) Blue, Navy (14) Blue, Sky (15) Blue, Slate $! (16) Blue, Steel (17) Coral (18) Cyan $! (19) Firebrick (20) Gold (21) Goldenrod $! (22) Goldenrod, Medium (23) Green (24) Green, Dark $! (25) Green, Olive (26) Green, Forest (27) Green, Lime $! (28) Green, Medium Forest (29) Green, Medium Sea (30) Green, Medium Spring $! (31) Green, Pale (32) Green, Sea (33) Green, Spring $! (34) Green, Yellow (35) Gray, Dark Slate (36) Gray, Dim $! (37) Gray, Light (38) Khaki (39) Magenta $! (40) Maroon (41) Orange (42) Orchid $! (43) Orchid, Dark (44) Orchid, Medium (45) Pink $! (46) Plum (47) Red (48) Red, Indian $! (49) Red, Medium Violet (50) Red, Orange (51) Red, Violet $! (52) Salmon (53) Sienna (54) Tan $! (55) Thistle (56) Turquoise (57) Turquoise, Dark $! (58) Turquoise, Medium (59) Violet (60) Violet, Blue $! (61) Wheat (62) White (63) Yellow (64) Yellow, Green $! $! If you use an illegal color choice or type just the COLOR command without $! the color choices, the com file will display the color choices and prompt $! you for the colors. $! $! VERSION HISTORY: $! $! Version 1.0 5-June-1985 $! Version 1.1 6-June-1985 Use of Symbol substitution for color assignment $! for speedup of execution and cut down on file size. $! $!*************************************************************************** $ exit **EOD** $! $ @color 3 62 3 3 $ set term/page=24 $ set term/nobroadcast $! $! Files needed for Demo: $! $! 1. Demo.com (this command file) $! 2. Color.com (created by this command file) $! 3. Depdcy.cob (created by this command file) $! 4. COBOL must be installed on system! $! $! Check if COBOL is installed: $! $ file = f$search("sys$system:cobol.exe") $ if file .eqs. "" then goto cobol1 $ goto Start $! $ Cobol1: $ write sys$output " " $ write sys$output " " $ write sys$output " %CDD/R-DEMO WARNING: COBOL IS NOT INSTALLED ON THIS SYSTEM! " $ write sys$output " " $ write sys$output " " $ goto LastStep $! $ Start: $! $! Set up constants: $! $ cr[0,8] = %x0D $ esc[0,8] = %x1B $ csi = esc + "[" $ bold = csi + "0;1m" $ clear = csi + "2J" $ off = csi + "0m" $ flash = csi + "1;5m" $ reverse = csi + "1;7m" $ black :== "@color 62 3 62 62" $ blue :== "@color 62 4 62 62" $ green :== "@color 4 33 4 4" $ feher :== "@color 4 62 4 4" $ white :== "@color 3 62 3 3" $ yellow :== "@color 4 63 4 4" $ home = csi + "1;1H" $ display = "WRITE SYS$OUTPUT" $! $ Display "''Clear' ''Home' " $ inquire/nopunct reply - "''bold'''flash'NAME OF THIS WORKSTATION:''off' " $ length = f$length(reply) $ ws_name = f$extract(0,''length',reply) $ set display/create/node="''ws_name'"/trans=decnet $! $! Set up environment: $! $ @sys$share:decrdb$setver 6.1 $ set proc/priv=syslck $ set proc/priv=bypass $ set right/enable cdd$system $! $ on error then continue $ deassign cdo $ on error then continue $ deassign cddshr $ on error then continue $! deassign vaxcrtl $! $ create/dir SYS$DISK:[.db] $ create/dir SYS$DISK:[.db.personnel] $ create/dir SYS$DISK:[.db.credit] $! $ define/nolog CDD$DATABASE1 SYS$DISK:[.db.PERSONNEL] $ define/nolog CDD$DATABASE2 SYS$DISK:[.db.CREDIT] $! $ define/nolog CDD$REPOSITORY1 SYS$DISK:[.personnel] $ define/nolog CDD$REPOSITORY2 SYS$DISK:[.credit_union] $! $ feher $ set term/page=48 $ Display "''Clear' ''Home' " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display - " ''bold' WELCOME TO THE WORLD OF ORACLE CDD/REPOSITORY ! " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " WHAT YOU WILL SEE: " $ Display " " $ Display " " $ Display " " $ Display " 1./ WE'LL CREATE AND POPULATE REPOSITORIES " $ Display " " $ Display " 2./ CREATE DIRECTORIES IN DICTIONARY AND VIEW THEM FROM VMS " $ Display " " $ Display " 3./ CREATE DATABASES AND INSERT FIELDS AND VALUES " $ Display " " $ Display " 4./ SHOW AUTOMATIC AND MANUAL INTEGRATION " $ Display " " $ Display " 5./ RESULTS OF THE change COMMAND " $ Display " " $ Display " 6./ CREATE, RESERVE AND REPLACE COLLECTIONS " $ Display " " $ Display " 7./ COBOL INTERFACE " $ Display " " $ Display " 8./ CDD/ADMINISTRATOR DEMO " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " BLUE SCREEN: CDO - REPOSITORY ACTIVITY " $ Display " YELLOW SCREEN: SQL - DATABASE ACTIVITY " $ Display " GREEN SCREEN: DCL - VMS ACTIVITY " $ Display " " $ Display " " $ Display " $ Display " ''off' " $ inquire reply "''bold'''flash'SHALL WE START?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto StepEnd $! $! Define first Dictionary - Define directory, 5 fields and record for the 5 fields: $! $ blue $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' DEFINE AND POPULATE FIRST REPOSITORY ''off'" $ Display " " $ Display " " $ set verify $ define/nolog cdd$default CDD$REPOSITORY1 $ REPOSITORY define repository CDD$REPOSITORY1. set default CDD$REPOSITORY1 show default define field EMPLOYEE_ID datatype text size 5. define field LAST_NAME datatype text size 14. define field FIRST_NAME datatype text size 10. define field MIDDLE_INITIAL datatype text size 1. define field ADDRESS_DATA_1 datatype text size 25. define field ADDRESS_DATA_2 datatype text size 20. define field CITY datatype text size 20. define field STATE datatype text size 2. define field POSTAL_CODE datatype text size 5. define field SEX datatype text size 1. define field BIRTHDAY datatype is date. define field STATUS_CODE datatype text size 1. define record EMPLOYEES. EMPLOYEE_ID. LAST_NAME. FIRST_NAME. MIDDLE_INITIAL. ADDRESS_DATA_1. ADDRESS_DATA_2. CITY. STATE. POSTAL_CODE. SEX. BIRTHDAY. STATUS_CODE. end. define field SALARY_AMOUNT datatype is longword. define field SALARY_START datatype is date. define field SALARY_END datatype is date. define record SALARY_HISTORY. SALARY_AMOUNT. SALARY_START. SALARY_END. end. directory define directory D1. set default CDD$REPOSITORY1:D1 define directory SUB_D2. set default CDD$REPOSITORY1:D1.SUB_D2 define directory SUB_D3. set default CDD$REPOSITORY1:D1.SUB_D2.SUB_D3 define directory SUB_D4. exit $! $ set noverify $ wait 00:00:20.0 $ Display "''Clear' ''Home'" $ green $! $ Display - " ''bold' SHOW THAT DIRECTORIES CAN BE VIEWED FROM VMS: ''off'" $! $ set verify $ directory/size CDD$REPOSITORY1 $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto Stepend $! $!______________________________________________________________________________ $! $ yellow $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' CREATE DATABASE (NO AUTOMATIC INTEGRATION FOR THIS ONE): ''off'" $ Display " " $ Display " " $! $ set verify $ mcr SQL$ CREATE DATABASE FILENAME CDD$DATABASE1:B1; create table EMPLOYEES (EMPLOYEE_ID char (5), LAST_NAME char (14), FIRST_NAME char (10), MIDDLE_INITIAL char (1), ADDRESS_DATA_1 char (25), ADDRESS_DATA_2 char (20), CITY char (20), STATE char (2), POSTAL_CODE char (5), SEX char (1), BIRTHDAY date vms, STATUS_CODE char (1)); commit; insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0001', 'ARONSON', 'ARON', 'A'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0002', 'BRONSON', 'BYRON', 'B'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0003', 'CRANSON', 'CARIN', 'C'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0004', 'DAVIDSON', 'DAVID', 'D'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0005', 'ERIKSON', 'ERIK', 'E'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0006', 'FREDRICKSON', 'FRED', 'F'); insert into EMPLOYEES (EMPLOYEE_ID, LAST_NAME, FIRST_NAME, MIDDLE_INITIAL) values ('0007', 'GARSON', 'GREER', 'G'); commit; create table SALARY_HISTORY (EMPLOYEE_ID char (5), SALARY_AMOUNT integer (2), SALARY_START date vms, SALARY_END date vms); commit; create table JOB_HISTORY (EMPLOYEE_ID char (5), SUPERVISOR_ID char (5), JOB_CODE char (2), JOB_START date vms, JOB_END date vms, DEPARTMENT_CODE char (2)); commit; create table WORK_STATUS (STATUS_CODE char (1), STATUS_NAME char (8), STATUS_TYPE char (14)); commit; show tables; disconnect all; $! $ set noverify $ inquire reply "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto Cleanup1 $! $!____________________________________________________________________________ $! $ blue $ Display "''Clear' ''Home' " $ Display " " $ Display - "''bold' SHOW REPOSITORY BEFORE MANUAL INTEGRATION (EXPECT ERRORS):''off'" $ Display " " $ Display " " $! $ set verify $ REPOSITORY set default CDD$REPOSITORY1 show record/full EMPLOYEES from database CDD$REPOSITORY1:B1 show record/full EMPLOYEES show record/full JOB_HISTORY from database CDD$REPOSITORY1:B1 show record/full JOB_HISTORY show record/full WORK_STATUS from database CDD$REPOSITORY1:B1 show record/full WORK_STATUS exit $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!____________________________________________________________________________ $! $! In Database - create new table, then integrate with Repository1: $! $ yellow $ Display "''Clear' ''Home' " $ Display " " $ display - "''bold' MANUALLY INTEGRATE DATABASE CHANGE WITH REPOSITORY:''off'" $ Display " " $ Display " " $! $ set verify $ mcr SQL$ ! integrate DATABASE filename cdd$database1:b1 create pathname CDD$REPOSITORY1:B1; commit; ! show tables; $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!_________________________________________________________________________________ $! $ blue $ Display "''Clear' ''Home' " $ Display " " $ Display - "''bold' SHOW RESULT OF MANUAL INTEGRATION:''off'" $ Display " " $ Display " " $! $ set verify $ REPOSITORY set default CDD$REPOSITORY1 show record/full EMPLOYEES from database CDD$REPOSITORY1:B1 show record/full JOB_HISTORY from database CDD$REPOSITORY1:B1 show record/full WORK_STATUS from database CDD$REPOSITORY1:B1 exit $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!_________________________________________________________________________________ $! $! In Second Dictionary - Define directory, 5 fields and record for the 5 fields: $! $ blue $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' CREATE SECOND REPOSITORY WHERE FIELDS ARE BASED ON FIRST REPOSITORY''off'" $ Display " " $ Display " " $! $ set verify $ define/nolog cdd$default CDD$REPOSITORY2 $ REPOSITORY define repository CDD$REPOSITORY2. set default CDD$REPOSITORY2 show default define field CREDIT_LIMIT based on CDD$REPOSITORY1.SALARY_AMOUNT. define field MINIMUM_DEPOSIT based on CDD$REPOSITORY1.SALARY_AMOUNT. define field CREDIT_REFERENCE based on CDD$REPOSITORY1.SALARY_AMOUNT. define field LOAN_CODE based on CDD$REPOSITORY1.SALARY_AMOUNT. define field INTEREST_RATE based on CDD$REPOSITORY1.SALARY_AMOUNT. define record CREDIT_RECORD. CREDIT_LIMIT. MINIMUM_DEPOSIT. CREDIT_REFERENCE. LOAN_CODE. INTEREST_RATE. end. directory show repos/full show all exit $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!______________________________________________________________________________ $! $ yellow $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' CREATE DATABASE (FOR AUTOMATIC INTEGRATION): ''off'" $ Display " " $ Display " " $! $ set verify $ mcr SQL$ CREATE DATABASE FILENAME CDD$DATABASE2:B2 PATHNAME CDD$REPOSITORY2:B2 DICTIONARY IS REQUIRED; create table from CREDIT_RECORD; commit; show table CREDIT_RECORD; create domain ELIGIBILITY_DATE date vms; alter table CREDIT_RECORD add ELIGIBILITY_DATE ELIGIBILITY_DATE; commit; show table CREDIT_RECORD; disconnect all; $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!----------------------------------------------------------------------------- $! $! In Second Dictionary - check result of automatic integrate: $! $ blue $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' CHECK INTEGRATION IN SECOND REPOSITORY''off'" $ Display " " $ Display " " $! $ set verify $ define/nolog cdd$default CDD$REPOSITORY2 $ REPOSITORY set default CDD$REPOSITORY2 show record CREDIT_RECORD from database CDD$REPOSITORY2:B2 exit $! $ set noverify $ inquire reply - "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!______________________________________________________________________________ $! $ Display "''Clear' ''Home' " $ Display " " $ Display - "''bold' ONE CHANGE WILL HAVE RESULTS IN TWO REPOSITORIES:''off'" $ Display " " $ Display " " $! $ set verify $ REPOSITORY ! LETS'S PEEK INTO CDD$REPOSITORY2 AND CHECK SOME ELEMENT TYPES: set default CDD$REPOSITORY2 show repos/full show all ! NOW LET'S CHANGE THE VERY FIELD ALL THOSE FIELDS WERE BASED ON: set default CDD$REPOSITORY1 show record/full SALARY_HISTORY ! CHANGE DATATYPE OF A FIELD: change field SALARY_AMOUNT datatype byte. show record/full SALARY_HISTORY dir ! NOW SEE IF FIELDS (BASED ON SALARY_AMOUNT) IN SECOND REPOSITORY CHANGED: set default CDD$REPOSITORY2 show all exit $! $ set noverify $ inquire reply "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!______________________________________________________________________________ $! $ Display "''Clear' ''Home' " $ Display " " $ Display - "''bold' DEFINE, RESERVE AND REPLACE COLLECTIONS:''off'" $ Display " " $ Display " " $! $ define/nolog CDD$DEFAULT CDD$REPOSITORY2 $ set verify $ REPOSITORY set default CDD$DEFAULT define partition mortgage. define context home_loan base_partition mortgage. set context home_loan define collection improvement. reserve collection improvement define collection long_term. define collection short_term. dir reserve collection short_term define field loan1. define field loan2. define field loan3. define field loan4. dir replace collection short_term replace collection improvement dir reserve collection/closure=to_bottom improvement dir replace collection/closure=to_bottom improvement exit $! $ set noverify $ inquire reply "''bold'''flash'SHALL WE CONTINUE?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto cleanup1 $! $!______________________________________________________________________________ $! $ Display "''Clear' ''Home' " $ Display " " $ Display - " ''bold' CREATE DEPENDENCY WITH COBOL PROGRAM (EXPECT ERROR!): ''off'" $ Display " " $ Display " " $! $ create depdcy.cob IDENTIFICATION DIVISION. PROGRAM-ID. DEPDCY. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. VAX. OBJECT-COMPUTER. VAX. DATA DIVISION. WORKING-STORAGE SECTION. COPY "CDD$USR1:[BARNETT.DEMO.PERSONNEL]EMPLOYEES" FROM DICTIONARY. PROCEDURE DIVISION. A100. STOP RUN. $ Display "IDENTIFICATION DIVISION." $ Display "PROGRAM-ID. DEPDCY." $ Display "ENVIRONMENT DIVISION." $ Display "CONFIGURATION SECTION." $ Display " SOURCE-COMPUTER. VAX." $ Display " OBJECT-COMPUTER. VAX." $ Display "DATA DIVISION." $ Display "WORKING-STORAGE SECTION." $ Display " COPY SYS$DISK:[.PERSONNEL]EMPLOYEES FROM DICTIONARY." $ Display "PROCEDURE DIVISION." $ Display "A100." $ Display " STOP RUN." $ Display "" $ Display "" $! $ set verify $ cobol/dep depdcy $ REPOSITORY set default CDD$REPOSITORY1 show uses EMPLOYEES delete record EMPLOYEES. exit $! $ set noverify $ delete depdcy.*;* $! $ set noverify $ Display "''Clear' ''Home' " $ inquire reply - "''bold'''flash'WOULD YOU LIKE TO SEE OUR CDD/ADMINISTRATOR DEMO?''off' (PRESS TO CONTINUE!) " $ if reply .EQS. "N" then goto packup $! $!______________________________________________________________________________ $! $ define cdd$default cdd$repository1 $ white $ Display "''Clear' ''Home' " $ set term/page=24 $ cdda $!______________________________________________________________________________ $! $ packup: $ feher $ set term/page=48 $ Display "''Clear' ''Home' " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ display "''bold' THAT'S IT FOLKS!''off' " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $ Display " " $! $ wait 00:00:05.0 $cleanup2: $!____________________________________________________________________________ $! $! Clean up second database: $! $ mcr SQL$ ! drop DATABASE FILENAME 'CDD$DATABASE2:B2'; $! $!_________________________________________________________________________________ $! $ on error then continue $! $cleanup1: $!____________________________________________________________________________ $! $! Clean up first database: $! $ mcr SQL$ ! drop DATABASE FILENAME 'CDD$DATABASE1:B1'; $! $!_________________________________________________________________________________ $! $ on error then continue $! $ StepEnd: $! $ delete [.personnel]*.*;* $ delete [.credit_union.partitions]*.*;* $ delete [.credit_union.contexts]*.*;* $ delete [.credit_union]*.*;* $ delete [.db.personnel]*.*;* $ delete [.db.credit]*.*;* $ delete [.db]*.*;* $ delete personnel.dir;* $ delete credit_union.dir;* $ delete db.dir;* $! $ StepQuit: $! $ Display " " $ Display " " $ deassign CDD$DATABASE1 $ deassign CDD$DATABASE2 $ deassign CDD$REPOSITORY1 $ deassign CDD$REPOSITORY2 $ deassign cdd$default $ LastStep: $ set default SYS$DISK:[] $ set term/broadcast $ Display "''Clear' ''Home' " $ white $ delete color.com;* $ set term/page=24 $ set proc/priv=noall $ exit