109 lines
3.6 KiB
Plaintext
109 lines
3.6 KiB
Plaintext
|
********************************************************************************
|
||
|
*
|
||
|
* GCI.CREAT.B Program to create a new GCI definition file
|
||
|
*
|
||
|
* Module %M% Version %I% Date %H%
|
||
|
*
|
||
|
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
|
||
|
* This is unpublished proprietary source code of Ardent Software Inc.
|
||
|
* The copyright notice above does not evidence any actual or intended
|
||
|
* publication of such source code.
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
*
|
||
|
* Maintenence log - insert most recent change descriptions at top
|
||
|
*
|
||
|
* Date.... GTAR# WHO Description.........................................
|
||
|
* 10/14/98 23801 SAP Change copyrights.
|
||
|
* 03/25/96 18026 PGW Initial implementation.
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
*
|
||
|
* Program Description:
|
||
|
*
|
||
|
* This program, run from the GCI administration menu, creates a data file
|
||
|
* to hold GCI definitions. The data file is created with standard parameters,
|
||
|
* which ought to match the parameters used in port.mak to create the file
|
||
|
* "GCI" as shipped with uniVerse. The new file does not have its own
|
||
|
* dictionary; its dictionary is the dictionary of "GCI".
|
||
|
*
|
||
|
* Calling sequence:
|
||
|
*
|
||
|
* RUN APP.PROGS GCI.CREAT.B file.name
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
*
|
||
|
$OPTIONS DEFAULT
|
||
|
|
||
|
PROGRAM GCI.CREAT.B
|
||
|
|
||
|
ID = "@(#)%M% %I%"
|
||
|
|
||
|
$INCLUDE UNIVERSE.INCLUDE FILENAMES.H
|
||
|
$INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
|
||
|
|
||
|
EQUATE bell TO CHAR(7)
|
||
|
|
||
|
* This string defines the CREATE.FILE parameters used. They should
|
||
|
* match the parameters used in port.smp to create to file "GCI".
|
||
|
EQUATE gci.parms TO " 2 17 1"
|
||
|
|
||
|
PROMPT ""
|
||
|
cl = @(-4)
|
||
|
cl.err = @(0,23):cl
|
||
|
err = cl.err:bell
|
||
|
msg10 = err:PROD.NAMEU:' General Calling Interface is not installed.'
|
||
|
failure.message = "GCI Definition File not created."
|
||
|
|
||
|
OPENPATH UV.ROOT : UV.FSEP : 'DATA.TYPES' TO file.data.types ELSE
|
||
|
PRINT msg10:
|
||
|
INPUT q: ; PRINT cl.err: ; STOP
|
||
|
END
|
||
|
|
||
|
* Extract the file name from the command line
|
||
|
cmd = CONVERT(" ", @FM, TRIM(@SENTENCE))
|
||
|
new.file.name = cmd<4>
|
||
|
IF new.file.name = "" THEN
|
||
|
PRINT "You must enter a file name."
|
||
|
STOP
|
||
|
END
|
||
|
|
||
|
* Open the VOC, to check and update the file's VOC entry
|
||
|
OPEN "","VOC" TO voc.file ELSE
|
||
|
PRINT "Cannot open VOC file."
|
||
|
PRINT failure.message
|
||
|
STOP
|
||
|
END
|
||
|
|
||
|
PRINT @( -1 )
|
||
|
PRINT @( 0, 0 ):"General Calling Interface Administration" : @( 67, 0 ) : "GCI.CREAT.B":
|
||
|
PRINT @( 17, 1): 'Create a GCI Definition File "':new.file.name:'"':
|
||
|
PRINT @( 0, 2 ): STR( "-", 79 ):
|
||
|
PRINT @( 0, 4 ):
|
||
|
PRINTER RESET
|
||
|
|
||
|
* Create the data portion of the file, and its VOC entry
|
||
|
EXECUTE "CREATE.FILE DATA " : new.file.name : gci.parms
|
||
|
|
||
|
* Get the new VOC entry
|
||
|
READ voc.record FROM voc.file, new.file.name ELSE
|
||
|
* No VOC record - presumably CREATE.FILE failed, and will have
|
||
|
* already reported the error, so just exit
|
||
|
PRINT failure.message
|
||
|
STOP
|
||
|
END
|
||
|
|
||
|
* Set the dictionary pointer
|
||
|
voc.record<3> = UV.ROOT : UV.FSEP : "D_GCI"
|
||
|
WRITE voc.record ON voc.file, new.file.name ELSE
|
||
|
PRINT "Could not write VOC entry for the new GCI file!"
|
||
|
PRINT failure.message
|
||
|
STOP
|
||
|
END
|
||
|
|
||
|
* Done
|
||
|
PRINT 'GCI Definition File "' : new.file.name : '" created.'
|
||
|
STOP
|
||
|
END
|
||
|
|