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
 

 

Reformatting field, error while using date func

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dheeraj.ramchandani

New User


Joined: 03 Sep 2015
Posts: 10
Location: Peru

PostPosted: Thu Nov 05, 2015 8:30 pm    Post subject: Reformatting field, error while using date func
Reply with quote

I have a PD date field in julian CCYYDDD format and I want to extract records with date higher than current date and print them with converted gregorian date DDMMCCYY or MMDDCCYY. I am able to extract records with date higher than current date using DATE3P but unable to convert them using TOGREG. Please find the sysout below: -

Code:

********************************* TOP OF DATA **********************************
ICE805I 1 JOBNAME: XXXXXXX  , STEPNAME: STEPXXX                                 
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 09:51 ON THU NO
            SORT FIELDS=COPY                                                   
            INCLUDE COND=(67,4,PD,GT,DATE3P)                                   
            OUTREC BUILD=(1:67,4,Y4T,TOGREG=Y4W)                                 
                                 $                                             
ICE111A E REFORMATTING FIELD ERROR                                             
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E7-K95469                     
ICE052I 3 END OF DFSORT                                                         
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Nov 05, 2015 8:56 pm    Post subject: Reply to: REFORMATTING FIELD ERROR WHILE USING DATE FUNC IN DFSORT
Reply with quote

Y4T is an eight-position character/zoned-decimal field. You have four bytes of packed-decimal, so that's not going to work. You need Y4U.

When using the date-formats, you need to have specified the correct length, and the data needs to be in the correct format.

Using the system-date is bad. How will you do a re-run, or test to specific dates?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Nov 05, 2015 9:01 pm    Post subject:
Reply with quote

Shouldn't that be:
Code:
 OUTREC BUILD=(1:67,4,Y4U,TOGREG=Y4W)


?? IFIRC, Y4T expects an 8-byte ZD field but your field is packed.

Garry
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Nov 05, 2015 9:51 pm    Post subject:
Reply with quote

Garry just missed to see Bill's reply but apprently both have the same answers.. icon_biggrin.gif
Back to top
View user's profile Send private message
dheeraj.ramchandani

New User


Joined: 03 Sep 2015
Posts: 10
Location: Peru

PostPosted: Fri Nov 06, 2015 2:33 am    Post subject: Re: Reply to: REFORMATTING FIELD ERROR WHILE USING DATE FUNC IN DFSORT
Reply with quote

Bill Woodger wrote:
Y4T is an eight-position character/zoned-decimal field. You have four bytes of packed-decimal, so that's not going to work. You need Y4U.

When using the date-formats, you need to have specified the correct length, and the data needs to be in the correct format.

Using the system-date is bad. How will you do a re-run, or test to specific dates?


Thanks Bill, it worked. I did not know about Y4U. In fact, I would like to have a document which explains all the Y4x and Y2x fields. The DFSort and ICETOOL docs are not of much help.

I need to create an adhoc process where I need to extract records having date more than current date. I can run that whenever there is a requirement.

Garry Carroll wrote:
Shouldn't that be:
Code:
OUTREC BUILD=(1:67,4,Y4U,TOGREG=Y4W)


?? IFIRC, Y4T expects an 8-byte ZD field but your field is packed.


Thanks Garry.

I am getting date as MM/DD/CCYY, what if I want DD/MM/CCYY?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Nov 06, 2015 3:19 am    Post subject:
Reply with quote

Quote:
I did not know about Y4U. In fact, I would like to have a document which explains all the Y4x and Y2x fields. The DFSort and ICETOOL docs are not of much help.


If you Google it , you should find right away or look at the top "Manual".
Look what I have found it,
https://www-01.ibm.com/support/knowledgecenter/#!/SSLTBW_2.1.0/com.ibm.zos.v2r1.iceg200/cvtdf.htm
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Nov 06, 2015 2:20 pm    Post subject: Reply to: REFORMATTING FIELD ERROR WHILE USING DATE FUNC IN DFSORT
Reply with quote

Consult the DFSORT Application Programming Guide, everything is documented. If you have complaints about the format or content, IBM are happy for you to contact them. I really can't see at all how you can think the documentation doesn't help. I suspect in your searching you've accidentally found one of the stupid-dumb "blogs" written by people who know nothing, rather than the actual documentation.

To get DD/MM/YYYY you're going to have to start with MM/DD/YYYY and rearrange it with code.
Back to top
View user's profile Send private message
dheeraj.ramchandani

New User


Joined: 03 Sep 2015
Posts: 10
Location: Peru

PostPosted: Fri Nov 06, 2015 7:47 pm    Post subject:
Reply with quote

Thanks a lot Rohit and Bill, I will again try to find out in the documents mentioned by you and get back to you if I encounter any problem. I have all the docs suggested by you.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 17 Tue Dec 06, 2016 8:04 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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