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

Date conversion using SORT


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chillmo

New User


Joined: 31 Aug 2017
Posts: 39
Location: USA

PostPosted: Fri Jan 15, 2021 10:23 am
Reply with quote

I'm trying to convert a packed date, format is MMDDYY PIC S9(6) COMP-3, to 0MMDDCCYY PIC X(9) using sort.

Here's the input and my error message:
Code:


0181
002C

103:78,4,Y2U,TOGREG=Y4T,
       *               
WER271A  OUTREC STATEMENT  : NUMERIC FIELD ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE   


Any assistance would be greatly appreciated.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Jan 15, 2021 10:58 am
Reply with quote

There is no p,4,Y2U comparison, simple as that. Only 2 or 3 are permissible values.
Back to top
View user's profile Send private message
chillmo

New User


Joined: 31 Aug 2017
Posts: 39
Location: USA

PostPosted: Fri Jan 15, 2021 11:24 am
Reply with quote

Thanks Joerg.Findeisen!

I changed my code to:
Code:
103:78,4,Y2Y,TOGREG=Y4W,


It works; however, it displays as MMDDCCYY (8-bytes) instead of 0MMDDCCYY.

But, I'm heading in the right direction.

Thanks again!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Jan 15, 2021 2:37 pm
Reply with quote

Could you fix it? If so, how did you? icon_question.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2144
Location: USA

PostPosted: Fri Jan 15, 2021 6:44 pm
Reply with quote

chillmo wrote:
Thanks Joerg.Findeisen!

I changed my code to:
Code:
103:78,4,Y2Y,TOGREG=Y4W,


It works; however, it displays as MMDDCCYY (8-bytes) instead of 0MMDDCCYY.

But, I'm heading in the right direction.

Thanks again!

There is no way to get date value as 0MMDDCCYY. It is mainly out of common sense: I start my new job on 012112021?
Extra zero is only present in packed decimal (as well as decimal sign): X’012112021C’, but you don’t want this ‘C’ to be appended to your date; I hope so?

If you need this, add prefix 0 as constant C’0’ just before your (actual) date value.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 4
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
Search our Forums:

Back to Top