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: 18
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

Active User


Joined: 15 Aug 2015
Posts: 396
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: 18
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

Active User


Joined: 15 Aug 2015
Posts: 396
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

Active Member


Joined: 29 Apr 2008
Posts: 967
Location: Maryland

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 Building a sort key DFSORT/ICETOOL 3
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
Search our Forums:

Back to Top