View previous topic :: View next topic
|
Author |
Message |
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Hi,
Need your suggestion on this one. We have 2 mainframe jobs as below:
Job 1: Creates a file containing email communication to the users. This is one mainframe dataset containing the email matter(From email address, To email address, Subject, Body) for all the users.
Job 2: Takes the above file as input and sends out email communication to each of the users email addresses present in the file using ICEGENER utility.
Issue: During testing in dev/QA, Job 2 would actually send out emails to all the users present in the file. This also happens if somebody accidentally runs Job 2 in dev/QA.
Resolution:
1. We are changing Job 1 to make the email address invalid by replacing @XYZ.COM by invalid characters.
2. Job 2 will now have a program to convert the invalid email address to a valid one only if it is running in production(check the region in the program) and write out the file to SYSOUT=B,SMTP.
3. If Job 2 is running in test/QA, the invalid characters are not converted and file is not written out.
Question:
Is there a better resolution? Testing the above resolution is difficult too. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Why not have job 2 execute a program to determine if it is running in test or production and email the development team or the entire list respectively? Converting invalid email addresses to valid email addresses seems to add additonal complexity for no apparent reason.
Or, you could add a program to job 1 to check if it is running in production or test and take appropriate action. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Right, there is no need of converting email extensions to invalid charachers but by any means can we avoid changing the proc/job?
I just got a clue to have NONE authority to place for that perticular dataset for the number of users. this will avoid changing the proc/job.
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
That would depend upon your particular site and its security package. Only someone working at your site could advise you about it; however, if the test region (LPAR?) security data base is ever refreshed from production (or somewhere else) you could lose the protection. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If all your e-mail contact details are in a dataset, you just have a different one in different environments. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Thank you for the inputs. I will update with what we implemented. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Rohit Umarjikar wrote: |
Issue: During testing in dev/QA, Job 2 would actually send out emails to all the users present in the file. This also happens if somebody accidentally runs Job 2 in dev/QA. |
Your question is somewhat site-specific as Robert has also said. On the other hand, how come a file, which is presumably should have a PROD High Level Qualifier (HLQ) for files, is available in test LPAR also? Should not the HLQ of PROD and TEST be different at first place?
As one of the solutions, you can also use symbolic data-set name for the file having e-mail contact details. One of its nodes should be replaced with 'something' which distinguish Test and prod LPARs at your shop that way, a Prod file, will not be referred in Test/QA (which is strange and site-specific, to start with). |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I would caution that invalid email addresses can cause trouble. I put an invalid address on purpose for exactly the same reason, and I managed to hose up the bridge between mainframe and the SMTP server.
The worst part was that it happened at like 6:30 one night, and I KNEW it had happened. I started calling people to let them know I had broken it, but nobody knew who the owners were.
I kept calling the next morning and still had no luck finding the right people. However, there were about fifty open tickets for missing email from production jobs.
Of course, three days later, I get a screaming phone call from the owner trying to get me fired for doing this. Luckily I had written docs from the moment of failure that I had been trying to reach him. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Anuj : Yes the first HLQ is available in every region/LPAR. on the other note even if we use the symbolic parameter then by chance if someone gives production HLQ then again emails going to send out.
But currently I can refer every prod file in TEST/QA region. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Ed Goodman:
Btw,
Currently, I have requested system people to restrict the access to NONE for that perticular dataset for the development users till further notice. Now as long as testing goes on none of us can send emails to production people |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
Currently, I have requested system people to restrict the access to NONE for that perticular dataset for the development users till further notice. Now as long as testing goes on none of us can send emails to production people |
What if someone requests to execute the Job using scheduler, e.g. CA7? Okay, that's again site-specifc but that possiblity might exist. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Yes, if they do so then they need to have all the approval process, where they will get catch , and the request will be rejected and warned for further such requests. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Fine. However, I don't see that as a good foolproof method. Also, at all the sites I've been to, there was never a way to refer a file from Prod in Test LPAR as-it-is, unless of-course you XMIT the file. Are the Jobs in question using ROUTE XEQ?
With all those site-specifc stuff, suggestion form Bill looks best that you just have a different file for different environments
I need to learn a lot more, looks like. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
With all those site-specifc stuff, suggestion form Bill looks best that you just have a different file for different environments |
We do have this in place for dev-T*, QA-#*,prod-P* as first qualifier but in every across the regions these files are accessible. This is purely site specific tho.
Also this is needed in case if I have to generate some reports in dev based on the production data then I either I should be having a access to prod(P*) files in dev region or copy data from P* to T* and use T* file in dev to generate the reports.So better make P* available in every region directly.
Quote: |
I need to learn a lot more, looks like. |
No way, you are already top of all of us... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Jeez, I don't want to know about your accessing Production data outside of a Production environment. Fix it, quick, as the consequences for the company/companies involved can be rapid and severe.
Have a dataset for Text. Have a dataset for E-mail addresses. Have a process which puts the two together.
Then you can use "whatever" combination of inputs for these as suit your requirement at the time. You can have multiple "dev" datasets, multiple "prod" datasets, you can use the prod datasets from test if/when necessary.
Or have I just not grasped your problem accurately? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
I am sure your suggestions would certainly be bullet proof for the issue I have mentioned, but this is an existing process in place and just for testing purpose this change they would never be accepting proc/jcl.
But moreover I am just trying to understand how would
Quote: |
Have a dataset for Text. Have a dataset for E-mail addresses. Have a process which puts the two together. |
avoid sending emails from test env.? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If no e-mail messages are needed for the task, then the list of e-mail messages for the task will be empty, so no e-mail messages will be created (if the e-mail generation is "clever enough"..
If you want "no" e-mail messages, I'd put one, just so you know it's working anyway.
I get the feeling I'm missing something :-) |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
I get the feeling I'm missing something :-) |
Yeah, Bill I too think the same... but thanks for your time as always.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you consider creating an address file for each environment. For a given process there might be a different distribution list depending on the environment.
The member name for each environment would be the same so that the proper people received each email and there would be no need to customize for each run. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Dick,
Thanks for the inputs, Addres file means something like this,
Code: |
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT NAME-ADDRESS-FILE
ASSIGN TO "C:\TMP\SAMPIN.TXT"
ORGANIZATION IS LINE SEQUENTIAL. |
?
if so then it will be changing of entire design, but good idea. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Code: |
ASSIGN TO "C:\TMP\SAMPIN.TXT" |
do You realize that what You posted is NOT mainframe related ??? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
I take it back that part, my only intention was just to know more on "an address file for each environment" term. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The code in the program would be the same for all.
The dataset referenced would vary from one environment to another - preferable by using a symbolic parameter for the dataset name. Hopefully, all of the member names would be the same across environments. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Dick, currently it is in place, but if I use production qualifier in test region then I still be able to send emails and I want to restrict that. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
In a proper establishment your production qualifier woud not even be defined in a test environment and if it was only a very few people should have any access to it at all. |
|
Back to top |
|
|
|