View previous topic :: View next topic
|
Author |
Message |
manishram1
New User
Joined: 23 Mar 2006 Posts: 34
|
|
|
|
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 |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
Back to top |
|
|
manishram1
New User
Joined: 23 Mar 2006 Posts: 34
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
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 |
|
|
manishram1
New User
Joined: 23 Mar 2006 Posts: 34
|
|
|
|
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 |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
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 |
|
|
manishram1
New User
Joined: 23 Mar 2006 Posts: 34
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
manishram1
New User
Joined: 23 Mar 2006 Posts: 34
|
|
|
|
Hi,
Thanks Frank,I will discuss with my team and i will get back to you.
Regards,
Manivelan
Mumbai |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|