View previous topic :: View next topic
|
Author |
Message |
Md Immrann
New User
Joined: 12 Jun 2012 Posts: 4 Location: India
|
|
|
|
Hi . I am using repattern to convert a date from format YYMMDD to YYYYMMDD s below. I ma not getting any compilation error , but the below error when I execute the program.
Error message :
'IBM0517S ONCODE=2117 X in SECS(X,Y) did not match the picture specification. From entry point MOVE_LEADS at compile unit offset +000000B2 at entry offset +000000B2 at address 23193562. '
Code I am using :
COMP_DATE =
Repattern(PGMKORT.RUN_DATE,'YYYYMMDD','YYMMDD',1950);
I declared COMP_DATE as char(8), when it didnt work I tried giving Fixed Dec(8,0)
Could you please let me know what am I doing wrong |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
What is the value of PGMKORT.RUN_DATE? That is what is involved in the error. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Have you looked at the data to verify what format it is in? Particularly for that one record causing the ONCODE?
And of course you got no compile error -- what you are seeing is a RUNTIME error; you cannot -- EVER-- see a runtime error at compile time. Runtime errors are generally data related, hence cannot be found until the program is actually executing. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
You are talking bullsh*t!
You show us usage of the REPATTERN builtin, yet the error message clearly mentions the SECS builtin. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
prino wrote: |
You are talking bullsh*t!
You show us usage of the REPATTERN builtin, yet the error message clearly mentions the SECS builtin. |
But that's the message that you'll get if you pass REPATTERN a datetime string of, say, '120713 ' and a source pattern of 'YYMMDD'. REPATTERN is either calling SECS "under the covers", or LE can't be bothered to generate a different message for REPATTERN. |
|
Back to top |
|
|
|