SQL Programming Manual for TAL

Examples of Static NonStop SQL Programs
HP NonStop SQL Programming Manual for TAL527887-001
B-10
Date-Time Program
Date-Time Program
The date-time sample program (TALDT) inserts values into the PROJECTS table,
which you can create using this CREATE TABLE statement.:
CREATE TABLE PROJECTS
( PROJECT_NAME CHAR( 10 ) NO DEFAULT NOT NULL
, START_DATE DATETIME YEAR TO MINUTE NO DEFAULT NOT NULL
, END_DATE DATETIME YEAR TO MINUTE NO DEFAULT NOT NULL
, WAIT_TIME INTERVAL DAY(2) NO DEFAULT NOT NULL
) CATALOG =PROJ ;
TALDT refers to the PROJECTS table using the DEFINE name =PROJECTS and the
catalog using the DEFINE name =PROJ. The commands to add these DEFINE names
are:
SET DEFINE CLASS MAP
ADD DEFINE =PROJECTS, FILE PROJ.PROJECTS
SET DEFINE CLASS CATALOG
ADD DEFINE =PROJ, SUBVOL PROJ
TALDT can perform these functions:
Page 11 [1] $VOL1.S04.TALTEST 1991-10-15 13:40:20
BINDER AND COMPILER STATISTICS
BINDER - OBJECT FILE BINDER - T9621C30 - (01NOV91) SYSTEM \SYS1.
Copyright Tandem Computers Incorporated 1982-1989, 1991
Object file $VOL1.S04.TALS1O
TIMESTAMP 1991-10-15 13:40:20
1 Code page
11 Primary data words
193 Secondary data words
64 Data pages
0 Resident code pages
1 Extended data page
204 Top of stack location in words
1 Code segment
0 Binder Warnings
0 Binder Errors
TAL - Transaction Application Language - T9250C30 - (01NOV91)
Number of compiler errors = 0
Number of unsuppressed compiler warnings = 0
Number of warnings suppressed by NOWARN = 0
Maximum symbol table space used was = 24692 bytes
Number of source lines = 3031
Compile cpu time = 00:00:03
Total Elapsed time = 00:00:40