Sample DCL-like syntax:
$ NNTP_Xfer/Node=remhost/Protocol=transport/File=grpfile -
[/Groups=grouplist][/DayOffset=days][/HourOffset=hours] -
[/Task=decnet-task][/Stream][/LogFile=log-file][/Debug]
Sample U*ix-like syntax:
$ NNTP_Xfer -n remhost -p transport [-g grouplist] -
[-d days] [-h hours] [-t decnet-task] [-s] -
[-l log-file] [-o]
Sample abbreviated syntax:
$ NNTP_Xfer remhost transport log-file
If the first command line argument does not begin with '-' or '/', NNTP_Xfer
assumes this abbreviated syntax is being used, and will interpret the command
line arguments accordingly. As a consequence, the following is an illegal
command
$ NNTP_Xfer cicero decnet News_Manager:Cicero_Xfer.Log -g misc.legal.*
(The correct syntax would be
$ NNTP_Xfer -n cicero -t decnet -
-l News_Manager:Cicero_Xfer.Log -g misc.legal.*
in this case.)
/Node=remhost -- the name of the remote host. This is the actual
address to be used in establishing the connection, not the name that site uses
in news item headers. For DECnet connections this should be the DECnet nodename
of the remote node, or its node number in the format area*1024+node
(area*1024 is optional if the server is in the same area as your system).
For TCP connections it should be the FQDN of the remote host, or its IP
address in dotted decimal form.
[U*ix-like syntax: -n remhost Abbreviated syntax: first parameter]
/Protocol=transport -- the transport protocol to be used when
connecting to the remote node. This value should be 'TCP', or the name of the
TCP transport you specified when building News, if you want to establish a TCP
connection to the remote NNTP server; NNTP_Xfer uses the standard NNTP port
(119). If any other value is specified, NNTP_Xfer will attempt to establish a
DECnet connection.
[U*ix-like syntax: -p transport Abbreviated syntax: second parameter]
/File=grpfile -- file specification of a file containing the list of newsgroup patterns to be passed to the remote server. Grpfile should be a text file containing newsgroup patterns separated by commas or record boundaries; a pattern cannot span a record boundary. All records beginning with the character '#' are considered to be comments, and are ignored. The list of newsgroup patterns read from the file is treated just as if it had been entered using the /Groups qualifier (except that files cannot be nested using the '@' for indirection).
If both /File and /Groups are specified, the /File qualifier is ignored. If
neither /Groups nor /File is specified, then all newsgroups on the remote
system are searched.
[U*ix-like syntax: -f grpfile. If both -g and -f are present on the
command line, or if either is specified multiple times, only the last
occurrence is used.]
/Groups=grouplist -- a comma-separated list of newsgroup patterns specifying the newsgroups about which information is to be obtained. If the DCL qualifier /Groups was used, and first character of a newsgroup pattern is '@', the remainder of the pattern is treated as a file specification, as though it had been specified using the /File qualifier. The text of grouplist is converted to lower case, and all occurrences of '_' are replaced by '!'. The list is then passed to the remote NNTP server as the first parameter to a NEWNEWS command, and the server interprets the patterns. According to the NNTP standard, the following rules should be applied to each pattern:
If /Groups is not specified, or if no grouplist value is given, all
newsgroups on the remote system are searched. If /Groups is specified, the
/File qualifier is ignored.
[U*ix-like syntax: -g grouplist. If -g is specified, grouplist
must be specified. The '@' character does not receive the same special
interpretation as it does following the DCL-like /Groups qualifier; use the -f
switch (described under the /File qualifier) to process files containing lists
of newsgroup patterns. If both -g and -f are present on the command line, or if
either is specified multiple times, only the last occurrence is used.]
/DayOffset=days -- NNTP_Xfer maintains a record of the time at which it
last contacted a system, and as part of the current NEWNEWS command, requests
items which have been added on the remote system within days days before
the last contact. Thus, if days=0, NNTP_Xfer requests items added on the
remote site after the time of the last contact, while if days=1, NNTP_Xfer
requests all items appearing at the remote site since one day before the last
contact. If the /DayOffset qualifier is not specified, days defaults to 0.
[U*ix-like syntax: -d days]
/HourOffset=hours -- This qualifier functions similarly to the /Days
qualifier, except that hours specifies the number of hours before the last
contact to offset the time specified in the NEWNEWS command. This can be
particularly useful since NNTP_Xfer records the time of the last contact in
local time, while the NEWNEWS command requires that time be specified as GMT.
Therefore, if your local timezone is two hours ahead of GMT, you should specify
an hours value of 2 in order for the NEWNEWS command to properly correct
its recorded time to GMT. If the /HourOffset qualifier is not specified,
hours defaults to 0.
[U*ix-like syntax: -h hours]
/Task=decnet-task -- the name of the DECnet object through which the NNTP server on the remote system is contacted. If the /Protocol value specifies a DECnet connection, NNTP_Xfer determines the remote task name as follows:
If /Protocol specifies a TCP connection, the /Task qualifier is ignored.
[U*ix-like syntax: -t decnet-task If the U*ix-like syntax is used,
decnet-task is not checked for the '=' character, and "TASK=" is not
added.]
/Stream -- specifies that stream input calls should be used over a DECnet
connection, rather than record-based input calls. This is normally necessary
only when connecting to a NNTP server running on an Ultrix system. If
/Protocol specifies a TCP connection, the /Stream qualifier is ignored.
[U*ix-like syntax: -s]
/LogFile=log-file -- file specification of a file to which a one-line
summary of the current session will be appended. This summary will list
the time, remhost, grouplist, the number of message IDs returned by the
remote system, and the number of items actually transferred.
[U*ix-like syntax: -l log-file Abbreviated syntax: third parameter]
/Debug -- causes status messages tracking the progress of the session to be
output to the terminal. In addition, all traffic over the connection to the
remote server is echoed to the terminal.
[U*ix-like syntax: -o]
In addition, if NNTP_Xfer is invoked with the U*ix-like command line switch -he, a listing of the U*ix-like switches, with brief explanations, will be printed, and NNTP_Xfer will exit. There is no DCL-like equivalent for this option.
NNTP_Xfer then attempts to determine the time of the last connection to remhost, by looking for the file News_Manager:NNTP_remhost.LastCall. (When remhost appears in any file names, all occurrences of '.' in the host name are converted to '-'.). This file is normally written by NNTP_Xfer at the end of a NEWNEWS inquiry, and contains a hexadecimal number specifying the number of seconds elapsed between midnight January 1, 1970 and the last NEWNEWS inquiry. If NNTP_Xfer cannot read this file, it uses midnight January 1, 1970 as the time of the last inquiry. This time is then adjusted using the offsets specified by the /DayOffset and /HourOffset qualifiers. The adjusted time and grouplist are used to construct a NEWNEWS command, which is sent to the remote server. The list of message-IDs received from the server in response to the NEWNEWS request is written to a message-ID file in the News_Manager directory. The message-ID file is named as follows:
Once the entire list of message-IDs has been received, NNTP_Xfer checks each message ID against the item index file and the history file on the local system. If the ID is not found on the local system, NNTP_Xfer requests the text of the item from the remote site, and stores it in a batch file in the News_Manager directory, named in a manner similar to the message-ID files, except that the file type is '.Batch' instead of '.IDs'. Once all of the message IDs are processed successfully, the message-ID file is deleted. The batch files should then be added to the local News database using the Add File command in News.Exe.
The following command will cause NNTP_Xfer to contact the NNTP server on the
remote Ultrix system EMU, and search all newsgroups named animals.* for message
IDs appearing on the remote system since one day before the last selective
NNTP_Xfer connection to EMU. The connection will be over DECnet using stream
I/O calls, with "NNTP=" specified as the task string in the connection request.
$ NNTP_Xfer -n emu -p decnet -s -t "NNTP=" -
-g animals -d 1 -l News_Manager:NNTPXfer.Log
The message IDs will be stored in News_Manager:NNTP_emu_Selective.IDs, and
items retrieved from the remote server will be stored in
News_Manager:NNTP_emu_Selective.Batch. When the session is complete, a
summary will be appended to News_Manager:NNTPXfer.Log.
The following command will cause NNTP_Xfer to contact the NNTP server on the
remote system KOALA, and search all newsgroups for message IDs appearing on the
remote system since the last non-selective NNTP_Xfer connection to KOALA. The
connection will be over DECnet using the default task string "TASK=NNTP".
$ NNTP_Xfer KOALA DECnet News_Manager:NNTPXfer.Log
The message IDs will be stored in News_Manager:NNTP_koala.IDs, and items
retrieved from the remote server will be stored in
News_Manager:NNTP_koala.Batch. When the session is complete, a summary will
be appended to News_Manager:NNTPXfer.Log.
The list of message identifier strings is set up by News itself when processing incoming news batches via the Add File command or local postings via the Post command. In either case the News.Sys file is consulted, and if the item is to be forwarded to a remote site whose News.Sys flags field is N or NX, then the message ID is added to the spool file for that site.
The spool files are, by default, organized as sequential text files with one message ID string per line. In most cases this should be adequate, but where the news traffic level is high, or the remote system is connected with a low bandwidth line, there may be contention for this file between News.Exe (writing new message IDs to the file) and NNTP_Xmit.Exe (reading message IDs from the file during a transfer session). In such cases the NX flag should be used in the flags field of the News.Sys entry for that site, so that a shared access RMS indexed file is used to store the message ID strings.
Before invoking NNTP_Xmit, the process should insure that it has read access to all News item files in the local database. You can do this by running the job which invokes NNTP_Xmit under the same UIC as the owner of the News_Device directory tree (usually the News manager), or by granting the process SysPrv or ReadAll privilege, or by Installing the image with SysPrv or ReadAll. NNTP_Xmit does not turn off these privileges when not using them.
In addition, you should make sure NNTP_Xmit.Exe has SysNam privilege, if you want it do define the logical name NNTP_More_To_Offer when it exceeds the maximum number of message IDs you have specified for a single session, and there are more message IDs remaining in the remote system's spool file. You can do this by running NNTP_Xmit.Exe in a process which has SysNam, or by Installing the image with SysNam. NNTP_Xmit does not turn off SysNam when it is not using it.
Finally, if you plan to use the News resource lock mechanism (i.e. NewsShutDown.Exe) when you need exclusive access to the News database, NNTP_Xmit.Exe must have access to SysLck privilege. You can do this by running NNTP_Xmit.Exe in a process which has SysLck, or by Installing the image with SysLck.
Sample DCL-like syntax:
$ NNTP_Xmit/Node=remhost/Protocol=transport /IDFile=id-file[/Task=decnet-task][/Stream][/IndexID] [/LogFile=log-file][/DebugFile=dbg-file]
Sample U*ix-like syntax:
$ NNTP_Xmit remhost transport id-file [-t decnet-task] [-s] [-x] [log-file] [dbg-file] [-h]
/Node=remhost -- the name of the remote host. This is the actual address to
be used in establishing the connection, not the name that site uses in news
item headers. For DECnet connections, this should be the DECnet nodename of the
remote node, or its node number in the format area*1024+node
(area*1024 is optional if the remote node is in the same area as your
system). For TCP connections it should be the FQDN of the remote host, or its
IP address in dotted decimal form.
[U*ix-like syntax: first parameter not beginning with -- or immediately
following -t.]
/Protocol=transport -- the transport protocol to be used when connecting to
the remote node. This value should be 'TCP', or the name of the TCP transport
you specified when building News, if you want to establish a TCP connection to
the remote NNTP server; NNTP_Xmit uses the standard NNTP port (119). If any
other value is specified, NNTP_Xmit will attempt to establish a DECnet
connection.
[U*ix-like syntax: second parameter not beginning with -- or immediately
following -t.]
/IDFile=id-file -- file specification of the spool file to be used in
offering items to the downstream site. This is the file specified in the
spool-file field of the remote site's News.Sys entry.
[ U*ix-like syntax: third parameter not beginning with -- or immediately
following -t.]
/Task=decnet-task -- name of the NNTP server DECnet task on the remote node. This parameter is used only for DECnet connections, and is ignored for TCP connections. If the task name is not specified on the command line, NNTP_Xmit will attempt to translate the logical name News_remhost_Task, and, if successful, will use this as the task name. If this fails, a default task name of "TASK=NNTP" is used. The task name is converted to uppercase.
You should determine the DECnet task name of the remote NNTP server when you
set up your newsfeed to the downstream site. In particular, the names
"TASK=NNTP" or "0=NNTP" are common on VMS systems, and "NNTP=" is common in
Ultrix systems.
[U*ix-like syntax: -t decnet-task]
/Stream -- indicates that during a DECnet connection stream input routines
should be used instead of record-based input routines. This is necessary when
connecting via DECnet to a NNTP server running under Ultrix. This parameter is
ignored for TCP connections.
[U*ix-like syntax: -s]
/IndexID -- indicates that the spool file is an RMS indexed file, rather than a
sequential text file (see discussion above).
[U*ix-like syntax: -x]
/LogFile=log-file -- file specification of a file to which will be appended
a one line summary of the transfer session on completion. This summary will
list the number of identifiers offered to the remote system, the number of
items accepted and rejected, and the number of local lookup failures.
[U*ix-like syntax: fourth parameter not beginning with -- or immediately
following -t .]
/DebugFile=dbg-file -- the file specification of a file to which will be
written a full traffic log of the transfer session. This file will expand quite
rapidly when processing a large batch of identifiers, so the parameter should
be used only in a controlled testing environment.
[U*ix-like syntax: fifth parameter not beginning with -- or immediately
following -t .]
The U*ix-like command line switch -h causes NNTP_Xmit to print a summary of the command syntax, as does invoking NNTP_Xmit with no parameters. There is no DCL qualifier which has this function.
This process will continue until
If the spool file is an indexed file, NNTP_Xmit makes a sequential pass through the file. All offers (i.e. remote acceptance or remote rejection) are followed by deletion of the corresponding record from the identifier file.
$ NNTP_Xmit/Node=wombat.bush.au/Protocol=TCP - _$ /IDFile=News_Manager_Dev:[IHave_Wombat]Wombat.Ids - _$ /LogFile=News_Manager:NNTPXmit.Log
wombat:comp,misc,news,rec,soc,talk,vmsnet,au,to.wombat:N:\ News_Manager_Dev/[IHave_Wombat]Wombat.Ids:world,net,au
The following command will contact the NNTP server on the remote Ultrix system EMU using DECnet, and will offer the items whose message IDs appear in the file News_Manager_Dev:[IHave_Emu]Emu.Ids. A summary of the session will be appended to the file News_Manager:NNTPXmit.Log.
$ NNTP_Xmit EMU DECnet -s -t "NNTP=" - _$ News_Manager_Dev:[IHave_Emu]Emu.Ids - _$ News_Manager:NNTPXmit.Log
emu:*,!alt,!control,!junk,!to,to.emu:N:\ News_Manager_Dev/[IHave_Emu]Emu.Ids:*
The following command will contact the NNTP server on the remote VMS system KOALA using DECnet, and will offer the items whose message IDs appear in the RMS indexed file News_Manager_Dev:[IHave_Koala]Koala.Ids. A summary of the session will be appended to the file News_Manager:NNTPXmit.Log, and a detailed record of the session will be written to the file News_Manager:Koala_NNTPXmit.Test.
$ NNTP_Xmit/Node=KOALA/Protocol=DECnet - _$ /IDFile=News_Manager_Dev:[IHave_Koala]Koala.Ids/IndexID - _$ /LogFile=News_Manager:NNTPXmit.Log - _$ /Debugfile=News_Manager:Koala_NNTPXmit.Test
koala:aarnet,vmsnet,to.koala:NX:\ News_Manager_Dev/[IHave_Koala]Koala.Ids:world,net,au,aarnet
previous: 7 News Support Utilities
next: 7.2 Testing NNTP connections over DECnet or TCP/IP networks
Table of Contents