Dumping ADABAS data into an ASCII file

I want to dump the data in two ADABAS tables into an ASCII file for conversion to Oracle. I want to know if there is way to do it without writing a long Natural program. Many thanks for your assistance

John Herritt

1 Like

Depends on what you consider a “long” Natural program.

DEFINE DATA LOCAL
1 MYVIEW VIEW OF EMPLOYEES
2 NAME
2 FIRST-NAME
2 CITY
1 #OUT (A100)
END-DEFINE
*
READ (1) MYVIEW
COMPRESS MYVIEW INTO #OUT WITH DELIMITER ‘,’
PRINT #OUT
END-READ
END

Depending on your data, you will probably use a different delimiter; H’00’ is a useful one. Then just specify this when importing your data.

steve

Thank you for your response I guess I would define ‘long’ as several hundred lines of code. We found a couple of JCL’s that will accomplish the goal. I was just trying to find a way we could download the 2 files directly from the mainframe to an ASCII format - through an FTP site. I appreciate your suggestion.

some options to look at:

  • Adabas Replication allows you to do real-time data replication from the mainframe to a relational database target. Avoids FTP and handles data conversion.
  • webMethods EntireX (formerly Communicator) allows you to have real-time services available to provide methods and data available
  • Adabas SQL lets you use SQL commands to read the Adabas mainframe data directly from any ODBC compliant application.

It would be wonderful if we had access to those utilities. I’m dealing with applications that are no longer in use. My employer needs to move them into Oracle 10g. We’ve found a JCL that will get us the 2 files we need into an ASCII format. What I’m looking for is a way to grab the files off the mainframe directly (without using JCL or writing a long Natural program). In other words, getting this data into an ASCII format without having Operations having to reactivate the system. Thank you for your assistance.

You could use Adabas utilities to unload, decompress and FTP, but that does involve a bunch of JCL.

The files cannot be obtained directly from Adabas without going through a program or utility.

If you use a Natural program similar to Steve’s suggestion, you can route the output to a sequential file (replace PRINT #OUT with WRITE WORK FILE 1 #OUT). If you have access to TSO, you can allocation work file 1 (DD CMWKF01), run the Natural program from there then call FTP from TSO to send the work file to the workstation or Unix box (or run FTP from the target to get the file(s) from the mainframe). As long as the sequential file is all text, it will be translated to ASCII just fine (don’t use “BIN” or “IMAGE” ftp mode, use “ASCII” or “Text” mode).

1 Like