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


  • Subject: RE: What record return from getNewRecord() ??
  • From: Martinus Ivan <IVANM@xxxxxxxxxxxxxxxx>
  • Date: Fri, 10 Mar 2000 16:53:46 +0700


        Thank You Frances & David,
        I create PF with default value..and getNewRecord() actualy return
the default value you set on the PF field.
        I can put an anology that  the getNewRecord() actualy give (or get)
you a new record object slot(bucket), which we fill the slot with data and
put it on file.

        Thank you very much.

        regards,
        Ivan

> Martinus Ivan <IVANM@MULTIPOLAR.CO.ID> on 03/08/2000 11:36:16 PM
> 
> Please respond to JAVA400-L@midrange.com
> 
> To:   "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com>
> cc:
> Subject:  What record return from getNewRecord() ??
> 
> 
> 
> 
> 
> > Hi All,
> >
> > I have a confusion about getNewRecord() method from RecordFormat Class
> > (I'm using ToolBox version from JBuilder/400).
> > I create a small PF file call MyData and its only have one field (20
> *char
> > long).
> > I add two record in it. And develop a small java program just to learn
> the
> > characteristic of getNewRecord().
> >
> > Base on my code below I don't understand :
> >    Why the.......System.out.println(dat.toString()).......print nothing
> >
> > And the disconnectAllServices() didn't work. The program seems do not
> > return/finished.
> > I'm very sure it not because of object authority problem in AS/400.
> > Hope some who have try this method can share it....:)
> > Thanks in Advance
> >
> > regards,
> > Ivan. L
> >
> >
> /*************************************************************************
> > **********
> > import com.ibm.as400.access.*;
> >
> > class filedesc {
> >        public static void main (String args[]) {
> >    AS400 TheAS400 = new AS400("XXX.XXX.XXX.XXX");
> >
> >            try {
> >               SequentialFile dataf = new
> > SequentialFile(TheAS400,"/QSYS.LIB/MyLib.LIB/MyData.FILE");
> >
> >      AS400FileRecordDescription file_desc = new
> > AS400FileRecordDescription
> >
> > (TheAS400,"/QSYS.LIB/MyLib.LIB/MyData.FILE");
> >
> >          //Retrieve the MyData file record format description
> >               RecordFormat datarec =
> file_desc.retrieveRecordFormat()[0];
> >
> >         // Set the record format for dataf file object before open it
> >      dataf.setRecordFormat(datarec);
> >
> >        // Open the file
> >
> > dataf.open(AS400File.READ_ONLY,0,AS400File.COMMIT_LOCK_LEVEL_NONE);
> >               Record dat = datarec.getNewRecord();
> >              System.out.println(dat.toString());
> >          }
> >      catch(Exception e) {
> >         e.printStackTrace();
> >          }
> >
> >    mpcas410.disconnectAllServices();
> >
> >    }
> > }
> > /*****************************************************************
> >
> >
> +---
> | 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
> +---
> 
> 
> 
> +---
> | 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
> +---
+---
| 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 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.