× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi Thorbjørn,

Chuck's response looks like it should work; I have some concern about
David's, mainly that I wonder what a table generated by SQL displays for
source file? I'm obviously too lazy to check it out. Too busy and too
lazy...

I'll offer a third option. It will probably be slower, but I wouldn't
expect that to be too much of a concern in an FTP batch operation. Since,
as you say,

I can see externally described files
as tables with JDBC, the others not

you could hit the file/table with JDBC and base your decision on the result.


Joe Sam

Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400

----- Original Message ----- From: "CRPence" <crp@xxxxxxxxxxxxxxxxxxxx>
To: <java400-l@xxxxxxxxxxxx>
Sent: Tuesday, March 04, 2008 10:26 AM
Subject: Re: Is there a way to detect if a file is "externally described"?


Code at the server to extract the information using an API is an option:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/qdbrtvfd.htm

QDBRTVFD API "File Definition Header (Qdb_Qdbfh)" FILD0100 Format

0d47 0x2F BINARY(2) Qdbfhmnum "Number of members, 0 through 32,767"
...
0d60 0x3C,7 BIT(1) Qdbfpgmd "Program described file indicator.
If on, the file is program described."
0d61 0x3D BINARY(2) Qdbffmtnum "Total number of record formats, 1
through 32."

<code>
If Qdbfhmnum > 1 Then Do; /* At least one member */
// which member, presumably is requested...
If Qdbffmtnum > 1 Then /* More than one format */
Send_Error();
If Qdbfpgmd = 0b1 /* Program Described file */
Use_CpyToStmf()
Else /* Externally Described */
Use_CpyToImpf()
End;
Else /* No members, No data */
... ;
</code>

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.