Browse Prior Art Database

Output Redirection of the BASIC "FILES" Command

IP.com Disclosure Number: IPCOM000038580D
Original Publication Date: 1987-Feb-01
Included in the Prior Art Database: 2005-Jan-31
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Lopez, VE: AUTHOR

Abstract

A method is described which allows a programmer to design his BASIC program so that he does not need to rely on user input to get the name(s) of file(s) that are needed by his program. The Color Selection Program for the IBM PC 3270 Emulation Program must know the exact name of a certain load module in order to open it for input/output. This program should not require a user to know the name of the load module or to have to key in the name. The Color Selection Program is written in BASIC. There is no BASIC command that searches a directory for a partially qualified file name and returns the exact name in a variable to an executing program. The BASIC "FILES" command partially fills this requirement, but is limited in that it directs its output to the screen.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Output Redirection of the BASIC "FILES" Command

A method is described which allows a programmer to design his BASIC program so that he does not need to rely on user input to get the name(s) of file(s) that are needed by his program. The Color Selection Program for the IBM PC 3270 Emulation Program must know the exact name of a certain load module in order to open it for input/output. This program should not require a user to know the name of the load module or to have to key in the name. The Color Selection Program is written in BASIC. There is no BASIC command that searches a directory for a partially qualified file name and returns the exact name in a variable to an executing program. The BASIC "FILES" command partially fills this requirement, but is limited in that it directs its output to the screen. However, in accordance with the new method, the output of the "FILES" command is "read" from the screen and the file names "read" are assigned to string variables with the BASIC "SCREEN" command. In addition, the output to the screen is hidden with the BASIC "COLOR" command by making the display background and foreground colors the same. A subroutine was written using the "COLOR" command to hide output to the screen, the "FILES" command to search for the file name, and the "SCREEN" command to read the screen.

1