HP3000-L Archives

July 1996, Week 2

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:
JOHN KORB <[log in to unmask]>
Reply To:
JOHN KORB <[log in to unmask]>
Date:
Tue, 9 Jul 1996 15:52:35 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (115 lines)
Leonard:
 
I've done something similar to what you ask using UDCs on MPE/iX.  I've included the
full listings of the UDCs in case you wish to copy them as-is.
 
 
 
fldates fileset
comment
comment   Displays file date information
comment   Written by John P. Korb
comment   Created:   8/10/95
comment   Last Updated:
comment      10/12/95 JPK to delete temp variables used.
comment
setvar heading  "  File Name                Code   Record Type     EOF"
setvar heading  heading+"  Last Modified   Accessed"
echo !heading
setvar SaveMsgFence HPMsgFence
setvar HPMsgFence 1
purge zflist,temp
file zflist,new;rec=-254,1,v,ascii;disc=1500;temp
listf !fileset,6;*zflist
reset zflist
if finfo("zflist",19) <> 0 then
   setadlf <zflist
   setvar HPMsgFence SaveMsgFence
   deletevar reclimit, reccount, record, file_name
   deletevar mo_date, mo_yr, mo_mo, mo_da, mo_out
   deletevar mo_time, mo_hr, mo_min, mo_tout
   deletevar ac_date, ac_yr, ac_mo, ac_da, ac_out
   deletevar fl_code, fl_rec, fl_opts, fl_typ
   deletevar rec_typ, typ_chr, typ_ctl, fl_eof
else
   echo Fileset is Empty.
endif
*****
setadlf
comment
comment   This UDC is called from FLDATES and is NOT to
comment   be invoked independently!
comment
setvar reclimit finfo ('zflist',19)
setvar reccount 0
while reccount < reclimit do
   input record
   setvar  file_name  str(record,2,len(record)-1)
   setvar  flname     file_name+rpt(" ",26)
   setvar  flname     str("!flname",1,26)+" "
   setvar  mo_date    finfo("!file_name",-8)
   setvar  mo_yr      str("!mo_date",3,2)
   setvar  mo_mo      str("!mo_date",5,2)
   setvar  mo_da      str("!mo_date",7,2)
   setvar  mo_out     "!mo_yr"+"\"+"!mo_mo"+"\"+"!mo_da"+" "
   setvar  mo_time    finfo("!file_name",-24)/100+10000
   setvar  mo_hr      str("!mo_time",2,2)
   setvar  mo_min     str("!mo_time",4,2)
   setvar  mo_tout    "!mo_hr"+":"+"!mo_min"+"  "
   setvar  ac_date    finfo("!file_name",-7)
   setvar  ac_yr      str("!ac_date",3,2)
   setvar  ac_mo      str("!ac_date",5,2)
   setvar  ac_da      str("!ac_date",7,2)
   setvar  ac_out     "!ac_yr"+"\"+"!ac_mo"+"\"+"!ac_da"
   setvar  fl_code    finfo("!file_name",9)
   setvar  fl_code    fl_code+rpt(" ",6)
   setvar  fl_code    str("!fl_code",1,6)+" "
   setvar  fl_rec     finfo("!file_name",14)
   if finfo("!file_name",14) < 0 then
      setvar fl_rec   str("!fl_rec",2,len("!fl_rec")-1)+"B"
   else
      setvar fl_rec   fl_rec+"W"
   endif
   setvar  fl_rec     rpt(" ",6-len("!fl_rec"))+fl_rec+" "
   setvar  fl_opts    finfo("!file_name",-13)
   setvar  string  "FVUS"
   setvar  rec_typ    str("!string",((fl_opts lsr 6) band 3)+1,1)
   setvar  string  "BA"
   setvar  typ_chr    str("!string",((fl_opts lsr 2) band 1)+1,1)
   setvar  string  " C"
   setvar  typ_ctl    str("!string",((fl_opts lsr 8) band 1)+1,1)
   setvar  string  " KR?OSM?"
   setvar  fl_typ     str("!string",((fl_opts lsr 11) band 7)+1,1)
   if typ_ctl = " " and fl_typ <> " " then
      setvar  typ_ctl  fl_typ
      setvar  fl_typ   " "
   endif
   setvar  fl_eof     finfo("!file_name",19)
   setvar  fl_eof     rpt(" ",8-len("!fl_eof"))+"!fl_eof"+"  "
   setvar  out flname+fl_code+fl_rec+rec_typ+typ_chr+typ_ctl+fl_typ
   setvar  out out+fl_eof+mo_out+mo_tout+ac_out
   echo !out
   setvar reccount reccount+1
endwhile
*****
 
Note that in the line:
 
   setadlf <zflist
 
the output from the LISTF command is passed to the UDC "setadlf" (fldates spelled
backwards) as the UDC's input file.  The UDC "setadlf" then uses the "INPUT" command
to read a record from the file.
 
John
--------------------------------------------------------------
John Korb                            email: [log in to unmask]
Innovative Software Solutions, Inc.
 
The thoughts, comments, and opinions expressed herein are mine  and do not reflect
those of my employer(s), or anyone else.
 
 
PS:  Please send all email to the [log in to unmask] address, NOT this government
address.  Thanks.

ATOM RSS1 RSS2