HP3000-L Archives

May 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul H. Christidis" <[log in to unmask]>
Reply To:
Date:
Thu, 7 May 1998 13:17:33 PDT8
Content-Type:
text/plain
Parts/Attachments:
text/plain (213 lines)
Cynthia,

The only way I know of 'deleting' 'old' versions of a form is to copy the
'active' forms to a new forms file, compile the new one and then replace the
old one with the new.  In the process one would also need to re-specify the
GLOBAL setting, if different from the defaults, any defined save fields and
any 'ARB' definitions.

The attached command file will copy the active forms, establish any parent
child relationships and compile the new forms file. (It does NOT handle
GLOBAL settings, save fields and 'ARB' definitions).

Regards
Paul H. Christidis

-------------------------------<Start Cut *+1 for VFORMCLN
parm infile="?"; outfile="newvform"; entry='MaIn'
#
# Command file:  vformcln    1998/05/06
# Author:        Paul H. Christidis  : [log in to unmask]
# Remarks:       Will generate the 'spec' file needed and 'clean'
#                a 'VPLUS' forms file.
#------------------------------------------------------------
# ReadFormList section.  Reads the output of the 'forms' command
# of formspec and generates the needed 'copy' and 'relate' commands.
#
if "!entry" = "ReadFormList" then
   while (POS("-----",(SETVAR(_vp_text,INPUT()))) = 0) do
   endwhile
#
   setvar _vp_relate_count 0
   while (POS("EXIT ",(SETVAR(_vp_text,INPUT()))) = 0) AND &
                      (LEN(_vp_text) > 4)              do
     setvar _vp_form   STR(_vp_text,1,16)
     setvar _vp_parent RTRIM(STR(_vp_text,62,16))
     echo COPY !_vp_form IN !infile >> cleanspc
     if LEN(_vp_parent) <> 0 then
        echo RELATE !_vp_form TO !_vp_parent >> rlatspec
        setvar _vp_relate_count _vp_relate_count + 1
     endif
   endwhile
   if _vp_relate_count <> 0 then
      print rlatspec;page=0 >> cleanspc
      purge rlatspec,temp
   endif
   echo COMPILE        >> cleanspc
   echo EXIT           >> cleanspc
   return
#
#  Main Section:
#  Display banner and/or usage, validate parameters, build files.
#
else
   setvar _vp_bell CHR(7)
   echo (PHC) FORMSPEC forms 'clean up' V98.05.06  !hpdatef, !hptimef
   setvar _vp_infile UPS("!infile")
   if "!_vp_infile" = "?" then
      echo Usage:   !_vp_bell
      echo ![FINFO(hpfile,"fname")] Infile [Outfile]
      echo
      echo   Infile - VLPUS forms file, qualified to the extent needed,
      echo            that will be 'cleaned up'.
      echo
      echo  Outfile - Name of new forms file.  The new forms file must
      echo            NOT already exist.  [Default: NewVform]
      echo
      echo  NOTE: This command file cannot handle 'save' fields.  The
      echo       user MUST create any save fields in the new file and
      echo       then execute this command.
      echo
      return
   endif
   setvar mpexfinfoany 1
   setvar _vp_error 0
   if NOT finfo(_vp_infile,"exists") then
      echo !_vp_bell ** File !_vp_infile does NOT exist...
      setvar _vp_error _vp_error + 1
   else
      if finfo(_vp_infile,"fmtfcode") <> "VFORM" then
         echo !_vp_bell ** File !_vp_infile is NOT a VPLUS forms file...
         setvar _vp_error _vp_error + 1
      endif
   endif
   if _vp_error <> 0 then
     return
   endif
   echo !_vp_bell
   echo Warning** If !_vp_infile contains any 'SAVE' fields you MUST
   echo   first create them in the newfile and then run this command.
   echo !_vp_bell
   setvar _vp_outfile UPS("!outfile")
   if FINFO(_vp_outfile,"exists") then
     if finfo(_vp_outfile,"fmtfcode") = "VFORM" then
       echo *** File '!_vp_outfile' already exists *** !_vp_bell
       setvar _vp_yn "Y"
       input _vp_yn;prompt="Purge !_vp_outfile [Y/n] ?!_vp_bell";wait=60
       if UPS(LTRIM(RTRIM(_vp_yn))) = "Y" then
          echo !_vp_bell Purging OLD version of !_vp_outfile file ....
          purge !outfile
       else
          echo !_vp_bell Cleaning of !_vp_infile is being canceled...
          return
       endif
     else
       echo !_vp_bell
       echo Output file already exists.  Cleaning being canceled...
       return
     endif
   endif
#
# Parameters were validated.  Generate batch command to invoke formspec
# and generate list of forms. XEQ command to process list and finally
# invoke formspec again to compile the new form.
#
   echo FILE !_vp_infile  > gpstdin
   echo FORMS            >> gpstdin
   echo EXIT             >> gpstdin
   echo !_vp_bell Generating list of forms if file !_vp_infile
   formspec.pub.sys gpstdin > fspeclst
   echo FILE !_vp_outfile  > cleanspc
   xeq !hpfile !_vp_infile, !_vp_outfile ;entry="ReadFormList" <fspeclst
   echo !_vp_bell Compiling new (!_vp_outfile) forms file...
   formspec.pub.sys cleanspc
   echo !_vp_bell
   echo ************************************************* !_vp_bell
   echo * The newform !_vp_outfile was compiled.  Use 'online'
   echo * FORMSPEC to create the 'Fast Form File' if needed and
   echo * manually rename !_vp_outfile to !_vp_infile when ready.
   echo ************************************************* !_vp_bell
endif
#
# Clean Up
#
deletevar mpexfinfoany
if bound(traceon) then
   showvar   _vp_@
else
   purge gpstdin,temp
   purge cleanspc,temp
   deletevar _vp_@
endif
-------------------------------------<End Cut *-1



______________________________ Reply Separator _________________________________
Subject: "123199" in MM3000 Forms Files
Author:  [log in to unmask] at CCGATE
Date:    05/07/98 07:33


My boss needs some help with physically deleting logical records in for=
mspec -
does anyone have any ideas?  Here at 3M Columbia, we have historically =
used
'991231' as the 'end-of-time' for certain data fields, and we are getti=
ng ready
to change this to '20271231', which prompts his need for help.  Thanks =
in
advance for any suggestions for Bill.

Cynthia Redick
3M Columbia
---------------------- Forwarded by Cynthia P. Redick/HE-Columbia/3M/US=
 on
05/07/98 08:39 AM ---------------------------
From: Bill Thalhuber on 05/06/98 05:13 PM

To: Cynthia P. Redick/HE-Columbia/3M/US@3M-Corporate
cc:
Subject: "123199" in MM3000 Forms Files

Below is what prompted my telephone request to you.

---------------------- Forwarded by Bill Thalhuber/HE-Columbia/3M/US on=

05/06/98 05:11 PM ---------------------------
From: Bill Thalhuber on 05/06/98 04:46 PM

To: Marcia Odom/HE-Columbia/3M/US@3M-Corporate
cc: Al Columbia C. Smith/HE-Columbia/3M/US@3M-Corporate
Subject: "123199" in MM3000 Forms Files

"123199" appears in the following MM3000 forms files forms:

Forms File      Form    Comment

MPSFORM.PUB.CLMM[TEST]  AddFOHdr
MPSFORM.PUB.CLMM[TEST]  AddFOType5
MPSFORM.PUB.CLMM[TEST]  BatchAddFOHdr
MPSFORM.PUB.CLMM[TEST]  AddFOLine
MPSFORM.PUB.CLMM[TEST]  ChgFOLine
MPSFORM.PUB.CLMM[TEST]  ChgFOLine2
MPSFORM.PUB.CLMM[TEST]  ChgFOLineX

ORDFORM.PUB.CLMM[TEST]  AddWOShop       no relevance to FOE end-of-time=

ORDFORM.PUB.CLMM[TEST]  RevRecIss       no relevance to FOE end-of-time=


I used Qedit with a List "123199" command to identify the forms.  As fo=
rms
files are special, the results are ugly.

In the process I discovered that once deleted, a form's data remains in=
 the
forms file (even after the forms file has been compiled)!   To verify t=
his
phenomenon I added a new form, specially marked the form, deleted the f=
orm,
compiled the forms file, and could still observe the form.
=

ATOM RSS1 RSS2