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

How to find if a file exists from COBOL

Status
Not open for further replies.

whoyou

Programmer
Nov 24, 2005
6
IL
Hi,
my COBOL's a bit rusty, please can someone refresh my memory how to check if a file exists from a cobol routine.
I'm using Realia cobol, at the moment I have:
Code:
	   STRING 'DIR C:\HAD\' FLD-FILE-NAME (DOC-IND) ' > FF.LST'
		  LOW-VALUES DELIMITED BY SIZE INTO DOS-COMMAND
		  CALL 'DOS_EXEC_COMMAND' USING DOS-COMMAND.

This should give me the result in FF.LST, then I'd need to read FF.LST to find if the file exists.
What would be the accepted way to do this in cobol? (how do I access STDIN/OUT ?)
Thanks for any help
 
Sorry to have wasted your time. Obviously I just need to open it to see if it exists.
A bit more than rusty!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top