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

SYNCSORT Convert Julian to Gregorian


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arun Raj

Moderator


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

PostPosted: Wed Apr 16, 2008 4:55 pm
Reply with quote

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
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Wed Apr 16, 2008 5:31 pm
Reply with quote

In your SORT CARD

Code:
OUTREC FIELDS=(p,l,Y2T,DTNS=(MD4))
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Apr 16, 2008 6:37 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Apr 16, 2008 8:42 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Apr 16, 2008 8:45 pm
Reply with quote

shrivatsa wrote:
Code:
OUTREC FIELDS=(p,l,Y2T,DTNS=(MD4))
Where did you dig up this "DTNS"?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Apr 17, 2008 4:11 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 4:27 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Apr 17, 2008 7:27 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 17, 2008 7:30 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Apr 18, 2008 2:30 am
Reply with quote

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 zos_tech@syncsort.com 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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 18, 2008 3:41 am
Reply with quote

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 zos_tech@syncsort.com 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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Apr 18, 2008 3:55 am
Reply with quote

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. ... icon_smile.gif
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Fri Apr 18, 2008 9:23 pm
Reply with quote

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
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Feb 11, 2009 8:40 pm
Reply with quote

Hi, Is it must that the input Julian date supplied should always be in PD format.......How to use this for decimal values?

Code:

106
180
023
056


I want to convert the above to Gregorian date. Please help.

Thanks.
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 Feb 11, 2009 11:09 pm
Reply with quote

Hello,

Without knowing the year, the gregorian date cannot be calculated/converted. . .
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Feb 12, 2009 11:13 am
Reply with quote

Thanks for the info.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top