Page 1 of 1

.TXT file conversion to .CSV/.XLSX

PostPosted: Thu May 20, 2021 7:09 am
by dangtran10
hi -

I have a batch job that produce an output file as HLQ1.DATA.TXT. it looks something like this:

1234567890;00;1234
2345678901;00;1234
3456789012;00;2345
4567890123;00;2345
5678901234;00;3456

And I want to send this file as excel to a customer. The current process is:

1. use reflection FTP to desktop and open the txt file in excel and adjust the columns accordingly (insert sheet rows with names, insert another row for the title).
2. then email them this file as excel.

So I’m trying to automate step #2/3 in a JCL as additional steps. Step #2 I can use a few utility to send. It’s Step #1 I’m trying to do in a job.

Re: .TXT file conversion to .CSV/.XLSX

PostPosted: Fri May 21, 2021 4:26 am
by sergeyken
How DFSORT/ICETOOL/IEBGENER utilities may be used in your plans? Which step?

As of today, there is no mainframe utility which is able to produce any Excel file. Some “smart” programs can produce PDF files, but not Excel ones yet.

Re: .TXT file conversion to .CSV/.XLSX

PostPosted: Fri May 21, 2021 1:42 pm
by willy jensen
EXCEL can read CSV files, so why the need for a 'real' EXCEL format?

Re: .TXT file conversion to .CSV/.XLSX

PostPosted: Fri May 21, 2021 10:57 pm
by steve-myers
18 or 19 years ago I had a mainframe program to process SMF data and produce reports. It occurred to me it would be useful for OpenOffice (this was before LibreOffice) to also get the data. It was not hard for the mainframe program to generate a CSV data set to send to the workstation for OpenOffic (or Excel) to process to generate some decent graphs. As Sergeyken says, it should not be difficult for DFSORT to create a CSV data set much like my program in 2002 or 2003 did.