Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a variable name as the file to write out to

Status
Not open for further replies.

SiouxCityElvis

Programmer
Jun 6, 2003
228
US
I don't know if this is possible, but I'd be surprised if it weren't...

Upon reading from a name pipe file, I will get information used to search against a database I have setup.

Problem: On each of the requests sent thru the pipe that I read from, it will include the name of a sequential file that I am to write the query results out to. So, I will need to bring in the string name of the sequential file to be written to.

How do I put that variable value into the SELECT phrase?

Let's say the Java Programmer puts
BOB SMITH, UniqueFileName

into the named pipe.

I grab that info from the named pipe.
How do I put "UniqueFileName" into the SELECT part of my program in order to write my query results out to it?

Thanks.
-David
 
In the FILE-CONTROL paragraph, the SELECT statement's ASSIGN clause may specify a variable:
ASSIGN TO data-name-1

Check chapter 3 of the RM/COBOL Langusge Reference Manual for documentation on the ASSIGN clause.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top