**********************************************************************************************
      * DBG189R4: Add standard HTML header/footer to converted *SPLF
      * Copyright (C) 2000  Martin Rowe   <martin@dbg400.net>
      *
      * This program is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published by
      * the Free Software Foundation; either version 2 of the License, or
      * (at your option) any later version.
      *
      * This program is distributed in the hope that it will be useful,
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      * GNU General Public License for more details.
      *
      * You should have received a copy of the GNU General Public License
      * along with this program; if not, write to the Free Software
      * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      **********************************************************************************************
     H DATEDIT(*YMD) DEBUG(*YES) OPTION(*NODEBUGIO : *SRCSTMT)
      **********************************************************************************************
     FDBGOLDD1  IF   E           K DISK
     FDBG1872W  O    F  255        DISK
      **********************************************************************************************
     D P#Document      S             10
     D P#HTMLTitle     S             50
     D HTMLLine        S             79
     D Record          S            255
      **********************************************************************************************
      * CONSTANTS:
      **********************************************************************************************
     D Lower           C                   CONST('abcdefghijklmnopqrstuvwxyz')
     D Upper           C                   CONST('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
      **********************************************************************************************
      *  ENTRY PARAMETERS
      **********************************************************************************************
     C     *ENTRY        PLIST
     C                   PARM                    P#Document
     C                   PARM                    P#HTMLTitle
      **********************************************************************************************
      *
     C     P#Document    CHAIN     DBGOLDD1                           80
      *
B001 C                   DOW       NOT *IN80
     C     Lower:Upper   XLATE     DFTEXT        HTMLLine
B002 C                   SELECT
S002 C                   WHEN      P#Document = 'HTMLSTART'
     C                             AND HTMLLine = '<TITLE></TITLE>'
     C                   EVAL      Record = %SUBST(DFTEXT : 1 : 7) +
     C                             %TRIM(P#HTMLTitle) + %SUBST(DFTEXT : 8 : 8)
S002 C                   WHEN      P#Document = 'HTMLSTART'
     C                             AND HTMLLine = '<H1></H1>'
     C                   EVAL      Record = %SUBST(DFTEXT : 1 : 4) +
     C                             %TRIM(P#HTMLTitle) + %SUBST(DFTEXT : 5 : 5)
S002 C                   OTHER
     C                   EVAL      Record = DFTEXT
E002 C                   ENDSL
      * Write out the current line
     C                   EXCEPT    TFRFORMAT
      *
     C     P#Document    READE     DBGOLDD1                               80
E001 C                   ENDDO
      *
      *
     C                   EVAL      *INLR = *on
     C                   RETURN
      **********************************************************************************************
     ODBG1872W  E            TFRFORMAT
     O                       Record             255
Topic revision: r1 - 26 May 2005 - 19:42:32 - MartinRowe
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DBG/400? Send feedback