Managing host to workstation file transfer4999766Abstract A technique is described for maintaining consistent filename conventions between multiple hosts and workstations by providing a table of default parameters for various hosts and workstations and the corresponding filetypes that are accessed to determine the default parameters and filetypes for a given file. A display is also provided to display the name or names of files to be transferred and their destination. The programs which produce these screens also obtain and display default information concerning the files, such as, the file names and the data structures for the files on the destination host computer or workstation. The user can either accept the default information or change it. Claims Having thus described our invention, what we claim as new and desire to secure by Letters Patent is set forth in the following claims: Description BACKGROUND OF THE INVENTION
______________________________________
EXT APPEND OPTIONS
______________________________________
BAT CH ASCII CRLF
COM BIN
______________________________________
The options selected for MYPROG BATCH A would be ASCII CRLF, while the options selected for MYPROG BATBIN would be null. The user can select and edit a filename from the list area at field 30. The filename and its current information is presented in the upper portion of the screen for editing and replaced after any corrections by pressing function key three to save. An example of the fast select screen is shown in FIG. 3. The files are listed with their workstation counterparts and the default options. When the list is completed, the user has the option of verifying which workstation files will be replace by the list of filenames. The files that will be replaced are highlighted to allow the user to determine any conflicts that may occur. If the user does not want the conflicting file to be replaced, the list can be edited and the filename renamed to avoid any conflicts. FIG. 4 is a flow diagram of the main send and receive logic of the invention. The purpose of this logic is to interpret program parameters passed from the user and to determine the SEND/RECEIVE option and a possible list of files to process. The process begins at function block 100 where a profile is read into core or main memory for fast look up and a log file is opened. A test is made in decision block 102 to determine if the send or receive direction is specified. If not, the user is prompted in function block 104 to input the send or receive direction; otherwise, a test is made in decision block 106 to determine if the process is interactive. If the user has been prompted in function block 104 for send or receive direction or if the test in decision block 106 is true, the access FASTSELECT list function 108 is read into core or main memory for possible selection. The access FASTSELECT list function is shown in FIGS. 5A and 5B and is described in more detail hereinafter. At this point, a subroutine GETFILELIST is called in operation block 110. This subroutine, shown in more detail in FIG. 6, constructs an array of filenames to transfer. When that list has been constructed and a return has been made to the main program, a subroutine BUILDNAMES is called in operation block 111. The BUILDNAMES subroutine is different for the receive or send functions. The subroutine for the receive function is shown in FIG. 7, and the subroutine for the send function is shown in FIG. 8. These subroutines are a host filename construction and parameter routine which uses the previously constructed array of files to be transferred. When a return has been made to the main program, control is passed via connector A to decision block 112 in FIG. 4 where a test is made to determine if the process is interactive. If so, a call is made in operation block 114 to an interactive display routine, shown in more detail in FIG. 9. If the process is not interactive, control goes directly to function block 116 where the SEND/RECEIVE command is constructed for each filename Next, a call is made in function block 118 to the operating system (OS) to execute the command and store the status of the transfer. Next, a test is made in decision block 120 to determine if all the files have been processed. If not, control loops back to function block 116; otherwise, a test is made in decision block 122 to determine if the process is interactive. If so, the status screen is displayed in function block 124; otherwise, the log file is closed in function block 126 before the process ends. The following pseudocode, written in Program Design Language (PDL), implements the logic illustrated in the flow diagram of FIG. 4. A programmer skilled in the art can write source code in any suitable programing language, such as Pascal, C or BASIC, from which object code can be derived by a suitable compiler.
______________________________________
IF (SEND/RECEIVE not specified) THEN
query user for direction of transfer and set
prompt=TRUE
ENDIF
read profile into core for fast lookup /*always*/
IF (prompt) THEN /*do not read fast select file if
in batch mode*/
read FASTSELECT LIST into core for possible
selection /*used by interact*/
ENDIF
call GETFILELIST /*construct array of filenames
to transfer*/
call BUILDNAMES /*host filename construction/
parameter routine*/ /*BUILDNAMES uses an array
of files to be transferred*/
:SCREENlENTRY
IF (prompt) THEN
call INTERACT /*allow user interaction and
selection modification via call to Interact*/
ENDIF
/*at this point there is a full list of files to
transfer*/
call sprint type routine to build actual exec
line
call OS to execute send command (log RC from each
transfer)
IF (prompt) THEN
display status of transferred files
query user to return to Screenlentry (via flag)
ENDIF
If flag THEN
goto SCREENlENTRY
ENDIF
close log file
EXIT program
______________________________________
FIG. 5 shows the flow diagram for the logic for the access FASTSELECT list function performed in function block 108 in FIG. 4. This logic accesses the Fastselect list and looks up key definitions in the profile table stored in core or main memory. The process begins by displaying the fast select screen shown in FIG. 3 in function block 130. The input to the screen is read in function block 132, and then a series of tests are made to monitor the user input. The first of these is to determine if the user has pressed the ESCAPE key in decision block 134. If so, a return is made to the main program; otherwise, tests are made in decision blocks 136 for user select input, 138 for user unselect input, 140 for delete, and in 142 for undelete. In each case, if the test is positive, the appropriate operation is performed. Thus, when a select input is detected in decision block 136, the current line is marked as not transferrable in function block 144. When an unselect input is detected in decision block 138, the current line is marked as transferrable in function block 146. When a delete input is detected in decision block 140, the current line is marked as deleted in function block 148. When an undelete input is detected in decision block 142, the current line is unmarked in function block 150. In each case, the user input is monitored in decision block 152, and if more input is detected, control loops back to function block 132 to read the input; otherwise, control goes to decision block 154 in FIG. 5 via connector B. A test is made in decision block 154 to determine if the file was selected, and if so, the filename is appended in function block 156 to the existing file transfer array. If not selected, a test is made in decision block 158 to determine if the file was deleted, and if so, the file name is deleted in function block 160 from the FASTSELECT list. If not deleted, a test is made in decision block 162 to determine if the file is added or modified, and if so, a new fast select list is saved in function block 164. When this process is complete, a return is made to the main program The following pseudocode, written Program Design Language (PDL), implements the logic shown in the flow diagram of FIG. 5.
______________________________________
/*Do this for `number of files` passed to this
function. This allows function to be used both
in batch for a long list of files or from the
interactive screen by passing one file at a
time.*/
IF (send) THEN
FOR (i=0; i < number.sub.-- of.sub.-- files.sub.-- to.sub.-- xfer ; i++)
/*A host file is built on send extension by
using IWS file extension XXX as character
string to select profile entries `APPEND` and
`OPTIONS` by simple compare of EXT field in
profile to XXX from current filename being
constructed.*/
PARSE file extension /*Get .XXX part of IWS
filename. This is done by scanning for . in
file name*/
IF strlen(EXT[i]) == 0 THEN /*If no file
extension*/
*/Select default option, i.e., profile entry 0*/
host.sub.-- filetype [i] = strcat(`XXX`, APPEND[0] )
xfer.sub.-- option[i] = OPTIONS[0]
ELSE
complete[i] = FALSE;
FOR (j=0, j <number.sub.-- of.sub.-- profile.sub.-- entries; x.sup.++)
IF (XXX[i] == EXT[j]) THEN /*when match*/
host.sub.-- filetype[i] = strcat(`XXX`, APPEND[j])
xfer.sub.-- option[i] = OPTIONS[j]
complete[i] = TRUE
ENDIF
IF complete THEN
ELSE
host.sub.-- filetype[i] = strcat(`XXX`, APPEND[0])
xfer.sub.-- option[i] = OPTIONS[0]
ENDIF
END-FOR
ENDIF
END-FOR /*do more files until done!*/
RETURN
______________________________________
FIG. 6 is the flow diagram for the GETFILELIST subroutine called in operation block 110 in FIG. 4. This subroutine begins by determining in decision block 170 whether the operation is to receive files. If so, a test is made in decision block 172 to determine if a file type is specified. If not, an error message is displayed in function block 174, and a return is made to the main program. If there is a file type specified, the user terminal emulator is invoked to receive the files in function block 176. The user terminal emulator used in a specific implementation of the invention was the IBM 3270-PC Control Program and the High Level Language Application Program Interface (API) first published in 1984. Other computer terminals and emulators can be used in the practice of the invention. At this point, a return is made to the main program in FIG. 4A. If files are to be transmitted to a host computer, the test in decision block 170 will be negative, and a local file transfer list is built in function block 178. Then, in function block 180, the file names are copied into a list of files to transfer before a return is made to the main program. The following pseudocode, written in Program Design Language (PDL), implements the logic shown in FIG. 6.
__________________________________________________________________________
IF (receive) THEN
Parse file name /*get filetype of HOST filename*/
IF strlen(EXT[i]) == 0 THEN /*If no file extension*/
TERMINAL ERROR! EXIT! HOST FILETYPE MUST BE SPECIFIED or `*` used;
ELSE
Use emulation interface to get host filename list;
EXAMPLE:
FOR VM systems
Pass `CMS LIST * * a (EXEC` to host and execute.
Call OS to execute receive program to get access to file list.; Build
filename
array using host filename list as source.
Copy host filename into list.sub.-- of.sub.-- files.sub.-- to.sub.--
transfer
ELSE /*must be send*/
Build file transfer list (array) using OS filesearch
Copy filenames into list.sub.-- of.sub.-- files.sub.-- to.sub.-- transfer
ENDIF
__________________________________________________________________________
FIG. 7 shows the logic of the BUILDNAMES receive function. This is the subroutine called in operation block 111 in FIG. 4 when a transfer is to be made from a host computer to the personal computer. The process begins at function block 182 where the host file name is retrieved. In function block 184, a personal computer file name is created by copying the host file and the first three characters of the file type. In function block 186, the file type is looked up in the profile to get the transfer options, and the options as specified in the profile are set in function block 188. A test is then made in decision block 190 to determine if there are more file names. If so, control loops back to function block 182 to process the next file; otherwise, a return is made to the main program. The following pseudocode, written in Program Design Language (PDL), implements the logic shown in FIG. 7.
______________________________________
/*BUILDNAMES RECEIVE FUNCTION*/
ELSE /*must be receive*/
FOR (i-0; i < number.sub.-- of.sub.-- files.sub.-- to.sub.-- xfer;
i++)
/*IWS name is built on receive by stripping all
characters except first three from the host
file type, yielding XXX. By simple compare of
the host filetype (all eight characters) to
the combined EXT and APPEND fields, the
proper transfer options are obtained.*/
Complete[i] = FALSE;
/*Copy first three characters of host
filetype*/
strcpy(host filetype[i],IWS.sub.-- ext[i],3)
FOR (j=0, j < number.sub.-- of.sub.-- profile.sub.-- entries; x++)
IF (host.sub.-- filetype[i] == EXT[j]+APPEND[j])
THEN /*when match*/
xfer.sub.-- option[i] = OPTIONS[j]
complete[i] = TRUE
j=number.sub.-- of.sub.-- profile.sub.-- entries; /*stop
searching*/
ENDIF
IF complete THEN /*do nothing*/
ELSE
xfer.sub.-- option[i] = OPTIONS[0]
ENDIF
END-FOR
ENDIF
END-FOR /*do more files until done!*/
RETURN
ENDIF
______________________________________
FIG. 8 shows the logic of the BUILDNAMES subroutine called in operation block 111 when the option of sending files to a host computer is selected. The process begins in function block 192 where the file name entry is retrieved. A test is then made in decision block 194 to determine if the file name has an extension. If so, the profile is searched in function block 196 for the extension append, and then the file extension append is concatenated in function block 198 to the extension and select options before control goes to decision block 202. On the other hand, if the file name does not have an extension, as determined by the test in decision block 194, a default extension is selected from the profile in function block 200 before control goes to decision block 202. In decision block 202, a test is made to determine if more file names are left to process. If so, control loops back to function block 192; otherwise, a return is made to the main program. The following pseudocode, written in Program Design Language (PDL) implements the logic shown in FIG. 8.
______________________________________
: BUILDNAMES (number.sub.-- of.sub.-- files.sub.-- to.sub.-- xfer, *array
of files)
*do this for `number of files` passed to this
function. This allows function to be used both in
batch for a long list of files or from the
interactive screen by passing one file at a time.*/
IF (send) THEN
FOR (i=0; i < number.sub.-- of.sub.-- files.sub.-- to.sub.-- xfer; i++)
/*The host file on send extension is built
using IWS file extension XXX as character
string to select profile entries `APPEND` and
`OPTIONS` by simple compare of EXT field in
profile to XXX from current filename being
constructed.*/
Parse file extension /*get .XXX part of IWS
filename. This is done by scanning for . in
filename*/
IF strlen(EXT[i]) == 0 THEN /*if no file
extension*/
/*select default option, i.e. profile entry
0*/
host.sub.-- filetype[i] = strcat(`XXX`, APPEND[0])
xfer.sub.-- option[i] = OPTIONS[0]
ELSE
complete[i] = FALSE;
FOR (j=0, j < number.sub.-- of.sub.-- profile.sub.-- entries; x++)
IF (XXX[i] == EXT[j]) THEN /*when match*/
host.sub.-- filetype[i] = strcat(`XXX`,
APPEND[j])
xfer.sub.-- option[i] = OPTIONS[j]
complete[i] = TRUE
ENDIF
IF complete THEN /*do nothing*/
ELSE
host.sub.-- filetype[i] = strcat(`XXX`,
APPEND[0])
xfer.sub.-- option[i] = OPTIONS[0]
ENDIF
END-FOR
ENDIF
END-FOR /*do more files until done!*/
RETURN
______________________________________
Turning next to FIG. 9, there is shown in more detail the interactive display routine called in operation block 114 in FIG. 4. This routine performs a lookup of key definitions in the profile table which is stored in core or main memory. In the flow diagram, the process begins by displaying the select screen to the user in function block 204. Next, in function block 206, the user input selection is processed. This is followed by a test in decision block 208 to determine if the user input is to be checked for errors. If so, any errors detected are highlighted in function block 210, and control loops back to function block 204 to redisplay the screen to the user; otherwise, a return is made to the main program. The following pseudocode, in Program Design Language (PDL), implements the logic of the flow diagram shown in FIG. 9.
__________________________________________________________________________
WHILE not exit ok
Display Screenl using OS display services
/*ALL FILES ARE INITIALLY SELECTED FOR TRANSFER*/
/*Allow modification of default selections constructed by BUILDNAMES*/
read keystroke
xlate keystroke to function /*customizable?*/
WHILE NOT (keydefinition == `execute`)
select keydefinition
case `fast.sub.-- select`
:
call Fast.sub.-- select
case `add.sub.-- FS.sub.-- list`
:
append current fileinfo to FASTSELECT LIST:
case `escape` :
return 1
case `delete` :
if current line is `xfer able` then mark current
list `not xfer able`
case `undelete` :
if current line is `not xfer able` then mark
current line `xfer able`
end select
END-WHILE
/*Check modifications to insure no unknown parameters or format errors.
This is
done by conventional techniques by making compares to the `OPTIONS`
field
contents of the profile. If an unknown error or `type` is found, the
field is high-
lighted to show the error with the cursor under the offending option.*/
IF errors THEN
set exit-ok = FALSE
ENDIF
END-WHILE
*Re-construct lies of files to be transferred by placing all selected
files into the
filename array.*/
FOR (i=1; i < number of files in list; i++)
IF file selected[i] THEN
add filename to new array
ENDIF
RETURN new array of files to transfer
__________________________________________________________________________
Briefly reviewing, the send file process is facilitated by appropriate display screens generated by presentation services which are part of the file transfer application program. The user first selects the workstation's data storage device, i.e., disk drive, from which to retrieve files. Then the user selects the directory on the drive from which to select files. Next, the user selects the file, subdirectory or filename in the filename field. The user can employ a wild card capability to see all the files on a directory. If the entire directory is to be transferred, the user enters "." to indicate all files. This capability allows the user to conveniently backup a directory to a host. The user can also enter "..", which will display all the files in the parent directory. If the user presses function key ten (F10) while the cursor is positioned on a subdirectory, all the files in that subdirectory are selected for upload and displayed in a list area. The user can also press function key nine (F9) while the cursor is positioned on a subdirectory to display the files in that subdirectory. After the files are selected, the user either accepts the default options for transfer or changes the options to meet the user's requirements. The default options are based on information that is user revisable and stored in the profile file on the workstation 10. The format of the default options is as shown below:
______________________________________
EXT APPEND OPTIONS
______________________________________
BAT CH ASCII CRLF
COM BIN
EXE BIN LRECL 512 RECFM V
ASC II ASCII CRLF LRECL 255 RECFM F
OBJ BIN LRECL 512 RECFM F
PAS CAL ASCII LRECL 255 RECFM F
SYS BIN LRECL 512 RECFM F
______________________________________
The APPEND field is appended to the file extension (EXT) field to form the host file type. The options such as Logical Record Length 512 bytes (LRECL 512), Carriage Return Line Feed (CRLF), Record Format Fixed (RECFM F) explicitly define the data structure of the file on the host. The user can choose to accept the default options that are displayed, or overtype the entries to create new defaults. Once the options are selected, the file or files are transferred. The user selects the files that are to be transferred. Then, the program builds the file names and the file attributes that the transferred file will use on the host computer. Next, the filenames and their associated attributes are displayed for verification and possible modification by the user on the display. The display screen is shown in FIG. 2, and the filenames and their associated attributes are shown at reference numerals 30, 32, 34, AND 36. The user can use the delete, spacebar, insert and cursor keys on the keyboard to change any of the defaulted attributes. Once the filenames and their associated attributes are correct, the file transfer logic is invoked. Files are transferred one at a time by repetitively calling a file transfer program to perform system dependant transfers of the files. The status of the transferred files is displayed on the screen for the user. Additional file transfers can be processed if any files remain for processing. The display screen shown in FIG. 2 is also used to transfer files from a host computer to the workstation. The program accesses the profile table to obtain the default information discussed previously and displays this information on the screen illustrated in FIG. 2. Then, the entry processor processes keyboard entries by the user. The keyboard entries include editing functions such as delete, insert and other standard editing functions. In addition, the entry processor also differentiates between function key selections to carry out the save (function key three (F3)), send (function key seven (F7)), receive (function key eight (F8)) and fast select (function key five (F5)) functions. Whenever a file is selected by the user, the profile table is accessed to obtain default options for the file based on the filename, as discussed above. When the list of files has been entered by the user, the list processor is activated to receive the set of files from the host computer. The list processor processes the receive list. The receive list is processed one file at a time. Files are transferred one at a time by repetitively calling a file transfer program to perform system dependant transfers of the files. The file transfer program is passed the host and the workstation filenames, the direction of transfer (either send to the host or receive from the host) and the attributes of the file. The receive file operation also employs the fast select processing. The fast select display is shown in FIG. 3 and controlled by the logic illustrated in FIG. 5. The fast select display is invoked by pressing function key five from the send/receive display. The user is presented with all the workstation or host filenames and their corresponding transfer options that the user has selected in previous operations from the fast select file. The user can use the fast select display to quickly select files. While the invention has been described in terms of a preferred embodiment in a specific operating system environment, those skilled in the art will recognize that the invention can be practiced, with modification, in other and different operating systems within the spirit and scope of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
