Previous Topic Next topic Print topic


Introduction to File Handling

Assembler support provides file handling facilities for a subset of data set organizations. The following table shows the data set organizations and access methods that you can use in your Assembler programs:

Data Set Organization Record Formats Access Methods
PS (member of GDG) Fixed, variable, line sequential QSAM, BSAM
PS Fixed, variable, line sequential QSAM, BSAM
PSU Fixed, variable, line sequential QSAM, BSAM
ES (Entry sequence) Fixed, variable VSAM
KS (Key sequence) Fixed, variable VSAM
RR (Relative record) Fixed, variable VSAM

Assembler support includes performing all file handling by calling the COBOL file handler; this ensures 100% compatibility. Your Assembler programs can access any file created by a COBOL program, as long as its data set organization is one of those shown in the table. Equally, COBOL programs can access files created by Assembler programs.

In your Assembler program you define your files and perform input/ouput operations on them using the same macros that you use on the mainframe. We ignore some control block parameters and applies others differently, but in general the level of compatibility between control blocks on the PC and control blocks on the mainframe is very high. The input/output request macros expand differently from the mainframe. All fields in request macros that accept register notation in a mainframe environment also accept register notation in our Assembler support.

If you are working with mainframe-style files you should map PC filenames to mainframe-style names using the catalog.

You can access data files held on Fileshare servers. We recommend that you specify full Fileshare pathnames in the catalog for any files that you want to access through Fileshare. Alternatively you can specify Fileshare pathnames in your Assembler file handling macros; if you want to use this method, you need to use the Fileshare File Handler, FHREDIR, rather than the standard COBOL File Handler. To do this, set the following parameter in the Assembler support configuration file, mf370ctl.cfg, located in the %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\bin directory:

MF370EFH=FHREDIR

Previous Topic Next topic Print topic