| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Sreejith Intermediate
 
  Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
  | 
		
			
				 Posted: Mon Dec 02, 2002 8:48 am    Post subject: To Recall multiple dataset from migration | 
				     | 
			 
			
				
  | 
			 
			
				Got from somebody
 
 
To Recall multiple dataset from migration
 
 
 	  | Code: | 	 		  
 
/* REXX */
 
/* THIS REXX WILL RECALL MULTIPLE DATASET FROM MIGRATION */
 
ARG QUAL MAX
 
 IF QUAL=' ' THEN,
 
    DO
 
      SAY 'THE SYNTAX FOR USING UNARCH IS:'
 
      SAY 'UNARCH <MASK> <MAX>'
 
      SAY '   '
 
      SAY 'WHERE <MASK> IS THE SAME AS USED IN ISPF 3.4'
 
      SAY '      <MAX>  IS THE NUMBER OF FILES TO RECALL (MAX 50)'
 
      SAY '   '
 
      SAY 'EXAMPLE ==>UNARCH TSDB.TS0897.**.CNTL'
 
      SAY '   '
 
      EXIT
 
    END
 
  IF MAX='' THEN MAX=10
 
  IF MAX>200 THEN MAX=200
 
  COUNT=0
 
/* PRIMING "READ" */
 
   "ISPEXEC LMDINIT LISTID(DSLIST) LEVEL(&QUAL)"
 
     "ISPEXEC LMDLIST LISTID(&DSLIST)",
 
          "DATASET(DSNVAR) OPTION(LIST) STATS(YES)"
 
   IF ZDLMIGR='YES' THEN DO
 
     DSNVAR=LEFT(DSNVAR,44)
 
     DSNVAR = "'"| |STRIP(DSNVAR)| |"'"
 
     SAY "ISSUING RECALL FOR " DSNVAR
 
     "HRECALL " DSNVAR
 
     COUNT=COUNT+1
 
     END
 
/* "READ" LOOP */
 
 DO WHILE RC=0
 
   "ISPEXEC LMDLIST LISTID(&DSLIST)",
 
            "DATASET(DSNVAR) OPTION(LIST) STATS(YES)"
 
   IF RC>0 THEN LEAVE
 
   IF COUNT>MAX THEN LEAVE
 
   IF ZDLMIGR='YES' THEN DO
 
      DSNVAR=LEFT(DSNVAR,44)
 
      DSNVAR = "'"| |STRIP(DSNVAR)| |"'"
 
      SAY "ISSUING RECALL FOR " DSNVAR
 
      "HRECALL " DSNVAR
 
      COUNT=COUNT+1
 
      END
 
   END
 
 "ISPEXEC LMDLIST LISTID(&DSLIST)",
 
          "OPTION(FREE)"
 
 EXIT
 
 | 	 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Cogito-Ergo-Sum Advanced
 
  Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
  | 
		
			
				 Posted: Mon Dec 16, 2002 11:02 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Why not code the RECALL statements in JCL and let the datasets (any number) be recalled in batch? For example,
 
 
 	  | Code: | 	 		  
 
//HELP1010 EXEC PGM=IKJEFT01,
 
//             COND=(0,LT)
 
//SYSTSIN  DD  *
 
HRECALL PANELS.CODE
 
HRECALL PANELS.DEFN
 
HRECALL TEST.INVGEN
 
/*
 
//SYSTSPRT DD  SYSOUT=*
 
//SYSOUT   DD  SYSOUT=*
 
 | 	  
 
 
The datasets that I have put have HLQ as my userid. The job ends immediately because the sending the recall request completes immediately. The complete recall will take the same time as in your code. _________________ ALL opinions are welcome.
 
 
Debugging tip:
 
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. 
 
-- Sherlock Holmes. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pvrajs Beginner
 
  Joined: 07 Jan 2005 Posts: 41 Topics: 12
 
  | 
		
			
				 Posted: Tue Apr 24, 2007 2:35 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Hi,
 
 
How can i recall multiple PS of a specific pattern, just by specifying the HLQ, using IEFBR14. I tried executing the below mentioned code, but the migrated datasets are not being recalled - 
 
 	  | Code: | 	 		  
 
//HELP1010 EXEC PGM=IKJEFT01
 
//SYSTSIN  DD  * 
 
HRECALL TEST.**
 
/* 
 
//SYSTSPRT DD  SYSOUT=* 
 
//SYSOUT   DD  SYSOUT=* 
 
 | 	  
 
Thanks for the help,
 
Vijay | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Tue Apr 24, 2007 2:43 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				pvrajs, 
 
 
What are error message you got? What did the dsnames translate to ?look at SYSTSPRT which lists the errors and how the wild card is translated. If you get an error that NO Dsnames matched your criteria then check and see if your tid is appended in the beginning. If so then put the dsname in quotes.
 
ie
 
 
 	  | Code: | 	 		  
 
//SYSTSIN  DD  * 
 
HRECALL 'TEST.**'
 
 | 	  
 
 
 
Hope this helps...
 
 
Cheers
 
 
Kolusu _________________ Kolusu 
 
www.linkedin.com/in/kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pvrajs Beginner
 
  Joined: 07 Jan 2005 Posts: 41 Topics: 12
 
  | 
		
			
				 Posted: Tue Apr 24, 2007 3:03 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Hi kolusu,
 
 
Thanks for the imm. reply.
 
 
I am not getting any errors. Surprisingly I am not getting SYSTSPRT. I checked the spool and I am not getting any translation of the widlcard. I also checked giving quotes, but of no use. Please find the job spool below - 
 
 	  | Code: | 	 		  
 
 15.56.45 JOB22093 ---- TUESDAY,   24 APR 2007 ----
 
 15.56.45 JOB22093  IRR010I  USERID test12   IS ASSIGNED TO THIS JOB.
 
 15.56.50 JOB22093  ICH70001I test12   LAST ACCESS AT 15:54:01 ON TUESDAY, APRIL 24, 2007
 
 15.56.50 JOB22093  $HASP373 test12X2 STARTED - INIT 04   - CLASS P - SYS FSYS
 
 15.56.50 JOB22093  SURF920I STEP START: JOB=test12X2 STEP=SEARCH   PGM=IEFBR14  STEP#=001
 
 15.56.50 JOB22093  IEF403I test12X2 - STARTED - TIME=15.56.50
 
 15.56.50 JOB22093  SURF931I STEP ENDED: JOB=test12X2 STEP=SEARCH   CC=00000
 
 15.56.50 JOB22093  -                                         --TIMINGS (MINS.)--            ----PAGING COUNTS---
 
 15.56.50 JOB22093  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP    CPU    SRB  CLOCK   SERV  PG   PAGE   SWAP    VIO SWAPS STEPNO
 
 15.56.50 JOB22093  -test12X2          SEARCH      00      3    .00    .00    .00    310   0      0      0      0     0     1
 
 15.56.50 JOB22093  IEF404I test12X2 - ENDED - TIME=15.56.50
 
 15.56.50 JOB22093  SURF934I  JOB ENDED: JOB=test12X2       HIGHEST CC= 0000
 
 15.56.50 JOB22093  -test12X2 ENDED.  NAME-SEARC                TOTAL CPU TIME=   .00  TOTAL ELAPSED TIME=   .00
 
 15.56.50 JOB22093  $HASP395 test12X2 ENDED
 
0------ JES2 JOB STATISTICS ------
 
-  24 APR 2007 JOB EXECUTION DATE
 
-            9 CARDS READ
 
-           73 SYSOUT PRINT RECORDS
 
-            0 SYSOUT PUNCH RECORDS
 
-            6 SYSOUT SPOOL KBYTES
 
-         0.00 MINUTES EXECUTION TIME
 
         1 //test12X2 JOB (VIJ,SYS999,TSO--TC3,test12),                            JOB22093
 
           //     'SEARC',MSGLEVEL=(1,1),CLASS=P,
 
           //       NOTIFY=&SYSUID,MSGCLASS=X
 
           IEFC653I SUBSTITUTION JCL - (VIJ,SYS999,TSO--TC3,test12),'SEARC',MSGLEVEL=(1,1),CLASS=P,NOTIFY=test12,
 
           MSGCLASS=X
 
         2 //SEARCH  EXEC PGM=IEFBR14                                            *
 
         3 //SYSTSPRT DD SYSOUT=*
 
         4 //SYSOUT   DD  SYSOUT=*
 
         5 //SYSTSIN  DD *
 
 ICH70001I test12   LAST ACCESS AT 15:54:01 ON TUESDAY, APRIL 24, 2007
 
 IEF236I ALLOC. FOR test12X2 SEARCH
 
 IEF237I JES2 ALLOCATED TO SYSTSPRT
 
 IEF237I JES2 ALLOCATED TO SYSOUT
 
 IEF237I JES2 ALLOCATED TO SYSTSIN
 
 IEF142I test12X2 SEARCH - STEP WAS EXECUTED - COND CODE 0000
 
 IEF285I   test12.test12X2.JOB22093.D0000102.?          SYSOUT
 
 IEF285I   test12.test12X2.JOB22093.D0000103.?          SYSOUT
 
 IEF285I   test12.test12X2.JOB22093.D0000101.?          SYSIN
 
 SURF930I STEP ENDED: JOB=test12X2 STEP=SEARCH   PGM=IEFBR14  ID=YS/00000/001 CC=00000
 
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 *       SYSTEM NAME - FSYS                  S T E P   C O M P L E T I O N   R E P O R T              SYSTEM LEVEL - MVS/SP 7.1.7  *
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 *     JOB NAME : test12X2     REGION        <16MB        >16MB                             CIO: 00:00:00.00                       *
 
 *     STEP NAME: SEARCH      AVAILABLE:    10,216K   1,564,672K   PRV MOUNT: 0             WLM: BATCH                             *
 
 *     STEP NO  : 1           REQUESTED:     4,096K           0K   SCR MOUNT: 0             SCN: BATCH3                            *
 
 *     PGM NAME : IEFBR14     USED USER:         4K           4K                            GRN:                                   *
 
 *     COND CODE: 0000        USED SYS :       316K      10,272K                            RCN:                                   *
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 *   DDNAME    UCB   VOLUME    I/O TIME    MAX BLKSZ   EXCP COUNT    DDNAME    UCB   VOLUME    I/O TIME    MAX BLKSZ   EXCP COUNT  *
 
 *                                                                                                                                 *
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 
 PGI         0/PGO         0/NSW         0/PSI         0/PSO         0/VPI         0/VPO         0/VPR         0/
 
 CPI         0/HPI         0/LPI         0/HPO         0/PST         0/PIE         0/POE         0/BIA         0/
 
 BOA         0/BIE         0/BOE         0/KIA         0/KOA         0/KIE         0/KOE         0/ENQ 00:00:00.00/HSM 00:00:00.00/
 
 IEF373I STEP/SEARCH  /START 2007114.1556
 
 IEF374I STEP/SEARCH  /STOP  2007114.1556 CPU    0MIN 00.00SEC SRB    0MIN 00.00SEC VIRT     4K SYS   316K EXT       4K SYS   10272K
 
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 *       SYSTEM NAME - FSYS                    J O B   C O M P L E T I O N   R E P O R T              SYSTEM LEVEL - MVS/SP 7.1.7  *
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 *             HIGHEST CONDITION   JOB START   JOB START    JOB END      JOB END     JOB ELAPSED TIME        PRIVATE     SCRATCH   *
 
 *  JOBNAME          CODE            DATE        TIME         DATE        TIME       (HHHH:MM:SS.TH)         MOUNTS      MOUNTS    *
 
 *                                                                                                                                 *
 
 *  test12X2         0000         04/24/2007  15:56:50.10  04/24/2007  15:56:50.11      00:00:00.01               0           0    *
 
 *---------------------------------------------------------------------------------------------------------------------------------*
 
 
 IEF375I  JOB/test12X2/START 2007114.1556
 
 IEF376I  JOB/test12X2/STOP  2007114.1556 CPU    0MIN 00.00SEC SRB    0MIN 00.00SEC
 
 | 	  
 
Thanks,
 
Vijay _________________ Thanks for help | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Tue Apr 24, 2007 3:11 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Quote: | 	 		  
 
15.56.50 JOB22093  SURF920I STEP START: JOB=test12X2 STEP=SEARCH   PGM=IEFBR14  STEP#=001 
 
 | 	  
 
 
why are you running IEFBR14? You should be running IKJEFt01
 
 
Kolusu _________________ Kolusu 
 
www.linkedin.com/in/kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pvrajs Beginner
 
  Joined: 07 Jan 2005 Posts: 41 Topics: 12
 
  | 
		
			
				 Posted: Tue Apr 24, 2007 3:26 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Thanks Kosulu. It worked. But, the job has sent a recall request to the datasets of the specified pattern and completed with a return code of ZERO. When I tried viewing them using 3.4 many of them are still in migrated state. Would it take some time? 
 
 
My actual requirement is to backup datasets of a particular pattern to disk. I wanted to use ADRDSSU. But I heard that it wont backup any of the migrated datasets. So, i thought of recalling them in the first step and then execute ADRDSSU. But, if the step is completing without recalling the datasets and triggering the next step, how would it serve the purpose. Please let me know.
 
 
Please suggest if there is an alternative
 
 
Thanks,
 
Vijay | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Tue Apr 24, 2007 4:47 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Quote: | 	 		  
 
Thanks Kosulu. It worked. But, the job has sent a recall request to the datasets of the specified pattern and completed with a return code of ZERO. When I tried viewing them using 3.4 many of them are still in migrated state. Would it take some time? 
 
 | 	  
 
 
 
Just code "wait" parm on the HRECALL statement i.e 
 
 	  | Code: | 	 		  
 
//SYSTSIN  DD  * 
 
HRECALL TEST.** WAIT
 
 | 	   
 
 
 	  | Code: | 	 		  
 
WAIT specifies that you want to wait for the HRECALL            
 
  command to complete.  If you are recalling data sets from     
 
  tape, we recommend that you do not specify the WAIT option    
 
  because the operator has to mount the tape for the recall to  
 
  complete.                                                     
 
                                                                
 
NOWAIT specifies that you do not want to wait for the           
 
  HRECALL command to complete.  If you are recalling data sets  
 
  from tape, we recommend that you specify the NOWAIT option    
 
  because the operator has to mount the tape for the recall to  
 
  complete.                                                     
 
                                                                
 
 | 	  
 
 
 
Hope this helps...
 
 
Cheers
 
 
Kolusu _________________ Kolusu 
 
www.linkedin.com/in/kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pvrajs Beginner
 
  Joined: 07 Jan 2005 Posts: 41 Topics: 12
 
  | 
		
			
				 Posted: Thu Apr 26, 2007 3:33 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Thats great Kolusu. You have all answers for my problem. 
 
 
Apologize for bothering you ... As I understand some of the datasets are migrated to tape while some onto the disk. Please correct me if I am wrong. When we are giving a pattern in the batch job how can we determine whether the dataset is being migrated from disk or tape.
 
 
Thanks
 
Vijay _________________ Thanks for help | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Thu Apr 26, 2007 4:00 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				pvrajs, 
 
 
It depends on how your shop has set up the migration levels. In our shop the datasets go to MIGRAT1 (dasd backup ) status and then MIGRAT2 (tape backup) status.  So if you look at under the VOLUME column in 3.4 listing you will see this migration levels 
 
 
Kolusu _________________ Kolusu 
 
www.linkedin.com/in/kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		MFBaba Beginner
  
  Joined: 24 Nov 2004 Posts: 8 Topics: 4
 
  | 
		
			
				 Posted: Mon Jun 21, 2010 1:57 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				If I recall multiple datasets in batch, will the recall be processed sequentially based on the order in which the datasets are listed or will it mount a tape and recall all datasets in the list that are on the mounted tape?
 
My goal is to minimize the mounting-remounting of Tapes while performing the recall in batch. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Mon Jun 21, 2010 2:30 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | MFBaba wrote: | 	 		  If I recall multiple datasets in batch, will the recall be processed sequentially based on the order in which the datasets are listed or will it mount a tape and recall all datasets in the list that are on the mounted tape?
 
My goal is to minimize the mounting-remounting of Tapes while performing the recall in batch. | 	  
 
 
MFBaba,
 
 
I suggest you read this along with the examples listed at the bottom
 
 
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2u360/2.9.2
 
 
kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		MFBaba Beginner
  
  Joined: 24 Nov 2004 Posts: 8 Topics: 4
 
  | 
		
			
				 Posted: Mon Jun 21, 2010 2:51 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| Thanks Kolusu. I went thru the details but I could not find the answer to my question. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		expat Intermediate
  
  Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
  | 
		
			
				 Posted: Tue Jun 22, 2010 5:08 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				HSM will analyse the queued recall requests and process all requests from one volume together. The use of WAIT overrides this as each recall will be processed in the order in which it appears in a list, hence the same tape may be mounted and dismounted many times.
 
 
Unless you have a desperate requirement to use WAIT - don't do it _________________ If it's true that we are here to help others, 
 
then what exactly are the others here for ? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |