Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8057
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: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us