Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Creating Record Layout (.str) files from the command line with DFSTRCL

Creating Record Layout (.str) files from the command line with DFSTRCL

Problem:

The Record Layout Editor within the Classic Data File Tools enables the creation of structure files (.str) for use when viewing and editing records in a structured or formatted way within the Data File Editor.

Typically a Record Layout File is created within a Visual COBOL project by right-clicking on the source file name within the solution explorer that contains the Data Division information you require, and selecting Create Record Layout File.



(Note: The program must be compiled and a .idy file must exist).

However if there are several data files that require layouts, this process must be repeated for each file.

Resolution:

Note: DFSTRCL creates DEFAULT record layout (.str) files, if conditional record layout files are required use the New Record Layout Wizard from  within the Data File Editor

The Data File Structure Command Line (DFSTRCL) was added in Visual COBOL V2.3. The utility enables you to create DEFAULT record layout (.str) files from .idy files directly from the command line, and must be run from a Visual COBOL command prompt.
DFSTRCL can be used to process a single debug information (.idy) file. Alternatively, it can be configured to perform batch processing using a parameters file passed at the command line using the /r parameter. Please refer to the Visual COBOL documentation for further details.

In the example below a data file has two record layouts STUDENT-RECORD and COURSE-RECORD.
A default record layout based on the STUDENT-RECORD needs to be created, the .str will be saved in the same location as the .idy file.



  • The COBOL program must be compiled for debug
  • Run DFSCTRL passing the necessary parameters:

    e.g. DFSTRCL STUDENTS.IDY /D STUDENT-RECORD
     (where /D is record name)
  • Load the data file into the Data File Editor to view/edit in formatted mode

    e.g. MFDATATOOLS STUDENTS.DAT

Click on the video to follow the necessary steps:

8802.DFSTRCLDemo.mp4


(Note: If conditional record layout files are required use the New Record Layout wizard from within the Data File Editor)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
2 of 2
Last update:
‎2019-03-07 09:49
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.