Paul

I tried your suggestion and the command ran with no errors. Unfortunately the resulting text file had unrecognizable characters in it.

I did get something to do the job for the time being. It is not as eloquent as you using 1 command but it got the job done for now. Here is my CL program.

PGM PARM(&WORDFILE &TEXTFILE)

/* Declare Variables */

DCL VAR(&TEXTFILE) TYPE(*CHAR) LEN(200)
DCL VAR(&WORDFILE) TYPE(*CHAR) LEN(200)

/* Convert Word Document to a Spool File */

JAVA CLASS('/java/Tika/tika-app-1.14.jar') PARM('-t' +
&WORDFILE) OUTPUT(*PRINT)

/* Convert Spool File to a Text File */

SPLCONVERT FILE(QPRINT) TOOBJ(&TEXTFILE) JOB(GORD/QPRTJOB) +
TRANSFORM(*TXT) DLTSPLF(*YES) +
OBJATR((*DISKSTGOPT *MINIMIZE))
ENDPGM

As you can see, I run the java command and have my output go to a spool file. Then I use the SPLCONVERT command from the SPLAMATIC product from Gumbo Software to convert the spool file to text. We have used this product for many years. That worked for me for now. Though it would be nice to do it with just calling the java program.

Thanks for all your help. We really appreciate it.

Gord

-----Original Message-----
From: JAVA400-L [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of java400-l-request@xxxxxxxxxxxx
Sent: January 22, 2017 11:00 AM
To: java400-l@xxxxxxxxxxxx
Subject: JAVA400-L Digest, Vol 15, Issue 15

Send JAVA400-L mailing list submissions to
java400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/java400-l
or, via email, send a message with subject or body 'help' to
java400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
java400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than "Re: Contents of JAVA400-L digest..."


Today's Topics:

1. Output results from tika to a file (Paul Roy)


----------------------------------------------------------------------

message: 1
date: Sat, 21 Jan 2017 19:39:55 +0100
from: Paul Roy <paul.roy@xxxxxxx>
subject: Output results from tika to a file

it looks like the Java Class is directing the output to stdout...
you could then try

JAVA CLASS('/java/Tika/tika-app-1.14.jar') PARM('-t' '"/java/Tika/Goralta Invoice.doc" ') PROP((os400.stdout "file:/java/Tika/Goralta Invoice.txt"))


paul

------------------------------

Subject: Digest Footer


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.