Unix Ds Commands

April 5, 2018 | Author: Anonymous | Category: Documents
Report this link


Description

Using the Command Line Interface for DataStage 1.1 The dsjob Command Command syntax1: dsjob [-server ][-user ][-password ] [] The first three options allow the system on which the DataStage server is running to be identified and user ID and password for that system to be supplied. Defaults are the local machine and the user ID and password you are currently using. Valid primary command options are: -run -stop -lprojects -ljobs -lstages -llinks -jobinfo -stageinfo -linkinfo -lparams -paraminfo -log -logsum -logdetail -lognewest 1 The executable for this command is in the bin subdirectory in the directory in which the DataStage server engine was installed. For example, if you installed DataStage server into its default location (i.e. C:\Ardent\DataStage\ServerEngine), then the pathname C:\Ardent\DataStage\ServerEngine\bin would need to be in your PATH or the full pathname of the executable would need to be entered. Page 1 of 7 Using the Command Line Interface for DataStage 1.2 Running and Stopping Jobs Running a Job dsjob -run [-mode ] [-param =] [-warn ] [-rows ] [-wait] Default run mode is NORMAL. Default warnings and rows limits are as defined in the Director options. The -param option can be used repeatedly to provide values for parameters defined for the job. must be the name of a parameter defined for the job, and must be of the appropriate type for the parameter. Stopping a Running Job dsjob -stop 1.3 Discovering Information Listing DataStage Projects dsjob -lprojects Example - lists the DataStage projects installed on the system C:\>dsjob -lprojects Project1 Project2 C:\> Page 2 of 7 Using the Command Line Interface for DataStage Listing Jobs in a Project dsjob -ljobs Example - lists the jobs defined in Project1 C:\>dsjob -ljobs Project1 Demo%rel6.0.0 Demo PopulateRegion PopulateSales Transform1 Transform2 Transform3 Aggregation C:\> Listing Stages in a Job dsjob -lstages Example - lists the active stages in the Aggregation job C:\>dsjob -lstages Project1 Aggregation TransformData FormTotals C:\> Listing Links to a Stage dsjob -llinks Example - lists the links connected to the TransformData stage C:\>dsjob -llinks Project1 Aggregation TransformData SalesData RegionData SalesmanData TransformedData RejectedRows C:\> Page 3 of 7 Using the Command Line Interface for DataStage Listing Information about a Job dsjob -jobinfo Example - lists information about the Aggregation job C:\>dsjob -jobinfo Project1 Aggregation Job Status : NOT RUNNING (99) Job Controller : not available Job Start Time : not available Job Wave Number : 0 User Status : not available C:\>dsjob -run Project1 Aggregation C:\>dsjob -jobinfo Project1 Aggregation Job Status : RUNNING (0) Job Controller : not available Job Start Time : Thu May 21 17:53:53 1998 Job Wave Number : 1 User Status : not available C:\> In this example, the job was not running. Then dsjob was used to start the job and the query made again. Job wave number identifies the instance of a job if more than one instance is running at the same time (perhaps with different parameter values). Listing Information about a Stage dsjob -stageinfo Example C:\>dsjob -stageinfo Project1 Aggregation TransformData Stage Type : CTransformerStage In Row Number : 32767 Stage Last Error: C:\> Information reported is the stage type (as in the Repository StageTypes branch), the number of rows processed through its primary input link and the error code of the most recent error to occur in the stage. Listing Information about a Link dsjob -linkinfo Page 4 of 7 Using the Command Line Interface for DataStage Example C:\>dsjob -linkinfo Project1 Aggregation TransformData RejectedRows Link Row Count : 5 Link Last Error : C:\> Information reported is the number of rows processed along this link, and the error code of the most recent error to have occurred on this link. 1.4 Job Parameters Listing Parameter Names dsjob -lparams Example - lists the names of job parameters defined for the Aggregation job. C:\>dsjob -lparams Project1 Aggregation SourceDir SourceFile TargetDir TargetFile RunPriorJobs C:\> Listing Information about a Job Parameter dsjob -paraminfo Example - shows information about the SourceDir job parameter C:\>dsjob -paraminfo Project1 Aggregation SourceDir Type : Pathname (4) Help Text : Fully qualified pathname of directory in which source files reside Prompt : Directory containing source files Prompt At Run : 0 Default Value : C:\DEMOSRC Original Default: C:\DEMOSRC C:\> Page 5 of 7 Using the Command Line Interface for DataStage 1.5 Log Information Adding an Entry to a Log dsjob -log [-info | -warn] Example C:\>dsjob -log Project1 Aggregation Enter message text, terminating with Ctrl-d Hello, World! What a wonderful day today is! (ctrl D) Message read. C:\> Viewing a Log - Summary View dsjob -logsum [-type ] [-max ] where event type is one of INFO, WARNING, FATAL, REJECT, STARTED, RESET or BATCH and n is the maximum number of entries to be displayed Example C:\>dsjob -logsum Project1 Aggregation 0 RESET Thu May 21 16:41:03 1998 Log cleared by user 1 STARTED Thu May 21 16:41:11 1998 Starting Datastage Job Aggregation. 2 INFO Thu May 21 16:41:15 1998 Aggregation.TransformData: DSD.StageRun Active stage starting, tracemode = 0. 3 INFO Thu May 21 16:41:17 1998 Aggregation.FormTotals: DSD.INTOpen Active stage starting, tracemode = 0. 4 INFO Thu May 21 16:42:11 1998 Aggregation.FormTotals: DSD.INTClose Active stage finishing. (...) 5 REJECT Thu May 21 16:42:11 1998 Aggregation.TransformData.RejectedRows: 5 Rows rejected. 6 INFO Thu May 21 16:42:11 1998 Aggregation.TransformData: DSD.StageRun Active stage finishing. (...) 7 STARTED Thu May 21 16:42:32 1998 Finished Datastage Job Aggregation. 8 INFO Thu May 21 17:13:23 1998 Hello, World! (...) C:\> Page 6 of 7 Using the Command Line Interface for DataStage Viewing Detail of a Log Entry dsjob -logdetail Example - viewing event number 4 C:\>dsjob -logdetail Project1 Aggregation 4 Event Id: 4 Time : Thu May 21 16:42:11 1998 Type : INFO Message : Aggregation.FormTotals: DSD.INTClose Active stage finishing. 32762 rows read from TransformedData 3917 rows written to AggregatedData C:\> Viewing Newest Log Entry dsjob -lognewest [] where event type is one of INFO, WARNING, FATAL, REJECT, STARTED, RESET or BATCH Example - shows the ID of the newest entry (of the chosen type) in the log. C:\>dsjob -lognewest Project1 Aggregation Newest id = 8 Page 7 of 7


Comments

Copyright © 2024 UPDOCS Inc.