<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to feature-requests</title><link href="https://sourceforge.net/p/jrecord/feature-requests/" rel="alternate"/><link href="https://sourceforge.net/p/jrecord/feature-requests/feed.atom" rel="self"/><id>https://sourceforge.net/p/jrecord/feature-requests/</id><updated>2018-01-12T18:37:07.392000Z</updated><subtitle>Recent changes to feature-requests</subtitle><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#cf01" rel="alternate"/><published>2018-01-12T18:37:07.392000Z</published><updated>2018-01-12T18:37:07.392000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.net97d782c883fc56493461960f66fd9e87ef003dec</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you! Bruce for the detailed explanation.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#2b1b" rel="alternate"/><published>2018-01-11T01:55:28.136000Z</published><updated>2018-01-11T01:55:28.136000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.netb45cc4f4265f3ab94157985dffe214cf3ebd18db</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;JRecord is designed to work with Cobol data structures. The &lt;strong&gt;setFileOrganization&lt;/strong&gt;&lt;br/&gt;
tells JRecords are to be organised - i.e. what the line seperator is.&lt;/p&gt;
&lt;h3 id="fixed-width-records"&gt;Fixed width Records&lt;/h3&gt;
&lt;p&gt;With length records, each record is a fixed length. There is no /r / n etc between individual records.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;lt;--Record 1 --&amp;gt;&amp;lt;--Record 2 --&amp;gt;&amp;lt;--Record 3 --&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This is what was being used initially. JRecord provides 2 versions of fixed length records&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;          .setFileOrganization(Constants.IO_FIXED_LENGTH_RECORDS)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;does byte (stream based IO). You can use it for single byte charactersets / binary files.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;          .setFileOrganization(Constants.IO_FIXED_LENGTH_CHAR)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Used for multi-byte character-sets (e.g.UTF-8, UTF-16)&lt;/p&gt;
&lt;h3 id="vb-records"&gt;VB Records&lt;/h3&gt;
&lt;p&gt;With Variable length records you have&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;   &amp;lt;record-length&amp;gt;&amp;lt;--- record data  ---&amp;gt;
   &amp;lt;record-length&amp;gt;&amp;lt;---   record data     ---&amp;gt;
   &amp;lt;record-length&amp;gt;&amp;lt;--- record data ---&amp;gt;
   &amp;lt;record-length&amp;gt;&amp;lt;---        record data       ---&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;JRecord provides several VB formats &lt;strong&gt;Constants.IO_VB, Constants.IO_VB_DUMP, Constants.IO_VB_FUJITSU, Constants.IO_VB_GNU_COBOL&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="text-files"&gt;Text files&lt;/h3&gt;
&lt;p&gt;For standard text files you can use&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;         .setFileOrganization(Constants.IO_BIN_TEXT)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;or&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;         .setFileOrganization(Constants.IO_UNICODE_TEXT)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;With &lt;strong&gt;Constants.IO_BIN_TEXT&lt;/strong&gt; all IO is done at byte (stream level).&lt;/p&gt;
&lt;p&gt;With &lt;strong&gt;Constants.IO_UNICODE_TEXT&lt;/strong&gt; standard Java Read / writers are used&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#3748" rel="alternate"/><published>2018-01-10T14:48:54.257000Z</published><updated>2018-01-10T14:48:54.257000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.net38f5f18bccd3bb04f5cc42a590146f541c8570e5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you!Bruce .It is working perfectly now. Can you update how Constants.Io_BIN_TEXT helped here?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#5 PIC 9(5).99- should be numeric</title><link href="https://sourceforge.net/p/jrecord/feature-requests/5/?limit=25#d02d" rel="alternate"/><published>2018-01-10T04:10:03.749000Z</published><updated>2018-01-10T04:10:03.749000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.net88572e96bde5659c04ea30686d381ed55ec925f8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; pending&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#e176" rel="alternate"/><published>2018-01-10T04:08:53.526000Z</published><updated>2018-01-10T04:08:53.526000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.netd825bb7d774f4ee89c633fcd63918562febb4437</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;What you need to do is set the &lt;strong&gt;setFileOrganization(Constants.IO_BIN_TEXT)&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL
            .newIOBuilder("copybook")
                    .setFileOrganization(Constants.IO_BIN_TEXT)
                    .setFont("CP1252");
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#29f6" rel="alternate"/><published>2018-01-10T03:05:16.201000Z</published><updated>2018-01-10T03:05:16.201000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.net8a1be38fda021d8fe0c6eb5777d805c51f7e6fb3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;Description has changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Diff:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gd"&gt;--- old&lt;/span&gt;
&lt;span class="gi"&gt;+++ new&lt;/span&gt;
&lt;span class="gu"&gt;@@ -4,7 +4,7 @@&lt;/span&gt;
  check if below code is correct.

&lt;span class="gd"&gt;-    final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
&lt;span class="gi"&gt;+        final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
             "copybook").setFont("CP1252"); 
          AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");
          AbstractLine outline = null;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#d38e" rel="alternate"/><published>2018-01-10T03:03:56.427000Z</published><updated>2018-01-10T03:03:56.427000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.netdfc468c326f9d1e026ad8c8c289157d67da45390</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;Description has changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Diff:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gd"&gt;--- old&lt;/span&gt;
&lt;span class="gi"&gt;+++ new&lt;/span&gt;
&lt;span class="gu"&gt;@@ -3,19 +3,19 @@&lt;/span&gt;
  I am using jrecord to write records to file. But i writer is writing all records to a single. Can you please
  check if below code is correct.

&lt;span class="gd"&gt;- ~~~&lt;/span&gt;
&lt;span class="gd"&gt;-  final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
&lt;span class="gd"&gt;-       "copybook").setFont("CP1252"); &lt;/span&gt;
&lt;span class="gd"&gt;-     AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");&lt;/span&gt;
&lt;span class="gd"&gt;-     AbstractLine outline = null;&lt;/span&gt;
&lt;span class="gd"&gt;-     while(resultSet.next()){&lt;/span&gt;
&lt;span class="gd"&gt;-       outline = ioBuilder.newLine();&lt;/span&gt;
&lt;span class="gd"&gt;-       outline.getField("id").set(resultSet.getInt("id")));&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="gi"&gt;+    final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
&lt;span class="gi"&gt;+            "copybook").setFont("CP1252"); &lt;/span&gt;
&lt;span class="gi"&gt;+         AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");&lt;/span&gt;
&lt;span class="gi"&gt;+         AbstractLine outline = null;&lt;/span&gt;
&lt;span class="gi"&gt;+         while(resultSet.next()){&lt;/span&gt;
&lt;span class="gi"&gt;+           outline = ioBuilder.newLine();&lt;/span&gt;
&lt;span class="gi"&gt;+           outline.getField("id").set(resultSet.getInt("id")));&lt;/span&gt;

&lt;span class="gd"&gt;-       writer.write(outline);&lt;/span&gt;
&lt;span class="gd"&gt;-       }&lt;/span&gt;
&lt;span class="gd"&gt;-       writer.close();&lt;/span&gt;
&lt;span class="gd"&gt;-~~~&lt;/span&gt;
&lt;span class="gi"&gt;+           writer.write(outline);&lt;/span&gt;
&lt;span class="gi"&gt;+           }&lt;/span&gt;
&lt;span class="gi"&gt;+           writer.close();&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;

       Excpected  Output:
       1234
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#c2e6" rel="alternate"/><published>2018-01-10T03:02:53.549000Z</published><updated>2018-01-10T03:02:53.549000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.nete9adc79a3068580f311e68c58fbcc0674da40c9d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;Description has changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Diff:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gd"&gt;--- old&lt;/span&gt;
&lt;span class="gi"&gt;+++ new&lt;/span&gt;
&lt;span class="gu"&gt;@@ -2,10 +2,10 @@&lt;/span&gt;

  I am using jrecord to write records to file. But i writer is writing all records to a single. Can you please
  check if below code is correct.
&lt;span class="gi"&gt;+ &lt;/span&gt;
  ~~~
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;- final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
&lt;span class="gd"&gt;-   "copybook").setFont("CP1252");&lt;/span&gt;
&lt;span class="gi"&gt;+  final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/span&gt;
&lt;span class="gi"&gt;+       "copybook").setFont("CP1252"); &lt;/span&gt;
      AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");
      AbstractLine outline = null;
      while(resultSet.next()){
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#8 CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/?limit=25#a4cf" rel="alternate"/><published>2018-01-10T03:01:06.992000Z</published><updated>2018-01-10T03:01:06.992000Z</updated><author><name>Bruce Martin</name><uri>https://sourceforge.net/u/userid-1262681/</uri></author><id>https://sourceforge.netd6dad27a384d8f9ed76258a9bbddad1709c04fa6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;Description has changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Diff:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gd"&gt;--- old&lt;/span&gt;
&lt;span class="gi"&gt;+++ new&lt;/span&gt;
&lt;span class="gu"&gt;@@ -2,7 +2,8 @@&lt;/span&gt;

  I am using jrecord to write records to file. But i writer is writing all records to a single. Can you please
  check if below code is correct.
&lt;span class="gd"&gt;- &lt;/span&gt;
&lt;span class="gi"&gt;+ ~~~&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
  final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(
    "copybook").setFont("CP1252");
      AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");
&lt;span class="gu"&gt;@@ -14,6 +15,7 @@&lt;/span&gt;
        writer.write(outline);
        }
        writer.close();
&lt;span class="gi"&gt;+~~~&lt;/span&gt;

       Excpected  Output:
       1234
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>CobolBuilder writing records to single line</title><link href="https://sourceforge.net/p/jrecord/feature-requests/8/" rel="alternate"/><published>2018-01-10T01:43:49.838000Z</published><updated>2018-01-10T01:43:49.838000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.neta51f50cc97e40ac4aca8ea77f6a109f3d71d2719</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 8 has been modified: CobolBuilder writing records to single line&lt;br/&gt;
Edited By: Bruce Martin (bruce_a_martin)&lt;br/&gt;
Description updated:&lt;br/&gt;
--- description-old&lt;/p&gt;
&lt;p&gt;+++ description-new&lt;/p&gt;
&lt;p&gt;@@ -4,7 +4,7 @@&lt;/p&gt;
&lt;p&gt;check if below code is correct.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;/li&gt;
&lt;li&gt;final ICobolIOBuilder ioBuilder = JRecordInterface1.COBOL.newIOBuilder(&lt;br/&gt;
             "copybook").setFont("CP1252"); &lt;br/&gt;
          AbstractLineWriter writer =  ioBuilder.newWriter("output.txt");&lt;br/&gt;
          AbstractLine outline = null;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry></feed>