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
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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