× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



One of the most under used utility I have ever seen or heard about
is a very poorly documented program called FTS which is described
in very little detail in ICF manual.. Years ago, somebody did a 
article on this code with a user written front end.. It requires
nothing more than a simple connection between 2 systems and it
will send almost anything.. It still exists even on the newer
boxes and I have used it for about everything under the sun...

The entire thing is stored at : 
http://www.midrangecomputing.com/mc/prog/

Look in 1989 programs(November,I think)

I hope David won't throw a fit about this but I will include original
article in txt format... I hope this works

  AS/400 Pass-Through and File Transfer
 Nov, 1989
 Art Tostaine
  Copyright 1989, Midrange Computing
List of Figures 
Simplified Interface to AS/400-to-AS/400 Display Station Pass-Through and File  
                              Transfer Support
AS/400 consultants, software vendors, and multi-site companies all have the 
need to communicate AS/400 to AS/400. You may need to send a new program 
version from your AS/400 to a client, receive a file from a remote site, or 
just sign on to a remote AS/400. You can very easily perform all these 
functions without purchasing any software or hardware besides the standard 
AS/400 setup. The base communications and modem that come with the AS/400 are 
all you will need.
This article presents the command LINK400. It will allow you to easily perform 
two different communications functions File Transfer Support(FTS) and Display 
Station Pass-through (DSPT). FTS lets you send and receive database and source 
physical file members between two AS/400s. DSPT lets you sign on to a remote 
AS/400.
Since both FTS and DSPT are provided by IBM, why do you need LINK400?  Because, 
as with most communications functions, it is not the easiest thing in the world 
to set up. You can do it yourself if you have a free day to educate yourself, 
write some programs, and do some testing with a remote site. It's easier to use 
LINK400.
Setting Up
Key and compile the commands and programs shown in  Figures 1, 2, 3, and 4. 
When you compile the commands, make sure that you reference the CL program of 
the same name in the Program to process command parameter.
The LINK400 command runs on both the source and target systems, sets up a 
communications line, controller, and device with the name TEMPRMT. Both FST and 
DSPT use these. It also creates a virtual controller (VCTL) and virtual device 
(VDSP01), used only by DSPT. The UNLINK400 command is used on both the source 
and the target system to vary off and delete the communications line, 
controllers, and devices. (Throughout this article the term Source system 
refers to the calling system, the term Target system refers to the called 
system. Source is synonymous with Local, and Target is synonymous with Remote.)
Note: The local location name is hard coded to the name TEMPLCL and the remote 
location name is hard coded to TEMPRMT. You can change these references in the 
CL programs if you already have lines, controllers or devices configured with 
the same names on the source or target systems.
Preparing the Target System
Regardless of whether you will be transferring files to the target, from the 
target, or sign on to the target system, you must always initiate LINK400 on 
the target system first. Once you set up a target system with LINK400, you will 
not need to re-initiate it as a target unless you vary off the line, 
controllers, or devices, with or without UNLINK400, or re-IPL the system.
If you do not wish to keep the line and controllers varied on at the remote 
site, run UNLINK400, specifying 'T' for target in the SYSTEM parameter. We 
recommend that you run UNLINK400 after you are through with LINK400 to prevent 
any chance of someone linking to your system without your knowing. Also, if you 
switch from being the target system to the source, or vice-versa, you must run 
UNLINK400 before running LINK400 again.
LINK400 On The Source System
The first panel displayed by LINK400 requests if this is a source or target 
system. Enter a 'S' in the SYSTEM parameter.
The second panel LINK400 asks two questions. It wants to know the function, FTS 
or DSPT, that you wish to perform, and the target system's phone number. If you 
selected DSPT, you will be presented with a sign-on screen from the target 
system after pressing enter. Once connected, a user on the target system can 
also sign on to your system by running STRPASTHR. Users from both systems  can 
be signed on to their respective remotes simultaneously.
If you chose FTS, a third panel requests the password that is associated with 
your user ID on the target system (you must have the same user ID and password 
on the target), and more information about the file member. Once entered, the 
member is transferred.
Basically, LINK400 wants to know if you will send or receive, what you are 
tranferring, its library destination and name, if different, and if it should 
automatically replace an existing member, if one exists. Be forewarned that if 
you specified no automatic replacement, and a duplicate member is present, no 
message is displayed. This is a function of FTS that we could not control.
Just as with the target system, if you do not wish to keep the line and 
controllers varied on the source system, run UNLINK400 specifying an 'S' in the 
SYSTEM parameter. We also recommend that you always run UNLINK400 on the source 
system when you are done with LINK400.
Technical Explanation
Program LINK400 calls the IBM-supplied program QY2FTML to perform file 
transfer, or it executes the IBM command STRPASTHR for signing on to another 
system. QY2FTML and STRPASTHR both require that an SDLC line, an APPC 
controller, and an APPC device be created. Additionally, STRPASTHR needs to 
have a virtual controller and device configured on the target system. LINK400 
configures the line, controllers, and devices for both FTS and DSPT every time 
you execute it.
Notice that the virtual device in LINK400 is set to 5251 Model 0011.  The 
virtual device, used by DSPT only, defines the workstation at the other end of 
the connection. That is, the device type in LINK400 on the target system should 
match the calling workstion.  To avoid confusion, leave the device type as is. 
We have found that this setting will work for all workstation that we have 
tested so far.
The benefit of setting up the precise workstation type is that all that 
workstation's special attributes will function. If this is a requirement, set 
up the device type in LINK400 to match the device on the opposite end of the 
connection. If only the source system will be running DSPT, then LINK400 on the 
target system should specify the source system's workstation type. If the 
callee begins DSPT with the caller, the device type on the source system's 
LINK400 must match the target's workstation type.
As we said, this is a confusing subject. Do yourself a favor and leave the 
device type as 5251 Model 0011 until you further understand the concepts.
Enhancements
As with all DataNetwork programs, LINK400 is short, simple, and to the point. 
There is no specific message monitoring included, so you may want to add some. 
Also, there is very little validity checking, so invalid data may cause 
abnormal termination.
An obvious improvement you can make is allow the passing of multiple members. 
You can do this by defining a list for the file member parameter in the LINK400 
command. Then you could set up a loop in the LINK400 CL program to call QY2FTML 
for each member in the list. If you are new to CL, you may find processing the 
list  a bit tricky. An alternate method is to pass the list to an RPG program 
and call QY2FTML from there. (See the RPG sample program in Appendix D of 
Communications: Programmers Guide.)
You could also add two additional parameters to allow virtual device type and 
model to be entered through the LINK400 command.
Considerations
If you have a communication line that is active and using station address 01, 
LINK400 will fail no more than one line can be active for a given port at the 
same time. Either vary the line off that is using the station address, or if 
you have another address to use, change the STNADR value in the CRTLINSDLC 
command and both CRTCTLAPPC commands of LINK400.
If you ever experience abnormal termination of LINK400, you should run 
UNLINK400 to return to a normal state. If LINK400 still doesn't execute after 
this, check your communication lines, contollers and devices with the WRKCFGSTS 
command.
References:
 AS/400 Communications: User's Guide (SC21-9601)
 AS/400 Communications Programmer's Guide (SC21-9590)
 AS/400 Communications: Advanced Program-to-Program Communications
 and Advanced Peer-to-Peer Networking User's Guide
Figures for AS/400 Pass-Through and File Transfer

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.