|
Hello Peter, You wrote: >I've been trying to get the bindable API CEESECS to work but it keeps >crashing with missing operational descriptors despite using either OPDESC >when prototyped or (D) when not. The 3rd parameter is a floating point value >and OS/400 only support descriptors on character fields but it's only the >first 2 parameters that are variable strings so I figured it would be >expecting operational descriptors only on these. The following example code works happily on VRM440. The strange definitions at the top are from my RPG IV version of the LETYPE include. You could simplify the prototype considerabley at the expense of some flexibility. Note that the timestamp is not an ISO format timestamp (indeed, the API will take any sort of date/time input as long as it can be described by a supported picture string). H DFTACTGRP(*NO) D INT2_ S 5I 0 D INT4_ S 10I 0 D UINT2_ S 5U 0 D UINT4_ S 10U 0 D BITS_ S 1A D CHAR_ S 1 D CHAR1_ S 1 D CHAR255_ S 255 D FLOAT8_ S 8F D VSTRING_ DS INZ D l2pstring +2 LIKE(CHAR255_) OVERLAY(VSTRING_) D l2len LIKE(INT2_) D OVERLAY(l2pstring : 00001) D l2string LIKE(CHAR255_) D OVERLAY(l2pstring : 00003) D l4pstring +4 LIKE(CHAR255_) OVERLAY(VSTRING_) D l4len LIKE(INT4_) D OVERLAY(l4pstring : 00001) D l4string LIKE(CHAR255_) D OVERLAY(l4pstring : 00005) D stringz OVERLAY(VSTRING_) LIKE(CHAR1_) D FEEDBACK_ DS INZ D MsgSev LIKE(UINT2_) D MsgNbr LIKE(UINT2_) D Flags LIKE(BITS_) D Case LIKE(BITS_) OVERLAY(Flags) D Severity LIKE(BITS_) OVERLAY(Flags) D Control LIKE(BITS_) OVERLAY(Flags) D Facility_ID LIKE(CHAR_) DIM(3) D I_S_Info LIKE(UINT4_) D CeeCvtTimestampToSecs... D PR D EXTPROC('CEESECS') D OPDESC D timeStamp LIKE(VSTRING_) OPTIONS(*VARSIZE)CONST D picture LIKE(VSTRING_) OPTIONS(*VARSIZE)CONST D seconds LIKE(FLOAT8_) D feedbackCode LIKE(FEEDBACK_) OPTIONS(*OMIT) D aTimestamp S 23 INZ('2001-07-26 14:00:23.123') D aPictureString S 23 INZ('YYYY-MM-DD HH:MI:SS.999') D theNbrOfSecs S 8F C CALLP CeeCvtTimestampToSecs( aTimestamp : C aPictureString : C theNbrOfSecs : C *OMIT ) C theNbrOfSecs DSPLY C SETON LR C RETURN Regards, Simon Coulter. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» «» FlyByNight Software AS/400 Technical Specialists «» «» Eclipse the competition - run your business on an IBM AS/400. «» «» «» «» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ «» «» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / «» «» X «» «» ASCII Ribbon campaign against HTML E-Mail / \ «» «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.