Skip to main content

Problem:

What is the quickest way to import a PC text file to the MFE Catalog to be used by my programs? We currently allocate a new dataset in the MFE Catalog and then use Cut and Paste.

Resolution:

  You have several choices on how to place an ASCII Text file into the Mainframe Express Catalog.

- Allocate a dataset then copy/paste it as you have done previously.

   This works for both a QSAM dataset or for a PDS member.   

- Use the Data File Converter to copy a .txt file into a Catalogued dataset

- Create the PC file then make a Catalog entry pointing to that PC file

The easiest means for you is probably to create your text file (using

Windows Notepad or the MFE IDE Editor), then Allocate it in the MFE Catalog.

To do this, follow these steps:

- Create the ASCII text file

- Go into your MFE project, in the Project View window select the

   'Catalog' tab

- Right-click in a blank area and select 'Add Existing Dataset'

    Note:  you will notice that the window presented by the 'Add Existing

    Dataset' does not have the 'PC Filename' field grayed out   

- Enter the MVS name of your QSAM dataset in the 'DS Name' field:

       ZOS.DVLP.QSAM1

- In the 'PC Filename' field, either navigate to your PC file using the

   Windows Browse button (those three little dots to it right) or enter

   the full path to your file. If you use the Browse button, then be aware

   of the 'Files of Type' selection box. You can select 'All Files (*.*)' at

   the bottom of this list, or you can just enter '*.*' in the 'File name'

   field. Either way you want to navigate to where your physical PC file

   exists and select it.

- If you are adding a QSAM dataset, enter DSORG=PS RECFM=F or FB

   and the appropriate LRECL for your dataset

- If you are creating a PDS and then want to add PDS members (such as

   control cards for SORT, IDCAMS, DB2, etc.), then enter DSORG=PO

   RECFM=LSEQ and LRECL=80

- Go to the 'Advanced tab'  and ensure 'ANSI'  is shown for 'Charset'

  (the ANSI character set includes ASCII)

- Click OK

Your dataset should now be catalogued. Micro Focus will do character set translation for its catalogued dataset depending on WHO issues the OPEN. If it is JCL or control cards then Micro Focus will pass the data as ANSI. If it is a Cobol program then Micro Focus will pass the data as EBCDIC. For Assembler, you need to take an extra step, but most people have now converted their Assembler to Cobol.

Old KB# 2600

#MFDS
#EnterpriseDeveloper