MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Doubt in SAS program.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sumanth4u
Beginner


Joined: 13 Feb 2006
Posts: 1
Topics: 1
Location: bangalore

PostPosted: Thu Mar 23, 2006 4:36 am    Post subject: Doubt in SAS program. Reply with quote

I am reading a COBOL file and writing ot SAS file the thing is that i'm n't able to get the required output and only all ecords are reading and only one record is writing .
Please check the code below and help me in this regard.

Code:

DATA F1;                                         
   INFILE ERRMSG;                                 
                                                 
   INPUT @1     CLNT                   $CHAR02.   
         @3     CUST                   $CHAR07.   
         @10    GRP_NM                 $CHAR30.   
         @40    GRP_I_CONV             $CHAR01.   
         @41    GRP_D_               $CHAR08.   
         @49    GRP_MKT                $CHAR03.   
         @52    I_STRATEGIC_CUST       $CHAR01.   
         @53    ALIAS_CUST             $CHAR07.   
         @60    CUST_FIRST3_CHAR       $CHAR03.   
         @63     C_NM_CUST          $CHAR60.   
         @66    ERROR                  $CHAR03.   
         @69    HLP                   $CHAR80.   
         @149    KEY                 $CHAR20.   
         @169   DIV                    $CHAR04.; 
             
PROC SUMMARY DATA=F1;
OUTPUT OUT=O1;       

DATA _NULL_;                                                     
     SET O1;                                                     
     FILE REPORT;                                               
           PUT @1     RPT_CLNT                   $CHAR02.       
               @3     RPT_CUST                   $CHAR07.       
               @10    RPT_GRP_NM                 $CHAR30.       
               @40    RPT_GRP_I_CONV             $CHAR01.       
               @41    RPT_GRP_D_EFF              $CHAR08.       
               @49    RPT_GRP_MKT                $CHAR03.       
               @52    RPT_I_STRATEGIC_CUST       $CHAR01.       
               @53    RPT_ALIAS_CUST             $CHAR07.       
               @60    RPT_CUST_FIRST3_CHAR       $CHAR03.       
               @63    RPT_ C_NM_CUST          $CHAR60.       
               @66    RPT_ERROR                  $CHAR03.       
               @69    RPT_HELP                   $CHAR80.       
               @149   RPT_ KEY                 $CHAR20.       
               @169   RPT_DIV                    $CHAR04.;       
                                                                 

The requirement is easy only .but i has nill knowledge in SAS .please help me..

Thanks in advance,
Sumanth.
_________________
Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Mar 23, 2006 6:29 am    Post subject: Reply with quote

sumanth4u,

First of all you are asking for a summary which will result in just 1 row. If you want to copy the input file to output file then you need a PUT statement.
Quote:

but i has nill knowledge in SAS .please help me..


I can provide the code but that would not help you to learn the language, so I would suggest you start reading the online documentation of sas.

http://support.sas.com/documentation/onlinedoc/

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jetson
Beginner


Joined: 07 Oct 2005
Posts: 30
Topics: 2
Location: Texas

PostPosted: Thu Mar 23, 2006 4:30 pm    Post subject: Reply with quote

A PROC PRINT might be what you're looking for. BEWARE that without a limit on the records, it will attempt to print ALL records. You can limit like this:

Remove the PROC SUMMARY because you are not using it correctly.

PROC PRINT DATA=F1(OBS=100);
RUN;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group