Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi All -- New to forum. Just gettin 2

Status
Not open for further replies.

kjl22

Programmer
Aug 2, 2019
3
US
Hi All -- New to forum. Just getting started on brushing off some of my Cobol coding skills. I have GNUcobol install on my Win 10 PC. I've been writing a few simple programs using EditRocket. I'm an old mainframe programmer so getting used to the PC environment. One program I am working on:
1. Input CSV file
2. Unstring it
3. Write to .txt file

Issue: when i write the output record, it is displaying in the output file as one continuous line. I've tried a few different options but can not get the next record to write on a new line. Any help is appreciated. Thank you!
 
What are you using to view the output file? It is important to note that Windows uses a <CR> <LF> (carriage return line feed - two characters) at the end of line. Other systems, like Unix/Linux use <NL> (newline) - one character which does both carriage return and line feed. You may need to change some options on the file viewing software to detect the <CR><LF> or <NL> characters, which are non-printable characters and will not display on most ordinary viewers. You can also look at the file using a HEX editor - to make sure the end of line character(s) are present. You can search the net to find one or more free ones, or free trials.

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
for viewing files the following are your best options
vim - unix style editor - notepad ++ - all purpose editor - HxD - hex editor - and for COBOL formatted files (and others) - recordeditor -
Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
I was using notepad. I downloaded notepad++ and all good. Thank you!
 
Hi,

I prefer the ispf mainframe look-alike editor with all kinds of commands. It takes you some time to get used to it, but in the end you will be much more productive.

You can visit to have an idea.

There are situations where the ISPF editor helps you to do something in minutes where less experienced users need more than a week to get the same result.

Much pleasure!

Regards,
Crox
 
Good info about text editors and such!

Just as a possibly interesting side note, when reviewing the original issue posted here, my very first thought would have been to look at the SELECT clause definition of the output file in the COBOL program, to make sure that the output file is described as LINE SEQUENTIAL and not just SEQUENTIAL.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top