Skip to main content

I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

The KB article that you reference is for an older product version V2.1 and relates to accessing RM/ACU Vision files thru the Micro Focus file handler.

Is this what you are wishing to do, open up RM/ACU data files in Visual COBOL? If you can provide details on what exactly you are trying to achieve then perhaps I can provide you with more direction.

The File Handling docs can be found under Programming-->Data Access-->File Handling and the mapping chapter can be found here:

The information on accessing other types of files such as ACU or RM cam be found in the chapter on Compatibility. The docs for configuring the ACU file hander can be found here:


I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

No, all I mean to do is code the program as close to what I've done on the mainframe. But of course on the mainframe the COBOL assign close just pointed to a DD on the JCL step. So I am not sure what to do here on the PC with Visual COBOL. I suspect I will find the answer to where you have directed me.

I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

You can code the program the same as on the mainframe. On a PC with Visual COBOL, you can map the name specified in the program by using an environment variable set to a value of the pathname for the file. This can be an OS specific pathname such as "C:\\MydataFolder\\Mydatafile.txt". In a nod to JCL, the environment variable name may need to be dd_filename, where filename is the name specified in the program. This is related to whether the file is assigned as dynamic or external. There is Visual COBOL syntax to specify whether the file is dynamic or external, but there is also a default setting when the syntax is not used. If the default is not set correctly for your needs, there is a compiler directive ASSIGN for specifying the default as external or dynamic: ASSIGN"EXTERNAL" or ASSIGN"DYNAMIC". The default is assign"DYNAMIC" and I think ASSIGN"EXTERNAL" is what you need. I hope you know how to set environment variables on Windows.

I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

I don't know how to know to set environmental variables on Windows and suspect I don't want to do so.
But reading what Chirs and you Bruce have written I have come up with this as an example. Is it correct?

INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT dd-filename ASSIGN TO "D:\\Data\\crseregl.dat"
ORGANIZATION IS LINE SEQUENTIAL
FILE STATUS IS FILE-STATUS.

DATA DIVISION.
FILE SECTION.
FD dd-filename
IS EXTERNAL
RECORD CONTAINS 80 CHARACTERS.
01 dd-filename-record.
05 fd-tran-date pic x(4).
05 fd-with-or-dep pic x(6).
05 fd-abc pic x(60).
05 fd-def pic x(10).

I was reading this about file mapping but the link provided on 'filename mapping' no longer works.  So where might that chapter now be?

This might be helpful:

community.microfocus.com/.../configure-the-visual-cobol-file-handler-to-access-acu-vision-or-rm-indexed-files

I grabbed some code from Murach's Structured COBOL and this worked.
IDENTIFICATION DIVISION.
*
PROGRAM-ID. MC_RPT1000.
*
ENVIRONMENT DIVISION.
*
INPUT-OUTPUT SECTION.
*
FILE-CONTROL.
*
SELECT CUSTMAST ASSIGN TO "D:\\COB_MURACH\\DATA\\CUSTMAST.DAT".
SELECT SALESRPT ASSIGN TO "D:\\COB_MURACH\\DATA\\SALESRPT.PRN".
*
DATA DIVISION.
*
FILE SECTION.
*
FD CUSTMAST.
*
01 CUSTOMER-MASTER-RECORD.
05 CM-BRANCH-NUMBER PIC 9(2).
05 CM-SALESREP-NUMBER PIC 9(2).
05 CM-CUSTOMER-NUMBER PIC 9(5).
05 CM-CUSTOMER-NAME PIC X(20).
05 CM-SALES-THIS-YTD PIC S9(5)V9(2).
05 CM-SALES-LAST-YTD PIC S9(5)V9(2).
*