Code Comments
Programming Forum and web based access to our favorite programming groups.I need a little help with imports and exports programs. I have created many comma delimited programs, I am having an issue with tab delimited files and numeric fields. I have written an export program that creates a tab delimited file from an indexed file. I have also written an import that would use the tab delimited file and update or create an index field. I am having an issue with numeric fields. Does anyone have any good examples of these. I am using Acucobol in a Solaris environment. Thank you
Post Follow-up to this messagejmoore207@gmail.com wrote: > I need a little help with imports and exports programs. I have created > many comma delimited programs, I am having an issue with tab delimited > files and numeric fields. I have written an export program that > creates a tab delimited file from an indexed file. I have also written > an import that would use the tab delimited file and update or create > an index field. I am having an issue with numeric fields. Does anyone > have any good examples of these. I am using Acucobol in a Solaris > environment. Thank you What kind of problem? Wouldn't you: 1. Move the numeric value to an editted field 2. STRING value1 TAB value2 TAB... DELIMITED SIZE INTO OUTPUT-REC 3. Write OUTPUT-REC
Post Follow-up to this messageIn the Olden Days, there may have been a reason for using such delimited files. Why bother? Just make it fixed-field format and save yourself the headaches. Surely, you cannot have a space or speed problem. tony dilworth
Post Follow-up to this messagejmoore207@gmail.com wrote: > I need a little help with imports and exports programs. I have created > many comma delimited programs, I am having an issue with tab delimited > files and numeric fields. I have written an export program that > creates a tab delimited file from an indexed file. I have also written > an import that would use the tab delimited file and update or create > an index field. I am having an issue with numeric fields. Does anyone > have any good examples of these. I am using Acucobol in a Solaris > environment. Thank you > I'd advise putting quotes around each field before stringing with tabs. If you do not, then tabs inside fields will screw up, as well as certain dates.
Post Follow-up to this messageOn 21 Feb 2007 06:55:36 -0800, "foodman" <foodman123@aol.com> wrote: >In the Olden Days, there may have been a reason for using such >delimited files. >Why bother? Just make it fixed-field format and save yourself the >headaches. >Surely, you cannot have a space or speed problem. I create files that are downloaded to PCs and are read into Excel. Until this w, I was unaware that I should have created them as .CSV file, making it easier to load. (I created them as .txt files)
Post Follow-up to this messageOn Thu, 22 Feb 2007 10:34:07 +1300, "Pete Dashwood" <dashwood@removethis.enternet.co.nz> wrote: >On Planet Dilworth the villagers know that their COBOL lord has provided th e >one true path for them. The rest of your fun post clipped. I see a real life compromise - the CoBOL passing fixed field format XML data to a compressor routine. This would be easy in an OO environment, but sufficiently complex in my environment that I created a CoBOL paragraph(s) that I clone as needed.
Post Follow-up to this message"Howard Brazee" <howard@brazee.net> wrote in message news:ogfpt2t8ufber5hakc4bjt7l3u94nivfa5@ 4ax.com... > On Thu, 22 Feb 2007 10:34:07 +1300, "Pete Dashwood" > <dashwood@removethis.enternet.co.nz> wrote: > > > The rest of your fun post clipped. > > I see a real life compromise - the CoBOL passing fixed field format > XML data to a compressor routine. This would be easy in an OO > environment, but sufficiently complex in my environment that I created > a CoBOL paragraph(s) that I clone as needed. Yes, as usual, Howard, you make good sense. It is pretty trivial to create XML from a COBOL program (assuming you can't simply plug in an existing XML component as you probably would in an OO environment). There has been some discussion on this in the "Bridging the Gap" topic, where both Richard and I have advocated using a a templated approach for XML generation. Of course, XML for the Dilworthians would be like teaching shorthand to an orang-utan... Pete.
Post Follow-up to this messageOn 21 Feb, 22:36, "Pete Dashwood" <dashw...@removethis.enternet.co.nz> wrote: > "Howard Brazee" <how...@brazee.net> wrote in message > > news:ogfpt2t8ufber5hakc4bjt7l3u94nivfa5@ 4ax.com... > > > > > > > > > > > > Yes, as usual, Howard, you make good sense. > > It is pretty trivial to create XML from a COBOL program (assuming you can' t > simply plug in an existing XML component as you probably would in an OO > environment). There has been some discussion on this in the "Bridging the > Gap" topic, where both Richard and I have advocated using a a templated > approach for XML generation. > > Of course, XML for the Dilworthians would be like teaching shorthand to an > orang-utan... > The Librarian has no need for shorthand (see the Discworld series) other than the occasional modular bunch of fives.
Post Follow-up to this messageOn Feb 22, 11:36 am, "Pete Dashwood" <dashw...@removethis.enternet.co.nz> wrote: > Yes, as usual, Howard, you make good sense. > > It is pretty trivial to create XML from a COBOL program (assuming you can' t > simply plug in an existing XML component as you probably would in an OO > environment). There has been some discussion on this in the "Bridging the > Gap" topic, where both Richard and I have advocated using a a templated > approach for XML generation. Guess how I output CSV files # template acreport.file for writing file # # ---------------------------------------------------------- *CSV *ADDCR :header Content-Type: application/csv; charset=ISO-8859-1; Content-Disposition: attachment; filename="<!%extract%>"; <head><title><!%extract%></title></head><body><pre> :glcoderow "<!%glcode%>","<!%po%>","<!%supplier%>","<!%loc%>","<!%costcent%>",<! %amount%>,<!%accrue%>,"<!%user%>","<!%date%>","<!%name%>" :trailer </pre></body></html> :end This one is from a web based system. It get thrown at the browser for saving on their local machine, or directly into Excel^H^H^H^H^HOpenOffice.org Calc. If they want an XML file or HTML, or EDIFAC or TAB separated, just change the template.
Post Follow-up to this messageOn Feb 22, 3:04 am, jmoore...@gmail.com wrote: > I need a little help with imports and exports programs. I have created > many comma delimited programs, I am having an issue with tab delimited > files and numeric fields. What particular 'issues' are you having ? Is it just the wrong value you are getting or is it a problem that you need to align the numerics. Try FUNCTION NUMVAL USING csvfield. > I have written an export program that > creates a tab delimited file from an indexed file. I have also written > an import that would use the tab delimited file and update or create > an index field. I am having an issue with numeric fields. Does anyone > have any good examples of these. What does the 'these' refer to: TAB delimited files or programs that read them ? > I am using Acucobol in a Solaris > environment. Thank you Thank you for indicating your environment, that saves having to do a discourse on the problems of TABs with Microfocus.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.