90 lines
2.9 KiB
Plaintext
90 lines
2.9 KiB
Plaintext
function INET_listdict(Request)
|
|
|
|
***************************************************************************
|
|
* Project : OpenInsight for Internet
|
|
*
|
|
* Name : INET_Finalize
|
|
* Description: Finalization of response to a request.
|
|
*
|
|
* Parameters:
|
|
* Request [in/out] -- HTTP request (see INET_EQUATES)
|
|
* Response [in/out] -- Response to request
|
|
*
|
|
***************************************************************************
|
|
declare function inet_queryparam, inet_msg, inet_rlist
|
|
declare subroutine rlist, activate_save_select
|
|
|
|
$insert Logical
|
|
$insert Inet_Equates
|
|
$insert msg_equates
|
|
|
|
|
|
RlistIssued = Inet_QueryParam(Request, "RLISTSTMT", "", "" )
|
|
*ListsId = 'SCHED_RPT1*EPIPROGAM_1'
|
|
*activate_save_select( ListsId )
|
|
*MsgInfo = ''
|
|
*MsgInfo<mtext$> = RlistIssued
|
|
*RlistHtmlResults = inet_msg( Request, MsgInfo, '', '' )
|
|
*return RlistHtmlResults
|
|
CMD = 'LIST SCHEDULE SHIP_DATE WITH SHIP_DATE FROM "9/1/99" TO "9/10/99" BY CUST_CITY'
|
|
*CMD = "LIST SCHEDULE WITH SHIP_DATE FROM '09/1/99' TO '9/30/99' BREAK-ON CUST_CITY ":"'V'":' JUSTLEN 55 SHIP_DATE JUSTLEN 0 DET-SUPP '
|
|
*CMD:= 'LIMIT SHIP_DATE FROM "09/01/99" TO "09/30/99" TOTAL SHIP_QTY JUSTLEN 6 '
|
|
*Cmd:= 'TOTAL SHIP_AMOUNT JUSTLEN 16 ID-SUPP'
|
|
*Cmd:= "'Qty' ":' TOTAL SHIP_AMOUNT JUSTLEN 16 'HEADING " Billings by Company ':"'T'":" PAGE # 'PPL' for Selected Dates From (09/01/99 ) Thru (09/30/99)":" ID-SUPP"
|
|
*Cmd = "LIST SPC_CLEAN_SRD PRE POST DELTA TOTAL PRE TOTAL POST TOTAL DELTA"
|
|
*Cmd = "LIST LSL_USERS BY LAST LAST FIRST"
|
|
*DEBUG
|
|
RlistHtmlResults = inet_rlist( Request, CMD )
|
|
return RlistHtmlResults
|
|
|
|
convert @lower_case to @upper_case in Filename
|
|
Html = ''
|
|
*DEBUG
|
|
open 'DICT.':Filename to Dvar then
|
|
Stmt = 'SELECT DICT.':Filename:' BY TYPE BY FMC BY COLUMN_NAME WITH @ID NOT STARTING "%"'
|
|
Html = '<HTML><HEAD><TITLE> Dictionary listing for file ':Filename:'</TITLE><BODY><TABLE BORDER=2>'
|
|
Html:= '</TABLE></HEAD></HTML>'
|
|
HoldHtml = Html
|
|
Body = ''
|
|
RList( Stmt, 5, '', '', '' )
|
|
Eof = 0
|
|
Colcnt = 0
|
|
Body = "<TR>"
|
|
Body := '<TH>Name</TH>'
|
|
Body := '<TH>Type</TH>'
|
|
Body := '<TH>Pos</TH>'
|
|
Body := '<TH>SM</TH>'
|
|
Body := '<TH>Just</TH>'
|
|
Body := '<TH>Length</TH>'
|
|
loop
|
|
readnext @id else Eof = 1
|
|
until Eof
|
|
ThisRec = xlate( 'DICT.':Filename, @id, '', 'X' )
|
|
Name = @id
|
|
Type = ThisRec<1>
|
|
Pos = ThisRec<2>
|
|
SM = ThisRec<4>
|
|
Just = ThisRec<9>
|
|
Length = ThisRec<10>
|
|
/*
|
|
ColCnt += 1
|
|
if ColCnt = 3 then
|
|
Body := '</TR><TR>'
|
|
ColCnt = 0
|
|
end else
|
|
*Body := '</TR>'
|
|
end
|
|
*/
|
|
Line = Name:@fm:Type:@fm:Pos:@fm:SM:@fm:Just:@fm:Length
|
|
swap @fm with '</TD><TD>' in Line
|
|
Line = '<TR><TD>':Line:'</TD></TR>'
|
|
Body := Line
|
|
repeat
|
|
swap '</TABLE>' with Body:'</TABLE></BODY>' in Html
|
|
end else
|
|
Html = inet_msg(Request, 'Unable to open the dictionary for file ':Filename)
|
|
end
|
|
*return Html
|
|
return ''
|
|
|