Code:
$INCLUDE DSINCLUDE JOBCONTROL.H
handle=DSAttachJob (Arg1,DSJ.ERRFATAL)
if handle <> 0 Then
jobName=DSGetJobInfo(handle,DSJ.JOBNAME)
jobStatus=DSGetJobInfo(handle,DSJ.JOBSTATUS)
JOBTYPE = TRANS("DS_JOBS", jobName, 6, "X")
JobTypeDesc = FIELD('Server|Sequence|Parallel|Mainframe','|',JOBTYPE,1)
Ans="Job Name is : " : jobName : " and job type is :" : JobTypeDesc
End
Else
Ans="Invalid.. Please enter a valid Job/Sequence name."
End
User has to Pass Proper Jobname to Arg1 to get the Proper Output and test the Routine using Test option