BookmarkSubscribeRSS Feed
rohitkrishna
Calcite | Level 5

Hi all,

plz find below mention code and give me some suggestions to rectify the problem

 

Problem :

   By using proc report I want to generate a report I able to get the observation only,  variables are not presented in the output file 

kindly check with the code and try to resolve the issue 

 

{

       PROC REPORT DATA = _HED OUT= _OUT;
COLUMN( H SEQNUM COUNT);
DEFINE H / DISPLAY "HED";
DEFINE SEQNUM / DISPLAY "SEQNUM";
DEFINE COUNT / DISPLAY "COUNT";
BREAK AFTER H / SKIP;
TITLE ' CURRENT DATE SEQNUM AND COUNT OF REC';
RUN;
PROC PRINT DATA = _OUT;
RUN;                                                                                                                                     }

 

 

And the results in spool 

CURRENT DATE SEQNUM AND COUNT OF REC

Obs H SEQNUM COUNT _BREAK_

1 H 696 19121
2 T 0 96

 

and the output file it shows only observations variables are not there (H SEQNUM COUNT ) those three are not at present in the output file 

 

****** ***************
000001 H 696 19121
000002 T 0 96

 

kindly give the answer to that problem and one more I

want to show in footnote next seqnum 697 how can I do by using sas code could u explain that one also 

 

Thanks & regards 

rohit Krishna

4 REPLIES 4
Kurt_Bremser
Super User

Please supply some example data (in the usual form, data step with datalines) against which we can test code, and an example for the expected output. Since we are talking list output, post the result example using the {i} button, so we can see the horizontal alignment correctly. And use the "little running man" for the example datalines step.

rohitkrishna
Calcite | Level 5
Hi KurtBremser,
thanks for the quick replay below the code plz check it once
input values
1 H BCDE 3 696 20190501 19121
2 T UTL 31 0 0 96

dataset:

DATA _HED;
INFILE CLSTHED MISSOVER;
INPUT @1 H $CHAR1.
@3 HED $CHAR4.
@8 NUM 3.
@12 SEQNUM 3.
@16 BUSDT 8.
@25 COUNT 7.;
RUN;

the output :
{
Obs HED NUM SEQNUM BUSDT COUNT

1 BCDE 3 696 20190501 19121 }

for trailer results :
{ Obs H HED NUM SEQNUM BUSDT COUNT

1 T UTL 31 0 0 96 }

thanks & regards
Rohit Krishna
Kurt_Bremser
Super User

Please switch to Rich Text when Posting. In this mode, the {i} button is the sixth icon from the left, the "little running man" the seventh, right above your posting area.

You ABSOLUTELY(!!!) must use these buttons for code and text, as the normal posting window will invariably change the contents, and the whole vertical alignment gets scrambled. As you can see, the example lines of your input data are useless at the moment.

Only then will we be able to provide serious help.

 

Tom
Super User Tom
Super User

Are your trying to use PROC REPORT to produce your report? Or PROC PRINT?

Not sure why you would want to use PROC REPORT to produce a dataset and then use PROC PRINT to print it.

 

Do you want a human readable report? Or another data file that you can use as input to some other mainframe program?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 814 views
  • 0 likes
  • 3 in conversation