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

Need Sort Card to Convert ordinary date to Julian Date


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Sat Apr 08, 2006 1:37 pm
Reply with quote

Hi Everyone,
I need to convert a date in a flat file to another with date converted to julian form.

Input::
1---------------13
04/08/2006USD
Output::
1-----------10
2006098USD

Can anyone help on this.

Regards,
Manivelan P
Mumbai
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Mon Apr 10, 2006 12:15 am
Reply with quote

You can take advantage of this thread

www.ibmmainframes.com/viewtopic.php?t=7537&highlight=

Alain
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Wed Apr 12, 2006 6:05 pm
Reply with quote

Thanks Frank/Alain for your quick response.Still i am in confusion.I have a TSO utility JULDATE which converts the ordinary dates to julian date.Can you tell me whether this sortcard helps me or not.
As mentioned Earlier can you please give the sortcard for this

Input::
1---------------13
04/08/2006USD

Output::
1-----------10
2006098USD

Regards,
Manivelan P,
Mumbai
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 12, 2006 8:59 pm
Reply with quote

Manivelan,

I didn't respond to you - Alain did. Sort products do not have any built-in features for doing the kind of date conversion you're asking for.

Hopefully, Alain will come back and explain about the other thread he pointed to.
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Thu Apr 13, 2006 1:12 am
Reply with quote

Well, I need to know more to help you.

- Do you know the date before submitting ?
- Is there just one date to convert or they are different date values in the other records ?

Alain
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Apr 13, 2006 1:19 am
Reply with quote

Hi,
I have the dates in a dataset,i want this dates to converted to julian format in output dataset.We have a TSO Utility named JULDATE which will convert the ordinary date to Jul date.Can we make use of this??

Input:::
01/01/2005USD
02/01/2006USD
03/01/2004USD

Output:::
2005001USD
2006032USD
2004061USD

all the ordinary dates in the Input dataset should be converted to Julian dates in Output dataset.


Apologise Frank,it's my mistake.


Regards,
Manivelan P,
Mumbai
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Thu Apr 13, 2006 1:28 am
Reply with quote

Manivelan,

You ask me if you can use your tool to convert to jdate. Is it what it does ?
Why not using it then. The tool you are talking about is unknown to me; it's certainly something developped by someone in your shop.

Alain
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Apr 13, 2006 4:54 am
Reply with quote

Hi Alain,
I want to know how to use this tool in the sort card.Please provide me example.Thanks for your patience.

Regards,
Manivelan P,
Mumbai
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 13, 2006 5:03 am
Reply with quote

Quote:
I want to know how to use this tool in the sort card


You can't use your "JULDATE tool" in the "sort card". DFSORT has a specific set of control statements. Those control sttements do not include the capability to use your "tool" directly, whatever it is. You can use additional program logic with DFSORT either by invoking DFSORT from a program, or by using one of DFSORT's defined exits (e.g. E15, E35). But you'd have to figure out how to incorporate the logic of your "tool" into your invoking program or your exit. We can't tell you how to do that.
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Apr 13, 2006 5:58 am
Reply with quote

Hi,
Thanks Frank,I will discuss with my team and i will get back to you.


Regards,
Manivelan
Mumbai
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 25, 2009 4:02 am
Reply with quote

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), you can now use DFSORT's date conversion functions for this kind of thing. For the example in this thread, you could use a DFSORT job like the following:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,10,UFF,TO=ZD,LENGTH=8,9:11,3)),
    IFTHEN=(WHEN=INIT,BUILD=(1,8,Y4W,TOJUL=Y4T,9,3))               
/*


For complete details on date conversion functions and the other new functions available with the Nov, 2009 DFSORT PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top