MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SAVE LIST in batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Jun 17, 2010 8:10 am    Post subject: SAVE LIST in batch Reply with quote

Hi All,

We have the command SAVE LIST which we type on the command prompt and the list gets saved in the dataset USERID.LIST.DATASETS. Can we get the same list outputed to a file by running SAVE LIST command in batch. Basically I want to automate the prcoess.
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 9:48 am    Post subject: Reply with quote

Take a look at LMDLIST in the ISPF Services Manual. All will be revealed.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 17, 2010 10:29 am    Post subject: Reply with quote

yadav2005,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=382&highlight=save+list
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Jun 17, 2010 10:46 am    Post subject: Reply with quote

Kolusu,

In your code you have the command SAY - which means I have to input the dataset criteria , how can we do without any manual intervention. Can you help me the code which I can execute the REXX code in batch say I want the datasets matching YADAV.TEST.** in SAVE LIST.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jun 17, 2010 12:11 pm    Post subject: Reply with quote

Pass the key as an argument from your executing JCL, or read it in from a dataset.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 17, 2010 12:18 pm    Post subject: Reply with quote

yadav2005 wrote:
Kolusu,

In your code you have the command SAY - which means I have to input the dataset criteria , how can we do without any manual intervention. Can you help me the code which I can execute the REXX code in batch say I want the datasets matching YADAV.TEST.** in SAVE LIST.


yadav2005,

If you are not familiar with REXX then you are better off using ADRDSSU dump option with TYPRUN=NORUN which just lists the datasets that matched your criteria and then parse that output using sort like shown below.


Code:

//STEP0100 EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'                 
//SYSPRINT DD DSN=&&LIST,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)   
//PSEUDO   DD DUMMY                                             
//SYSIN    DD *                                                 
  DUMP                       /* COMMAND DUMP             */ -   
   DS(INCL(YADAV.TEST.**))   /* INCLUDE ALL DSN WITH HLQ */ -   
   OUTDD(PSEUDO)             /* OUT DD NAME              */     
//*                                                             
//STEP0200 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=&&LIST,DISP=SHR                               
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
  OMIT COND=(5,5,CH,EQ,C'1PAGE')                               
  SORT FIELDS=COPY                                             
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(138:X)),                     
  IFTHEN=(WHEN=GROUP,BEGIN=(5,8,CH,EQ,C'0ADR475I'),             
  END=(5,5,CH,EQ,C'0ADR0'),PUSH=(138:SEQ=1))                   
  OUTFIL VTOF,BUILD=(32,44,80:X),                               
  INCLUDE=(138,1,CH,GT,C' ',AND,6,3,CH,NE,C'ADR')   
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Jun 17, 2010 8:24 pm    Post subject: Reply with quote

Kolusu,

Great .You are really really great.I am surprsied to see the options given by you. Thanks a lot for your help it worked fine for me.
Back to top
View user's profile Send private message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Fri Jun 18, 2010 8:44 am    Post subject: Reply with quote

Kolusu,

The code did work fine in TEST environment but when I tried the same in PROD environment , even though there are datasets in 3.4 , the ADRDSSU utility did not bring
out any datasets in the list and I am sure there are datasets in 3.4 on PROD. Is that there could be shop restrictions for using ADRDSSU utility with TYPRUN=NORUN option.
and my job ends with RC=4 and I have output the temporary dataset to a file to show you the problem. Can you please help further.I am really surprised.
Code:

PAGE 0001     5695-DF175  DFSMSDSS V1R09.0 DATA SET SERVICES     2010.169 09:38
ADR031I (SCH)-PRIME(01), TYPRUN=NORUN REQUESTED. TASKS WILL EXECUTE IN NORUN MODE
  DUMP                       /* COMMAND DUMP             */ -                   
  DS(INCL(YADAV.PROD.**))    /* INCLUDE ALL DSN WITH HLQ */ -                   
  OUTDD(PSEUDO)              /* OUT DD NAME              */                     
ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'DUMP '       
ADR109I (R/I)-RI01 (01), 2010.169 09:38:32 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED
ADR016I (001)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK           
ADR006I (001)-STEND(01), 2010.169 09:38:32 EXECUTION BEGINS                     
ADR415W (001)-DTDSC(04), NO DATA SETS WERE COPIED, DUMPED, OR RESTORED FROM ANY VOLUME
ADR040I (001)-DTDSC(01), PROCESSING BYPASSED DUE TO NORUN OPTION               
ADR006I (001)-STEND(02), 2010.169 09:38:33 EXECUTION ENDS                       
ADR013I (001)-CLTSK(01), 2010.169 09:38:33 TASK COMPLETED WITH RETURN CODE 0004
ADR012I (SCH)-DSSU (01), 2010.169 09:38:33 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0004 FROM:
                         TASK    001                                           

I am doing anything wrong here.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jun 18, 2010 10:41 am    Post subject: Reply with quote

Quote:
ADR415W (001)-DTDSC(04), NO DATA SETS WERE COPIED, DUMPED, OR RESTORED FROM ANY VOLUME


yadav2005,

The message ADR415W is self explanatory. There are no matching datasets with that high level qualifier. Are you sure you have datasets starts with YADAV.PROD.*? Also are you authorized to run this in production?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group