On Mon, Sep 12, 2016 at 10:17 AM, Farley, Peter x23353 < [email protected]> wrote:
> John, > > I am sure you already know this, and given what you have already related > to us of your management's general bad attitude to z/OS Unix it is probably > a long shot, but z/OS Unix "awk" can probably process those CSV files > quicker than COBOL UNSTRING. I have a robust CSV splitter function in awk > if you are interested. It could easily be architected into an awk main > program that takes in a CSV file and a file of "field lengths and types" as > input associated with each input CSV to automatically format the output > record, including left justification with trailing blanks for non-numeric > fields and right justification with leading zeros for numeric fields. > > Then all your programmers would have to do is "code" input > field-length-and-type files unique to each CSV. And z/OS Unix awk has the > great advantage of being able to both input and output normal sequential > files, not just Unix file system files (it uses fopen not open). So you > could conceivably "package" the whole thing into a nice little "black box" > solution. > Interesting, but _my_ boss would like put the stop on me supplying any kind of code for the programmers. He doesn't want us in that loop. And I'm not too sure that I want in it either. There have been occasions in the past where we helped them a bit and, all of a sudden, we ended up being the maintainers instead of the original developers. > > Let me know if you are interested in the CSV splitter function. > > Another alternative might be if the vendor can send XML files instead of > CSV. COBOL V3.4 can process XML files (XML PARSE statement), and that > might or might not be more efficient than UNSTRING. > Hum, an interesting possibility. I may see if the programmer responsible is interested. One possible problem might be if the same file is also going over to the Windows people for something. They seem to like CSV files more than XML. > > HTH > > Peter > > -- Unix: Some say the learning curve is steep, but you only have to climb it once. -- Karl Lehenbauer Unicode: http://xkcd.com/1726/ Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
