HP3000-L Archives

January 2000, Week 3

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:
"Johnson, Tracy" <[log in to unmask]>
Reply To:
Johnson, Tracy
Date:
Wed, 19 Jan 2000 22:04:01 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (91 lines)
Of the several responses I received on Monday regarding methods
to remove orphaned groups I preferred Scott's the best.  Although
his actually was the reverse of what I was looking for.  The
other big one used TDP and I wanted to avoid two pieces of
software.  This makes and/or launches a stream JOB.

I cooked up the following and it ONLY uses VEAUDIT using the
typical string compare from two files we all learned in
programming 101:

 o It only works on one ACCOUNT at a time as a parameter.

 o It only works on one VOLUME_SET at a time as a parameter.

 o Safety feature to ignore the MPEXL_SYSTEM_VOLUME_SET and
null parameters.

 o Perhaps VESoft will add it to their VECSL.

 o File is 128 bytes wide so be careful of WRAP-AROUND features
in your e-mail if you cut and paste.

 o Fixed EOF on sort files of 100000 records.  If you have more than
groups than that, increase the DISC on the BUILD commands.

 o Final result prefixed with !COMMENT so you don't endanger your
machine by testing.  Remove the !!COMMENT out of the VEFWRITE when
satisfied it is safe.  (And/Or remove the STREAM TOPURGE statement
at the bottom if you want to STREAM the result manually.)

BOT

PARM volset="" account=""
OPTION NOLIST
  IF "!volset" <> "" AND "!account" <> "" AND "!volset" <> "MPEXL_SYSTEM_VOLUME_SET"
  IF FINFO('NOVOL1','EXISTS')
    YESPURGE NOVOL1
  ENDIF
  BUILD NOVOL1;REC=-80,,F,ASCII;DISC=100000
  IF FINFO('NOVOL2','EXISTS')
    YESPURGE NOVOL2
  ENDIF
  BUILD NOVOL2;REC=-80,,F,ASCII;DISC=100000
  IF FINFO('TOPURGE','EXISTS')
    YESPURGE TOPURGE
  ENDIF
  BUILD TOPURGE;REC=-80,,F,ASCII;DISC=100000
  FILE TOPURGE=TOPURGE,OLD
  FILTER "REPORT @.!account;ONVS=!volset", "/" AND NOT &
    "COUNT    LIMIT    COUNT    LIMIT    COUNT    LIMIT";OUT=*NOVOL1,OLD
  FILTER "REPORT @.!account", "/" AND NOT &
    "COUNT    LIMIT    COUNT    LIMIT    COUNT    LIMIT";OUT=*NOVOL2,OLD
  LISTF NOVOL@,2
  ALTFILE NOVOL@;FLIMIT=EOF
  SETVAR NOVOL1 VEFOPEN('NOVOL1,OLD;ACC=IN')
  SETVAR TOPURGE VEFOPEN('TOPURGE,OLD;ACC=INOUT')
  SETVAR PURGEGROUP VEFWRITE(!TOPURGE,"!!JOB PURGEGRP,MANAGER.SYS;OUTCLASS=,1")
  REPEAT
    SETVAR PRIVGROUP VEFREAD(!NOVOL1)
    SETVAR PRIVSTRING STR("!PRIVGROUP",5,8)
    SETVAR FOUNDFLAG1 FALSE
    SETVAR NOVOL2 VEFOPEN('NOVOL2,OLD;ACC=IN')
    REPEAT
      SETVAR MPEXGROUP VEFREAD(!NOVOL2)
      SETVAR MPEXSTRING STR("!MPEXGROUP",5,8)
      IF "!PRIVSTRING" = "!MPEXSTRING"
        SETVAR FOUNDFLAG1 TRUE
      ENDIF
    FORRECS NOVOL2REC=NOVOL2,OLD
    SETVAR NOVOL2 VEFCLOSE(!NOVOL2)
    IF FOUNDFLAG1=FALSE
      SETVAR PURGEGROUP VEFWRITE(!TOPURGE,"!!COMMENT !!PURGEGROUP !PRIVSTRING.!account;ONVS=!volset")
      SETVAR PURGEGROUP VEFWRITE(!TOPURGE,"!!COMMENT YES")
    ENDIF
  FORRECS NOVOL1REC=NOVOL1,OLD
  SETVAR NOVOL1 VEFCLOSE(!NOVOL1)
  SETVAR PURGEGROUP VEFWRITE(!TOPURGE,"!!EOJ")
  SETVAR TOPURGE VEFCLOSE(!TOPURGE)
  ALTFILE TOPURGE;FLIMIT=EOF
  STREAM TOPURGE
ELSE
  ECHO **** Volume Set and or Account not Entered ****
  ECHO ***** Or MPEXL_SYSTEM_VOLUME_SET Entered ******
ENDIF


EOT
NNNN
Tracy M. Johnson
TRW Automotive Electronics

ATOM RSS1 RSS2