|
I agree 100% with Eric. Mandy Eric Merritt <cyberlync@yahoo.com> on 10/05/2001 15:21:15 Please respond to JAVA400-L@midrange.com To: JAVA400-L@midrange.com cc: (bcc: Mandy Shaw/Pacific/UK) Subject: Re: AS/400 PCML and Record access I know you probably can't change anything, but in the long run I think the best way to go to call native programs on the 400 is through Stored Procedures in your JDBC code. Anything else gets really complicated really fast. --- "Annalur, Pavan" <Pavan.Annalur@aig.com> wrote: > > We are using PCML in order to invoke a AS/400 COBOL > program and return data > back. Can any one tell, how to pass " record " > (AS/400 Physical file record) > as linkage variable using PCML. > > I knew that program call will allow a record to be > passed as an argument ( > if record is converted as byte array and we set the > byte array as program > parameter), > > How to pass same argument using PCML, how should I > code a record argument in > <struct> tag. > > My Cobol program can take record as linkage section > ( 01 record-area) > > Any suggestions ? > > > > > -----Original Message----- > From: Dave Wall [mailto:dawall@us.ibm.com] > Sent: Wednesday, May 09, 2001 11:21 AM > To: JAVA400-L@midrange.com > Subject: Re: Dealing with AS/400 text file io > > > Note IFSFileInputStream and IFSFileOutputStream > extend their > java.io > counterparts. This makes it possible to use > java.io buffers > and readers > with Toolbox classes. For example, > > AS400 system = new AS400(); > IFSFileOutputStream outputStream = new > IFSFileOutputStream(system, > "/daw.temp"); > PrintWriter writer = new > PrintWriter(outputStream); > > for (int i=0; i<10; i++) > { > writer.println("Hello Java"); > } > writer.flush(); > > IFSFileInputStream inputStream = new > IFSFileInputStream(system, > "/daw.temp"); > InputStreamReader inReader = new > InputStreamReader(inputStream); > BufferedReader reader = new > BufferedReader(inReader); > > String text = reader.readLine(); > while (text != null) > { > System.out.println(text); > text = reader.readLine(); > } > > > But, there is one hole in our support that we have > on our > todo list to fix. > We have InputStream and OutputStream objects that > convert > text between the > ccsid of data stored in the file and Unicode. For > example, > if the file > contains ebcdic data you can use > IFSTextFileInputStream to > read that file. > The class will automatically convert data from > ebcdic to > unicode and stuff > the data in a String object. Don't see an obvious > way to > hook up an > IFSTextFileOutputStream with a buffered reader. > It will > compile but I > think the reader will call the method that gets > bytes, not > Strings. > Getting bytes will get the raw ebcdic data, not > the > converted unicode > strings. Maybe your text is not in ebcdic so you > don't care > but I wanted > to point this out just in case. A way around this > problem > (if the file is > small) is to read the entire file into a single > String > object, then create > a StringReader over the String. Hope this helps, > > David Wall > AS/400 Toolbox for Java > > > MaradyPrak@cnstores.com@midrange.com on 05/09/2001 > 06:10:42 > AM > > Please respond to JAVA400-L@midrange.com > > Sent by: owner-java400-l@midrange.com > > > To: JAVA400-L@midrange.com > cc: > Subject: Re: Dealing with AS/400 text file io > > > > > It is a text file on IFS. I tried to use > IFSFile,IFSFileInputStream, > IFSFileOutputStream, etc. but there isn't a > readLine() > method in these > classes. I want to be able to read one line at a > time. > With IFS file > access classes above, you can only read for a > specific > amount of byte at a > time not per line basis. > > > Marady Prak - Technical Support Specialist > 300 Phillipi Road > P.O. Box 28512 > Columbus, OH 43228 > Phone: 614-278-7186 > Fax: 614-278-4769 > Email: mprak@biglots.com > Pager: 877-282-3426 PIN 6143956967 > > > > > "Dave Wall" > <dawall@us.ibm.com To: > JAVA400-L@midrange.com > > cc: > Sent by: > Subject: > Re: Dealing with > AS/400 text file io > owner-java400-l@mi > drange.com > > > 05/08/2001 01:50 > PM > Please respond to > JAVA400-L > > > > > > > > What type of file are you reading from? > > (1) If from a stream file in the integrated file > system and > on the AS/400 > use java.io.*. If on a client try the Toolbox IFS > classes > (IFSFile, > IFSFileInputStream, IFSFileOutputStream, etc.). > They work > just like the > java.io classes. > > (2) If reading from a database file use JDBC or > Toolbox > record-level > database access. > > David Wall > AS/400 Toolbox for Java > > > MaradyPrak@cnstores.com@midrange.com on 05/08/2001 > 11:58:42 > AM > === message truncated === ===== Eric Merritt Information Systems Consultant McCormack & Associates, Inc. Rock Hill, South Carolina (V) 803-327-3358 X 225 eric@mccinc.com http://www.mccinc.com/ __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- Regards, Mandy Shaw Notability Solutions PLC Kingfisher House Frimley Business Park Camberley Surrey GU16 5SG UK http://www.Notability.com Email: Mandy.Shaw@Notability.com Telephone: +44 (0)870 166 1000 DDI: +44 870 166 1324 Facsimile: +44 870 168 3920 Mobile: +44 7710 447966 ---------------------------------------------------------------------- ---------------------------------------------------------------------- Catalyst Solutions plc. Registered No 2918101. Registered @ Kingfisher House, Frimley Business Park, Frimley, Surrey. GU16 5SG U.K. NOTICE: This message is intended only for the named addressee(s) and may contain confidential and/or privileged information. If you are not the named addressee you should not disseminate, copy or take any action or place any reliance on it. If you have received this message in error please notify postmaster@catalyst-solutions.com and delete the message and any attachments accompanying it immediately. ---------------------------------------------------------------------- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
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.