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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening user defined input

Status
Not open for further replies.

cargo2000

Technical User
Mar 8, 2000
4
US
I tryed writing a program where the user could pick the data file they wanted to process. I was woundering if thet is possable in cobol, I am new to the language. it went somthing like this...<br>
<br>
select input-file assign to file-path.<br>
<br>
.<br>
.<br>
.<br>
<br>
01 file-path pic x(80) value spaces.<br>
<br>
.<br>
.<br>
.<br>
<br>
accept file-path line 1 column 1.<br>
<br>
it was a while ago when i was working on the program and i can't quite remember the error i was getting. I was working with the fujitsu compiler for the pc.
 
Cargo,<br>
I dont know about the fujitsu compiler, but I would code this as:<br>
select optional input-file assign to file-path<br>
The optional phrase keeps the program from blowing up if the file doesnt exist.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top