SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

SAS Access for IMS DB: Unable to Print Records

Reply
New Contributor
Posts: 4

SAS Access for IMS DB: Unable to Print Records

I'm trying connect to IMS to read a HDAM DB (DB1) segment (SEG1) and print first 5 records of it, but getting following error while executing PROC PRINT:

IMS has terminated. Return code = 9991

 

Here is my code:

//SASIMS   EXEC SAS                                                  
//SAS.WORK DD UNIT=(SYSDA),SPACE=(CYL,(100,99),RLSE),                
//            DCB=(RECFM=FS,LRECL=6144,BLKSIZE=6144,DSORG=PS)        
//MYLIB    DD DSN=TEST.DUMMY.DSN,                                    
//            DISP=(NEW,CATLG,DELETE),                               
//            SPACE=(CYL,(50,50),RLSE),UNIT=SYSDA,                   
//            LABEL=EXPDT=2019/365,                                  
//         DCB=(MODELDCB,RECFM=FS,LRECL=27648,BLKSIZE=27648,BUFNO=20)
//*                                                                  
//IMS      DD  DSN=TEST.PSBLIB,DISP=SHR                              
//         DD  DSN=TEST.DBDLIB,DISP=SHR                              
//DFSRESLB DD  DSN=TEST.RESLIB,DISP=SHR                              
//*                                                                  
//SYSIN    DD *                                                     

OPTIONS NODATE LINESIZE=120;                        


PROC ACCESS DBMS=IMS;                                
CREATE MYLIB.DB1.ACCESS;                             
DATABASE=DB1 DBTYPE=HDAM;                            
RECORD='TEST REC' SEGMENT=SEG1 SEGLNG=756;           
ITEM='FLD1' LEVEL=2 DBFORMAT=$16.  SEARCH=FLD1 KEY=Y;
ITEM='FLD2' LEVEL=2 DBFORMAT=$135. SEARCH=FLD2;      
AN=Y;                                                
LIST ALL;                                            
                                                     
CREATE MYLIB.SEG1.VIEW PSBNAME=PSB1 PCBINDEX=3;      
SELECT 'TEST REC';                                   
LIST VIEW;                                           
RUN;                                                


PROC DATASETS LIB=MYLIB;                             
CONTENTS DATA =_ALL_; QUIT;                          
RUN;                                                
PROC PRINT DATA=MYLIB.VSLPTAP(OBS=5);                
RUN;                                                

 

I'm unable to get to the root cause. Can someone please advise? 

 

Ref used to develop this code: http://support.sas.com/documentation/cdl/en/acims/59519/PDF/default/acims.pdf

SAS Employee
Posts: 271

Re: SAS Access for IMS DB: Unable to Print Records

Hi @Arin,

 

Because this involves IMS and JCL I think I deserve bravery points for replying to this post Smiley Happy

 

I did some snooping around and this issue shows up in our Tech Support system. The tracks I have reviewed all indicate that this is caused by an IMS issue. The suggestions were to apply a fix to the IMS system.  I suggest contacting SAS Tech Support so that they can help your z/OS systems programmer implement the solution. Reference this number - 7611433387 - when you contact SAS Tech Support.

 

Hopefully this will solve your issue and I will get to lord it over some of my SAS cohorts!

 

Best wishes,

Jeff

 

New Contributor
Posts: 4

Re: SAS Access for IMS DB: Unable to Print Records

[ Edited ]

Thanks much @JBailey! I finally have reached out to the SAS Tech Support.

 

However before that, following I tried without success:

1. DFSRRC00 IMS program was found missing, perhaps because DFSRESLB is not a supporting DD for SAS PROC.

So, tried to pass RESLIB as LOAD, and it failed as a different IMS system module DFSVCI00 wasn't accessible; it seemed to be in a NON-APF Library. 

 

2. Above mentioned error is usually received in IMS Jobs when RESLIB is not passed. So, DFSRESLB was added again, beside using the LOAD too. This time it failed with error: "UNABLE TO INITIALIZE DL/I BUFFERING SERVICES" Reason Code 04.

 

I understand that these are more IMS issues than that of SAS, but how these IMS PARMs and LIBs to be passed to SAS properly is still unknown to me.

SAS Employee
Posts: 271

Re: SAS Access for IMS DB: Unable to Print Records

Hi @Arin

 

I think this is going to boil down to the IMS issue.

 

Getting the JCL right is tough, too. I don't have any working JCL handy. If I logged into my MVS account it would spend days recalling librariesSmiley Wink Let us know how this goes...

 

Working JCL would make a great SAS Communities article.

 

Best wishes,

Jeff

Community Manager
Posts: 704

Re: SAS Access for IMS DB: Unable to Print Records

This topic sure would make a great community article, @JBailey.

 

@Arin, when you reach a solution with Tech Support, I encourage you to add it to this thread and consider writing an article on what you found out and how you got there. I explain why and how to write an article in this post: 3 reasons why you should write an article for the SAS Communities Library.

 

Best,

Anna

Ask a Question
Discussion stats
  • 4 replies
  • 195 views
  • 1 like
  • 3 in conversation