Page 1 of 1

Date conversion

PostPosted: Tue Aug 07, 2012 10:30 am
by lekha
Hi,
I have to convert month-day-year format to year-month-day format.
Code which i tried :
   OPTION COPY                                                       
   OUTREC PARSE=(%01=(ENDBEFR=C',',FIXLEN=5),                       
                 %02=(ENDBEFR=C',',FIXLEN=3),                       
                 %03=(ENDBEFR=C',',FIXLEN=18),                       
                 %04=(ENDBEFR=C',',FIXLEN=9),                       
                 %05=(FIXLEN=23)),                                   
                    BUILD=(%01,9:%02,15:%03,35:%04,Y4Y,TOGREG=(Y4T(-)),47:%05)     

Error message :
  WER268A  OUTREC STATEMENT  : SYNTAX ERROR                           
  WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                       
  WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Without date conversion field code is working fine.
Kindly help me in this requirement

Thanks,
Lekha

Re: Date conversion in jcl sort

PostPosted: Tue Aug 07, 2012 10:56 am
by steve-myers
  1. Determine the sort product in use at your site. IBM DFSORT messages are usually preceded by ICEnnn message codes. Syncsort messages are preceded by WERnnn codes. There are a few other sort products in the wild, but they are rarely encountered.
  2. Post this request in the appropriate forum for the sort product you use, not in the JCL forum. There is no such thing as a "JCL sort." Sort products are called by JCL, but the best place to get information about a sort product is in the appropriate forum.
  3. The control statements you show are not JCL. They are input controls that tell a sort product what to do.

Re: Date conversion in jcl sort

PostPosted: Tue Aug 07, 2012 2:30 pm
by BillyBoyo
Your topic has been moved to SYNCSORT, as you have the WER... messages.

Your post has also been Code'd to improve readability.

You need to show the full sysout for the step, all the WER messages as they are. Please use the Code tags.

Re: Date conversion

PostPosted: Tue Aug 07, 2012 7:09 pm
by MrSpock
I don't see any parameter "TOGREG" listed in the product documentation.

Re: Date conversion

PostPosted: Tue Aug 07, 2012 7:59 pm
by Alissa Margulies
Which release of SyncSort for z/OS are you running?

Re: Date conversion

PostPosted: Tue Aug 07, 2012 8:18 pm
by Alissa Margulies
In the OUTREC control statement you specified:
BUILD=(%01,9:%02,15:%03,35:%04,Y4Y,TOGREG=(Y4T(-)),47:%05)

Y4Y is not a valid field format. What does the data actually look like in that field?

In regards to the date conversion, are you just simply trying to reorder the field (move the year to the beginning instead of the end), or are you truly converting a Julian date to a Gregorian date?

Providing sample input and the desired output may help us to better assist you.