View previous topic :: View next topic |
Author |
Message |
leeroy2 Beginner
Joined: 28 May 2003 Posts: 5 Topics: 1
|
Posted: Wed May 28, 2003 7:11 am Post subject: automated TSO tasks |
|
|
Hello,
I am abit of a novice when it comes to all technical mainframe stuff so please excuse the crudeness of my question.
I was wondering is the is a way to automate a tso task (maybe through REXX programming).
In the current project I print a report to HOLD from our mainframe then switch to TSO S;ST find the job and use XDC to create a dataset (userid.print) and send it to it then i use command 6 on the ISPF and using TRANFER RECIEVE I download the data to TXT format.
Each Time I do this I need to delete the dataset I have created via command 3.4 on ISPF main menu.
Is there anyway I can automate this task through a REXX macro as it maybe rolled out to the users in my area who are not technically minded ? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed May 28, 2003 7:51 am Post subject: |
|
|
leeroy2,
1. Allocate a dataset (userid.print) to the sysprint/sysout , so that you don't have to go to sdsf and do xdc.
Code: |
//SYSPRINT DD DSN=USERID.PRINT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(LRECL=133,RECFM=FB,BLKSIZE=0)
|
2. Code a delete step before the execuetion of your program which prints the report.
Code: |
//STEP10 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE USERID.PRINT
/*
|
By doing so you are deleting and defining for every run
If you have rumba /extra you can record a macro which will down load the dataset to PC and save it as a text document
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Wed May 28, 2003 7:57 am Post subject: |
|
|
Can you add/modify a step to the job to email the output to the user(s)? If your shop has SMTP running and set up correctly (SMTP comes with TCPIP). Then you could send it as a txt attachment. |
|
Back to top |
|
 |
leeroy2 Beginner
Joined: 28 May 2003 Posts: 5 Topics: 1
|
Posted: Wed May 28, 2003 8:06 am Post subject: |
|
|
Thanks for the info guys, your help is much appreciated.
A few things though:-
where and how do I enter this code ?
I have read about the email functionality, is it possible just to automatically save it to a file instead ?
Many thanks  |
|
Back to top |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Wed May 28, 2003 9:08 am Post subject: |
|
|
Leeroy,
Just search for SMTP, you will find couple of hits. It has already been discussed before.
Cheers,
Coolman
________
hot box vape
Last edited by coolman on Sat Feb 05, 2011 1:23 am; edited 1 time in total |
|
Back to top |
|
 |
leeroy2 Beginner
Joined: 28 May 2003 Posts: 5 Topics: 1
|
Posted: Wed May 28, 2003 9:11 am Post subject: |
|
|
After reading your responses again I think the route I need to go would be to create a new report and include the coding you have advised. I will also need to stop the from printing and allow it only to go to TSO.
As the report does not create a dataset and the coding uses userid.print the jobs will overwrite each other if more than one user sends them at one given time. Is there any way for it to use a unique dataset for each user ?
I will also use the email functionality so all the user will need to do is print the report from rumba and it will arrive by email from where they will detach it and run an excel macro to reformat it.
Is this all possible ? |
|
Back to top |
|
 |
Mike Beginner

Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Wed May 28, 2003 10:25 pm Post subject: |
|
|
Leeroy,
if the the user is submitting the job then you can use SYSUID (note the two periods after SYSUID).
e.g.
Code: |
//SYSPRINT DD DSN=&SYSUID..PRINT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(LRECL=133,RECFM=FB,BLKSIZE=0)
|
_________________ Regards,
Mike. |
|
Back to top |
|
 |
leeroy2 Beginner
Joined: 28 May 2003 Posts: 5 Topics: 1
|
Posted: Thu May 29, 2003 4:12 am Post subject: |
|
|
Thanks for the info guys.
One last question, is it possible for the dataset that is unique for the user (&SYSUID..PRINT) to be automatically emailed to the user by SMTP ? |
|
Back to top |
|
 |
leeroy2 Beginner
Joined: 28 May 2003 Posts: 5 Topics: 1
|
Posted: Fri May 30, 2003 3:33 am Post subject: |
|
|
Hello,
I have another problem unfortunately chaps
The print jobs the user submits via rumba do not enter TSO under the users ID but under one system ID for all users so the &SYSUID.PRINT dataset will not work.
Can you think of any way round this other than to re-configure the whole way our system is setup ? |
|
Back to top |
|
 |
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Thu Jun 19, 2003 9:13 am Post subject: |
|
|
leroy,
maybe u can have a ftp step at the end that transmit the file to a destination
predefined by ur sysguys ? _________________ Dorkhead |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Sep 04, 2003 3:09 pm Post subject: |
|
|
Know this post has aged a bit but..... Do you have an internal website that the report could be ftp'd to? Then they could just point their browser to it.
similar but less desirable would be to ftp it to a shared network drive location. |
|
Back to top |
|
 |
|
|