View previous topic :: View next topic
|
Author |
Message |
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
Hi,
I am using the utility EZACFSM1 in my job. I have to email files with the current time appended to the filename. when i uses IEBGENER with the file name in SYSIN DD *, it seems to work fine. But i need to use a PS file.
Example of what i am using
Code: |
//EMAIL EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD *
HELO z/os
MAIL FROM: <XXX@zzz.com>
RCPT TO: <XXX@zzz.com>
DATA
SUBJECT: Appending current time to file name
\\file link\\RPT_TIME_&LHHMMSS..TXT
|
What i need is
Code: |
//EMAIL EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD DSN=TEST.EMAIL,DISP=SHR
|
In TEST.EMAIL i need to have current time appended to the file name like how i had it in the SYSIN DD *. This doesnt seem to happen.
Can someone advise on this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Could you show how you build the contents of TEST.EMAIL so we know how you'd add the date to it? |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
This is how TEST.EMAIL looks like
Code: |
HELO z/os
MAIL FROM: <XXX@zzz.com>
RCPT TO: <XXX@zzz.com>
DATA
SUBJECT: Appending current time to file name
\\file link\\RPT_TIME_&LHHMMSS..TXT
|
Obviously this is not working as the email i receive is as below.
Appending current time to file name
\\file link\\RPT_TIME_&LHHMMSS..TXT |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Obviously this is not working as the email i receive is as below. |
Obviously Your chances of getting help are pretty slim,
You obviously forgot to post the ezacfsm1 step
but I spent a few minutes to test and it works for me
the job
Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICO1 JOB NOTIFY=&SYSUID,
000002 // REGION=0M,
000003 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000004 //*
000005 //EZA EXEC PGM=EZACFSM1,REGION=0K
000006 //SYSIN DD *
000007 HELO z/os
000008 MAIL FROM: <XXX@zzz.com>
000009 RCPT TO: <XXX@zzz.com>
000010 DATA
000011 SUBJECT: Appending current time to file name
000012 \\file link\\RPT_TIME_&LHHMMSS..TXT
000013 //SYSOUT DD SYSOUT=*
****** **************************** Bottom of Data ****************************
|
the result ( the content of the SYSOUT DD )
Code: |
********************************* TOP OF DATA **********************************
HELO z/os
MAIL FROM: <XXX@zzz.com>
RCPT TO: <XXX@zzz.com>
DATA
SUBJECT: Appending current time to file name
\\file link\\RPT_TIME_083756.TXT
******************************** BOTTOM OF DATA ********************************
|
the ball is on Your side of the court now |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
This is the entire JCL.
Code: |
//DDD JOB NOTIFY=&SYSUID,
// REGION=0M,
// MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
//*
//EZA EXEC PGM=EZACFSM1,REGION=0K
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSIN DD DATA,DLM=@@
//CCC JOB NOTIFY=&SYSUID, MSGCLASS=U,CLASS=R
//Step1 exec proc
//
//FTPFILES EXEC PGM=IBMFTP
//Input DD *
XXXFTP.COM
CD Folder&LYYMMDD
Put 'FILE A.D&LYYMMDD..RPT' RPT_TIME_&LHHMMSS..TXT
Quit
//*
//Email Exec PGM IEBGENER
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD DSN=TEST.EMAIL,DISP=SHR
//*
|
In TEST.EMAIL, i want to send an email that gives details of the above report with the current time attached to it. Please let me know if the requirement in not clear. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
clear up the conflict between Your neurons and start posting properly
what has the FTP step You posted to do with the complaint about wrong email
the two steps You posted at run time are completely unrelated
the first step will run an FTP step with the <parameters> changed by the
EZA... process
the second step will email the content of the input without any modification!
learn to describe better Your problem
in order not to have people waste time on badly described requirements !
a quick way of sending a customized email would be just to
Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICO1 JOB NOTIFY=&SYSUID,
000002 // REGION=0M,
000003 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000004 //*
000005 //EZA EXEC PGM=EZACFSM1,REGION=0K
000006 //SYSIN DD *
000007 HELO z/os
000008 MAIL FROM: <XXX@zzz.com>
000009 RCPT TO: <XXX@zzz.com>
000010 DATA
000011 SUBJECT: Appending current time to file name
000012 \\file link\\RPT_TIME_&LHHMMSS..TXT
000013 //SYSOUT DD SYSOUT=(B,SMTP)
****** **************************** Bottom of Data ****************************
|
for the issued debated in the first post |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
Enrico,
I posted the entire JCL because it was asked for. The 2 steps are definitely not related. the first step does an FTP. the 2nd step is for email. My requirement is to customize it no doubt.
Now the problem here is i cannot customize it in the SYSIN DD * of the JCL as it is of 80 byte LRECL. The server link with the file name goes beyond 80 byte. So i would have preferred to have it in the PS file. Is there anyway of customizing the file name with the current time in PS file? This is the question |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
do You realize that You are making people waste time ???
You asked one question I replied You with a working solution for what You asked for.
what else do You want now ?
if You do not know how to describe Your own requirements
meditate a career switch to a less demanding job |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
High time for a need of a polite protocol
i am asking if it is possible to have the current time appended to a filename in a physical sequential file which will be emailed.
This question is not answered yet. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
High time for a need of a polite protocol |
the politeness depends on the attitude and the willingness to cooperate of the TS
and both in this case are scarce!
under zOS dd * and sysout=* things are just treated as plain datasets
and if You do not have the basic skills of understanding it I regretfully cannot do nothing more than confirm the hint for a career shift
what did the example I posted do ???
reread and meditate
when I asked You to post the jcl I was expecting something useful, according to the initial post...
not useless garbage
and IT needs a bit of ingenuity, not just the skill to whine and complain
if You had spent 49(*) seconds to test You would have seen that EZACFSM1
works well also on VARIABLE DATASETS
(*)
10 seconds to allocate a VB datasets
4 seconds to allocate another vb dataset
8 seconds to edit the first one and cut and paste the email text from the previous example
8 seconds to correct a typo ( caps on/off issue )
12 seconds to find the jcl and change it
about 7 seconds to run the job
10 seconds to check the result
here is the job
Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICO1 JOB NOTIFY=&SYSUID,
000002 // REGION=0M,
000003 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000004 //*
000005 //EZA EXEC PGM=EZACFSM1,REGION=0K
000006 //SYSIN DD DISP=SHR,DSN=ENRICO.TEST.VB1
000007 //SYSOUT DD DISP=SHR,DSN=ENRICO.TEST.VB2
****** **************************** Bottom of Data ****************************
|
the input dataset
Code: |
****** ***************************** Top of Data ******************************
000001 HELO z/os
000002 MAIL FROM: <XXX@zzz.com>
000003 RCPT TO: <XXX@zzz.com>
000004 DATA
000005 SUBJECT: Appending current time to file name
000006 \\file link\\RPT_TIME_&LHHMMSS..TXT
****** **************************** Bottom of Data **************************** |
the output dataset ( result )
Code: |
****** ***************************** Top of Data ******************************
000001 HELO z/os
000002 MAIL FROM: <XXX@zzz.com>
000003 RCPT TO: <XXX@zzz.com>
000004 DATA
000005 SUBJECT: Appending current time to file name
000006 \\file link\\RPT_TIME_131034.TXT
****** **************************** Bottom of Data ****************************
|
and here to save some of Your preciuous time a test with the substitution running after column 80
input left side
Code: |
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 HELO z/os
000002 MAIL FROM: <XXX@zzz.com>
000003 RCPT TO: <XXX@zzz.com>
000004 DATA
000005 SUBJECT: Appending current time to file name
000006 \\a very loooooooooooooooooooooooooooooooooooooooooooooooooong file link
****** **************************** Bottom of Data **************************** |
input right side
Code: |
****** ***************************** Top of Data ******************************
=COLS> --+----8----+----9----+----0----+----1----+----2----+----3----+----4----
000001
000002
000003
000004
000005
000006 \\RPT_TIME_&LHHMMSS..TXT
****** **************************** Bottom of Data ****************************
|
output left side
Code: |
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 HELO z/os
000002 MAIL FROM: <XXX@zzz.com>
000003 RCPT TO: <XXX@zzz.com>
000004 DATA
000005 SUBJECT: Appending current time to file name
000006 \\a very loooooooooooooooooooooooooooooooooooooooooooooooooong file link
****** **************************** Bottom of Data **************************** |
output right side
Code: |
****** ***************************** Top of Data ******************************
=COLS> --+----8----+----9----+----0----+----1----+----2----+----3----+----4----
000001
000002
000003
000004
000005
000006 \\RPT_TIME_132429.TXT
****** **************************** Bottom of Data **************************** |
if You are not satisfied with the level of free consultancy You get here,
You can shift to a paid for service |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Write a program (in the language of your choice) to generate the file name and the rest of the email commands.
Further, you are providing the requirements piecemeal -- your original post did not mention anything about needing a record length more than 80. If you are not willing to provide a complete statement of what you need, what you have tried, and where the things you tried fell short of what you need -- just how do you expect us to read your mind and provide complete solutions?
Finally, did you bother to read the manual? Section 1.2.10.1 of the Communcations Servier: IP Configuration Guide manual includes this extract:
Quote: |
//STEP1 EXEC PGM=EZACFSM1,REGION=0K
//SYSIN DD DSN=TCP.DATA.INPUT,DISP=SHR
//*SYSIN DD PATH='/tmp/tcp.data.input'
| //* The input file can be either an MVS data set or an z/OS
| //* UNIX file.
//*
//*
//SYSOUT DD DSN=TCP.DATA.OUTPUT,DISP=SHR
//*SYSOUT DD PATH='/tmp/tcp.data.output',PATHOPTS=(OWRONLY,OCREAT),
//* PATHMODE=(SIRUSR,SIWUSR,SIRGRP,SIWGRP)
| //* The output file can be either an MVS data set or an z/OS
| //* UNIX file.
//*
//* The output file cannot be the same file as the input file-
//* doing so will result in a return code of 45.
//*
//* You can mix input and output file types (i.e., the input
| //* can be an MVS data set with the output being a z/OS UNIX
| //* file or visa versa).
//* Note: Other pathmodes for sysout may be used if needed. |
|
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
thanks Robert for a humane reply.
My only question was if it was possible to customize the filename in the Physical sequential file through some method. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
thank You for the great opportunity You gave me to waste time on writing snippets testing them posting them and trying to explain them to You |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Since you do not seem to be interested in actually trying any of the posted solutions, and keep asking the same thing over and over -- I'm locking this topic. Either go try enrico's suggestions, or try SOMETHING on your own, but stop wasting our time by asking and asking and asking without giving us any idea as to what problem you are having. |
|
Back to top |
|
|
|