MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
janani Beginner Joined: 20 Sep 2006 Posts: 2 Topics: 2
Posted: Thu Sep 17, 2009 4:32 am Post subject: FTP PKZIP to Desktop
Hi,
This is my first post and sorry if i have posted anything incorrectly.
My requirement is to ZIP a file in mainframe and send that thru mail. Inside the zipped file, the original file should be in excel format. I tried the below JCL, and it is executing with out any issues, but am not getting mail.
Code:
//**********************************************************************
//* JS030 COMPRESS THE PDS
//**********************************************************************
//JS030 EXEC PGM=PKZIP,
// REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
-ARCHIVE(xxxx.yyyyy.zzzzz.ZIP)
-ARCHSCLASS(SC000404)
-ARCHBLKSIZ(27720)
-NOPATH
-TEXT
-ARCHIVE_LRECL(360)
-ARCHIVE_RECFM(FB)
-ZIPPED_DSN(AAAA.BBBB.CCCC.DDDD,AAA_BBB.XLS)
AAAA.BBBB.CCCC.DDDD
/*
//*
//********************************************************************
//* JS035 - ENCODE THE ZIP FILE
//********************************************************************
//JS035 EXEC PGM=IRXJCL,
// PARM='ENBASE64'
//SYSEXEC DD DSN=ABCD.XXXX.JCL,
// DISP=SHR
//SYSUT1 DD DSN=xxxx.yyyyy.zzzzz.ZIP,
// DISP=SHR
//SYSUT2 DD DSN=xxxx.yyyyy.zzzzz.ZIP.BASE64,
// DISP=(NEW,CATLG,DELETE),
// MGMTCLAS=MC0012,
// SPACE=(CYL,(10,50),RLSE),
// DCB=(LRECL=360,RECFM=FB,BLKSIZE=27720)
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//*
//**********************************************************************
//* JS045 - EMAIL REPORT *
//**********************************************************************
//JS045 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=A,DEST=(CHIPC1A,NETISMTP)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXXX.YYYY.ZZZZ.HEADER1,DISP=SHR -> has mail id and attachment details
// DD DSN=xxxx.yyyyy.zzzzz.ZIP.BASE64,DISP=SHR -> zipped report file
// DD DSN=XXXX.YYYY.ZZZZ.CTRLINPT,DISP=SHR -> has the boundary information (--------------55266=15045=:257--)
//*
The default record length coded in the enbase64 is "80", but as per my requirement i have changed it to "360".
in the header file i have,
Code:
helo sys.eds.com
mail from:<AAAA@bbb.com>
Rcpt to:<CCC@ddd.com>
data
from:<AAAA@bbb.com>
to:<CCC@ddd.com>
Subject: MAIL
MIME-version: 1.0
Content-type: multipart/mixed; boundary="------------55266=15045=:257"
This is a multi-part message in MIME format.
--------------55266=15045=:257
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Find the zip file attached.
Thanks,
AAAAA
--------------55266=15045=:257
Content-Type: application/octet-stream; NAME="aaaa.zip"
CONTENT-TRANSFER-ENCODING: base64
Please let me know what is the problem.
Thanks in advance for the help.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Sep 17, 2009 2:51 pm Post subject:
janani ,
Quote: I tried the below JCL, and it is executing with out any issues, but am not getting mail.
Do you have SMTP up and running?
what is the LRECL and recfm of the header file? Remember they also need to be 360
Kolusu
Back to top
veluvpv Beginner Joined: 14 Jul 2008 Posts: 9 Topics: 1
Posted: Fri Sep 18, 2009 3:32 am Post subject:
Kolusu,
The recfm and the record length of the header file is also the same (FB & 360)
Quote:
Do you have SMTP up and running?
Yes,SMTP is up (since we use the same JCL syntax in which we send word doc as attachment in mail).
My ID is not activated yet, and so am replying from my friend's ID. Could
you please activate my ID?
Thanks in advance.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Sep 18, 2009 8:33 am Post subject:
Janani,
Your ID is already active. _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
Anuj Dhawan Intermediate Joined: 19 Jul 2007 Posts: 298 Topics: 7 Location: Mumbai,India
Posted: Sat Sep 19, 2009 9:05 am Post subject:
Quote: My ID is not activated yet, and so am replying from my friend's ID
Then how did you start this thread with a post from your own ID? _________________ Regards,
Anuj
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum