In our legacy (Net Express 3.1) code we defined our input/output files as follows:
SELECT LOGIN ASSIGN TO DISK FROM LocLogin
ORGANZATION IS LINE SEQUENTIAL
LOCK MODE IS MANUAL WITH LOCK ON RECORDS
FILE STATUS IS FILE-STATUS
ACCESS IS SEQUENTIAL.
In moving to Visual COBOL this no longer worked and we were advised to use the External File Mapper (SupportLine Incident #2539016 ). We did and can open files using this setup. However, I have two issues I need some help with. Issue #1 is that if there is a file error, I don't have the file path available to report it. For example, EMLocLogin would be defined in the External Mapper File but it is not available at runtime; so so I need to open the External File Mapper File and read for EMLocLogin to get my file path? Issue #2, I need to be able to open a report file (output) whose name will be dynamic, that is, it is named for the particular USERID running it, for example C:\AIRRS\REPORTS\JPL0457.135 (JPL0457 = USERID), so the actual file path would be moved to RptLocation in working storage as shown in the select below:
SELECT RPT-FILE ASSIGN TO DISK FROM RptLocation
ORGANIZATION IS LINE SEQUENTIAL
ACCESS IS SEQUENTIAL
FILE STATUS IS FILE-STATUS.
Since I have to use External File Mapper, how can I set the path of the report file dynamically based upon which user is running it?
I have reviewed the PrintTextVC solution found here in the forum and it will be very helpful when it comes time to print, but I've got to create the file first. Thanks in advance, I realize it is probably an elementary question but the migration seems to be full of simple questions I have a hard time answering.