gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] File path.


From: vbcoen
Subject: Re: [open-cobol-list] File path.
Date: Wed, 8 May 2013 13:22:22 +0100
User-agent: KMail/4.8.5 (Linux/3.4.34-desktop-1.mga2; KDE/4.8.5; x86_64; ; )

Well this works for me under linux:

 

WS:

77 Batch-Text pic x(28) value spaces.

77 Script-Name pic x(20) value spaces.

77 Run-Backup pic x(512) value spaces. *> size changed

77 Full-Backup-Script pic x(512) value spaces.

77 OS-Delimiter pic x value "/".

77 ACAS_BIN pic x(512) value spaces.

*>

01 Cbl-File-Details.

03 Cbl-File-Size pic x(8) comp-x value zero.

03 Cbl-File-Date.

05 Cbl-File-Day pic x comp-x value zero.

05 Cbl-File-Mth pic x comp-x value zero.

05 Cbl-File-Year pic xx comp-x value zero.

03 Cbl-File-time.

05 Cbl-File-Hour pic x comp-x value zero.

05 Cbl-File-Min pic x comp-x value zero.

05 Cbl-File-Sec pic x comp-x value zero.

05 Cbl-File-Hund pic x comp-x value zero.

 

 

 

 

procedure:

 

string ACAS_BIN delimited by space

OS-Delimiter delimited by size

Script-Name delimited by space into Run-Backup

end-string

call "CBL_CHECK_FILE_EXIST" using Run-Backup Cbl-File-Details

end-call

if Return-Code not = zero

move "No BackUp Script in Bin/Data" to Batch-Text

else

move 1 to Backup-Sw

string "Using " delimited by size

Script-Name delimited by space into Batch-Text

end-if

 

 

OS-Delimiter is changed subject to OS running on eg if windows or Dos = "\".

 

Works for me on OC v1..1 and 2.0.

 

Vince

 

 

 

 

On Wednesday 08 May 2013 11:01:50 studiok wrote:

> Hi Everyone.

> I've a problem with file path and cannot get "CBL_CHECK_FILE_EXIST" to work.

> Nor can I open input an existing and not empty sequential file (file status

> 35).

> In a pic x(50) working storage variable, I string end-string, according

> to my needings, a variable lenght alfanumeric value.

> As an example "/abc/def/xyz/filename" where file name is pic x(8) to pic

> x(15) characters. Base name of file may vary in lenght.

> MicroFocus compile and runtime ignored trailing spaces. I suspect OC

> does not.

> Is the file path variable to be something terminated?

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]