Print a mainframe dataset.

Reply
Contributor
Posts: 25

Print a mainframe dataset.

Hi All,

I'm trying to print a mainframe dataset using PROC PRINT like the following

%let dataset= "xxxx1.xxxxx2.xxxxx3.xxxxx4"

Libname xxxxx5 &dataset. disp=shr;

proc print data=xxxx5;

run;

I'm getting the following error.

ERROR: File WORK.XXXXX5.DATA does not exist.

Please help, thanks in advance.

PROC Star
Posts: 7,363

Re: Print a mainframe dataset.

libname should reflect the path to where the data set is located.  If the file name is really xxxxx4 then try:

%let dataset= "xxxx1.xxxxx2.xxxxx3"

Libname xxxxx5 &dataset. disp=shr;

proc print data=xxxx5..xxxxx4;

run;

Contributor
Posts: 25

Re: Print a mainframe dataset.

Hi Art,

Thank you for your reply.

I tried like you mentioned, this time I'm getting a different error.

Error: Library xxxxx5 doe not exist

In the proc print step,

Error; Libname xxxxx5 is not assigned.

Thanks in advance.

Neal.

PROC Star
Posts: 7,363

Re: Print a mainframe dataset.

Are you sure you are specifying the correct path?  Have you tried it using JCL?  You might want to take a look at:

SAS(R) 9.2 Companion for z/OS

PROC Star
Posts: 7,363

Re: Print a mainframe dataset.

Actually, as I look at your initial %let statement, it doesn't appear to end with a semi-colon.  Try just adding the semi-colon and see if that works.

Contributor
Posts: 25

Re: Print a mainframe dataset.

It was a typo here in the discussion, it was added in the code when I executed it.

I'm giving the right path, also I'm executing this small peice of code using a jcl.

Ask a Question
Discussion stats
  • 5 replies
  • 328 views
  • 3 likes
  • 2 in conversation