Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> All Other Mainframe Topics
View previous topic :: :: View next topic  
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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

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 Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

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: 1703
Location: Australia

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 Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

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 Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

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
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us