DataStage jobs can be exported into two ways, using GUI and using command prompt. To export jobs from GUI, go to Export --> DataStage Component menu or right click on the particular job to export. A pop up window named "Repository Window" will appear on the screen where all or selected jobs can be exported. This Repository window allows various options to choose from. These options are as follows:
A. Change Selection - This section has three options "Add", "Remove" and "Select All". Using these options you can either select all the jobs to export or select/remove selective jobs from "Items to Export" section just above this section.
B. Job Components to Export - This Option gives user a choice to export the code in one of the following way:
1) Export job design with executables (where applicable) - export files created using 1st method would contain a separate section for executable of the job. Starting point of the executable section can be identified by DSEXECJOB keyword. This executable section contains the information about job like name and change date. The next section in the executable addresses the stages and virtual datasets or links. It list down the properties of the elements of the
jobs like name of the element, operator required for it etc. Next section of the executable lists the shell command to execute the job. This shell command takes parameters to run the jobs in normal mode or in performance wrapped mode. Last section of the export file contains the stages used in the job and their input and properties. For example in case of Oracle Enterprise stage it will list the connection properties and in case of Datasets it will list the virtual datasets name from where it would get data.
2) Export job designs without executables - This is just apposite to the above point and exported file will not contain the executable section in it. This is the option to use when XML export is required.
3) Export job executables without designs - These export files will only have the executable part in them.
C. Exclude read Only items - This option will exclude all read only items from being exported.
D. Include dependent item If this option is checked then while exporting the items export utility will identify the dependency between the items and will include all dependent items in the export.
E. Export to file - Choose the location to export the items and to assign the name to the export file. Also view button next to the brows button can be used to view the content of the file. In case of XML file the contents will open in the browser however for dsx file you will have to first associate a program with this extension.
F. Type of export - This list provides the choice to select the type of export. We can choose from three choices dsx, dsx 7 bit and xml. While exporting into XML format we can choose options to add DTD and stylesheet (click here for more on DTD) information in the export.
G. Append to existing file Choose this option to append the multiple different exports into one file. This option can be helpful while preparing the export file for deployment.
Lastly click on export button to start process.
To export jobs from command prompt DSEXPORT utility can be used. We can pass various parameters to DSEXPORT utility to configure export. Following are the parameters required while exporting jobs from command prompt:
/D - Specifies the domain where the application server configured. Usually in SMP environment this would be same as DataStage server name.
/H - Specifies the host name which would be same as DataStage server name.
/U - Specified the user name.
/P - Password for the user.
/JOB - Specifies the job which needs to be exported.
Following option can also be supplied in order to configure the export format. /XML to export into XML format. /EXEC to specify if only executable needs to exported. /APPEND to append the exported items to the existing file.
Following exmaple can help us understanding the export command:
DSEXPORT /D myserver:9080 /H myhostname /U myname /P mypsw mytest_project c:/temp/myexport.dsx
DSEXPORT command can be executed from client machine. On the client this command can be found at \IBM\InformationServer\Clients\Classic.
While exporting the jobs we should one thing in mind that if we have any encrypted values defined in the jobs then these encrypted values can be seen as it is in the exported files. Hence we should consider this while designing jobs and should pass the values only at run time instead of storing them.
Happy Working...
No comments:
Post a Comment