IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting Packded Decimal date into MMDDYYYY format


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Aug 06, 2008 12:05 pm
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
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
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

Superior Member


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

PostPosted: Wed Aug 06, 2008 2:29 pm
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
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: 1702
Location: Australia

PostPosted: Wed Aug 06, 2008 2:38 pm
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

Superior Member


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

PostPosted: Wed Aug 06, 2008 3:00 pm
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

www2.sas.com/proceedings/sugi28/066-28.pdf
www.nesug.org/proceedings/nesug03/cc/cc009.pdf
www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf
ftp.uni-heidelberg.de/ftp/pub/sas/infos/ts350.txt
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
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

Superior Member


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

PostPosted: Wed Aug 06, 2008 3:51 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 07, 2008 3:53 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top