LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2009)Back to main CICS-L pageJoin or leave CICS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Nov 2009 10:03:19 +0000
Reply-To:     CICS List <CICS-L@LISTSERV.UGA.EDU>
Sender:       CICS List <CICS-L@LISTSERV.UGA.EDU>
From:         Paul Cooper <PCOOPER@UK.IBM.COM>
Subject:      Re: How do __you__ read non-DB non-XML files in Java?
In-Reply-To:  <1258424095.2882.57.camel@mckown5.johnmckown.net>
Content-Type: multipart/alternative;

There are two technologies that I know of for working with COBOL style records in Java. The first is JZOS (though you need a recent version if you want the utilities for handling record based data). The second is the J2C tooling that's available in RAD/RDz and will probably be familiar to developers who work with the CTG. In both cases there is off-line tooling for generating Java classes that in turn can marshall/demarshall data to/from a byte[] that conforms to the structure of the data record. So the Java programmer gets a simple API to use with getters/setters to interact with the underlying fields in the record.

The recent update to the Java in CICS Redbook discusses both technologies, so you could take a look there for some examples: http://www.redbooks.ibm.com/abstracts/sg245275.html . See in particular section 7.3.

Paul Cooper, IBM United Kingdom Limited

From: John McKown <joarmc@SWBELL.NET> To: CICS-L@LISTSERV.UGA.EDU Date: 17/11/2009 02:18 Subject: Re: How do __you__ read non-DB non-XML files in Java? Sent by: CICS List <CICS-L@LISTSERV.UGA.EDU>

On Mon, 2009-11-16 at 18:08 -0600, Andrew Joseph wrote: > We use a utility called JZOS here and we've used it to read PS files. > I have never tried to read a VSAM file so far because nobody here as > asked for it - Knock on wood....They will ask for it tomorrow :-( > I think if you are on Java 5.0, you'll have JZOS included in your IBM > JDK and you don't have to download it. I think it does contain sample > programs, if not you can Google and find samples. > The JZOS forum is at http://dovetail.com/forum/viewforum.php?f=1 and > you'll find a lot of information there.

I've used JZOS to read z/OS legacy datasets. But it does not give me an easy way to split the record into fields. I would really like something like a COBOL structure or a C struct, but I think that I'm not going to get it.

-- John McKown Maranatha! <><

Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


[text/html]


Back to: Top of message | Previous page | Main CICS-L page