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

Recall dataset in a job


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

New User


Joined: 22 Jan 2008
Posts: 53
Location: china

PostPosted: Thu Feb 05, 2009 7:39 am
Reply with quote

Any sample code to recall some datasets in a batch job?
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: Thu Feb 05, 2009 7:43 am
Reply with quote

Hello,

If you reference a migrated dataset in the jcl it will be recalled.
Back to top
View user's profile Send private message
Joe_Song
Currently Banned

New User


Joined: 22 Jan 2008
Posts: 53
Location: china

PostPosted: Thu Feb 05, 2009 7:46 am
Reply with quote

Yes , i c, but i want to use the recall command to do the specific recall, i forgot how to wright the whole command, any idea?
Back to top
View user's profile Send private message
Joe_Song
Currently Banned

New User


Joined: 22 Jan 2008
Posts: 53
Location: china

PostPosted: Thu Feb 05, 2009 8:14 am
Reply with quote

got it, can just use HRECALL 'TEST.DATA1' WAIT command.
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: Thu Feb 05, 2009 8:16 am
Reply with quote

Hello,

If you have security permissions to do so, you can issue an HRECALL in batch.

Look here:
ibmmainframes.com/viewtopic.php?t=23202
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Fri Feb 06, 2009 11:08 pm
Reply with quote

dick scherrer wrote:
Hello,

If you reference a migrated dataset in the jcl it will be recalled.


Is the JCL reference enough? I thought you needed an 'OPEN' ACB to trigger the recall?

Cheers.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Feb 06, 2009 11:20 pm
Reply with quote

If you want to use a job step to recall, you can use:

Code:

//HRECALL EXEC PGM=IKJEFT01
//SYSTSPRT DD  SYSOUT=*   
//SYSTSIN  DD  *
 HRECALL 'HLQ.QUAL1.TEST' WAIT 
 HRECALL 'HLQ.QUAL2.TEST' WAIT     
//

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: Sat Feb 07, 2009 1:15 am
Reply with quote

Hello,

Quote:
Is the JCL reference enough? I thought you needed an 'OPEN' ACB to trigger the recall?
Possibly - my thought was that if the file was referenced, it would be an input file that would be used by the process icon_wink.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Feb 07, 2009 4:44 am
Reply with quote

Peter Poole wrote:
dick scherrer wrote:
Hello,
If you reference a migrated dataset in the jcl it will be recalled.

Is the JCL reference enough? I thought you needed an 'OPEN' ACB to trigger the recall?
Cheers.

IEFBR14 recalls the dataset with no open ACB.

I proved it with a simple test
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: Sat Feb 07, 2009 5:27 am
Reply with quote

On a similar note, one of the programmers named a dataset in their batch job, forgot to change the dsn to a test dataset name, waited long for the m2 recall, and then got the security violation. . .

Seems like HSM (at least on that system) recalls the dataset before ensuring the proper permissions exist icon_confused.gif

Double whammy. . .

Maybe its' a feature icon_cool.gif

d
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Sat Feb 07, 2009 4:22 pm
Reply with quote

Thanks expat. (FWIW I would have checked it myself if I had access to a system icon_razz.gif)

There do seem to be varying degees of knicker twisting built into HSM and RACF around the area of recalls...

I've fallen foul of the 'recall before check permissions' under OS/390 few years back, there's an interesting(?) difference between ISPF 3.4 primary selections "I" and "S" whereby one triggers a recall and one doesn't, recalls of a GDG DSN without relative number or explicit suffix will trigger recall of all generations - that was slightly embarrassing - and a LSTDSI of a PDS to which you don't have access will still trigger the error message because you're doing a read of the index table - that was very embarrassing because we had to do an exercise against all production libraries and managed to generate 120 RACF read violations in about 90 seconds... Whoops!

Cheers.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Feb 07, 2009 5:59 pm
Reply with quote

Quote:
and managed to generate 120 RACF read violations in about 90 seconds... Whoops!

And some places I've worked that would mean the guys in black leather coats and trucheons turning up at your desk icon_eek.gif
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Sat Feb 07, 2009 11:19 pm
Reply with quote

Almost.. I just got a call from the Scary Woman in the basement icon_smile.gif

Cheers
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Sun Feb 08, 2009 3:05 am
Reply with quote

Peter Poole wrote:
Almost.. I just got a call from the Scary Woman in the basement icon_smile.gif

Cheers


Like the situation for an old message that was removed by OA22838. Too bad some people have no sense of humor.
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Sun Feb 08, 2009 5:38 am
Reply with quote

If you work in IT and don't have a sense of humour you will go mad eventually...

Cheers
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Feb 09, 2009 6:17 am
Reply with quote

Hi,

if you have a number of datasets to recall in batch, I would not use the WAIT parameter as it can cause the tape to rewind and unload for each HRECALL request unless you need to test the return code of the HRECALL.

I have assumed the backup is on a tape/cart.

Gerry
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 Repeat a DD line- comment and insert ... CA Products 3
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
No new posts Adding space to a dataset - getting D37 ABENDS & Debugging 10
No new posts DataSet member creation failed with B... Java & MQSeries 15
Search our Forums:

Back to Top