PDA

View Full Version : Using ILE CEE APIs in COBOL



Guest.Visitor
01-01-1995, 02:00 AM
Hi, I'm writing an ILE COBOL program using CEEDAYS, CEEDATE and CEEDYWK. All is fine with CEEDAYS and CEEDATE, but CEEDYWK allways return 0. Any idea to help me ? ---------------------Abstract from my pgm -------------------- Special-Names. Linkage Procedure for "CEEDAYS" using all described Linkage Procedure for "CEEDATE" using all described Linkage Procedure for "CEEDYWK" using all described. Data Division. Working-Storage Section. 01 Fc. 02 Sev Pic 9(4) Binary. 02 MsgNo Pic 9(4) Binary. 02 Flgs Pic X. 02 Facid Pic X(3). 02 ISInfo Pic 9(9) Binary. 01 CharDate Pic X(20) Display. 01 PictureString Pic X(20) Display. 01 LillianDate Pic S9(4) Binary. 01 DayNumber Pic S9(4) Binary. Linkage Section. Date Test 01 TSTDAT-DATVAL PIC X(10). Format Date Test (Combinaison de Y M D avec séparateur) 01 TSTDAT-DATFMT PIC X(10). Jour de la Semaine 01 TSTDAT-DAYWK PIC X(3). Procedure Division Using TSTDAT-Datval TSTDAT-DatFmt TSTDAT-DayWk. Main. Move TSTDAT-DatVal to CharDate. Move TSTDAT-DatFmt to PictureString. Perform CharToLill. Perform LillToDywk. Move DayNumber to TSTDAT-DayWk. Goback. CharToLill. Call Procedure "CEEDAYS" Using CharDate PictureString LillianDate Fc. LillToChar. Call Procedure "CEEDATE" Using LillianDate PictureString CharDate Fc. LillToDywk. Call Procedure "CEEDYWK" Using LillianDate DayNumber Fc.

Guest.Visitor
09-03-2000, 07:43 PM
<font color=blue><pre> 01 Fc. 02 Sev Pic 9(4) Binary. 02 MsgNo Pic 9(4) Binary. 02 Flgs Pic X. 02 Facid Pic X(3). 02 ISInfo Pic 9(9) Binary. 01 CharDate Pic X(20) Display. 01 PictureString Pic X(20) Display. 01 LillianDate Pic S9(4) Binary. 01 DayNumber Pic S9(4) Binary. </font></pre> The binary variables are defined as 16bit integers they should be defined as 32 bit integers. BTW the feedback structure does not look correct. (refer QSYSINC/QCBLLESRC(QUSEC). Here is an example <pre> 01 API-Code. 03 FC-Bytes-Provided PIC S9(009) BINARY. 03 FC-Bytes-Available PIC S9(009) BINARY. 03 FC-Exception-ID PIC X(0007). 03 FC-Reserved PIC X(0001). 03 FC-Exception-Data PIC X(1000). 01 Lilian-Date PIC S9(009) BINARY. 01 Day-Of-Week-Integer PIC S9(009) BINARY. </pre> HTH David

Guest.Visitor
09-05-2000, 03:00 AM
Thank you David You are right, the PIC must be S9(9) Binary. But, now I have an MCH3601. I think I'm going to ask IBM to search for a bug.

Guest.Visitor
09-05-2000, 07:32 AM
The program you provided works OK for me after changing the integer values to PIC S9(9) and changing DayWk to PIC X(9). Is there something else in the program that may be causing the MCH?