HRECALL a list of Datasets using REXX



IBM's Command List programming language & Restructured Extended Executor

HRECALL a list of Datasets using REXX

Postby suganyagi » Tue Jul 08, 2008 3:47 pm

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?
suganyagi
 
Posts: 3
Joined: Mon May 26, 2008 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby dick scherrer » Tue Jul 08, 2008 9:32 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: HRECALL a list of Datasets using REXX

Postby suganyagi » Wed Jul 09, 2008 9:22 am

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.
suganyagi
 
Posts: 3
Joined: Mon May 26, 2008 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby dick scherrer » Wed Jul 09, 2008 9:39 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: HRECALL a list of Datasets using REXX

Postby jayind » Sat Jul 12, 2008 5:39 pm

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
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby Brahmam » Wed Mar 04, 2009 1:30 pm

Hi can you provide me sample complete JCL using IKJFET01 & IEBER14 which ends after completion of migration datasets.
Brahmam
 
Posts: 1
Joined: Wed Mar 04, 2009 1:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby dick scherrer » Thu Mar 05, 2009 12:38 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: HRECALL a list of Datasets using REXX

Postby claudiorua » Thu Aug 27, 2009 6:02 am

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
claudiorua
 
Posts: 1
Joined: Thu Aug 27, 2009 5:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby ramkbala » Wed Feb 16, 2011 10:20 pm

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?
Thanks,
Ramki
User avatar
ramkbala
 
Posts: 1
Joined: Wed Feb 16, 2011 9:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HRECALL a list of Datasets using REXX

Postby NicC » Thu Feb 17, 2011 12:13 am

m dng

??

Why not just run the compare step only? It will recall the datasets for you.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post