How to create a getTag to get the values in aloop

[```
I have to create getTags so that it populates xml sample as below where the UCIDATA
have multiple entries.

549300B2SAXGWM7G5218 BMO2100005345880 N 50 BMO2100005345087 Y 50 ```

I have to pass getag values so that the UCIDATA tags alone gets replicated twice or thrice as per the no.of UCI values.how do I do that?

I declared a cursor with srcid from a table which is a unique value for each of the UCI values entered in that table.

EXEC SQL DECLARE GET_UCI CURSOR   
                     FOR        
                     SELECT     MNUSU_SRCID,MNUSU_UCI,MNUSU_LEI,MNUSU_SIA_FLG,
                                MNUSU_INT_PCT_SHARE
                     FROM       MF_NFU_UCI_UPDATES_STG
                     WHERE      MNUSU_SRCID  = :in_srcid 

int fetchUCIDATA()
    {
        EXEC SQL OPEN GET_UCI;
        EXEC SQL FETCH GET_UCI  INTO     :MNUSU_UCI:ind_MNUSU_UCI,:MNUSU_LEI:ind_MNUSU_LEI,:MNUSU_SIA_FLG:ind_MNUSU_SIA_FLG,:MNUSU_INT_PCT_SHARE:ind_MNUSU_INT_PCT_SHARE;                                   
        return ( sqlca.sqlcode);
        }

getTags_1( UCI, ( char * ) MNUSU_UCI.arr, tagUCI );     
getTags_1( SIAFLG, ( char * ) MNUSU_SIA_FLG.arr, tagSIAFlag );      
getTags_1( INTPCT, ( char * ) MNUSU_INT_PCT_SHARE.arr, tagINTPCT );     
getTags_1(LEI, ( char * ) MNUSU_LEI.arr,tagLEI );       
getTags_3( UCIData ,tagUCI,tagSIAFlag,tagINTPCT,tagUCIData);            
getTags_2(CDICDATA,tagLEI,tagUCIData,tagCDICDATA);      
t_UCIData = t_UCIData||UCIData (1 to 11 times)

Please help me with the right syntax and logic to loop.How to pass the syntax here so that the UCIDATA tags gets concatenated for multiple UCI values.

I don’t recognize anything in your SQL. Is this related to Ignition? (Are you posting on the right forum?)

If it is related to Ignition, you’re going to have to post a lot more information for us to make sense of it.

This looks like spam

Since it didn’t link to anything, it didn’t occur to me that it might be spam.

Posting in the Archived Topics is something of a flag.

Its related to oracle pro*c

So, generally off topic for this forum, and certainly for this category. Would have been acceptable in the general discussion category, I suppose. Good luck with your Pro*C problem.

1 Like

Last line, links to an insecure page :astonished:

I looked at the edits, and I don’t see a complete URL. Just http://. My browser won’t open that. What would?

Note the lack of s in https. Clearly the work of spam bots

Sarc? Spam bots don’t reply to comments nor edit their OP to fix problems.

I wouldn’t put it past them; they’ve already rigged two US elections!

But yeah, jokes. OP wasn’t spammy. 0/10 Nigerian princes

2 Likes