Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there any Enscribe UNLOAD utility that can extract data into flat files(CSV) or SQL tables ?

622 views
Skip to first unread message

manojbo...@gmail.com

unread,
May 6, 2013, 5:34:38 PM5/6/13
to
Is there any Enscribe UNLOAD utility that can extract data into flat files(CSV) or SQL tables ?

Robert Hutchings

unread,
May 6, 2013, 6:08:35 PM5/6/13
to
There is an SQLCI command called CONVERT. You need the DDL for the Enscribe file and then you can create an SQL/MP table, like this:

SQLCI> CONVERT RECORD ORDER TO TABLE $VOL1.SALES.ORDERS
>+ CATALOG $VOL1.SALES;
CNVSRC contains the following commands:

?SECTION CREATE_ORDERS
CREATE TABLE \NODE.$VOL1.SALES.OR
---etc---

Check the NonStop SQL/MP Reference Manual...

Keith Dick

unread,
May 6, 2013, 6:56:42 PM5/6/13
to
That is one approach. If it gives you what you need, great -- use it.

You also can do the individual steps CONVERT would do yourself if you want to make any changes to the names, datatypes, rearrange the columns, leave out some of the columns, etc.

You would create the table as you like, perhaps even editing the CREATE that CONVERT produced.

The SQLCI COPY or LOAD commands move data from Enscribe files to SQL tables. LOAD is faster, but deletes any existing data in the target table, so COPY should be used if you want to preserve existing data in the table.

You don't need a DDL record description if the Enscribe record layout matches the default layout SQLCI assumes for the table. That is documented in the SQL/MP Reference manual. It is pretty simple for most many column types, but there are a few tricky cases that are a little hard to understand. Or you can provide a DDL record description and SQLCI will do conversions between compatible Enscribe and SQL data types.

If you need the data in CSV format, you probably could do that with an ENFORM report, putting commas as literals in the print list, but my memory of ENFORM is kind of dim, and I don't have the spare time right now to look at it.

In case you don't know how to find the NonStop manuals, go to:

http://www.hp.com/go/nonstop-docs/

scroll down to the NonStop Technical Library part at the bottom of that page, and click on the link that names your system type (H-series, J-series, or G-series). The page that takes you to is a alphabetical list by manual title of all the NonStop manuals. Each manual title is the link to the PDF file that contains the manual.

Tone

unread,
May 6, 2013, 7:08:33 PM5/6/13
to
On 05/07/2013 07:34 AM, manojbo...@gmail.com wrote:
> Is there any Enscribe UNLOAD utility that can extract data into flat files(CSV) or SQL tables ?
>
If you have the ENFORM reporting tool, then you can create a CSV file.
For example :

FUP CREATE CSVFILE,TYPE E,EXT 100,BUFFERED

ENFORM
>?DICT <ddl dictionary>
>?OUT CSVFILE
>OPEN DATAFILE;
>LIST FLD1 NOHEAD "," FLD2 NOHEAD "," FLD3 NOHEAD;
>CLOSE DATAFILE;
>EXIT


Robert Hutchings

unread,
May 6, 2013, 7:21:11 PM5/6/13
to
OK, so that will create an Entry-sequenced CSV file. If you want to get a file that you can edit later, do this...

TACL> EDIT CSVFILE PUT CSVFILE2 ! (the exclamation mark is needed here)

This is will give you an editable file, CSVFILE2. I believe you can do this for a data length of up to 239...

wbreidbach

unread,
May 7, 2013, 3:53:59 AM5/7/13
to
ENFORM might be an option but according to the manual the output is limited to 132 bytes.
I think the idea with the SQL table is the better one.
Just create a SQL table with a record description similar to the Enscribe file, it should have the same recsize afterwards. Then you can just use the COPY or better LOAD statement of SQLCI to fill the data into the table.
And a SELECT field1, ",", field2, ... with or without a where clause would produce a CSV file.
If you want to create an Enscribe file as output you have to create it using FUP with a recsize of 255 characters. By default SQLCI will create a type 101 file.

Robert Hutchings

unread,
May 7, 2013, 9:16:16 AM5/7/13
to
I'm assuming the OP needs to upload this file to a PC and them import into Excel, so you would need an edit (code 101) file on the NonStop, correct? You can ftp entry-sequenced files as well, but would the ASCII ftp option work for a structured file?

wbreidbach

unread,
May 7, 2013, 10:05:22 AM5/7/13
to
Am Dienstag, 7. Mai 2013 15:16:16 UTC+2 schrieb Robert Hutchings:
> I'm assuming the OP needs to upload this file to a PC and them import into Excel, so you would need an edit (code 101) file on the NonStop, correct? You can ftp entry-sequenced files as well, but would the ASCII ftp option work for a structured file?

An EDIT-file would be probably better depending on the target. As far as I remember it is possible to transfer Enscribe files as ASCII, you might need additional parameters within FTP.
The only advantage for Enscribe files is the recordsize of max. 255 against the always usable 239 of an EDIT-file.

Robert Hutchings

unread,
May 10, 2013, 12:47:40 PM5/10/13
to
One final thought on this thread...

If you can convert the ENSCRIBE file to a NonStop SQL table, there may be 3rd-party tools that can upload an SQL table into a CSV file or even directly into Microsoft Excel.

I know there are tools like SQLMagic, SQLWays, etc. If any NonStop partners have a product suggestion, this might be a good place to post...

Randall

unread,
May 10, 2013, 10:39:41 PM5/10/13
to
Once you're in SQL, ODBC will get you to EXCEL or ACCESS pretty quickly. "Get External Data", but make sure you have the appropriate ODBC driver from HP.

AndrewM

unread,
May 11, 2013, 3:19:15 AM5/11/13
to
RELATE from Ascert can produce CSV files directly from Enscribe files without the line-length restrictions mentioned above.

Details are at http://www.ascert.com/products/relate
0 new messages