BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am trying to use the ODS syatem to print the data into a mainframe flat file but seems it's not working. Please see if you can help me out.

Here is my code..

ODS PS FILE=OUTPUT2;
PROC PRINT DATA=WORK.RPTFLE U ROUND NOOBS LABEL SPLIT="*";
WHERE ;
VAR A B C....;
SUM A;
BY B;

TITLE 'ABC';
ODS PS CLOSE;
RUN;

-------------
OUTPUT2 = DD FOR THE FLAT FILE WHICH HAS BEEN ALREADY DEFINED

I am not sure if file type = PS is correct one for the mailframe files or not. please advice.

Thanks
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Tell us what you want to do with the output file, once generated? Also, you did not share the FILENAME OUTPUT2 ...; statement which is most important.

I would suggest you try ODS LISTING, not "PS" if you just want a text-formatted data file for your procedure output.

Also, you will want to refer to the SAS z/OS (MVS - IBM mainframe) companion documentation.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search for this topic/post:

sas z/os companion site:sas.com
Cynthia_sas
SAS Super FREQ
Scott is correct -- if you want the "standard" output from SAS on the mainframe, then ODS LISTING is automatically on. You don't (or should not) need any addition ODS statements to have your output go to standard LISTING output.

ODS PS is the destination for creating PostScript files. It might not be an appropriate destination for the mainframe, depending on how you direct output to your printers with JCL and whether your printers are PostScript printers or not.

This document has a lot of good information:
http://support.sas.com/rnd/base/ods/templateFAQ/MVSODS3.pdf
... on how to use ODS on the mainframe -- with specific allocation and JCL examples.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1986 views
  • 0 likes
  • 3 in conversation