START REPORT error.
Posted in 1996
Topics: Installation, Setup & Upgrades, SQL Development & Query Writing, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hello world,
can someone tell me the cause of this error? Everything looks ok to
The error message is at the bottom of this file.
me.
Thanks inn advance..
Leon.
kleon@osf1.gmu.edu
####################################################################
# MODULE NAME: B1_5_2()
#
# DESCRIPTION/PURPOSE: The purpose of this module is to
# perform the archive purge process. All
# closed cases are written to floppy diskette
# and removed from the active database. Each
# case is also written to the archive table
# with its archive id, the archive date, and
# an arc status of "0".
#
# FUNCTIONS:
#
# B1_5_2 main driver of the archive purge process
#
# center_prompt centers all prompts
#
# purge removes closed cases from the active database
#
# EXTERNAL FUNCTIONS:
#
# bcds_tar This is a script file which writes the files
# to the floppy diskette. Files are not written
# across floppies by using the -ek option on the tar
# command. 1150 is the block size specified.
#
# tar_status "C" routine which checks to see if the write
# to the floppy was successful or not. A tar_status
# of "0" is a successful write.
#
# DATABASE TABLES: ARCHIVE TABLE AND ALL TABLES BEING ARCHIVED
#
# MAINTENANCE:
#
# REVISION LEVEL NAME DATE DESCRIPTION
#
####################################################################
DATABASE cmp
GLOBALS "glob.4gl"
MAIN
DEFINE
l_arc_num smallint,
the_date char(10),
l_tar_status smallint,
as_of_date date,
l_write_loop smallint,
l_count smallint,
l_flag char(1),
l_count2 smallint,
l_arc_cnt smallint,
l_char char(1),
l_string1 char(55),
l_string2 char(35),
l_string3 char(52),
l_user_date date,
l_tar_name char(10)
defer interrupt
options
prompt line 2,
form line 3,
error line 22,
comment line 23,
message line 24,
input wrap
whenever error stop
LET l_string1 = "ARCHIVE FILES WILL BE PLACED IN THE ARCHIVE DIRECTORY"
LET l_string2 = " PRESS <RETURN> WHEN READY "
LET l_string3 = "REMEMBER TO BACKUP THE ARCHIVE DIRECTORY TO TAPE #: "
LET l_count = 0
LET l_count2 = 0
LET l_arc_cnt = 0
LET l_flag = 1
SELECT count(*)
INTO l_arc_cnt
FROM archive
WHERE archive.case_num = "00-000-00000"
IF l_arc_cnt = 0 THEN
INSERT INTO ARCHIVE
VALUES("00-000-00000",0,"07/13/65","1")
END IF
#
# SELECT THE NEXT ARCHIVE ID FROM THE ARCHIVE TABLE
#
SELECT MAX(arc_num)
INTO l_arc_num
FROM archive
open form f_B152 from "B1_5_2"
display form f_B152
let the_date[1,6] = "09/30/"
let the_date[7,10] = year(today) - 1
let as_of_date = the_date
message "PRESS <ESC> TO BEGIN ARCHIVE/PURGE PROCESSING; <DEL> TO EXIT"
input by name as_of_date
without defaults
after field as_of_date
if as_of_date is null then
call display_err(18)
next field as_of_date
end if
if as_of_date > the_date then
call display_err(129)
next field as_of_date
end if
end input
if int_flag then
call display_msg(86)
let int_flag = false
let g_report_flag = "N"
exit program
end if
message ""
let l_user_date = as_of_date
-- get a count of all closed cases that match the criteria
SELECT COUNT(*) INTO l_count2
FROM case
WHERE case_status = "C" and
closre_date <= l_user_date
IF l_count2 = 0 THEN
CALL display_msg(79)
EXIT PROGRAM
END IF
LET l_arc_num = l_arc_num + 1
CLEAR SCREEN
#
# THIS CALLS ARCHIVE PROCESSES FOR EACH TABLE, EACH OF THESE FUNCTIONS
# WRITES ALL CLOSED CASES AND THEIR ASSOCIATED RECORDS TO AN ASCII FILE
# USING A "|" AS A DELIMITER
#
CREATE TEMP TABLE arc_temp (case_num char(12),
arc_num smallint,
arc_date date,
arc_status char(1))
DISPLAY "ARCHIVING ACCOUNT table... " AT 12,22
CALL acc_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING ADJUSTMENT..." AT 12,22
-- CALL adj_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING ASS_LETTER ... " AT 12,22
-- CALL ass_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING CASE table... " AT 12,22
-- CALL case_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING CASE DISPOSITION table... " AT 12,22
-- CALL disp_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING CASE OLD table... " AT 12,22
-- CALL caseold_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING CASE OTHER table... " AT 12,22
-- CALL caseoth_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING CL table... " AT 12,22
-- CALL cl_archive(l_arc_num, l_user_date)
--
-- DISPLAY "ARCHIVING CREW table... " AT 12,22
-- CALL crew_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING DELINQUIENT ADDRESS table... " AT 12,22
-- CALL delinq_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING DEMAND LETTER table... " AT 12,22
-- CALL dem_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING EMPLOYEE table... " AT 12,22
-- CALL emp_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING EPPA table... " AT 12,22
-- CALL eppa_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING FLSA table... " AT 12,22
-- CALL flsa_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING FMLA table... " AT 12,22
-- CALL fmla_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING H1A table... " AT 12,22
-- CALL h1a_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING H1B table... " AT 12,22
-- CALL h1b_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING H2A table... " AT 12,22
-- CALL h2a_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING HOMEWORKER table... " AT 12,22
-- CALL hom_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING INSTALL OTHER table... " AT 12,22
-- CALL insto_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING INSTALLMENT table... " AT 12,22
-- CALL instm_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING INVESTIGATION table... " AT 12,22
-- CALL invest_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING JOINT EMPLOYER table... " AT 12,22
-- CALL empr_archive(l_arc_num, l_user_date)
-- DISPLAY "ARCHIVING MSPA ta