HP3000-L Archives

November 2007, Week 5

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:
Olav Kappert <[log in to unmask]>
Reply To:
Olav Kappert <[log in to unmask]>
Date:
Fri, 30 Nov 2007 20:55:48 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (74 lines)
Opps, I did not see the FTP.  So Dave is right.  You need to pipe in 
your input if you are going to use FTP.  The only way to do that is to 
echo everything needed for FTP into a file and use that as redirected input.

Olav.

Dave Powell, MMfab wrote:

>First off, FTP can't expand variables, but :echo can, so you need to build a
>file (any old temp file is ok), and redirect FTP's input to it, more or less
>like:
>
>!FILE  FTPI = FTPI; REC=-72,,F,ASCII
>!ECHO exitonerror                            >>  *FTPI
>!ECHO verbose                                >>  *FTPI
>!ECHO open whatever           >>  *FTPI
>!ECHO user whoever>>  *FTPI
>!ECHO put !remotefile                   >>  *FTPI
>!ECHO quit                                   >>  *FTPI
>!
>!RUN FTP.ARPA.SYS    <   FTPI
>!IF  FTPLASTERR      <>  0
>!    some error routine, etc
>
>This will also give you better error checking if anything goes wrong.
>
>Also, you dont need the 1st 4 setvars that just dummy-out the variables you
>are going to set later.
>
>Also, it looks to me like your code would eat the leading zeros single-digits
>months.  Try the "rht" function like Keven said
>
>----- Original Message ----- 
>From: "mag" <[log in to unmask]>
>To: <[log in to unmask]>
>Sent: Friday, November 30, 2007 13:58
>Subject: [HP3000-L] variable question
>
>
>hello,
>
>My file name,remotefile, is not coming out like I thought.  I am trying to
>name
>the file "cntr" and concatenate the month and year to the file name.  What I
>am getting is  this : "!file_name".  Can you see what I am doing wrong?
>Thanks!
>
>!setvar file_name ' '
>!setvar remotefile ' '
>!setvar mon ' '
>!setvar yr ' '
>!setvar mon '!hpmonth'
>!setvar yr '!hpyear'
>!setvar file_name 'CNTR!mon!yr'
>!setvar remotefile "!file_name"
>!COMMENT
>
>!FTP
>OPEN
>USER
>!put !remotefile
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>  
>

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

ATOM RSS1 RSS2