Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SAS Question- How to Place the Column Postion in Proc Print

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
er.manishawasthii

New User


Joined: 24 Oct 2008
Posts: 6
Location: Pune

PostPosted: Tue Dec 09, 2008 7:02 pm    Post subject: SAS Question- How to Place the Column Postion in Proc Print
Reply with quote

In this code i want to Place the column Postion in Proc Print .....

Means i need to fix the postion of column headings and its records to certain varibles ..... EMP no should start from 6 column , name should start from 15 and dept name should start from 32 postion how Could i do that...........
Back to top
View user's profile Send private message

er.manishawasthii

New User


Joined: 24 Oct 2008
Posts: 6
Location: Pune

PostPosted: Tue Dec 09, 2008 7:07 pm    Post subject: Reply to: SAS Question- How to Place the Column Postion in P
Reply with quote

here is the code
PROC SQL;
CREATE TABLE REPT AS
SELECT E.ENO,E.ENAME,D.DEPT_NAME
FROM EMPLOYEE E, DEPT D
WHERE E.EDEPT_CD = D.DEPT_CD
AND ESTATUS = 'A' ‘
AND ESAL BETWEEN 10000 AND 20000
ORDER BY DEPT_NAME ,ENO
%PUT &SYSDBRC;
RUN;

DATA _NULL_;
IF "&SYSDBRC" NOT IN ('0','100') THEN DO;
PUT 'READING SASCNT DB2 RETURN CODE : ' "&SYSDBRC";
ABORT ABEND;
END;
RUN;

PROC PRINT DATA = REPT LABEL NOOBS;

TITLE1 ' XYZ ORGANIZATION';
TITLE2 ' ACTIVE EMPLOYEES REPORT DT:' &SYSDATE;

LABEL EMPNO = 'EMPLOYEE_NO';
LABEL NAME = 'NAME ';
LABEL DEPT = 'DEPT_NAME';

RUN;
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Dec 09, 2008 7:19 pm    Post subject:
Reply with quote

PROC PRINT does not allow you to set columns for its output. You can use PUT statements in a DATA step to control exact columns, but if you use PROC PRINT you have relatively little control over the format of the output report.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 09, 2008 9:07 pm    Post subject:
Reply with quote

Why the "must do" for column positions ?
As Robert has correctly stated, this is not an option in PROC PRINT.

You could do it using filler fields, but that is oh sooooooooooooooo messy a way to do it.
Back to top
View user's profile Send private message
er.manishawasthii

New User


Joined: 24 Oct 2008
Posts: 6
Location: Pune

PostPosted: Wed Dec 10, 2008 12:33 pm    Post subject:
Reply with quote

@ expat could u please explain it how could i do this using the filler filelds.......

Actually i don't want to use PUT statments and Data steps . I would like to learn about PROC PRINT . I have already made the previous code using the Put statments in Dta step . This time i thought of doing it in a diffrent way........using Proc Print
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 10, 2008 2:29 pm    Post subject:
Reply with quote

Filler fields are blanks set to specific lengths to allow you to format the output from proc print, should you so wish to do.

Why the must for certain columns ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us