How do I include data access in a website developed with Visual COBOL?
I created a new COBOL ASP.NET web site, which works, but as soon as I add SELECT and FD statements for a file access I get compile errors. Maybe the syntax is wrong, or I have to link in some module for data access?
Error 1: Undeclared identifier _MF_LINK_TEST-FILE C:\Users\Test\AppData\Local\Temp\_cd5836_2\About.aspx.il
Error 2: COBCH1268 : A static file cannot reference instance items …\Default.aspx.cbl 11 55 Temp1-ASP-NET-WEB = results from the " FILE STATUS IS FS" statement.
The full program is shown below:
class-id Temp1_ASP_NET_WEB._Default is partial
inherits type System.Web.UI.Page public.
SELECT TEST-FILE ASSIGN TO "C:\TEST.DAT"
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS TEST-REFNO
LOCK MODE IS MANUAL.
* FILE STATUS IS FS.
FD TEST-FILE IS EXTERNAL.
03 TEST-REFNO PIC 9(8).
03 TEST-NAME PIC X(35).
77 FS PIC XX.
method-id Page_Load protected.
procedure division using by value sender as object by value e as type EventArgs.
Maybe the data access should be in some other module, such as a web service, but I thought a quick simple start would be to do it all in one program. Any pointers to to how best to separate secure data access from the web page?