Re: Testing external file existance
From: Frederico Fonseca (real-email-in-msg-spam_at_email.com)
Date: 07/15/04
- Next message: Clif Ivy: "Re: IBM 1401"
- Previous message: Donald Tees: "Re: Testing external file existance"
- In reply to: Kris Dames: "Testing external file existance"
- Next in thread: Richard: "Re: Testing external file existance"
- Reply: Richard: "Re: Testing external file existance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 15 Jul 2004 22:19:35 +0100
On 15 Jul 2004 12:59:49 -0700, kjdkld@hotmail.com (Kris Dames) wrote:
>I use rmcobol85 on redhat linux and I need a way to verify from within
>my program that a user-specified file exists in a specific location on
>the filesystem. For example, if the user inputs the filename
>"myfile.txt" I need to check the /tmp directory for the file and tell
>the user if the file exists or not. Any help would be appreciated!
issue a "call "SYSTEM" using command-line" where command line is made
as
01 command-line pic x(2000).
.....
accept file-name
string "ls -l "
file-name
" > /tmp/temp-file"
into command-line
call "system" using...
At this stage you read the "/tmp/temp-file" as a normal sequential
file and see if the file-name value appears there.
If so you can open that file.
Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
- Next message: Clif Ivy: "Re: IBM 1401"
- Previous message: Donald Tees: "Re: Testing external file existance"
- In reply to: Kris Dames: "Testing external file existance"
- Next in thread: Richard: "Re: Testing external file existance"
- Reply: Richard: "Re: Testing external file existance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|