Hi all,
I was hoping somebody would have come accross this very strange behaviour of 'ls -m' command executed from the Execute Command stage and is able to help me.
There is a list of files in DEV environment that I want to retrieve that are meant to be delimited by commas and later handled by a loop. The problem arises when the list of files is produced but no commas are included. This proven by the output that can be seen in Director's log of the job. The following loop does what its meant to and processes 1 file only (had the commas been included it would process them all).
Whats strange is that when the actual command 'ls -m' (parameters replaced by values) is copied from director and executed on Unix, the list of files with commas included is the resulting output.
Whats more strange even, is that this exact same job is run on 2 other environments (SIT and UAT on a different unix box to DEV) and it works like a clock.
I know it would be possible to consider some of the other delimiters to solve this small problem, but it is only the DEV box this is not working on and as mentioned before we have it functioning on the subsequent environments. It is just that it is intriguing and I would not mind knowing what could possibly cause this?
Thanks & Regards,
Novak
ls -m behaving strangely
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Does your command use any quote characters and, if so, of what kind? Can you post the complete command and parameters fields from your Execute Command activity?
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.
Convert The Filed Mark Value in a user variable activity
Code: Select all
Convert(@FM,"",ExecuteCommand.$CommandOutput)
Regards
LakNar
LakNar
Hi,
ls -m /apps/etl/dev/datainput/archive/reference_data/80241_*.dsv
The result from running the above command is as:
/apps/etl/dev/datainput/archive/reference_data/80241_Employee_20090907_164221.dsv
/apps/etl/dev/datainput/archive/reference_data/80241_General_Calendar_20090907_164223.dsv
/apps/etl/dev/datainput/archive/reference_data/80241_Global_Parameter_20090907_164229.dsv
The above is just the small part of all the files that get listed, but as you can see the delimiting comma between them is missing. Small reminder - the exact copy of the job working fine in the subsequent environments.
Thanks,
Novak
It is a no Ray, no quote characters. This is the actual command copied from Director:Can you post the complete command and parameters fields from your Execute Command activity?
ls -m /apps/etl/dev/datainput/archive/reference_data/80241_*.dsv
The answer to involving SysAdmins is no Chullet. Have not gone anywhere yet. Just tried to extensively test this.Have you involved your SysAdmins, the ones responsible for the O/S on those boxes? And please post the complete log entry which shows the command being executed.
The result from running the above command is as:
/apps/etl/dev/datainput/archive/reference_data/80241_Employee_20090907_164221.dsv
/apps/etl/dev/datainput/archive/reference_data/80241_General_Calendar_20090907_164223.dsv
/apps/etl/dev/datainput/archive/reference_data/80241_Global_Parameter_20090907_164229.dsv
The above is just the small part of all the files that get listed, but as you can see the delimiting comma between them is missing. Small reminder - the exact copy of the job working fine in the subsequent environments.
Thanks,
Novak
Guys,
Hopefully, nobody ever gets this same issue because I found it impossible to resolve. Since I posted last, the scenario is completely different with respect to the environments. All of sudden (for the reasons unknown to anybody) the job is working in DEV, but is not working in SIT.
So, instead of fearing this same scenario in future, I changed command from 'ls -m' to 'ls -1' (column listing) and handled the output in a later stage by converting @FM to a comma.
Regards,
Novak
Hopefully, nobody ever gets this same issue because I found it impossible to resolve. Since I posted last, the scenario is completely different with respect to the environments. All of sudden (for the reasons unknown to anybody) the job is working in DEV, but is not working in SIT.
So, instead of fearing this same scenario in future, I changed command from 'ls -m' to 'ls -1' (column listing) and handled the output in a later stage by converting @FM to a comma.
Regards,
Novak