[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: PCML and data structures with dim

Hello Magne,

Yes you can, but you will have to edit the generated pcml file a bit

You must pass an extra paramenter (an int) with the actual number of
rows from your rpg.

Here is a part of a pcml I use:
    <program name="HMOSAP54" parseorder="RowsFetched Returncode
        path="/QSYS.LIB/HMDPGMV31.LIB/HMOSAP54.PGM" threadsafe="false">
        <data length="7" name="Returncode" type="char" usage="output"/>
        <data length="10" name="HapimagnummerKunde" type="char"
        <data init="53" length="4" name="RowsFetched" precision="31"
type="int" usage="output"/>
        <data count="RowsFetched" name="FetchedData"
            type="struct" usage="output"/>

Notice the keyword 'parseorder' on the program element. The RowsFetched
parameter (my counter) MUST be parsed before the structure, so that it
knows how many FetchedData stucture rows are coming.
Also notice the 'count' keyword on the data element for the structure.
Here you specify which parameter (in this case RowsFetched) contains the
number of rows.

Hope this helps.

Have a nice weekend all.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Magne Kofoed
Sent: Freitag, 28. November 2008 09:05
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: PCML and data structures with dim

Hi Scott,


I must say that I've learned more from your httpapi, ifsebook and ftpapi
than any other open source projects.

The same applies to your superb support and presentations. 


I read a presentation of yours where you describe how to use data
with dimensions.

We are using DS and DIM in rpg prototypes and compile with the pcml

The problem is that we are returning a lot of "empty" data because of

If we use 2 out of 50 in the KutDS, we are returning 48 empty.

Is there a way to get rid of the 48 empty in the DS array? Any


Prototype example:


D SKSKTOHI        PR                  ExtPgm('SKSKTOHI')               

D   Meta                              likeds(Metads)                   

D   Kinn                              likeds(Kinnds)                   

D   KutMeta                           likeds(KutMetads)                

D   Kut                               likeds(Kutds) dim(50)            

D                                     options(*nopass)                 


DMetads           DS                  qualified                        

D SessionId                    256A                                    

D UserId                        50A                                    

D ResultCode                     5A                                    

D ResultType                    15A                                    

D ResultText                   100A                                    

D ResultDate                    10A                                    

D ResultTime                     8A

D ErrorId                       12A                       


DKinnds           DS                  qualified           

D customerNbr                   11A   Inz(*blanks)        



DKutMetads        DS                  qualified           

D hitsNbr                        3A                       


DKutds            DS                  qualified dim(50)   

D customerNbr                   11A   Inz(*blanks)        

D accountId                      3A   Inz(*blanks)        

D accountIdDesc                 30A   Inz(*blanks)        

D accountNbr                    23A   Inz(*blanks)        

D startDate                      8A   Inz(*blanks)        

D endDate                        8A   Inz(*blanks) 

D versCrtId                      5A   Inz(*blanks) 

D versCrtNameDc                 40A   Inz(*blanks) 

D versCrtDate                    8A   Inz(*blanks)  


Best regards,



Diese E-Mail enthält vertrauliche Informationen, die rechtlich geschützt sein können. Sie ist nur für den beabsichtigten Empfänger bestimmt. Bitte benachrichtigen Sie uns umgehend, falls Sie die E-Mail irrtümlich erhalten haben und löschen Sie sie unverzüglich. Besten Dank.

This e-mail contains confidential information that may be privileged. It is for the sole attention and use of the intended recipient. Please notify us at once if you have received it in error and delete it immediately. Thank you.

Les informations contenues dans cet e-mail sont soumises au secret professionnel et ont un caractère strictement confidentiel. Elles sont destinées à l'usage exclusif du destinataire. Si cet e-mail vous est parvenu par erreur, vous voudrez bien nous en aviser immédiatement et le détruire sans délai.  Merci d'avance.
This is the FTPAPI mailing list.  To unsubscribe, please go to: