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
 

 

Convert PD Julian date (CCYYDDD) to Greg Date - SyncSort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Wed Dec 31, 2008 2:30 am    Post subject: Convert PD Julian date (CCYYDDD) to Greg Date - SyncSort
Reply with quote

Hi,

My Input file has the date as CCYYDDD format and it is in Packed Decimal. I need to convert it to MM/DD/YY format. I couldn't found abot PD dates converison in the existing posts.

Could some please help me?
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 Dec 31, 2008 10:34 am    Post subject:
Reply with quote

Hi,

This feature is available in SyncSort for z/OS 1.3 via OUTREC DT or OUTREC DTNS. You might need to use CENTWIN parameter as well. To get a better help, please tell the position of Date field & the SORT product you are using - in case it's SyncSort you need to tell what version of this is in use at your shop.
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Tue Jan 06, 2009 2:40 am    Post subject:
Reply with quote

Hi Anuj,

The Vesrion is SYNCSORT FOR Z/OS 1.2.3
The Date Positions details are given below:
FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
-LAST-REQ-DATE S9(7) 10 41 44 4

As you can see It's a COMP-3 field.

Plea suggest the solution.
(Sorry I was away for long weekend)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Tue Jan 06, 2009 2:04 pm    Post subject:
Reply with quote

jpdeshai,

The below SyncSort job does what you're trying to achieve. It works with my SyncSort version (SYNCSORT FOR Z/OS 1.2.1.0R). Please note that it assumes that the input file has CC values of 19,20 and 21 only.

Code:
//STEP01   EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN= Input file ---- FB/LRECL=80             
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                             
  INREC IFTHEN=(WHEN=(44,1,CH,EQ,X'19'),OVERLAY=(44:X'00')),
        IFTHEN=(WHEN=(44,1,CH,EQ,X'20'),OVERLAY=(44:X'01')),
        IFTHEN=(WHEN=(44,1,CH,EQ,X'21'),OVERLAY=(44:X'02'))
  SORT  FIELDS=COPY                                         
  OUTREC FIELDS=(44,4,DT1)                                 
  OUTFIL BUILD=(5,2,C'/',7,2,C'/',3,2)                     
/*                                                         
Input
Code:
IN-DATE 
4/PS     
(44-47) 
2--------
  1998365
  2008366
  2009001
  2009010
  2100060
SORTOUT
Code:
12/31/98
12/31/08
01/01/09
01/10/09
03/01/00
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Tue Jan 06, 2009 8:26 pm    Post subject:
Reply with quote

Thanks arcvns.
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Tue Jan 06, 2009 10:31 pm    Post subject:
Reply with quote

Hey Arcvns,

Once again thnx for the help, It worked perfectly to me. I just changed a bit as per my layout & needs.
Code:

INREC IFTHEN=(WHEN=(41,1,CH,EQ,X'19'),OVERLAY=(41:X'00')),           
      IFTHEN=(WHEN=(41,1,CH,EQ,X'20'),OVERLAY=(41:X'01')),           
      IFTHEN=(WHEN=(41,1,CH,EQ,X'21'),OVERLAY=(41:X'02'))           
SORT FIELDS=COPY                                                     
INCLUDE COND=(1,1,CH,NE,C'0')                                       
OUTREC IFTHEN=(WHEN=INIT,                                           
        BUILD=(1:30,05,PD,M10,12:05,19,32:51,01,39:45,06,PD,M18,     
               54:35,06,PD,M18,70:41,4,DT1,                         
               83:52,6,PD,M18,100:58,06,PD,M18,118:64,06,PD,M18)),   
IFTHEN=(WHEN=(70,4,CH,EQ,C'1900'),OVERLAY=(70:C'       0'))         
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Tue Jan 06, 2009 10:52 pm    Post subject:
Reply with quote

JP,

You're welcome.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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