Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How can i give a date range as input in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How can i give a date range as input in JCL
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    Post subject:
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    Post subject:
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    Post subject: Re: How can i give a date range as input in JCL
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    Post subject:
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    Post subject: Re: How can i give a date range as input in JCL
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    Post subject: Re: How can i give a date range as input in JCL
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

Site Director


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

PostPosted: Mon Jul 02, 2007 8:42 pm    Post subject:
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    Post subject: Re: How can i give a date range as input in JCL
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    Post subject:
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

Site Director


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

PostPosted: Tue Jul 24, 2007 1:32 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 1 Sun Mar 12, 2017 5:35 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us