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 

how to move the job sysout into the dataset(fb,sequential,)
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun May 23, 2004 8:14 pm    Post subject: Reply with quote

Pzmohanty,

With the control cards shown above it will copy all the outputs of the jobs with the same jobname. You can use the parameters like LAST , First to copy the latest and oldest job outputs respectively.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Tue Sep 28, 2004 5:01 am    Post subject: Reply with quote

Hi

I written a REXX program to save my prodjobs from SDSF, but I am getting the following error message.

Quote:
IKJ56328I JOB ABC020 REJECTED - JOBNAME MUST BE YOUR USERID OR MUST START WITH YOUR USERID
the code is
address tso "output ("jobname"("jobid")) ",
"print('"dsname"') ",
"keep "

is there any other way to over come this...
_________________
Regards,
Chandra
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Sep 28, 2004 5:37 am    Post subject: Reply with quote

chandra,

post your rexx program, so that we can take a look at it. Are you coding the JCL to a stack in your Rexx program and submitting it to the intrdr?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Tue Sep 28, 2004 7:24 pm    Post subject: Reply with quote

HI kOLUSU,
My REXX program is like this

Quote:

/* REXX this program saves the sdsf data into a PDS */

arg jobinfo

dsname = 'TEST.CHANDRA.JOBLISTS(delete2)'
if dsname = '' then exit 8

if jobinfo <> '' then
do

/* save output from the job identified in parameter jobinfo */
parse var jobinfo jobname '(' jobid ')' .
if jobname = '' then exit 8
if jobid = '' then exit 8
if
_________________
Regards,
Chandra
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Thu Oct 07, 2004 8:30 pm    Post subject: Reply with quote

I know what Chandra is doing.

He is trying to save a job where he does not have autority to save the entire job. But if he gives a '?' against the job in spool then he is allowed to save individual DDNAMES.

Is it possible to do this through REXX or JCL, like saving JESMSGLG of a job?
Back to top
View user's profile Send private message Send e-mail
THE_EYE
Beginner


Joined: 13 Apr 2005
Posts: 2
Topics: 0

PostPosted: Wed Apr 13, 2005 10:26 pm    Post subject: Reply with quote

Can someone tell what's wrong with this.. I'm running this JOBA and wanted to save the job to a dataset. I had multiple job with the same JOBNAME(JOBA). It saved the previous job, it seems like it's not refering to my job as the LAST job.


//WRITE EXEC PGM=SDSF
//ISFOUT DD DUMMY
//ISFIN DD *
ST
PT ODSN 'MY DATASET NAME'
FIND JOBA LAST
++X
PRINT CLOSE
END

Question Very Happy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Apr 14, 2005 7:27 am    Post subject: Reply with quote

THE_EYE,

You cannot the refer the same job you are running as the last job. If you want to save the current job sysout why not allocate the sysout to a dataset?

ex:
Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD DSN=YOUR SYSOUT FB DATASET,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SORTIN   DD DSN=SOME INPUT FILE,
//            DISP=SHR
//SORTOUT  DD DUMMY
//SYSIN    DD *
  SORT FIELDS=COPY
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
THE_EYE
Beginner


Joined: 13 Apr 2005
Posts: 2
Topics: 0

PostPosted: Fri Apr 15, 2005 4:11 am    Post subject: Reply with quote

Thanks Kolusu!

Forgive me but I was not able to clarify my code, I have a 3 cascading PROC. I want to save the entire job log..where should I placed your given code.

Code:

//STEP0100 EXEC PROCA
.
.
.
//PROCA PROC
//STEP0200 EXEC PROCB1
//....
//...
//...
//STEP0300 EXEC PROCB2
.
.
.           
//STEP0400 EXEC PROCB11
//..etc
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Apr 15, 2005 5:36 am    Post subject: Reply with quote

Quote:

Forgive me but I was not able to clarify my code, I have a 3 cascading PROC. I want to save the entire job log..where should I placed your given code.


The_Eye,

You need to run a seperate Job to capture the joblog. Use the step posted above to capture it.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Apr 21, 2005 10:42 am    Post subject: Reply with quote

The_Eye,

You also have another alternative to capture the log of a running job from within the same job.

All you need to do is to use 'DA' - Display Active instead of 'H' - Hold Queue.

Change your control card like this.
Code:

//TSOXXXX4 JOB (12345),'JCL',CLASS=E,               
//           MSGCLASS=X,NOTIFY=&SYSUID,             
//           MSGLEVEL=(1,1)                         
//*                                                 
//*                                                 
//STEP010 EXEC PGM=IEFBR14                         
//DD2      DD DSN=&SYSUID..SPOOL.OUTPUT,             
//             DISP=(MOD,DELETE,DELETE),           
//             UNIT=SYSDA,                         
//             AVGREC=K,                           
//             SPACE=(0,(0))                       
//*                                                 
//STEP020 EXEC PGM=IEFBR14                         
//DD1      DD DSN=&SYSUID..SPOOL.OUTPUT,             
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,                           
//            SPACE=(CYL,(1,1),RLSE),               
//            DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0)   
//*                                                 
//R010    EXEC PGM=SDSF           
//ISFOUT  DD DUMMY               
//ISFIN   DD *                   
OWNER user-id                     
PREFIX job-name                   
DA                               
FIND job-name LAST               
++S                               
PRINT ODSN 'TSOXXXX.SPOOL.OUTPUT'
PRINT                             
PRINT CLOSE                       
END                               
/*                               


The only thing here is, it gives only partial job log. Meaning - if you have 5 steps in your job and the last step is the SDSF capturing step (listed above), the job log will show only the 4 steps that have COMPLETED.

I hope this should be okay for your requirement, unless you wanna capture the Total job time or CPU time etc...

Try and let me know if you have any questions,

Thanks,
Phantom
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 -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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