Page 1 of 1

Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 12:36 pm
by SKANDA
Hi all,

When i am trying to execute my Rexx pgm in batch mode i have got the following error,

DATA SET NNNN.DDD.REXX.INPT.JJJ NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
 MISSING DATA SET NAME+
 MISSING NAME OF DATA SET TO BE ALLOCATED
 The input or output file Inpfil is not allocated.It cannot be opened for I/O.
 EXECIO error while trying to GET or PUT a record.

DATA SET NNNN.DDD.REXX.CON.JJJ NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
 MISSING DATA SET NAME+
 MISSING NAME OF DATA SET TO BE ALLOCATED
 The input or output file INDD is not allocated.It cannot be opened for I/O.
 EXECIO error while trying to GET or PUT a record

-->actually,the dataset which is to be access is DDD.REXX.INPT.JJJ (INPUT PDS),DDD.REXX.CON.JJJ(CONFIG FILE) ,BUT in the above msg INPUT PDS name AND CONFIG FILE is come along with my id(NNNN).why is that so?
-->inpfil,INDD is the logical name used in alloc statement in the REXX pgm
below is the jcl i have used to call my Rexx Main module,

//STEP1 EXEC PGM=IKJEFT1A,PARM='JCLMAIN'
//SYSEXEC DD DSM=<REXX PDS NAME>, DISP=SHR
//SYSTSPRT DD SYSOUT=A
//SYSTSIN DD DUMMY
//

Where i have went wrong?
please help me to fix this

Thanks all,
Skanda

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 2:32 pm
by Aki88
Hello,

SKANDA wrote:...
-->actually,the dataset which is to be access is DDD.REXX.INPT.JJJ (INPUT PDS),DDD.REXX.CON.JJJ(CONFIG FILE) ,BUT in the above msg INPUT PDS name AND CONFIG FILE is come along with my id(NNNN).why is that so?
-->inpfil,INDD is the logical name used in alloc statement in the REXX pgm
below is the jcl i have used to call my Rexx Main module,
...


Since you haven't shown your REXX EXEC, hence this is a best fit suggestion against multiple possibilities- check your 'ALLOC' statement and verify if you have specified the DS-name within quotation marks; ISPF substitutes the PREFIX set-up for your PROFILE in case the DSN is not entered within quotation marks.

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 3:09 pm
by SKANDA
Hi,

Thanks for your response.
I have checked all alloc statements in that, dsn name was quoted.
Below is the allocation for the input pds.

NEXTFILE = DATASET_PGM_NAME !! '(' !! MEM_NAME !! ')'
" ALLOC DD(INPFIL) DA("NEXTFILE") SHR REUSE"
where,
DATASET_PGM_NAME--> INPUT PDS NAME
MEM_NAEM --> MEMBER OF THE INPUT PDS WHICH IS DYNAMIC

Thanks in advance.
Skanda

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 3:37 pm
by willy jensen
Well, it looks to me as as the data might not be quoted. Suggest that you do a 'say NEXTFILE' just before the allocate, or a 'trace r' / 'trace off' around the statements.

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 3:41 pm
by Robert Sample
NEXTFILE = DATASET_PGM_NAME !! '(' !! MEM_NAME !! ')'
I don't see any quote marks around the data set name here.

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 3:41 pm
by NicC
No - you have not quoted your data set name. Try this:

pull d_s_n
say d_s_n
say 'd_s_n'
Say "'"d_s_n"' "
exit
 


And use the code tags when posting anything that could appear on your screen (as I have).

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 3:43 pm
by Aki88
Hello,

SKANDA wrote:... NEXTFILE = DATASET_PGM_NAME !! '(' !! MEM_NAME !! ')'
" ALLOC DD(INPFIL) DA("NEXTFILE") SHR REUSE"
where,
DATASET_PGM_NAME--> INPUT PDS NAME
MEM_NAEM --> MEMBER OF THE INPUT PDS WHICH IS DYNAMIC
...


I hope, 'DATASET_PGM_NAME' is not a variable name, but the complete dataset namel; in case it is the variable name, it is also expected to be enclosed within quotation marks.

<Edit: multiple posters at the same moment :) >

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Thu Dec 29, 2016 8:27 pm
by NicC
Actually, my previous code was a bit useless: try this

/* rexx */                                                      
Say "Enter one of your own data set names (without your ID)..."
pull d_s_n                                                      
Call sayit                                                      
Say "Now enter the same one WITH your ID..."                    
pull d_s_n                                                      
Call sayit                                                      
exit                                                            
/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/                          
sayit:                                                          
   Address ISPEXEC                                              
   "BROWSE DATASET("d_s_n")"                                    
   Address TSO                                                  
Return                                                          
 

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Fri Dec 30, 2016 1:58 pm
by willy jensen
The proper quoting would be something like this: NEXTFILE = "'"DATASET_PGM_NAME !! "(" !! MEM_NAME !! ")'"

Re: Dataset is not in Catalog and can not be accessed err

PostPosted: Tue Jan 03, 2017 6:50 pm
by SKANDA
Hi all,
Thank you all for your timely help.

Many Thanks,
Skanda