Scripting in BODS

Do you know any web page link from where i can learn a bit of scripting in BODS,

I need to understand the below syntax for one of my project,

$email = ‘ETLloads@MB.com’;
print (‘email_address:’ || $email || ‘@@’);

#this is a custom function
sf_set_parameters();
print( ‘Process_id [$G_Process_Id]’);

$G_LOAD_DT = SYSDATE ();
print (‘Load_dt:’ || $G_LOAD_DT || ‘@’);

My queries in above syntax,

  1. Where does the Print text shows up if its mention in the script file.

  2. Does “||” refers to the concatenate operator. why || is used 2 times in the last print cmd - print (‘Load_dt:’ || $G_LOAD_DT || ‘@’);

  3. What does single @ & double @@ at the end of print line indicates.

  4. How to find out what the custom function “sf_set_parameters()” is doing as its build by some one else.

Thanks.


Dvn (BOB member since 2012-11-24)

Please do not bump the posts. This question has already been asked.

Thanks,
Shaz


Shazin :india: (BOB member since 2011-07-19)

Hi Shaz,

I didn’t intented to bump the post, its just that the subject line for my previous post was about Trim function & i asked you back about scripting.

So just re-posted the same thing with subject line as scripting so that people who reply don’t mis-understand my query.

I will refer to the technical document, however in case you had any spare time & have knowledge of scripting then do let me know answer of the 4 points i raised in my query.

Thanks again for your prompt replies :slight_smile:

Have a great weekend.


Dvn (BOB member since 2012-11-24)

Well on the actual post, you will have to have a basic coding/SQL Scripting knowledge to understand what the Custom Function does…and of course the thought/effort to understand what it is doing…

As Shazin said, the basic things are already there in the User Manual. In the Tool Palette, you will see a symbol of :?: , just click and search for your topics!

Forum can help you solve only specific issues and not a broader picture of what we can do!

Also, here is the SAP SDN Wiki which has lot of scenarios…
http://wiki.sdn.sap.com/wiki/display/EIM/Data+Services


ganeshxp :us: (BOB member since 2008-07-17)

Hi Ganesh,

Thanks for the advice, I do understand that forum is for discussion on specific topics & not detail explanation or spoon feeding.

However after going through the manual of Data Services I am still struggling to understand the use of @ in below 2 commands,

print (‘email_address:’ || $email || ‘@@’);
print (‘Load_dt:’ || $G_LOAD_DT || ‘@’);

In 1st line its printing the email address along with concatenate the actual email variable, while in 2nd line its printing the load date along with concatenate the actual variable of Load date.

However, I am not sure why @ is used & whats the difference between using single ‘@’ & double ‘@@’.

If you are aware then please explain.

Thanks.


Dvn (BOB member since 2012-11-24)

Can you show us the actual result?

I’d say I do know my way around the BODS scripting language but I have never used anything related to @ characters?

From a first glance, I’d say it would only just print the @ character as indicated? Especially as it’s not surrounded by brackets used for in-line variables etc?

Then again, I could just be wrong (yes, that does happen :mrgreen: ) and it’s something new that I have never seen before!


ErikR :new_zealand: (BOB member since 2007-01-10)

Hi Erik,

This has been resolved, yes what you had mentioned is right…this is just a print character.

Thanks for posting the solution though :slight_smile:

Cheers.


Dvn (BOB member since 2012-11-24)