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
 

 

SYNCSORT Convert Julian to Gregorian

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

Moderator


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

PostPosted: Wed Apr 16, 2008 4:55 pm    Post subject: SYNCSORT Convert Julian to Gregorian
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: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 5:31 pm    Post subject:
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: 2162
Location: @my desk

PostPosted: Wed Apr 16, 2008 6:37 pm    Post subject:
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: 2162
Location: @my desk

PostPosted: Wed Apr 16, 2008 8:42 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Apr 16, 2008 8:45 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Apr 17, 2008 4:11 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 4:27 am    Post subject:
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: 2162
Location: @my desk

PostPosted: Thu Apr 17, 2008 7:27 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Apr 17, 2008 7:30 pm    Post subject:
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 www.syncsort.com.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Apr 18, 2008 2:30 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 18, 2008 3:41 am    Post subject:
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

Senior Member


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

PostPosted: Fri Apr 18, 2008 3:55 am    Post subject:
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: 500
Location: USA

PostPosted: Fri Apr 18, 2008 9:23 pm    Post subject:
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    Post subject:
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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 11, 2009 11:09 pm    Post subject:
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    Post subject: Thx
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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