BookmarkSubscribeRSS Feed
gskn4u
Obsidian | Level 7

Hi All,

I am having issue when writing the data into mainframe file.

when I print DATA01, I see no issues. but when I write to output file I get completely different data (not as expected).

The record length is approximately 1200.

can someone please help me.

Best Regards,

DATA _NULL_;                                                      
  FILE OUTFL1 NOPRINT NOTITLES       ;                        
  FORMAT VAR1   VAR2 VAR3 VAR4 VAR5 VAR6       $050     
     VAR7   VAR8 VAR9 VAR10 VAR11 VAR12    $100     
     ;                                                        
  SET DATA01 ;                                                    
  IF _N_ = 1 THEN                                                 

  PUT @001 'VAR1,VAR2,VAR3,VAR4,VAR5,VAR6,VAR7,VAR8,VAR9,VAR10,VAR11,' 

  @058 'VAR12,' ;                                             
  PUT @001 VAR1        $050. '","'                            
  @053 VAR2        $050. '","'  

.

.

.

.

.                         
                                                                  

  ;   

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 0 replies
  • 556 views
  • 0 likes
  • 1 in conversation