ipretrev IPRETREV retrieves files from a remote destination via modem, ISDN or x25. It reads files from a queue - normally spool/2get, reads the DZ header field which should contain the tph number to dial unless the -n switch is ON for ignore dialno if not there. These files are just headers containing the DZ (and possibly the DF field to use the correct format file). The data part is ignored. If the number is busy or the call does not complete, the number is retried after 10 minutes. This can be modified by the 'interval' parameter. The modem setup, dial strings plus the remote computer's logon/off strings are held in a parameter file. The Syntax of this file are : ; comment setup: (setup string) dial: (dial and connect string) logon: (logon and file setup string) filestart: (start a file string) nextfile: (start of 2nd and subsequent files) fileend: (finish a file string) logoff: (logoff and kill comms string) disconn: (disconnect string) The strings are in uucp-like format where the syntax is : (send1string) (space) (receive1string) (spc) (s2) (spc) (r2) etc ie you send1, wait 5secs for r1, send s2 wait 5secs for r2 etc. To send a space, use \s or dbl quote that string. To wait a second - send a tilde (or redefine to your Wait chr) All keywords - setup, logon etc - are optional - if one does not exist, it is ignored. Embedded spaces may be specified by enclosing within double quotes. Null fields can be specified by two consequetive double quotes - "". If a wait is required howver ALWAYS SPECIFY BEFORE the dbl quotes eg: ~~~"" for a 3 second wait with nothing returned. The sections are done in the following order : stage 1- setup stage 2- dial stage 3- logon stage 4- file start stage 5- file end stage 4/5 (nextfile/fileend if required) stage 6- logoff stage 7- disconn In the parameter file several other options are : waitchr:\176 wait one sec chr default: tilde (octal 0176) dialchr:\174 'insert the dialno here' chr default: pipe (octal 0174) syschr:$ system precedent chr default: dollar (octal 044) This is used for Filename '$f' in filestart parameter. or $g for 6chr filename or '$s' for sequence number. timeout:10 timeout wait is 10 secs default: 5 secs bits:7 No of databits default: 8 speed:1200 the transmission speed default: none If you are using modems which cannot flow control and are not using kermit or zmodem, often pacing the line at a speed lower than the CONNECT eg speed:1100 for a 1200 bps line. commerror:NO\sCARRIER break in comms default: none This is advisable for large files sent without a protocol (ie no kermit or zmodem). If the remote system sends/echos copy back then this will also release the buffers. interval: Interval between attempts to send. default: 600secs kermit: Get the text using Kermit Protocol xmodem: Get the text using Xmodem Protocol ymodem: Get the text using Ymodem Protocol zmodem: Get the text using Zmodem Protocol zmskip: If zmodem, allow a SKIP file to be maintained containing names, sizes and dates of files brought over; so that only new files are received. This maintains a file called RETREV.SKIP.(name) in fix. Sundries eof: End of file for ascii - Not that hashes MUST be specified as \043 as they are otherwise interpreted as end-of-field eof:@\043@\043 localname: to change the filename eg: localname:$g.xy forcename:u/l to force the name of the incoming file upper/lower case. maxattempts: There is the limit on the number of attempts. File are sent to woops if this is exceeded. Default is 5 goes. Set to zero for NO limit. case: replies from remote system are Case Sensitive (yes) or case-insensitive (no) Default: Yes chrset: Source Character Set (SC Fip Header field) Default:ascii nofiles: String signifying no-files-waiting Default: none. Often you will ring through and, for some reason, there are no files to pick up. This is the string which says, go away for now. nofiles:NO SUCH FILE Note that 'nofiles' are only checked in 'filestart' and 'nextfile' sequences AND only if there is a Rcv string (ie 2nd, 4th or other even parameter). Ie : filestart:"call $f\r" - NEVER used 'nofiles' filestart:"call $f\r" OK - will check for 'nofiles' nohdr: Do NOT put a Fip style header on the file. dest: Destination (Fip Hdr field DU) to send the incoming files to. logfile: Name of a Logfile to contain the results of the transmission. eg logfile:/fip/log/retrev/ELE.\$d.\$m.\$y If the file exists, it is appended to. default: none There is no default queue where the log file is placed, so you must specify the full path. namelist: One or more filenames to get. This defaults to the contents of FipHdr field SN. This can be mixture of fixed names and variables as it is in FipSeq. If more than one name is specified, the 'nextfile' parameter must exist for the second and subsequent files. names are separated by commas, so to embed commas (and spaces and other non-printables), use FipSeq and top/tail with double quotes. namelist:first.txt , \ZZ , "Rh,u, bbbarb\017", last.txt if FipHdr field ZZ holds "abc,def" this example will try to retreive 5 files: first.txt, abc, def, something begining Rh.. and last.txt To specify in the startfile or nextfile, use '$f' or '$g' : startfile:"call $f/z\r" nextfile:"call $f/z\r" getall:yes/no If more than one file is to be retreived, stop on the first error (getall:no) or try to read all files sequentially (getall:yes - default) Example : setup:\r\r~+++ OK\r ath\r OK\r ~at&f\r OK\r ~atf0%b9600\r OK\r dial:~atdt9|\r\n CONNECT logon:li\r\n LOGON filestart:~~~new\s$f\r\n~~ logoff:lo\r\n LOGOFF lo\r\n disconn:~~+++ OK\r ~+++ OK\r ath\r OK\r That is for setup, we want to : send CR CR , wait a second, send +++ wait for OK CR send ath CR wait for OK CR send at&f CR wait for OK CR send atf0%b9600 CR wait for OK CR One point to note if you are using the TTY ports is that they INVARIABLY need to be setup using the STTY parameter file in tables/stty. Ths syntax of the file is covered in the Unix manual pages. The name of the file in tables/stty is : STTY_NAME_PORT (all uppercase) where NAME is the name of the parameter table which will be .. either "RETREV" or the "-z" default or the contents of the DF field where PORT is the TTY name ie for ttya : TTYA; for ttyx16 : TTYX16 For tuning, start off with one of the existing tty files in tables/stty. Note that stty for the Sparc loads a port using '(stty params) > /dev/ttya'. However the arrow is reversed on the rs6000 : '(stty params) < /dev/tty4'. For testing a new destination, it is rare to get it right first time! There is a 'verbose' flag, -L, which will display the whole dialogue as it happens. You can run the program manually from any terminal or window. eg ipretrev -s black2 -p 1210 -L or to also save the results in a log file : ipretrev -s black2 -p 1210 -L | tee LOGFILE Be careful in the latter case, that you are in a personal queue and not a tables or spool queue and that the name of the log file - LOGFILE in this case does not exist. How to specify filename(s) in the filestart and nextfile parameters : Fixed name - get the file 'today.txt' : filestart:~~~~~~"get today.txt\r" Pickup name from FipHdr field - get file whose name is in FipHdr field Y3 filestart:~~~~~~"get \Y3\r" or namelist:\Y3 filestart:~~~~~~"get $f\r" Input Parameters : Mandatory : -s : Spider name or TTY device name default: none -p : Spider port number default: none Optional : -n : do not look for nor check the tph number default: DZ field is tph -z : default parameter table to setup comms if not overwritten by the 'DF' FIP header field. default: tables/retrev/RETREV -i : input queue to scan default: spool/2get -o : output queue to leave files in default: spool/2go -d : do NOT delete the files after sending default: delete -D : disconnect from the port after each transmission default: - While 'ipdial' always disconnects from the modem, this also drops any TCP connection too. So this will disconnect from the terminal server too. -l : do NOT log any files sent default: log outgoings -L : Display all in/out for the session default: no except text -t : inter-file wait when sending more than one file. default: 1 sec -x : wakeup string for terminal server default: none -X : Turn Telnet Transparency OFF default: ON For terminal servers, is the port set to transparency ? -U : Raw or Telnet NO-escape mode default: telnet transparency ON For terminal servers, is the port set to transparency ? -y : Banner string to strip from terminal server.default: SpiderBanner -Y : There is no banner to strip default: as above -1 : Single pass then stop default: keep spooling -v : Print the version number and exit (copyright) 2021 and previous years FingerPost Ltd.