|
View previous topic :: View next topic
|
| Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi,
Is it possible to convert a 3 byte packed julian date(yyddd) to yyyymmdd format.
I am using SYNCSORT FOR Z/OS 1.2.1.0R.
Thanks,
Arun |
|
| Back to top |
|
 |
shrivatsa Warnings : 1 Active User

Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
In your SORT CARD
| Code: |
| OUTREC FIELDS=(p,l,Y2T,DTNS=(MD4)) |
|
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
For the above sort card, I am getting the error
| Code: |
SYNCSORT FOR Z/OS 1.2.1.0R U.S. PATENTS:
***
PRODUCT LICENSED FOR CPU SERIAL NUMBER 2680F,
SYSIN :
SORT FIELDS=COPY
OUTREC FIELDS=(1,3,Y2T,DTNS=(MD4))
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
|
Are you sure that this command works with my Syncsort version??
Thanks,
Arun |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi,
I got it. Below sort card is working fine.
| Code: |
SORT FIELDS=COPY
INREC FIELDS=(1,70,
71,3,PD,ADD,+100000,TO=PD,LENGTH=4,
74,5,
79,2,PD,M11,LENGTH=3,
81,29)
OUTREC FIELDS=(1,70,71,4,DT1,75,37)
|
my date field is starting from 71th location(3 bytes) in the input file.
Thanks,
Arun |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| shrivatsa wrote: |
| Code: |
| OUTREC FIELDS=(p,l,Y2T,DTNS=(MD4)) |
|
Where did you dig up this "DTNS"? |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
If an input field contains a character Julian date in the form of yyddd, then to convert to a Gregorian date in a month, day, 4-digit year format, specify p,l,Y2T,DTNS=(MD4). For , April 16, 2008, the input field would be '08107' and the output Gregorian date would appear as '04162008'.
Oh yes, converting a Julian date field to a printable Gregorian date is supported in SyncSort for z/OS 1.3. And this
| Code: |
| SYNCSORT FOR Z/OS 1.2.1.0R U.S. PATENTS: |
from the SYSOUT says an older version is running in the respective LPAR. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| Anuj D. wrote: |
| Oh yes, converting a Julian date field to a printable Gregorian date is supported in SyncSort for z/OS 1.3. |
Well, maybe he index gods don't like me, could you point me to where DTNS is documented in the 1.3 manual? |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi,
Could anybody please send me 1.3 manual so that i can go through the additional functionalities.
Thanks in advance,
Arun |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| arcvns wrote: |
| Could anybody please send me 1.3 manual so that i can go through the additional functionalities. |
No, those are copyrighted. Request a copy from Use [URL] BBCode for External Links. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi CICS Guy,
| CICS Guy wrote: |
| Well, maybe the index gods don't like me, could you point me to where DTNS is documented in the 1.3 manual? |
I can paste the scrap from the manual describing DTNS, this is available in Release 1.3.0.2; if you need Manual on that please contact Alissa on [email protected] OR follow Kevin..
Scrap:
| Quote: |
| DTNS[=(xyz)] This form of the subparameter specifies that the Julian date is to be converted in the form 'xyz', where x, y, and z indicate the order in which the month, day, and year are to appear and if the year is to appear as two or four digits. For x, y, and z, use M to represent the month (01-12), D to represent the day (01-31), Y to represent the last two digits of the year (for example, 02), or 4 to represent the four digits of the year (for example, 2002). If the mask specification is omitted, a mask of 'MDY' will be used by default. For example, if an input field contains a character Julian date in the form of yyddd, then to convert to a Gregorian date in a month, day, 4-digit year format, specify p,l,Y2T,DTNS=(MD4). For December 31, 2007, the input field would be '07365' and the output Gregorian date would appear as '12312007'. The field for this form requires 6 bytes for a 2-digit year representation and 8 bytes for a 4-digit year representation. The M, D, and Y or 4 may only appear once in the mask. |
|
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| Anuj D. wrote: |
| I can paste the scrap from the manual describing DTNS, this is available in Release 1.3.0.2; if you need Manual on that please contact Alissa on [email protected] OR follow Kevin.. |
Thanks, I found it, I made the newby error of trusting the index, next time I'll actually search the PDF..... |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
| CICS Guy wrote: |
| Thanks, I found it. |
Great. Actually I had it handy in my 'offshore' office but not here, so couldn't reply you that fast; yesterday only I've requested SyncSort Personnels to provide me with above PDF/manual & they promised me to ship the hard-copies ...first 'reward' for me to be in U.S. ...  |
|
| Back to top |
|
 |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
| Anuj D. wrote: |
| ...DTNS, this is available in Release 1.3.0.2... |
Just to clarify, the conversion of a Julian date field to a printable Gregorian date is supported in 1.3.0.0 and later. |
|
| Back to top |
|
 |
ramsri
Active User

Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Hi, Is it must that the input Julian date supplied should always be in PD format.......How to use this for decimal values?
I want to convert the above to Gregorian date. Please help.
Thanks. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Without knowing the year, the gregorian date cannot be calculated/converted. . . |
|
| Back to top |
|
 |
ramsri
Active User

Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
| Thanks for the info. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|