How to Create Your Future http://www.howtocreatefuture.com All copyrights for the individual articles remain with the original authors. However, reproduction of this ebook in its entirety is highly...
Now You Can Instantly
Create Stunning e-Books,
Reports & White papers In
3 Simple steps
A.Pick A Template
B.Add Instant Content
C.Customize & Publish
How to Create Stunning Digital Photography
CartoonsDescripción completa
This is how to create a portable Qt developing environment on Windows platform.Full description
Full description
Descripción: Inspirational book for anyone wants to create a better product
Descrição completa
Contents Introduction .................................................................................................................................................. 2 What can workflow …Descripción completa
Inspirational book for anyone wants to create a better productFull description
How to Create a Wicking Bed in a Raised Bed
A little class outline I wrote for giving instruction on the creation and activation of Scrying Mirrors. This was a work of Love and interest and I would do it all over again!
How to Create Stunning Digital Photography
Descrição: How to Create Your Own Gig Posters
How to Create Stunning Digital Photography
How to Create Stunning Digital PhotographyFull description
1
HOW TO CREATE BUILDOPS IN DATASTAGE Buildops :
You can define a Build stage to enable you to provide a custom operator that can be executed from a DataStage Parallel job stage. hen defining a Build stage you provide the follo!ing information:
Description of the data that !ill be input to the stage. hether records are transferred from input to output. " transfer copies the input record to the output buffer. #f you specify auto transfer$ transfer$ the operator transfers the input record to the output record immediately after execution of the per record code. %he code can still access data in the output buffer until it is actually !ritten. "ny definitions and header file information that needs to be included. &ode that is executed at the beginning of the stage 'before any records are processed(. &ode that is executed at the end of the stage 'after all records have been processed(.
&ode that is executed every time the stage processes a record.
&ompilation and build details for actually building the stage.
hen you have specified the information$ and re)uest that the stage is generated$ DataStage generates a number of files and then compiles these to build an operator !hich the stage executes. %he generated files include:
*eader files 'ending in .h( Source files 'ending in .c( +bject files 'ending in .o(
Advantages o using Buildops!
,ery efficient because they are native to the frame!or- &an implement extremely complex algorithms &an be developed in a standalone mode !ithout being connected to the DataStage server *ighly reusable and portable
How to create create Buildop in datastage datastage
1 of 17 Last updated: updated: 12/5/2017
/
Support 0&P Provide immediate access to the +rchestrates &22 classes
P"ope"ties o Buildops!
Parallel only 3ust have at least one input interface and one output interface #nterfaces are static Partitioning type is Same
8o to palette '#n Datastage Designer( 0ight clic- on 9stage type &lic- on 9ne! parallel stage Select 9build
How to create Buildop in datastage
+ of 17 Last updated: 12/5/2017
;
%his !ill bring you a buildop dialog box. 'see belo!(
Gene"al Ta'!
%ype the stage type name (this is the name you will be giving to your buildop) Supply category (the folder where your buildop will be residing within stages on your palette) Supply sort description (this will help others to know what this buildop is doing) ecution mode is "#arallel$ by default %lass &ame will be automatically populated and is same as your stage type name
How to create Buildop in datastage
, of 17 Last updated: 12/5/2017
<
C"eato" ta'!
*ere you can supply the author name and version number. 'ou can supply the bitmaps (icons of your buildop)
%here are t!o bitmaps () * this is a small icon which will appear on the palette (+) ,+ ,+ * this is a large icon which will appear on your -ob design
P"ope"ties Ta'!
*ere you can type in various properties for your buildop 4or example say if you are doing lookups using your buildop then you can specify the "ey value$ property here..!!! e dont need any properties for our sample calculator buildop.
How to create Buildop in datastage
5 of 17 Last updated: 12/5/2017
=
Build ta' (ve"+ i&po"tant*!
How to create Buildop in datastage
- of 17 Last updated: 12/5/2017
6 Build tab has three subtabs !ithin: (A* Inte"a$es! (,* Input!
#nput tab is used to define your input lin-s coming in to the buildop. #ort &ame* you can supply your o!n port names here 'compare port names !ith the lin- names in existing stages say merge stage !hich has t!o input lin-s 9master and 9update /uto 0ead* if you specify this as 9true then you dont need to use macros for reading the input records 'discussed later(. "nd if you specify this as 9false then you need to use macros to read the input records. 1able &ame* select the 9table definition or 9meta data using the table >ame column. +ur calculator source file meta data is saved under 9Saved?%st@buildop?a directory so !e can select that here. 0%#* you can ma-e 0&P enable by selecting true. +r leave it false. (-* Output!
+utput tab is used to define your output lin-s coming out from the buildop.
How to create Buildop in datastage
7 of 17 Last updated: 12/5/2017
A #ort &ame* you can supply your o!n port names here 'compare port names !ith the lin- names in existing stages say merge stage !hich has t!o output lin-s 9output and 9reject /uto 0ead* if you specify this as 9true then you dont need to use macros for reading the input records 'discussed later(. "nd if you specify this as 9false then you need to use macros to read the input records. 1able &ame* select the 9table definition or 9meta data using the table >ame column. +ur calculator source file meta data is saved under 9Saved?%st@buildop?ans directory so !e can select that here. 0%#* you can ma-e 0&P enable by selecting true. +r leave it false.
(.* T"anse"!
%ransfer tab is used to specify how the data transfer will occur in our sample buildop !e !ill ta-e one record from source and !rite one record to the target so our inpu !ill be 9ina 'source( and output !ill be 9ans 'target(. 2elect "/uto 1ransfer$ property to "true$ or you have to use transfer macros while coding .
(B* Logi$! How to create Buildop in datastage
of 17 Last updated: 12/5/2017
C
3ery important tab in buildop
"ctual buildop logic !ill be defined here 7ogic tab has four subtabs: (,* Deinitions!
0emember buildop code is a native &22 code so !e need to define many variablesclassesstructuresarrays in order to do the tas- /ny definitions related to %44 code would always go in 5efinitions tab . /ll 67ncldue statements8 65efine statements would always go under 5efinitions tab. (compare this with our %44 header files – from training)
How to create Buildop in datastage
of 17 Last updated: 12/5/2017
1E (-* P"e/Loop!
/ny code specified within this tab will be eecuted first while running the build op
#n our example we need to read first record from our source "ina$ for this task we can use the buildop macro "read0ecord(input name)$ #n the our example read0ecord'ina.portid@( !ill read the first available record from our source file. here 9ina is our source or input name
(.* Pe"/Re$o"d!
How to create Buildop in datastage
10 of 17 Last updated: 12/5/2017
11
1his is the table where actual transformation of a record will occur. 1his contains pure %44 code with some buildop macros.
A$tual Code o" ou" Cal$ulato"! ("ee" to E%planation in ne%t se$tion o" details*
!hile'FinputDone'ina.portid@(( G ans.ans@add H ina.fno 2 ina.snoI ans.ans@mul H ina.fno J ina.snoI ans.ans@div H ina.fno ina.snoI ans.ans@exp H ina.fno K ina.snoI ans.org@a H ina.fnoI ans.org@b H ina.snoI if ' ina.sno L ina.fno( G ans.ans@max H ina.fnoI !rite0ecord'ans.portid@(I M else G ans.ans@max H ina.snoI !rite0ecord'ans.portid@(I M read0ecord'ina.portid@(I M G prefixNindentO H ?EI cout LL Qevnet id Q LL prefixI if 'logDetailRevent#d L E( cout LL Qun-no!nQI else cout LL logDetailRevent#d LL endlI s!itch'logDetailRtype(
How to create Buildop in datastage
11 of 17 Last updated: 12/5/2017
1/ G case DS@7+8#>4+: cout LL Q#>4+QI brea-I case DS@7+8"0>#>8: cout LL Q"0>#>8QI brea-I case DS@7+84"%"7: cout LL Q4"%"7QI brea-I case DS@7+80TT&%: cout LL Q0TT&%QI brea-I case DS@7+8S%"0%TD: cout LL QS%"0%TDQI brea-I case DS@7+80TST%: cout LL Q0TST%QI brea-I case DS@7+8B"%&*: cout LL QB"%&*QI brea-I case DS@7+8+%*T0: cout LL Q+%*T0QI brea-I default: cout LL QSuccessful execution of BuildopQI brea-I M cout LL endlI cout LL Q3essageQ LL prefixI M
E%planation! while(!input5one(ina.portid9))
%his statement uses a macro 9inputDone !hich loops through all the input records in source until it finds end of records.
ans.ans9add : ina.fno 4 ina.sno;
%his statement first adds t!o numbers 'values in columns fno and sno in our source( and then later$ it assigns the result to the output field ans@add.
How to create Buildop in datastage
12 of 17 Last updated: 12/5/2017
15
ans.ans9mul : ina.fno < ina.sno;
%his statement first multiplies t!o numbers 'values in columns fno and sno in our source( and then later$ it assigns the result to the output field ans@mul. ans.ans9div : ina.fno = ina.sno;
%his statement first devides t!o numbers 'values in columns fno and sno in our source( and then later$ it assigns the result to the output field ans@div. ans.ans9ep : ina.fno > ina.sno;
%his statement first does apply exponential function on t!o numbers 'values in columns fno and sno in our source( and then later$ it assigns the result to the output field ans@exp. ans.org9a : ina.fno;
Straight move of source column 9fno to target column 9org@a ans.org9b : ina.sno;
straight move of source column 9sno to target column 9org@b
if ( ina.sno ? ina.fno) @ ans.ans9ma : ina.fno; write0ecord(ans.portid9); A
%hese statements compare values !ithin 9sno and 9fno columns in source and then assigns greater of those t!o values to output column 9ans@max 3acro 9!rite0ecord !rites the record to the target
0est of the code is a datastage "P# code !hich !rites the error massages to the datastage director job log. 'need advanced knowledge of datastage /#7 coding)
%hats it.your buildop is ready.no! you need to generate the underlying codes to ma-e the buildop ready to execute in order to do this you need to clic- generate button on the 8U#.
How to create Buildop in datastage
1+ of 17 Last updated: 12/5/2017
1;
hen you clic- 8enerate button the 8U# !ill create necessary files including (,* (-* (.* (1*