Page 1 of 1

HRECALL a list of Datasets using REXX

PostPosted: Tue Jul 08, 2008 3:47 pm
by suganyagi
Hi,
My Requirement is:
I have a list of datset names in a PS File coming as input to my Rexx code. I have to check whether they are migrated or not and then if migrated have to recall them and once recall is complete, I have to continue with further processing.

I tried to use "HRECALL <Dataset name> nowait" addressed to TSO region but the screen hangs till the datset is recalled. Since this REXX Routine is part of a REXX Tool I dont want to hang the system since there are large number of datasets to be recalled.

So, I tried executing a batch job for recalling.
//RECALL EXEC PGM=IKJEFT01,DYNAMNBR=20,TIME=(9)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
HRECALL 'datset1 ' NOWAIT
HRECALL 'datset2 ' NOWAIT
..
HRECALL 'datsetn ' NOWAIT
/*
But this returns a Maxxcc 0 after submitting the Recall request. It didnot return any information regarding the Recall request complete.
Is there a way to know whether the recall process ended or not. I want to execute the next job only after all the datsets are recalled. How this can be achieved?

Re: HRECALL a list of Datasets using REXX

PostPosted: Tue Jul 08, 2008 9:32 pm
by dick scherrer
Hello,

Is there a way to know whether the recall process ended or not.
Not that i know of - it is not related to "your job". Your recall may cause multiple system actions to accomplish the recall.

I want to execute the next job only after all the datsets are recalled. How this can be achieved?
If the job is submitted before the recall completes, it will wait for datasets that are still being recalled. If this is a problem, a change to how those datasets are managed/migrated may be needed. This would be something to work with the storage admins concerning.

Re: HRECALL a list of Datasets using REXX

PostPosted: Wed Jul 09, 2008 9:22 am
by suganyagi
After the Recall process completes, I have to execute the next ReXX Routine not Job. Sorry that I mentioned it as job in my last post. If the recall is not complete, my ReXX exec hangs the system and hence I need to check whether all Recall processes completes before executing the next Rexx Routine. Hope Iam clear this time.

Re: HRECALL a list of Datasets using REXX

PostPosted: Wed Jul 09, 2008 9:39 pm
by dick scherrer
Hello,

It is not a good practice to try to write online "things" that wait for the completion of "other things". At best it is a waste of resources - at worst, it can cause problems.

Depending on what you need to run (the rexx) after the recall, you should be able to run it in batch. REXX works quite well in batch.

Re: HRECALL a list of Datasets using REXX

PostPosted: Sat Jul 12, 2008 5:39 pm
by jayind
Hi suganyagi ,

What Dick mentioned was perfect... I have written a rexx routine for comparing files, even i faced the same problem in case of migrated datasets, then I used IEFBR14 as my first step in JCL to recall the datasets and second step was my rexx routine.. It went fine... Eventhough rexx can be called online/batch, in case of migrated datasets the above method can be followed..

LISTCAT or ALLOC in REXX also hints some information about the migrated datasets... I dont remember now.... sorry....

Regards,
Jayind

Re: HRECALL a list of Datasets using REXX

PostPosted: Wed Mar 04, 2009 1:30 pm
by Brahmam
Hi can you provide me sample complete JCL using IKJFET01 & IEBER14 which ends after completion of migration datasets.

Re: HRECALL a list of Datasets using REXX

PostPosted: Thu Mar 05, 2009 12:38 am
by dick scherrer
Hello and welcome to the forum,

which ends after completion of migration
No. Once the recall request is issued, your job is done with it and goes on. The recall is not done by your request, it is done by hsm which is not related to your job.

Why would you want your job to sit in the system waiting for the recall(s) to complete?

Re: HRECALL a list of Datasets using REXX

PostPosted: Thu Aug 27, 2009 6:02 am
by claudiorua
Suganyagi

I think that you can repeat you HRECALL again but in the second time you can use WAIT option .. so the job will finish just when all dataset's were recalled.

Example :

HRECALL 'datset1 ' NOWAIT
HRECALL 'datset2 ' NOWAIT
..
HRECALL 'datsetn ' NOWAIT
HRECALL 'datset1 ' WAIT
HRECALL 'datset2 ' WAIT
..
HRECALL 'datsetn ' WAIT

Re: HRECALL a list of Datasets using REXX

PostPosted: Wed Feb 16, 2011 10:20 pm
by ramkbala
hi,

This is my first post in this forum.. I do have the requirement like, I have to compare 2 files. Both are migrated.. I have written one Rexx program, it will submit a JOB. In the job, 1ST STEP m dng the HRECALL and in 2nd step m calling another rexx to compare the files. The Two files contain huge records , If i didnt wait for the Recall results from 1st step, when the 2nd step starts, my rexx prog will be called. I m getting error like Dataset not Present

Why would you want your job to sit in the system waiting for the recall(s) to complete?

Re: HRECALL a list of Datasets using REXX

PostPosted: Thu Feb 17, 2011 12:13 am
by NicC
m dng

??

Why not just run the compare step only? It will recall the datasets for you.