[go: up one dir, main page]

Activity for CobolToCsv

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    There must be a programmatically way to determine which record is which, normally it is done with 1 or more fields, position (e.g. 1st / last record) can be used. JRecord provides several ways of deciding which record to use. The lowest level is a hand written RecordDecider interface. It has one method int getPreferedIndex(AbstractLine line); You are given a JRecord line and return the Record-Index. You can use the setRecordDecider method to assign your method String poDownloadCobolFileName = Data.AMS_PO_COBOL_COPYBOOK_FILE_NAME;...

  • Bill Seubert Bill Seubert posted a comment on discussion General Discussion

    It's been a while since the last drop of this code happened, so I'm not sure if it's still supported. Today I got a file with multiple record types in it. It seems that the four different record types are supersets of each other - there's a small one, one with some additional fields, another with additional fields on top of that one, etc. - four in total. I've tried concatenating the four copybooks and running the MultiRecordCobol2Csv tool against the records, but it doesn't seem to be able to figure...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    I have updated Cobol2Csv to convert Cobol Multi-record file type files to Csv. See https://sourceforge.net/projects/coboltocsv/files/CobolToCsv/Version_0.90/

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.90/ReadMe_0.90.md

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.90/Cobol2Csv_0.90.zip

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    I am about to do a new Version that supports multi-record files. I will leave the existing programs alone and write a new multi-record Cobol to Csv program. This new program will support: writing each record type in a seperate file Adding the record-name as the first field in the file All the normal options

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    Here is a java program that reads a multi-record fileand writes a tsv (tab selected values). I used tabs because it is highly unlikely to be any tabs in the Cobol-file. In your case you could: Read all the copybooks into a String variable Create a StringReader for use in the ICobolIOBuilder iob = JRecordInterface1.COBOL.newIOBuilder(copybookName) statment Alternatively you could use the JRecordInterface1.COBOL.newMultiCopybookIOBuilder interface. Anyway here is an example of a program to generate...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    If the Copybooks start with 01 then yes but it may not give you what you want. If you have 01 Rec-1. 05 field-1-1 Pic x(2). 05 field-1-2 Pic x(4). 01 Rec-2. 05 field-2-1 Pic x(4). 05 field-2-2 Pic x(1). And the data is 0123456 you will get field-1-1,field-1-2,field-2-1,field-2-2 12,3456,1234,5 Converting Multi-Record files to CSV does not seem very sensible to me and likely to be of very limited appeal

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Hi Bruce, If i can concatenete it, i can use the coboltocsv.. is not it? Thanks, Kaushik

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    No that is Windows command; On the Mainframe: In standard ZOS JCL you could use a SORT Copy On the Unix side you can use standard unix commands //COPY EXEC PGM=SORT //SYSOUT DD SYSOUT=A //SORTIN DD DSN=XXXX.COPYBOOK(COPY1),DISP=SHR // DD DSN=XXXX.COPYBOOK(COPY2),DISP=SHR // DD DSN=XXXX.COPYBOOK(COPY3),DISP=SHR //SORTOUT DD DSN=XXXX.COMBINED.COBOL,DISP=(,CATLG), // UNIT=SYSDA,SPACE=(CYL,(5,5)) //SYSIN DD OPTION COPY / Issue -Cobol2Csv does not support Multiple copybooks Cobol2Cv does not support multiple...

  • Kaushik Kaushik posted a comment on discussion General Discussion

    My thought is - if i can concatenete it, i can use the coboltocsv.. is not it?

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Are you saying that I can use below command in minframe?- copy file1.cbl + file2.cbl + file3.cbl concattedfile.cbl

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    Sorry for the delay answering, been distracted. You concatenate files like: copy file1.cbl + file2.cbl + file3.cbl concattedfile.cbl Thinking some more on this Cobol2Csv will not handle multi-record files. Again I would suggest using Cobol2Xml, Cobol2JSon programs instead or generating Java-JRecord Pojo code. Note: I will have a new RecordEditor withan updated CodeGenerator in it. If you still want to convert the file to csv; you are better off starting with the Cobol2Xml package as it handles multi-record...

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Could you please tell me the step how I can merge the copybooks using the windows bat options.

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Thanks Bruce. I tried but I am not able to merge the copybook so that I can use the existing utility. It will be helpful if you can look at the multiple copybook option. Thanks in Advance.

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    It can not take multiple copybooks as input; you will have to combine them into one file and use the split option. In bat / shell scripts you have the option of combining the files. I can look at a MultiCopybook option but is low priority at this stage

  • Kaushik Kaushik posted a comment on discussion General Discussion

    I still dont understand how this tool can take multiple copybook as input .. As I can see in the screenshot, there is only one copybook.

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    Also you can generate Java~JRecord code

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    If it is reasonably easy to determine one record-type from the other you can look at Cobol To Xml there is also a CobolToJson. Notes: Do a binary transfer from the Mainframe If it is VB (it will almost certainly will be) use the RDW option to preserver the Record-Descriptor Word (Record-Length). As a last resort JRecord will use Record-Length to determine the Record-Type. Also the generate option in the RecordEditor may be useful: Start the server (or restart your computer after installing) Start...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    If it is reasonably easy to determine one record-type from the other you can look at Cobol To Xml there is also a CobolToJson. Notes: Do a binary transfer from the Mainframe If it is VB (it will almost certainly will be) use the RDW option to preserver the Record-Descriptor Word (Record-Length). As a last resort JRecord will use Record-Length to determine the Record-Type. Also the generate option in the RecordEditor may be useful: Start the server (or restart your computer after installing) Start...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    If it is reasonably easy to determine one record-type from the other you can look at Cobol To Xml there is also a CobolToJson. Notes: Do a binary transfer from the Mainframe If it is VB (it will almost certainly will be) use the RDW option to preserver the Record-Descriptor Word (Record-Length). As a last resort JRecord will use Record-Length to determine the Record-Type. Also the generate option in the RecordEditor may be useful: Start the server (or restart your computer after installing) Start...

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Hi Bruce Martin, I used your code CoboltoCSV code for getting the readable file of an IMS unload file using one copybook and it's working as expected. However I need your suggestion in the below requirement- I have one IMS unload file. But I have multiple Copybook to see the unload file in Fileaid. In the unload file, there are some parent and child relationship. Could you please tell me how to enhance your code to use this for scenario. This is the below options that I have tried till now- 1. Convert...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    Have you tried installing a headless version of java, Most linux distributions offer a headless version of java. I have not tried runningCobol2Csv under headless-java. There should not be any gui stuff

  • Dylan Newlander Dylan Newlander posted a comment on discussion General Discussion

    How do I run this on a headless server without X11? What is the requirement for X11?

  • Kaushik Kaushik modified a comment on discussion General Discussion

    You are fantastic! It's worked!

  • Kaushik Kaushik modified a comment on discussion General Discussion

    Hi Bruce Martin, Hope all is well with you. I have unloaded one IMS segment in a flat file and I have also have a copybook. I need to convert the unloaded flat file in CSV format. I have tried with the CBL2CSV utility but the output is not coming as expected. Could you please help me on this.

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    The first problem is the you have done a EBCDIC to Ascii conversion on the data file which has corrupted it. The file has comp/comp-3 fields in it. For example the space character x'40' is perfectly valid in a Comp, Comp-3. But the Ebcdic --> Ascii converter will convert all x'40' (EBCDIC space char) to x'20' (Ascii space). It will do this for both text and binary fields. You need to go back to the Mainframe, I would suggest converting the extract file to FB (it is probably VB) Doing a binary transfer...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    The first problem is the you have done a EBCDIC to Ascii conversion on the data file which has corrupted it. The file has comp/comp-3 fields in it. For example the space character x'40' is perfectly valid in a Comp, Comp-3. But the Ebcdic --> Ascii converter will convert all x'40' (EBCDIC space char) to x'20' (Ascii space). It will do this for both text and binary fields. You need to go back to the Mainframe, I would suggest converting the extract file to FB (it is probably VB) Doing a binary transfer...

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Did you get any chance to look into this?

  • Kaushik Kaushik posted a comment on discussion General Discussion

    Hi Bruce Martin, Hope all is well with you. I have unloaded one IMS segment in a flat file and I have also have a copybook. I need to convert the unloaded flat file in CSV format. I have tried with the CBL2CSV utility but the output is not coming as expected. Could you please help me on this.

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    To create a file with " " as a delimiter use -Delimiter space option. i.e. java -jar ../lib/Cobol2Csv.jar -I In/DTAR020.bin -O Out/o_DTAR020_space.csv -C DTAR020.cbl -Q DoubleQuote -FS Fixed_Length -Delimiter space

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields ~~~cobol 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields ~~~cobol 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields ~~~cobol 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields ~~~cobol 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields ~~~cobol 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME...

  • João Flávio João Flávio posted a comment on discussion General Discussion

    delimiter text " "

  • João Flávio João Flávio posted a comment on discussion General Discussion

    need to convert file microfocus cobol isam linux to csv: using syntax: java -jar ../lib/Cobol2Csv.jar -I ES-02 -O ES-02.csv -C FD-MOV.ARQ -D; -FS Fixed_Length does not convert comp fields 01 REG-MOV-ESTOQUE. 03 CHAVE2-ME. 05 CODIGO-ME PIC 9(5). 05 DATA-ME. 07 ANO-ME PIC 9(4). 07 MES-ME PIC 99. 07 DIA-ME PIC 99. 05 COD-MOV-ME PIC 9(4). 05 CONT-ME PIC 9(3). 03 NF-ME. 05 DATA2-ME. 07 ANO2-ME PIC 9(4). 07 MES2-ME PIC 99. 07 DIA2-ME PIC 99. 05 NR-DOC-ME PIC 9(6). 05 SERIE-ME PIC X(3). 05 TIPO-ME PIC X....

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    I added it into JRecord itself: https://sourceforge.net/p/jrecord/code/HEAD/tree/jrecord/Source/JRecord/src/net/sf/JRecord/Details/RecordDetail.java...

  • Bhaskar Bhaskar posted a comment on discussion General Discussion

    thanks Bruce for the update. just wanted to know for reference , where did you make...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    I have uploaded a new version https://sourceforge.net/projects/coboltocsv/files/CobolToCsv/Version_0.81.4/...

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.4/CobolToCsv_0.81.4.7z

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.4/ReadMe_0.81.4.md

  • Bhaskar Bhaskar posted a comment on discussion General Discussion

    thanks bruce for all your help

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    I have created an update that supports a \u0001 syntax; see: https://sourceforge.net/projects/coboltocsv/files/CobolToCsv/Version_0.81.2/CobolToCsv_0.81.3TstUpdate.7z/download...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    I have created an update that supports a \u0001 syntax; see: https://sourceforge.net/projects/coboltocsv/files/CobolToCsv/Version_0.81.2/CobolToCsv_0.81.3TstUpdate.7z/download...

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.2/CobolToCsv_0.81.3TstUpdate.7z

  • Bhaskar Bhaskar posted a comment on discussion General Discussion

    thanks a ton Bruce. may i know the default value for output character set

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    There is a partial solution, you can do (Column headers) java -jar ../lib/Cobol2Csv.jar...

  • Bhaskar Bhaskar posted a comment on discussion General Discussion

    No probelm Bruce, will update the code for my own usecase . your inputs will be helpful...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    At the moment no. I will add an option in for this; but it might take a while, (I...

  • Bhaskar Bhaskar posted a comment on discussion General Discussion

    Hello Bruce, hope your doing good. Does CobolToCsv utility supports control A as...

  • suyog parlikar suyog parlikar posted a comment on discussion General Discussion

    thanks a lot bruce

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    Csv2Cobol will pad out fields if needed when it converts files back to Cobol. Text...

  • suyog parlikar suyog parlikar posted a comment on discussion General Discussion

    Yes Bruce , i am using Csv2Cobol only. will Csv2Cobol handles this issue while converting...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    One place you could make the change is in the doCopy method at line 353 in the class...

  • Bruce Martin Bruce Martin modified a comment on discussion General Discussion

    One place you could make the change is in the doCopy method at line 353 in the class...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    One place you could make the change is in the doCopy method at line 353 in the class...

  • suyog parlikar suyog parlikar posted a comment on discussion General Discussion

    Yes Bruce , we are converting csv files back to ebcdic after making some changes...

  • Bruce Martin Bruce Martin posted a comment on discussion General Discussion

    At the moment no, I will have a think about what is involved. Is there any reason...

  • suyog parlikar suyog parlikar posted a comment on discussion General Discussion

    Hello Bruce, Thanks for this wonderful tool I am trying to convert fixed length mainframe...

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.2/ReadMe_0.81.2.md

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.2/CobolToCsv_0.81.2.7z

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.1/ReadMe_0.81.1.md

  • CobolToCsv CobolToCsv released /CobolToCsv/Version_0.81.1/CobolToCsv_0.81.1.zip

1