HP3000-L Archives

November 2004, 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:
"Dave Powell, MMfab" <[log in to unmask]>
Reply To:
Dave Powell, MMfab
Date:
Mon, 1 Nov 2004 11:20:38 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (106 lines)
We use the temp file trick here all the time.  If you let echo build the temp
file for you, it tolerates >> even on the1st line.  Just one less thing to
worry about if you ever add lines like 'exitonerror' or 'verbose' before the
'open'.

The temp file trick and the trick with MPE commands inside the FTP input are
not incompatible, and they help solve different issues.

IIRC, I checked out the 'if' trick when someone else reported problems with
FTP not setting its status variables correctly.  Another possible use might be
to try to get a file, then use MPE commands to check whether it exists, stream
a job to process it, and then  move on to the next get or put ever leaving FTP
or closing the connection.  Or maybe :run a quick program to read the new file
and build a reply file to put.  I don't have this in production, but if I did,
it would all be inside a temp file, something like (untested)
echo get myfile                           >> tempfile
echo :if finfo ('myfile', 'exists')     >> tempfile
echo    :stream myjob                 >> tempfile
echo :endif                                 >> tempfile
which is a whole different thing than
if  somecondition
   echo get myfile              >> tempfile
endif

Dave Powell,   MMfab.

----- Original Message -----
From: "Tony Summers" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Saturday, October 30, 2004 10:15
Subject: Re: [HP3000-L] Does 'IF' really works?


The simpler workaround is to prepare a temp file in the JCL as follows
(not the difference between >temp and >>temp)

!Echo  OPEN 192.168.1.111 >temp
!echo  USER MGR.TFTP >>temp
!echo  pass >>temp
!if greg = "false" then
!  Echo get jobsmpl >>temp
!endif
!echo quit >>temp
!#
!# Now run FTP with temp file
!#
!run frp.arpa.sys <temp
!if FTPJCQ etc
<snip>

> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Dave Powell, MMfab
>
> One minor addition to all the other replies about why it won't
> work......  I once did a test where it seems you can have mpe 'if',
> commands & end-ifs within the ftp input, like trying to get a file and

> then setting a variable if the get succeeded while ftp is still
> running, instead of waiting till after you exit.
>
> ----- Original Message -----
> From: "Greg Terterian" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Friday, October 29, 2004 09:04
> Subject: [HP3000-L] Does 'IF' really works?
>
>
> > I have the following test script:
> >
> > !JOB GREG,MGR.TFTP,PUB;HIPRI
> > !SETVAR GREG "TRUE"
> > !FTP
> > OPEN 192.168.1.111
> > USER MGR.TFTP
> >
> > PASS
> > !IF GREG = "FALSE" THEN
> > GET JOBSMPLE
> > !ENDIF
> > QUIT
> > !EOJ
> >
> > And here is the $STDLIST for that script... as you can see,
> it checks the
> condition and says that it is going to ignore till it finds the
> matching endif, but is still processing the lines inbetween.  Am I
> missing something?
> Or FTP does not care about the 'IF'?
> >
> > :JOB GREG,MGR.TFTP,PUB.
> >  Priority = DS; HIPRI; Time = UNLIMITED seconds.
> >  Job number = #j91.
> >  FRI, OCT 29, 2004,  8:56 AM.
> >  HP3000  Release: C.70.00   User Version: C.70.00
> >  MPE/iX  HP31900 C.39.06  Copyright Hewlett-Packard 1987.
> >  All rights reserved.
> >  STREAMED BY GREG,OP.AMSOP (#S88) ON LDEV# 8
> >     STREAM DATE:   FRI, OCT 29, 2004,  8:56 AM
> >  :SETVAR GREG "TRUE"
> >  :FTP
<snip>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2