I'am trying to call the api 'CEEDAYS' to convert a date in to the
Lilian datenumber.
I'have code the bnext source:
d pdate s 10
d picture s 10 inz('YYYY-MM-DD')
D lildate S 10I 0
c callB 'CEEDAYS'
c parm pdate
c parm picture
c parm lildate
c parm fc
12
Pdate is filled with a date: '2009-02-10'
The program ended with no lildate filled. Field is zero
and the field FC is filled with hex rubbish like this:
' ßCEE Ç^' hex: 00000 00030502 59C3C5C5 000068B0 ........
- ....ßCEE..Ç^....
What's goïng wrong or what I'am doïng wrong?
Thanks for answers
Regards
Jaap
Here is an example that I found:
* Compile with DFTACTGRP(*NO) - RETRIEVES LILDATE AND DAY-OF-
WEEK
*
H DEBUG
D DATEIN S 6
D DATEFMT S 6 INZ('MMDDYY')
D DATELIL S 9b 0
D DAY S 9b 0
C MOVE UDATE DATEIN
C CALLB(D) 'CEEDAYS'
C PARM DATEIN
C PARM DATEFMT
C PARM DATELIL
C PARM *OMIT
C MOVE DATELIL JULDAT 6 0
*
C CALLB(D) 'CEEDYWK'
C PARM DATELIL
C PARM DAY
C PARM *OMIT
C Z-ADD DAY DAYOWK 9 0
C 'WKDAY' DSPLY DAYOWK
C EVAL *INLR=*ON
C *PSSR BEGSR
C DUMP
C ENDSR
You creating this with crtbndrpg or crtsrvpgm??
Hammie, what looks like hex rubbish is actually a data structure.
D Feedback DS 12
D MsgSev 5I 0
D MsgNo 2A
D 1A
D MsgPrefix 3A
D MsgKey 4A
For your feedback value
MsgSev = 3
MsgNo = x'0502'
MsgPrefix = CEE
MsgKey = x'000068B0'
This means message CEE0502. DSPMSGD CEE0502 QCEEMSG says "Missing
operational descriptor".
If you code *OMIT for the feedback instead of coding the 12-byte
parameter, the message would go into the joblog. When I'm coding API
calls, I always start off by coding the feedback as *OMIT (or for pgm
APIs I code the error code with zero for the bytes-provided). That way,
I can easily see the errors in the joblog while I'm debugging my API
call. Once I have the call itself working properly, I sometimes switch
to use the feedback or error code, depending on how I want to handle
regular errors.
--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'
Thank all off you for thinking with me
It's now works well
Regards
Jaap