No luck. We had to do what we call a SQL wrapper to eliminate the header and format the file the way the vendor wants it. It worked. Took too much time though.
SET SQLENGINE=SQLORA
SQL PREPARE MAXIENT_SCHED_QUERY FROM
select DISTINCT sfrstcr_pidm SFRSTCR_PIDM,
sfrstcr_term_code SFRSTCR_TERM_CODE,
sfrstcr_crn SFRSTCR_CRN,
sfrstcr_credit_hr SFRSTCR_CREDIT_HR,
sfrstcr_grde_code_mid SFRSTCR_GRDE_CODE_MID,
sfrstcr_rsts_code SFRSTCR_RSTS_CODE,
'B' SFRSTCR_SEQ,
null SFRSTCR_FILLER,
SSBSECT_SUBJ_CODE SSBSECT_SUBJ_CODE,
SSBSECT_CRSE_NUMB SSBSECT_CRSE_NUMB,
SZVCRSE_TITLE SZVCRSE_TITLE
from saturn.sfrstcr,
SATURN.SSBSECT,
SATURN.SZVCRSE
where SSBSECT_CRSE_NUMB = SZVCRSE_CRSE_NUMB
AND SSBSECT_SUBJ_CODE = SZVCRSE_SUBJ_CODE
AND SFRSTCR_CRN = SSBSECT_CRN
AND SFRSTCR_TERM_CODE = SSBSECT_TERM_CODE
AND SFRSTCR_RSTS_CODE NOT IN ('DD', 'DE')
AND SFRSTCR_TERM_CODE >= '201809'
union
select szviden_pidm,
sfrstcr_term_code,
-*
-* NOTE
-* CHOOSE A GENERIC COURSE CRN FOR THE SEMESTER WITH NO MEETING SCHEDULE FOR A SINGLE ROW RETURN, I USED A SENIOR PROJECT COURSE
-* THE OUTPUT REQUIRES A SINGLE ROW RETURN FOR THE FILLER ROW
-*
max('92474'),
max(0),
max(null),
max('xx'),
'A',
szviden_id,
max(null),
max(null),
max(null)
from saturn.szviden,saturn.sfrstcr
where szviden_pidm = sfrstcr_pidm
and sfrstcr_term_code >= '201809'
AND SFRSTCR_RSTS_CODE NOT IN ('DD', 'DE')
group by szviden_pidm,szviden_id,sfrstcr_term_code, 7
union
select szviden_pidm,
sfrstcr_term_code,
-*
-* NOTE
-* CHOOSE A GENERIC COURSE CRN FOR THE SEMESTER WITH NO MEETING SCHEDULE FOR A SINGLE ROW RETURN, I USED A SENIOR PROJECT COURSE
-* THE OUTPUT REQUIRES A SINGLE ROW RETURN FOR THE FILLER ROW
-*
max('92474'),
max(0),
max(null),
max('xx'),
'C',
'**********',
max(null),
max(null),
max(null)
from saturn.szviden,saturn.sfrstcr
where szviden_pidm = sfrstcr_pidm
and sfrstcr_term_code >= '201809'
AND SFRSTCR_RSTS_CODE NOT IN ('DD', 'DE')
group by szviden_pidm,szviden_id,sfrstcr_term_code, 7
order by 1,2,7
END
SQL EXECUTE MAXIENT_SCHED_QUERY;
-**********************************************************
TABLE
ON TABLE HOLD
END
-RUN
-**********************************************************
JOIN CLEAR *
SET ALL = PASS
JOIN SFRSTCR_TERM_CODE AND SFRSTCR_CRN IN HOLD TO
SSBSECT_TERM_CODE AND SSBSECT_CRN IN SSBSECT AS B
END
JOIN SFRSTCR_PIDM IN HOLD TO
SPRIDEN_PIDM IN SPRIDEN AS A
END
-*JOIN SSBSECT_SUBJ_CODE AND SSBSECT_CRSE_NUMB IN HOLD
-*TO ALL SZVCRSE_SUBJ_CODE AND SZVCRSE_CRSE_NUMB IN SZVCRSE AS C
-*END
JOIN SSBSECT_TERM_CODE AND SSBSECT_CRN IN HOLD TO
SIRASGN_TERM_CODE AND SIRASGN_CRN IN SIRASGN AS D
END
JOIN SIRASGN_PIDM IN HOLD TO
SPRIDEN_PIDM IN SPRIDEN AS E
END
JOIN SFRSTCR_PIDM IN HOLD TO
SZVSTDN_PIDM IN SZVSTDN AS F
END
JOIN SFRSTCR_PIDM IN HOLD TO
SPBPERS_PIDM IN SPBPERS AS G
END
JOIN SZVSTDN_MAJR_CODE_1 IN HOLD TO
STVMAJR_CODE IN STVMAJR AS H
END
END
JOIN SSBSECT_TERM_CODE AND SSBSECT_CRN IN HOLD TO ALL
SSRMEET_TERM_CODE AND SSRMEET_CRN IN SSRMEET AS I
END
JOIN SSRMEET_BLDG_CODE IN HOLD TO
STVBLDG_CODE IN STVBLDG AS J
END
SET PRINT = ONLINE
SET PAGE-NUM = NOPAGE
SET NODATA = '';
-*SET ALL = PASS
DEFINE FILE HOLD
TITLE/A1000 = IF SSBSECT_CRSE_TITLE IS MISSING THEN SZVCRSE_TITLE
ELSE SSBSECT_CRSE_TITLE;
END
DEFINE FILE HOLD
ZTITLE/A30 = EDIT(SZVCRSE_TITLE,'999999999999999999999999999999');
TITLE/A30 = IF SSBSECT_CRSE_TITLE IS MISSING THEN ZTITLE
ELSE SSBSECT_CRSE_TITLE;
CREDITS/D5.2 MISSING ON = SFRSTCR_CREDIT_HR;
BTIME/A8 = IF SSRMEET_BEGIN_TIME IS MISSING THEN '' ELSE
IF SSRMEET_BEGIN_TIME FROM '0000' TO '0959' THEN EDIT(SSRMEET_BEGIN_TIME,'$ 9:99 am') ELSE IF
SSRMEET_BEGIN_TIME FROM '1000' TO '1159' THEN EDIT(SSRMEET_BEGIN_TIME,'99:99 am')
ELSE IF SSRMEET_BEGIN_TIME FROM '1200' TO '1259' THEN EDIT(SSRMEET_BEGIN_TIME,'99:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '13%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 1:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '14%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 2:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '15%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 3:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '16%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 4:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '17%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 5:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '18%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 6:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '19%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 7:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '20%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$ 8:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '21%%' THEN ' 9'||EDIT(SSRMEET_BEGIN_TIME,'$$:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '22%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$10:99 pm')
ELSE IF SSRMEET_BEGIN_TIME LIKE '23%%' THEN EDIT(SSRMEET_BEGIN_TIME,'$$11:99 pm')
ELSE SSRMEET_BEGIN_TIME;
ETIME/A8 = IF SSRMEET_END_TIME IS MISSING THEN '' ELSE IF SSRMEET_END_TIME
FROM '0000' TO '0959' THEN EDIT(SSRMEET_END_TIME,'$ 9:99 am') ELSE IF SSRMEET_END_TIME
FROM '1000' TO '1159' THEN EDIT (SSRMEET_END_TIME,'99:99 am') ELSE
IF SSRMEET_END_TIME FROM '1200' TO '1259' THEN EDIT (SSRMEET_END_TIME,'99:99 pm') ELSE
IF SSRMEET_END_TIME LIKE '13%%' THEN EDIT(SSRMEET_END_TIME,'$$ 1:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '14%%' THEN EDIT(SSRMEET_END_TIME,'$$ 2:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '15%%' THEN EDIT(SSRMEET_END_TIME,'$$ 3:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '16%%' THEN EDIT(SSRMEET_END_TIME,'$$ 4:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '17%%' THEN EDIT(SSRMEET_END_TIME,'$$ 5:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '18%%' THEN EDIT(SSRMEET_END_TIME,'$$ 6:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '19%%' THEN EDIT(SSRMEET_END_TIME,'$$ 7:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '20%%' THEN EDIT(SSRMEET_END_TIME,'$$ 8:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '21%%' THEN ' 9'||EDIT(SSRMEET_END_TIME,'$$:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '22%%' THEN EDIT(SSRMEET_END_TIME,'$$10:99 pm')
ELSE IF SSRMEET_END_TIME LIKE '23%%' THEN EDIT(SSRMEET_END_TIME,'$$11:99 pm')
ELSE SSRMEET_END_TIME;
TIMES/A17 = IF BTIME IS NOT MISSING THEN BTIME||'-'||ETIME ELSE '';
SECTIN/A4 = IF SSBSECT_SEQ_NUMB
IS NOT '0'
THEN SSBSECT_SEQ_NUMB
ELSE ' ';
THU/A2 = IF SSRMEET_THU_DAY IS 'R' THEN 'Th' ELSE '';
SECTION/A5 = EDIT(SECTIN,'99999');
SUBJECT/A5 = EDIT(SSBSECT_SUBJ_CODE,'99999');
NUMBER/A5 = EDIT(SSBSECT_CRSE_NUMB,'99999');
STVBLDG_DESC/A20 = EDIT(STVBLDG_DESC,'99999999999999999999');
STVBLDG_DES/A40 = STVBLDG_DESC||(' '|SSRMEET_ROOM_CODE);
ELAST_NAME/A20 = IF ESPRIDEN_LAS IS '' THEN
'TBA' ELSE
EDIT(ESPRIDEN_FIR,'9')||('. '|
EDIT(ESPRIDEN_LAS,'999999999999999'));
TERM/A12= IF SFRSTCR_TERM_CODE LIKE '%09' THEN EDIT(SFRSTCR_TERM_CODE,
'FALL 9999$$') ELSE
IF SFRSTCR_TERM_CODE LIKE '%01' THEN
EDIT(SFRSTCR_TERM_CODE,'SPRING 9999$$') ELSE IF SFRSTCR_TERM_CODE LIKE '%06'
THEN EDIT(SFRSTCR_TERM_CODE,'SUMMER 9999$$') ELSE IF SFRSTCR_TERM_CODE
LIKE '%12' THEN EDIT(SFRSTCR_TERM_CODE,'WINTER 9999$$') ELSE
'';
COURSE/A50 = SUBJECT|NUMBER|SECTION|TITLE;
CRITE/A30 = IF SFRSTCR_TERM_CODE GE '999999' THEN 'Crite Sheet' ELSE '';
SCHEDLINE/A200 = IF SFRSTCR_SEQ EQ 'A' OR 'C' THEN SFRSTCR_FILLER||' ' ELSE
COURSE|' '|SSRMEET_MON_DAY|SSRMEET_TUE_DAY|SSRMEET_WED_DAY|
THU|SSRMEET_FRI_DAY|' '|TIMES|' '|SSRMEET_BLDG_CODE|' '|SSRMEET_ROOM_CODE|
' '|ELAST_NAME;
END
TABLE FILE HOLD
PRINT SCHEDLINE
IF SSBSECT_SSTS_CODE IS 'A'
WHERE SFRSTCR_RSTS_CODE NE 'DD' OR 'DE'
WHERE SFRSTCR_TERM_CODE IS '201809'
WHERE ASPRIDEN_CHANGE_IND IS MISSING
WHERE ESPRIDEN_CHANGE_IND IS MISSING
WHERE SZVSTDN_LEVL_CODE EQ '01'
BY ASPRIDEN_ID NOPRINT
BY SFRSTCR_SEQ NOPRINT
ON TABLE PCHOLD FORMAT ALPHA
END
-EXIT
WebFOCUS 7.6
Windows, All Outputs