0

We are using this line of unix commands inside a Datastage Command Stage. It used to work fine on an older setup but keeps failing on this new server we stood up. Server is Windows but MKS toolkit allows us to run unix commands inside Datastage. We have verified all paths and folder/file permissions but issue persists.

Executed:

cat E:\app_data\EDI\POWERSTEPP\ELIGIBILITY\HCSC_CIRRUSMD\IN\BI_CUSTOM_FIELD_CLIENT_VERT.txt|cut -d',' -f4,5,6,7,8,9,10,11|sort -u >E:\app_data\EDI\POWERSTEPP\ELIGIBILITY\HCSC_CIRRUSMD\IN\FileList.txt
Reply=1

Output from command ====>

-uThe system cannot find the file specified.

Barmar
  • 741,623
  • 53
  • 500
  • 612
irshan syed
  • 89
  • 1
  • 6
  • 2
    Make sure the `-` in `-u` is an ASCII hyphen, not another Unicode character that looks similar. It apparently thinks that option is a filename. – Barmar Jun 21 '23 at 18:31
  • Thanks Barmar, we tried replacing the -u with other options as well, such as -k and it still fails with the same error. It doesnt appear to like any options with the sort, just plain sort works fine. We did make sure its a hyphen. – irshan syed Jun 21 '23 at 20:28
  • Are you sure this is the Unix version of `sort`? It seems like it's a version of sort that doesn't take options. – Barmar Jun 21 '23 at 21:49
  • 1
    We resolved the issue. This sort was provided by IBM as part of MKS toolkit to be able to run unix commands on Windows machines. We found out that the sort.exe was pointing to the SysWow64 version instead, we were able to repoint it and add to environment variables that helped resolve the issue. Thanks to everyone. – irshan syed Jun 22 '23 at 18:14

0 Answers0