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 help required

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

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Thu Jan 08, 2009 7:26 am    Post subject: SAS help required
Reply with quote

I have a file with 1000 records and I need to read the last record which contains the date. By using that date I need to read all the records having the date less than the date in the last record and also need to create report. I am not sure how we can read the last record and store the date. Again, need to read the file fom the beginning. Please help. If you need any more information please let me know.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Thu Jan 08, 2009 8:02 am    Post subject:
Reply with quote

Code:
DATA A;
INFILE DDNAME END=EOF;
INPUT @ ;
IF EOF THEN DO; INPUT @??? DATEFIELD ; OUTPUT; END;

DATA B;
INFILE DDNAME ;
IF _N_ = 1 THEN SET A; RETAIN DATEFIELD;
INPUT @?? BDATE ...
IF BDATE < DATEFIELD ;

Untested but this should work.
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Thu Jan 08, 2009 8:55 am    Post subject: Reply to: SAS help required
Reply with quote

Thank you. I will try this and let you know.
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Fri Jan 09, 2009 2:41 am    Post subject: Reply to: SAS help required
Reply with quote

I tried this and worked fine. Thanks for yoru help!!!!!!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jan 09, 2009 5:08 am    Post subject:
Reply with quote

Glad to hear it worked.
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 FTP help required amitc23 All Other Mainframe Topics 3 Thu Apr 28, 2016 12:02 pm
No new posts Why Newcopy is required when we have ... DIXINSH CICS 5 Thu Apr 28, 2016 9:47 am
No new posts Tricky sort logic required pgopi92 DFSORT/ICETOOL 3 Mon Jan 25, 2016 3:29 pm
No new posts Help required on sort kalakuntlavenkat DFSORT/ICETOOL 11 Sun Nov 15, 2015 8:55 am
No new posts Formatting a output to required form ... LOKESH DAIVAM All Other Mainframe Topics 2 Thu Aug 13, 2015 12:14 pm

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