Hi All,
I have to get the list of job names from a particular category and put them into a sequential file.
I have written a routine
$INCLUDE DSINCLUDE JOBCONTROL.H
*---- Start Processing
*---- Fectch Job Parameters
sleep 20
var1 = 'TARGET_RI_FILES\CLAIMS\INST_CLAIM'
strFileName = '/tmp' : "/" :'JobNames_List.dat'
Call DSLogInfo(strFileName, "Job Control")
OpenSeq strFileName To objFileVar
Else
Create objFileVar
Else
ABORT
End
End
open "DS_JOBS" to DsJobs else ABORT
CMD = "SELECT DS_JOBS WITH CATEGORY = ":var1
EXECUTE CMD CAPTURING Output
LOOP
WHILE READNEXT ID DO
READ DsJobsRec FROM DsJobs, ID Then
JobName = DsJobsRec<0>
WriteSeq JobName To objFileVar Then
End
END
REPEAT
CloseSeq objFileVar
ErrorCode = 0 ;* set this to non-zero to stop the stage/jo
The routine has ran succesfully, but when I opened the file, it contains nothing!!
When i replace the code as
JobName = DsJobsRec<3> then I am getting the list of category names. and
JobName = DsJobsRec<5> then I am getting the list of Job Numbers!!
Can you suggest what is the filed number that I have to give to get the filenames
Thanks
Madhu
Getting all jobnames under a particular category
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: