View previous topic :: View next topic
|
Author |
Message |
chillmo
New User
Joined: 31 Aug 2017 Posts: 39 Location: USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
There is no p,4,Y2U comparison, simple as that. Only 2 or 3 are permissible values. |
|
Back to top |
|
|
chillmo
New User
Joined: 31 Aug 2017 Posts: 39 Location: USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
Could you fix it? If so, how did you? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2144 Location: USA
|
|
|
|
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 |
|
|
|