**************************************************************************
      * DBG020R3: Display/edit document text
      * 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            Y
      **************************************************************************
      *  Document headings
     FDBGDFTH1IF  E           K        DISK                      A
      **************************************************************************
      *
     I           SDS
     I                                      254 263 #@USER
      *
     I              'Untitled document'   C         NEWDOC
      **************************************************************************
     C           *ENTRY    PLIST
     C                     PARM           P#DOCD 10
     C                     PARM           P#MODE  4
      **************************************************************************
      *  Get the program text
     C           P#DOCD    CHAINDBGDFTH1             80
      *  If not on file, create one
B001 C           *IN80     IFEQ *ON
     C                     MOVELNEWDOC    DFDOCH    P
     C                     MOVE P#DOCD    DFDOCD
     C                     Z-ADD*DATE     DFCDTE
     C                     Z-ADD*DATE     DFADTE
     C                     MOVE #@USER    DFCUSR
     C                     MOVE #@USER    DFAUSR
     C                     MOVE 'F'       DFLOCK
     C                     MOVE 'N'       DFHEAD
     C                     WRITEDB1DFTH
E001 C                     ENDIF
     C                     MOVE DFDOCH    P#TITL
      *  Call the editor or viewer, depending on mode
B001 C           P#MODE    IFEQ '*EDT'
      *  Call the editor program
     C                     CALL 'DBG020R4'             90
     C                     PARM           P#DOCD 10
     C                     PARM           P#TITL 50
X001 C                     ELSE
      *  Call the display program
     C                     CALL 'DBG030R4'             90
     C                     PARM           P#DOCD 10
     C                     PARM           P#TITL 50
     C                     PARM '0'       P#EDIT  1
E001 C                     ENDIF
      *  EXIT PROGRAM
     C                     SETON                     LR
     C                     RETRN
      **************************************************************************
Topic revision: r2 - 01 Oct 2014 - 19:37:01 - UnknownUser
 
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