Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: CBL_DIR_SCAN_READ

$
0
0

When testing your method I get an error on the cbl_dir_scan_read for index overflow because you have the filename field defined with an ODO but you do not set the value of NameLn prior to the call:

            10 FileName.

                 15 NameLn Pic XX    Comp-5.

                 15 NameTx.

                      20 NT Pic X Occurs 1 to 256 Times Depending on NameLn.

If I add the following statement before the call it works fine

move 256 to NameLn

You are using a field named LB_Path which is not shown in your example so I just used one defined as:

01 lb_path  pic x(256) value "C:\TEMP".

And when I do the call it returns the names of the files in c:\temp just fine.

BTW, you have a hyphen in the name of the routine where it should be an underscore but the compiler translates this anyway...

   Call "CBL_DIR_SCAN-READ"

Thanks.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>