Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Converting Packded Decimal date into MMDDYYYY format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics
Author Message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Wed Aug 06, 2008 11:55 am    Post subject: Converting Packded Decimal date into MMDDYYYY format
Reply with quote

Hi,

I need to compare two dates. One is in MMDDYYYY format. But another date is in PD4 format. Can you please tell me, how can i convert a packed decimal date to MMDDYYYY format

Thank You,
Back to top
View user's profile Send private message
References
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8729
Location: 221 B Baker St

PostPosted: Wed Aug 06, 2008 12:05 pm    Post subject:
Reply with quote

Hello Vasantha and welcome to the forums,

In which environment are you working (COBOL, some other programming language, your sort product, some other utility, etc.)?
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Wed Aug 06, 2008 12:07 pm    Post subject: Reply to: Converting Packded Decimal date into MMDDYYYY form
Reply with quote

hi,

The conversion should be in SAS,

Thank You
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Wed Aug 06, 2008 2:08 pm    Post subject: Reply to: Converting Packded Decimal date into MMDDYYYY form
Reply with quote

Can anyone help me on this........!!! i was trying from yesterday.... still iam not able to get the correct format............
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2222
Location: Phoenix, AZ

PostPosted: Wed Aug 06, 2008 2:29 pm    Post subject: Re: Reply to: Converting Packded Decimal date into MMDDYYYY
Reply with quote

vasantha wrote:
Can anyone help me on this........!!!
I don't speak SAS but if you can use SORT, there can be some suggestions.
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Wed Aug 06, 2008 2:31 pm    Post subject: Reply to: Converting Packded Decimal date into MMDDYYYY form
Reply with quote

The requirement is in SAS only not SORT.

Thank You,
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 663

PostPosted: Wed Aug 06, 2008 2:38 pm    Post subject:
Reply with quote

Hi,

I'm no expert at this but how does an eight byte number fit in a PD4 format ?

Gerry
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2222
Location: Phoenix, AZ

PostPosted: Wed Aug 06, 2008 3:00 pm    Post subject: Reply to: Converting Packded Decimal date into MMDDYYYY form
Reply with quote

Hi,

You might need to do go through some manuals, did a little googling & found some links which might help you, first link should give you a go..Good Luck.. icon_smile.gif

http://www2.sas.com/proceedings/sugi28/066-28.pdf
http://www.nesug.org/proceedings/nesug03/cc/cc009.pdf
http://www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf
http://ftp.uni-heidelberg.de/ftp/pub/sas/infos/ts350.txt
http://whitepapers.zdnet.co.uk/0,1000000651,260279115p,00.htm
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Wed Aug 06, 2008 3:46 pm    Post subject: Reply to: Converting Packded Decimal date into MMDDYYYY form
Reply with quote

Thank you for providing the docs..these are helpful for me.........i will try with these formats....

Once again Thank You......
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2222
Location: Phoenix, AZ

PostPosted: Wed Aug 06, 2008 3:51 pm    Post subject:
Reply with quote

Hi,

You are welcome... icon_smile.gif

They say, when you are in need it requires little efforts from your side, if you don't get succeed in some initials attempts try a littlie more..

PS.: above was just a philosophy.. icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Senior Member


Joined: 06 Jun 2008
Posts: 941
Location: Atlanta, GA

PostPosted: Thu Aug 07, 2008 3:53 am    Post subject:
Reply with quote

What does some of the PD4 data look like? As a long-time SAS user, PD4 dates usually lack the century ... but no problem to process.

Code:
X = INPUT(PUT(PD4VAR,Z8.),MMDDYY8.) ;
or other appropriate data input ... the PUT as Z8. puts the PD4 variable out as 8 bytes, zero filled, then the INPUT function can read the date.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1