IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can i give a date range as input in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
suvarna

New User


Joined: 24 Aug 2005
Posts: 13

PostPosted: Thu Sep 08, 2005 10:02 am
Reply with quote

Hi

I want to print some information from a job. But it so happens that there are more than one job having the same JOBNAME and JOB NUMBER.But the dates are different.

So if I give the date also as the input it should pick that job. It is also enough if it prints the latest job.

eg: PRINT JOB(MOBINSR1) JOBNUMBER(20190)

gives an abend with return code 16 because there are two jobs with the job number 20190 and job name MOBINSR1

NB: The number of jobs that I PRINT using a single JCL is 80.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Fri Sep 09, 2005 1:53 am
Reply with quote

I hope u are using the JHS tool from Systemware, if so use this
Code:
//SYSIN   DD *                             
  LOGON SYSTEM(JHS)                       
  OPTIONS OUTFILE(PRINTER) MAXJOBS(999)   
  PRINT JOB(LSPCPA) -                     
  FROMSTARTDATE(051705) -                 
  TOSTARTDATE(051805) -                   
  DDNAME(SORTXSUM)                         
  LOGOFF                                   
//                                         


To avoid confusion , please mention the Tool name.
Back to top
View user's profile Send private message
suvarna

New User


Joined: 24 Aug 2005
Posts: 13

PostPosted: Mon Sep 19, 2005 10:08 am
Reply with quote

Thank u for your answer. It works
Back to top
View user's profile Send private message
suganthyprabha

New User


Joined: 28 Jul 2005
Posts: 58

PostPosted: Mon Sep 19, 2005 11:51 am
Reply with quote

Hi suvarna and die7nadal,

Can u guys please tell me using which tool u are doing this Printing of job information?

Thanks and Regards,
Suganhy.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Mon Sep 19, 2005 7:53 pm
Reply with quote

JHS/XPTR from Systemware
Back to top
View user's profile Send private message
suvarna

New User


Joined: 24 Aug 2005
Posts: 13

PostPosted: Tue Sep 20, 2005 9:54 am
Reply with quote

Hi suganthyprabha
I use JHSPRINT to PRINT the job information .

//JHSPRINT EXEC PGM=JHSPRINT
//SYSPRINT DD SYSOUT=*
//OUTFILE DD DSN=Output file,
// DISP=(MOD,CATLG,CATLG),UNIT=(,9),
// DCB=(BLKSIZE=0,LRECL=80,RECFM=FB)
//*
//SYSIN DD *
OPTIONS AUTORESTORE(YES) RESTOREWAIT(10) OUTFILE(OUTFILE)
LOGON SYSTEM(JHS)
PRINT JOB(MOBINSR1) FROMSTARTDATE(06172005) FROMSTARTTIME(0001) -
TOSTARTDATE(06172005) TOSTARTTIME(2359) DSID(00004) -
LOGOFF

Check if it works for you
Back to top
View user's profile Send private message
shawnack

New User


Joined: 28 Jun 2007
Posts: 4
Location: India

PostPosted: Mon Jul 02, 2007 10:45 am
Reply with quote

I'm getting a "PROGRAM JHSPRINT NOT FOUND" when I'm jemming the JCL. Can you tell me how to find where the "JHSPRINT" program might be located, as in, "Is there any default library for this program?" I'm using the JHS utility from SYSTEMWARE.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 02, 2007 8:42 pm
Reply with quote

Hello and welcome to the forums,

You will get a quicker and probably better answer by asking your system support people - they will know what library contains the program.

Once you know the library, you might add a //STEPLIB DD for that dataset.
Back to top
View user's profile Send private message
shawnack

New User


Joined: 28 Jun 2007
Posts: 4
Location: India

PostPosted: Fri Jul 20, 2007 3:52 pm
Reply with quote

Thanks,
However I'm still unable to get the PDs. Can anyone put a snippet of the JHSPRINT program....
Back to top
View user's profile Send private message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Tue Jul 24, 2007 12:20 am
Reply with quote

My $.02....

XDC the jobs into members of a PDS.
and do a
Code:

TSO PRINTDS DATASET('"DATASET"') SYSOUT(C) DEST("PRINTERNAME")



Where DATASET is your data set and PRINTERNAME is your local printer connected to the mainframe.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 24, 2007 1:32 am
Reply with quote

Hello,

What do you mean by
Quote:
However I'm still unable to get the PDs


No snippet will help if you can't access the PDS. Is there some reason you will not get this from the support people there? If you need access permission, your security people should be able to help.

It is ikely that your situation is not understood by everyone here. If you clarify your "inability" to get the pds, we may be able to offer suggestions.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top