If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

"Goto" type functionality in TI process ?

Started by donap, 14 Dec 2017 10:53:34 AM

Previous topic - Next topic

donap

I have a large (approx 4,000 lines of code) TI process, but if one of the input (data source) variables is a certain value, I want to skip a large block of the code.  I know I can do this with an IF-ENDIF but I do not really want to have 2,000 lines of code inside of the IF-ENDIF block.
The remaining code needs to be executed in FOR ALL input rows, so there is no ELSE part of this logic.
Thanks
Sample -

if vTest_value @<> 'A';
   #== do a whole bunch of stuff -- approx 2,000 lines of code
endif;

#==== do everything else for ALL values of vTest_Value
....
....
...




AJAYC

There is no GOTO function, however I like to split this out. If you've got code of about 2000 lines, I'd keep these in another process, so have something like this:



# Process01 applies to all values of vTest_value
#===================================
ExecuteProcess ( "process01".........) ;


# Process02 applies to all values except 'A' of vTest_value
#===================================
IF ( vTest_value @<> 'A' );
     ExecuteProcess ( "process02".........) ;
ENDIF ;


The two processes called represent the what you wish to happen.
HTH
Ajay



donap

Thank you.


Never thought to do that -- but that makes so much sense.