Hi,
I am trying to send two attachments using the below JCL, i'm able to get the attachments but i'm not getting correct data in the attachmnets . I'm getting DD statement of data files in the attachmnets instead of data from data files .
//MAILPROC EXEC PGM=IEBGENER
//SYSABEND DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=MAIL.TEST(CTL.CARD)
contents of CTL.CARD
HELO MAINFRAME.XXX.COM
MAIL FROM: <MAINFRAME@XXX.COM>
RCPT TO: <HOLADVINCHI@XXX.COM>
DATA
TO: <HOLADVINCHI@XXX.COM>
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: INLINE
mail body
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE1.CSV
// DD DISP=SHR,DSN=MAIL.TEST(DATA1)
// DD *
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE2.CSV
// DD DISP=SHR,DSN=MAIL.TEST(DATA2)
// DD *
--SIMPLE BOUNDARY--
// DD DISP=SHR,DSN=MAIL.TEST(QUIT)
contents of DATA1
123456789146521541,ZENNY,HOLA,1234566788999
instead of getting the output as
123456789146521541 ZENNY HOLA 1234566788999
i'm getting output as
// DD DISP=SHR DSN=MAIL.TEST(DATA1)
// DD *
Please help me to get the correct data.
Thanks in advance,
Hola
getting wrong data in the attachments
-
- Posts: 3
- Joined: Wed Jun 19, 2019 12:36 pm
- Skillset: jcl, cobol
- Referer: google search
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: getting wrong data in the attachments
Try this:where MAIL.TEST(CTLCARD) contains And post exact code, please (using the CODE tag since spaces can be significant here) -- do NOT paraphrase what you're doing in your post since most people do not realize how sensitive SMTP with attachments is to the precise characters coded. And I know you've paraphrased because CTL.CARD is not a valid member name for a PDS, yet that is what your post has. Since you included JCL in your CTL.CARD (sic) member, that JCL is what became your attachment.
Fortunately, this type of issue won't stay around much longer (hopefully). IBM stopped releasing and supporting SMTP as of the 2.2 version of z/OS. Starting from z/OS 2.3, you MUST use CSSMTP instead of SMTP. I have not investigated CSSMTP enough to know how it handles attachments as my site is still running 2.2 (although we're starting to install 2.3).
Code: Select all
//MAILPROC EXEC PGM=IEBGENER
//SYSABEND DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=MAIL.TEST(CTLCARD)
// DD DISP=SHR,DSN=MAIL.TEST(DATA1)
// DD *
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE2.CSV
// DD DISP=SHR,DSN=MAIL.TEST(DATA2)
// DD *
--SIMPLE BOUNDARY--
// DD DISP=SHR,DSN=MAIL.TEST(QUIT)
Code: Select all
HELO MAINFRAME.XXX.COM
MAIL FROM: <MAINFRAME@XXX.COM>
RCPT TO: <HOLADVINCHI@XXX.COM>
DATA
TO: <HOLADVINCHI@XXX.COM>
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: INLINE
mail body
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE1.CSV
Fortunately, this type of issue won't stay around much longer (hopefully). IBM stopped releasing and supporting SMTP as of the 2.2 version of z/OS. Starting from z/OS 2.3, you MUST use CSSMTP instead of SMTP. I have not investigated CSSMTP enough to know how it handles attachments as my site is still running 2.2 (although we're starting to install 2.3).
-
- Posts: 3
- Joined: Wed Jun 19, 2019 12:36 pm
- Skillset: jcl, cobol
- Referer: google search
Re: getting wrong data in the attachments
Thanks Robert for the quick reponse. I'll try this code. Hope this will solve my issue.
Thanks,
Hola
Thanks,
Hola
-
- Similar Topics
- Replies
- Views
- Last post
-
- 3
- 6819
-
by socker_dad
View the latest post
Wed May 04, 2022 12:59 am
-
-
Copying All Data Off An Old Mainframe
by zunebuggy » Wed Sep 25, 2024 1:10 am » in Mainframe Security - 0
- 1586
-
by zunebuggy
View the latest post
Wed Sep 25, 2024 1:10 am
-
-
-
eliminate duplicates with different data
by cobol_dev » Fri Jun 03, 2022 3:47 am » in DFSORT/ICETOOL/ICEGENER - 7
- 1870
-
by cobol_dev
View the latest post
Wed Jun 15, 2022 10:44 pm
-
-
- 4
- 3256
-
by socker_dad
View the latest post
Fri Dec 31, 2021 5:28 am
-
- 4
- 2222
-
by sergeyken
View the latest post
Mon Jun 26, 2023 12:56 am