I am trying to e-mail a plain text comma delimited flat file from the mainfram to Outlook. I have the coding working to transfer the file but when the file arrives in outlook the first character on each line is an '&'. When EXCEL trys to open the file it generates an error message that this is an invalid file type for excel to open.
Here is the coding I use to transfer the file to Outlook
//STEP01 EXEC PGM=IEBGENER
//SYSUT1 DD *
HELO CSXB1TCP.CSXT.CSX.COM
MAIL FROM: <RICHARD_BARNETT@CSX.COM>
RCPT TO: <RICHARD_BARNETT@CSX.COM>
DATA
SUBJECT: LC ADAMS TMMI SPREADSHEET
MIME-VERSION: 1.0
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="INSPECTIONS.XLS"
CONTENT-TYPE: TEXT/PLAIN
/*
//* =========================================================*
//* FILE TO SEND:
// DD DISP=SHR,DSN=A4324.SYSTEM.WIDE.TMMI.YR2008
//* =========================================================*
//* DO NOT MODIFY PAST THIS POINT
//*
// DD *
.
QUIT
//SYSUT2 DD SYSOUT=A,DEST=TCPBSMTP
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//
Here is how the comma delimited file looks on the mainframe:
"ASHLAND","MECHANICAL","Y",0,0,0,0,0,0,0,1
"ATKINSON","MECHANICAL","",0,0,1,0,0,0,0,0
Here is how the comma delimited file looks after being sent to Outlook:
&"ASHLAND ","MECHANICAL","Y",0,0, 0,0,0,0,0,1
&"ATKINSON ","MECHANICAL"," ",0,0,1, 0,0,0,0,0
What cause the '&' to be inserted on each line?
Any help will be greatly aprreciated
Thanks in advance
Rick Barnett
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: