Hi ,
Is there any command that i can use in after job subroutine to delete a file if the rows are zero.
I mean for unix there is something like
`cat filename | wc -l ` -eq 0 to delete a file using after job subroutine with DSexecute f the rows are zero
Is there anything similar to this kind in windows?
Thanks in advance
Delete file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do you have parallel (Enterprise Edition) installed? If so you can use UNIX commands on Windows.
Otherwise you can create an after-job subroutine in DataStage BASIC that opens file using OpenSeq, uses the Status statement to determine the file size, closes the file then deletes the same if the size was zero.
Otherwise you can create an after-job subroutine in DataStage BASIC that opens file using OpenSeq, uses the Status statement to determine the file size, closes the file then deletes the same if the size was zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi ray,ray.wurlod wrote:Do you have parallel (Enterprise Edition) installed? If so you can use UNIX commands on Windows.
Otherwise you can create an after-job subroutine in DataStage BASIC that opens file using OpenSeq, ...
we have only server edition and we dont have paallel edition installed.
Thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: