HP3000-L Archives

September 1998, 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:
"Fontaine, Charles" <[log in to unmask]>
Reply To:
Fontaine, Charles
Date:
Thu, 17 Sep 1998 10:16:57 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (93 lines)
> If you have MPEX from VESOFT you can use the REPEAT FORRECS construct.
> Here is an example that reads an ASCII file (FTPFILE2) of fully qualified
> filenames and then FTP's them to another site.  These commands can easily
> be placed in a command file or UDC.
>
> RUN MPEX.PUB.VESOFT
> %PRINT FTPFILE2
> %RUNCREATE FTP.ARPA.SYS
> %RUNINPUT OPEN 123.456.789.0
> %RUNINPUT USER Username userpass
> %RUNINPUT EXITONERROR
> %RUNINPUT CD D:\WELLPATH
> %RUNINPUT DIR
> %REPEAT
> %  ALTFILE !CURRENTREC;SQUEEZE
> %  SETVAR TARGETFILE TOKEN("!CURRENTREC",".")
> %  SETVAR FULLQUALFILE "!CURRENTREC"
> %  SHOWVAR TARGETFILE
> %comment   IF VEFINFO("!FULLQUALFILE").EOF > 0
> %  RUNINPUT DELETE !TARGETFILE
> %  RUNINPUT PUT !CURRENTREC  !TARGETFILE
> %comment   ENDIF
> %FORRECS CURRENTREC=FTPFILE2,OLD
> %RUNINPUT DIR
> %RUNINPUT QUIT
> %RUNACTIVATE
> %SHOWVAR FTP@
>
> ----------
> From:  Genute, Thomas
> Sent:  Thursday, September 10, 1998 7:58 PM
> To:  [log in to unmask]
> Subject:  Re: using 'while' at command prompt on HP3000?
>
> Another way to do this is to XEQ a separate command file from your initial
> command file with input redirection.  Your second command file would have
> the while loop with an input statement to set a variable to the line.  If
> you insist on a single self contained command file you can create the
> "called" command file before executing it with echo statements and output
> redirection.
>
> XEQ INPROC.COMMAND.SYS < INFILE
>
>
>                 -----Original Message-----
>                 From:   Jan Gerrit Kootstra
> [mailto:[log in to unmask]]
>                 Sent:   Friday, September 04, 1998 4:42 PM
>                 To:     [log in to unmask]
>                 Subject:        Re: using 'while' at command prompt on
> HP3000?
>
>                 Steve Bagdon schreef:
>
>                 > Anyone have a quick example on how to read through an
> ascii file,
>                 > waiting for eof, and reading each record into a UDC
> variable for
>                 > processing? Looking for an example in the MPE/ix
> Commands
> Reference
>                 > Manual (Vol I/II), but nothing exactly as I need is in
> there.
>                 > Repeatedly using 'input' against an acii file returns
> the
> first line
>                 > of the file.
>                 >
>                 > There's a reason we want this in UDC, so it would be
> good
> to figure
>                 > this out. Anyone? Thanks!
>                 >
>                 > Steve B.
>
>                    Steve,
>
>                 using the input against an ascii file can be done, but for
> that you need
>                 to copy the original file contents into a message file.
> The
> message file
>                 uses destructive reads (each record is deleted after a
> read
> command).
>
>
>                 Good luck,
>
>
>                 Jan Gerrit Kootstra
>

ATOM RSS1 RSS2