Page 1 of 1

Not getting the allocation of pds with member name

PostPosted: Thu Feb 16, 2017 9:57 pm
by arya_starc
Hi All,

I am trying to reading the member of a pds. But I am not able to get that allocated dataset due to mismatch in the commas.

As on 'say' I get the pds name in single quote and member name seperately because of that it is failed to allocate that dataset.

Below is my rexx code

000500 ADDRESS TSO                                                            
 000600  CC = Listdsi('FILEI FILE')                                            
 000700  FILEI="'"SYSDSNAME"'"                                                  
 000800  CC1 = Listdsi('FILEO FILE')                                            
 000900  FILEO="'"SYSDSNAME"'"                                                  
 001000  WRT = 1                                                                
 001100  X = OUTTRAP(MEMBERS.)                                                  
 001200  "LISTDS" FILEI "MEMBERS"                                              
 001300  X = OUTTRAP(OFF)                                                      
 001400  DO I=7 TO MEMBERS.0                                                    
 001500     X = STRIP(MEMBERS.I)                                                
 001510  /* MEM = FILEI  || "(" || X || ")"  */                                
 001511     MEM = (FILEI(X))                                                    
 001512     SAY MEM                                                            
 001520     "ALLOC FI(IN) DA('"MEM"') SHR REUSE"                                
 001530     "EXECIO * DISKR IN (STEM TAB. FINIS"                                
 001540     "FREE F(IN)"                                                        
 


On line number 1510 when I am doing say, I get the below error message on executing.


'VM.LAT.V823.JCLLIB.SASH1'(PAUCXPT5)                                            
 IKJ56709I INVALID DATA SET NAME, ''VM.LAT.V823.JCLLIB.SASH1'(PAUCXPT5)'        
 IKJ56701I MISSING DATA SET NAME OR *+                                          
 IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED                              
 IRX0555E The input or output file IN is not allocated. It cannot be opened for I
 IRX0670E EXECIO error while trying to GET or PUT a record.                      
 IKJ56247I FILE IN NOT FREED, IS NOT ALLOCATED                                  
 'VM.LAT.V823.JCLLIB.SASH1'(PAUC0XB1)                                            
 IKJ56709I INVALID DATA SET NAME, ''VM.LAT.V823.JCLLIB.SASH1'(PAUC0XB1)'        
 IKJ56701I MISSING DATA SET NAME OR *+                                          
 IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED                              
 IRX0555E The input or output file IN is not allocated. It cannot be opened for I
 IRX0670E EXECIO error while trying to GET or PUT a record.                      
 IKJ56247I FILE IN NOT FREED, IS NOT ALLOCATED                                  
 

Re: Not getting the allocation of pds with member name

PostPosted: Thu Feb 16, 2017 10:20 pm
by Akatsukami
Could it be, Arya-chan, that you do not realize that you need to remove the single quotes, or do not know how?

Re: Not getting the allocation of pds with member name

PostPosted: Thu Feb 16, 2017 10:24 pm
by arya_starc
here I remove the single quote, but by removing it is taking the mainframe user id as the initial qualifier for the dataset.

here I remove

000600  CC = Listdsi('FILEI FILE')                                            
 000700  FILEI=""SYSDSNAME""                                                  
 000800  CC1 = Listdsi('FILEO FILE')                                            
 000900  FILEO=""SYSDSNAME""  
 

Re: Not getting the allocation of pds with member name

PostPosted: Fri Feb 17, 2017 1:20 am
by NicC
Look at you error message and study it carefully. Does the datasetname(membername) look right? If you think it is right - why? There is nothing magical about the dsn syntax in rexx compared with JCL. Fix it.

Re: Not getting the allocation of pds with member name

PostPosted: Fri Feb 17, 2017 1:48 am
by steve-myers
arya_starc - What akatsukami and Mr. Clousten are trying to tell you is the data set name is 'xxx(member)' not 'xxx'(member)