initialize_sms_error_table ();
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
outf = NULL;
}
+ /* The following WHENEVER is declarative, not executed,
+ * and applies for the remainder of this file only.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
sq = sq_create();
EXEC SQL DECLARE z CURSOR FOR
SELECT DISTINCT u.login, u.fullname, f.name
FROM users u, filesys f
- WHERE f.label = u.login and u.status = 1 and f.type = "AFS"
+ WHERE f.label = u.login and u.status = 1 and f.type = 'AFS'
ORDER BY name;
EXEC SQL OPEN z;
while (1) {
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
-
/* $Header$
*
* This generates the /usr/lib/aliases file for the mailhub.
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
struct list *l, *memberlist;
register struct member *m;
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL SELECT modtime INTO :buf FROM users WHERE users_id = 0;
initialize_sms_error_table();
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
char affil[5];
EXEC SQL END DECLARE SECTION;
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
/* get locks */
EXEC SQL DECLARE u_cursor1 CURSOR FOR
SELECT users_id, login, first, middle, last,
- mit_year, mit_dept, office_addr, office_phone,
+ affiliation, department, office_addr, office_phone,
home_addr, home_phone, potype, box_id
FROM users
WHERE status != 3;
sprintf(nfs_dir, "%s/nfs", DCM_DIR);
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
changed = do_nfs();
machs = sq_create();
lists = sq_create();
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE s_cursor CURSOR FOR
SELECT m.name, s.value3
EXEC SQL DECLARE l_cursor CURSOR FOR
SELECT gid, list_id
FROM list
- WHERE grp <> 0 AND active != 0;
+ WHERE grouplist != 0 AND active != 0;
EXEC SQL OPEN l_cursor;
while (1) {
EXEC SQL FETCH l_cursor INTO :gid, :lid;
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
outf = NULL;
}
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE x CURSOR FOR SELECT
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
outf = NULL;
}
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE x CURSOR FOR SELECT
- mit_id, login
- FROM users WHERE status != 3 and potype="POP";
+ clearid, login
+ FROM users WHERE status != 3 and potype='POP';
EXEC SQL OPEN x;
while (1) {
EXEC SQL FETCH x INTO :id, :login;
EXEC SQL CLOSE x;
EXEC SQL DECLARE y CURSOR FOR SELECT
- u.mit_id, s.string
+ u.clearid, s.string
FROM users u, strings s
- WHERE u.status != 3 and u.potype="SMTP" and u.box_id = s.string_id;
+ WHERE u.status != 3 and u.potype='SMTP' and u.box_id = s.string_id;
EXEC SQL OPEN y;
while (1) {
EXEC SQL FETCH y INTO :id, :string;
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
outf = NULL;
}
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE x CURSOR FOR
- SELECT login, mit_year FROM users WHERE status = 1;
+ SELECT login, affiliation FROM users WHERE status = 1;
EXEC SQL OPEN x;
while (1) {
EXEC SQL FETCH x INTO :login, :class;
initialize_sms_error_table ();
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
gettimeofday(&now, NULL);
cutoff = now.tv_sec - 14 * 24 * 60 * 60;
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE x CURSOR FOR
- SELECT u.login, u.mit_id, u.signature, u.sigdate, s.string
+ SELECT u.login, u.clearid, u.signature, u.sigdate, s.string
FROM users u, strings s
WHERE u.status = 1 and u.sigwho = s.string_id and u.sigwho != 0
and u.secure <= :cutoff and u.secure != 0;
EXEC SQL END DECLARE SECTION;
#ifsql INGRES
- EXEC SQL CONNECT sms;
+ EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
- EXEC SQL DATABASE sms;
+ EXEC SQL DATABASE moira;
#endsql
if (argc == 2) {
outf = NULL;
}
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
machines = create_hash(1000);
EXEC SQL DECLARE x CURSOR FOR
SELECT DISTINCT f.mach_id, count(f.filsys_id)
FROM filesys f
- WHERE f.type="NFS"
+ WHERE f.type='NFS'
GROUP BY f.mach_id;
EXEC SQL OPEN x;
while (1) {
sprintf(zephyr_dir, "%s/zephyr", DCM_DIR);
#ifsql INGRES
-EXEC SQL CONNECT sms;
+EXEC SQL CONNECT moira;
#endsql
#ifsql INFORMIX
-EXEC SQL DATABASE sms;
+EXEC SQL DATABASE moira;
#endsql
changed = do_classes();
top = (struct zclass *)malloc(sizeof(struct zclass));
next = top;
+ /* The following is declarative, not executed,
+ * and so is dependent on where it is in the file,
+ * not in the order of execution of statements.
+ */
EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
EXEC SQL DECLARE classes CURSOR FOR SELECT class, xmt_type, xmt_id,
sub_type, sub_id, iws_type, iws_id, iui_type, iui_id
EXEC SQL DECLARE umember CURSOR FOR SELECT users.login
FROM users, imembers
- WHERE imembers.list_id = :zid and imembers.member_type="USER" and
+ WHERE imembers.list_id = :zid and imembers.member_type='USER' and
imembers.member_id=users.users_id;
EXEC SQL OPEN umember;
while (1) {
EXEC SQL DECLARE smember CURSOR FOR SELECT strings.string
FROM strings, imembers
WHERE imembers.list_id = :zid and imembers.member_id=strings.string_id
- and (imembers.member_type="STRING" or imembers.member_type="KERBEROS");
+ and (imembers.member_type='STRING' or imembers.member_type='KERBEROS');
EXEC SQL OPEN smember;
while (1) {
EXEC SQL FETCH smember INTO :str;