01-24-2018 10:51 AM
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),
//MYLIB DD DSN=TEST.DUMMY.DSN,
//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;
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;
CREATE MYLIB.SEG1.VIEW PSBNAME=PSB1 PCBINDEX=3;
SELECT 'TEST REC';
PROC DATASETS LIB=MYLIB;
CONTENTS DATA =_ALL_; QUIT;
PROC PRINT DATA=MYLIB.VSLPTAP(OBS=5);
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
01-26-2018 03:58 PM
Because this involves IMS and JCL I think I deserve bravery points for replying to this post
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!
02-02-2018 10:37 AM - edited 02-02-2018 10:46 AM
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.
02-02-2018 01:33 PM
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 libraries Let us know how this goes...
Working JCL would make a great SAS Communities article.
02-02-2018 01:44 PM
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.