David Gibbs wrote:
Anyone know if there is a way to generate RFML specifications from a
physical file object?

Found the solution ... it's actually built into JT400 :)

Here's an example ... http://code.midrange.com/index.php?id=a9d75e7e3a

Or ...
import java.io.IOException;

import com.ibm.as400.access.*;
import com.ibm.as400.data.*;

public class GenerateRfml {

        private static final String SYSTEM_NAME = "systemname";
        private static final String USERID = "userid";
        private static final String PASSWORD = "password";
        private static final String LIBRARY = "library";
        private static final String FILENAME = "file";
        private static final String OUTPUT_PREFIX = "/temp/" + FILENAME + "-";
        private static final String OUTPUT_SUFFIX = ".rfml";
        public void go() {
                AS400 as400 = new AS400(SYSTEM_NAME, USERID, PASSWORD);
                String path = QSYSObjectPathName.toPath(LIBRARY, FILENAME, 
                try {
                        AS400FileRecordDescription recordDescription =
                                new AS400FileRecordDescription(as400, path);
                        RecordFormat[] formats = 
                        for(int i=0;i<formats.length;i++) {
                                RecordFormatDocument doc = new 
                                String formatName = formats[i].getName();
                                doc.toXml(OUTPUT_PREFIX + formatName + 
                } catch (AS400Exception e) {
                } catch (AS400SecurityException e) {
                } catch (InterruptedException e) {
                } catch (IOException e) {
                } catch (XmlException e) {
        public static void main(String[] args) {
                GenerateRfml genRfml = new GenerateRfml();

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-2022 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.