MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

automated TSO tasks

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
leeroy2
Beginner


Joined: 28 May 2003
Posts: 5
Topics: 1

PostPosted: Wed May 28, 2003 7:11 am    Post subject: automated TSO tasks Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed May 28, 2003 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Wed May 28, 2003 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message
leeroy2
Beginner


Joined: 28 May 2003
Posts: 5
Topics: 1

PostPosted: Wed May 28, 2003 8:06 am    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Wed May 28, 2003 9:08 am    Post subject: Reply with quote

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
View user's profile Send private message
leeroy2
Beginner


Joined: 28 May 2003
Posts: 5
Topics: 1

PostPosted: Wed May 28, 2003 9:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Wed May 28, 2003 10:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
leeroy2
Beginner


Joined: 28 May 2003
Posts: 5
Topics: 1

PostPosted: Thu May 29, 2003 4:12 am    Post subject: Reply with quote

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
View user's profile Send private message
leeroy2
Beginner


Joined: 28 May 2003
Posts: 5
Topics: 1

PostPosted: Fri May 30, 2003 3:33 am    Post subject: Reply with quote

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
View user's profile Send private message
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Thu Jun 19, 2003 9:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Sep 04, 2003 3:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group