I'm getting the error:
(FOC1517) UNRECOGNIZED COMMAND ON TABLE
(FOC1517) UNRECOGNIZED COMMAND HEADING
(FOC1517) UNRECOGNIZED COMMAND ""
(FOC1517) UNRECOGNIZED COMMAND ON TABLE SET PAGE-NUM OFF
(FOC1517) UNRECOGNIZED COMMAND ON TABLE NOTOTAL
(FOC1517) UNRECOGNIZED COMMAND ON TABLE SET PAGE NOLEAD
(FOC1517) UNRECOGNIZED COMMAND ON TABLE PCHOLD FORMAT PDF
(FOC1517) UNRECOGNIZED COMMAND ON TABLE SET HTMLCSS ON
(FOC1517) UNRECOGNIZED COMMAND ON TABLE SET STYLE *
(FOC1517) UNRECOGNIZED COMMAND UNITS=IN,
(FOC1517) UNRECOGNIZED COMMAND SQUEEZE=ON,
(FOC1517) UNRECOGNIZED COMMAND ORIENTATION=PORTRAIT,
(FOC1517) UNRECOGNIZED COMMAND GRID=OFF,
(FOC1517) UNRECOGNIZED COMMAND LEFTMARGIN=0.250000,
(FOC1517) UNRECOGNIZED COMMAND RIGHTMARGIN=0.250000,
(FOC1517) UNRECOGNIZED COMMAND TOPMARGIN=0.250000,
(FOC1517) UNRECOGNIZED COMMAND BOTTOMMARGIN=0.250000,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=REPORT,
(FOC1517) UNRECOGNIZED COMMAND GRID=OFF,
(FOC1517) UNRECOGNIZED COMMAND FONT='ARIAL',
(FOC1517) UNRECOGNIZED COMMAND SIZE=10,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=TITLE,
(FOC1517) UNRECOGNIZED COMMAND STYLE=BOLD,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=TABHEADING,
(FOC1517) UNRECOGNIZED COMMAND SIZE=12,
(FOC1517) UNRECOGNIZED COMMAND STYLE=BOLD,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=TABFOOTING,
(FOC1517) UNRECOGNIZED COMMAND SIZE=12,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, BOTTOMGAP=0.05, $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, TOPGAP=0.05, $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, SIZE=10 GRID=OFF,WIDTH=10.0000,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, LINE=1, SIZE=10, STYLE=BOLD,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, LINE=1,OBJECT=TEXT, COLOR='NAVY',
ITEM=1,WIDTH=1.5000, JUSTIFY=RIGHT,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING,
LINE=1,OBJECT=TEXT,ITEM=2,WIDTH=0.20000,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, LINE=1,OBJECT=TEXT,ITEM=3,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, LINE=1,OBJECT=TEXT,ITEM=4,
COLOR='NAVY',WIDTH=1.5000, JUSTIFY=RIGHT,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING,
LINE=1,OBJECT=TEXT,ITEM=5,WIDTH=0.20000,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND TYPE=HEADING, LINE=1,OBJECT=TEXT,ITEM=6,
(FOC1517) UNRECOGNIZED COMMAND $
(FOC1517) UNRECOGNIZED COMMAND ENDSTYLE
Here is the code I'm using.
-* jsa_header
ENGINE SQLORA SET DEFAULT_CONNECTION &MYSERV
SQL SQLORA PREPARE JSA_HEADER FOR
SELECT
a.ACTIVITY_ID ,
A.OWNER_ID ,
a.OWNER_ORG ,
a.ACTIVITY_TITLE ,
a.ACTIVITY_ORG ,
a.ACTIVITY_LOCATION ,
a.JSA_TITLE ,
a.WORK_PLANNER ,
a.WORK_PLANNER_ORG ,
a.WP_PHONE ,
a.SCOPE_DESC ,
a.REASON ,
a.ENVELOPE ,
ap.APPROVAL_PERSON ,
ap.APPROVAL_ORG ,
ap.APPROVAL_ROLE ,
ap.CREATED_DATE ,
ep.SL_NAME AS WPPERSON
FROM
ACT a ,
APP ap ,
per ep
WHERE
a.ACTIVITY_ID = ap.ACTIVITY_ID
AND UPPER(a.work_planner) = UPPER(ep.SL_OPERID)
AND a.ACTIVITY_ID = &ACTIVITY_ID;
-*PUT RESULTS OF QUERY INTO A WEBFOCUS HOLD FILE
TABLE
ON TABLE HOLD AS HEADER_1
END
-RUN
DEFINE FILE HEADER_1
AP_PERSON/A50V = ' ';
WP_PERSON/A50V = WPPERSON;
END
-RUN
ENGINE SQLORA SET DEFAULT_CONNECTION &MYSERV
SQL SQLORA PREPARE JSA_HEADER_II FOR
SELECT
a.ACTIVITY_ID ,
A.OWNER_ID ,
a.OWNER_ORG ,
a.ACTIVITY_TITLE ,
a.ACTIVITY_ORG ,
a.ACTIVITY_LOCATION ,
a.JSA_TITLE ,
a.WORK_PLANNER ,
a.WORK_PLANNER_ORG ,
a.WP_PHONE ,
a.SCOPE_DESC ,
a.REASON ,
a.ENVELOPE ,
ap.APPROVAL_PERSON ,
ap.APPROVAL_ORG ,
ap.APPROVAL_ROLE ,
ap.CREATED_DATE ,
ep.SL_NAME AS APNAME
FROM
ACT a ,
APP ap ,
per ep
WHERE
a.ACTIVITY_ID = ap.ACTIVITY_ID
AND UPPER(ap.APPROVAL_PERSON) = UPPER(ep.SL_OPERID)
AND a.ACTIVITY_ID = &ACTIVITY_ID;
TABLE
ON TABLE HOLD AS HEADER_2
END
-RUN
DEFINE FILE HEADER_2
AP_PERSON/A50V = APNAME;
WP_PERSON/A50V = ' ';
END
-RUN
-*PUT RESULTS OF QUERY INTO A WEBFOCUS HOLD FILE
TABLE FILE HEADER_1
PRINT
ACTIVITY_ID NOPRINT
OWNER_ID NOPRINT
OWNER_ORG NOPRINT
ACTIVITY_TITLE NOPRINT
ACTIVITY_ORG NOPRINT
ACTIVITY_LOCATION NOPRINT
JSA_TITLE NOPRINT
WORK_PLANNER NOPRINT
WORK_PLANNER_ORG NOPRINT
WP_PHONE NOPRINT
SCOPE_DESC NOPRINT
REASON NOPRINT
ENVELOPE NOPRINT
APPROVAL_PERSON NOPRINT
APPROVAL_ORG NOPRINT
APPROVAL_ROLE NOPRINT
CREATED_DATE NOPRINT
AP_PERSON NOPRINT
WP_PERSON NOPRINT
BY ACTIVITY_ID NOPRINT
ON TABLE HOLD AS NEWTABLE
MORE
FILE HEADER_2
END
-RUN
ON TABLE
HEADING
"Approving Mgr Name:<+0>
Approving Mgr Org:<+0> "WorkPlanner: ""