Problems in source code migrated from LINUX to AIX
Posted: Wed May 16, 2012 7:04 am
Hi,
We have migrated our project from LINUX box to AIX box.
In one of the DS routine we have are performing some operations using unix commands.
This commands works fine in DS routine on LINUX box but it doesn't works on AIX box.
The unix commands works fine if i run it directly from the AIX box.
But it doesnt work when run from DS routine. It doesn't throw any error though.
The command is:
OsType = 'UNIX'
OsCmd = "tr -d '\000\001\002\003\004\005\006\007\010\011\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\177' < ":FILENAME:" > ":NEWFILENAME
OsCmd := '; perl -i~ -pe "s/\x92/':REPLACECHAR:'/g" < ':NEWFILENAME:' > ':FILENAME:';rm ':NEWFILENAME
Call DSLogInfo('Command is : ':OsCmd ,'rtTrimNonPrintableChars')
Call DSLogInfo('Converting file: ':DIR_PATH:'/':FILE_NAME,'rtTrimNonPrintableChars')
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
Kindly advise what can be the issue. I think the OsType needs to be changed but I dont know the value for AIX server.
We have migrated our project from LINUX box to AIX box.
In one of the DS routine we have are performing some operations using unix commands.
This commands works fine in DS routine on LINUX box but it doesn't works on AIX box.
The unix commands works fine if i run it directly from the AIX box.
But it doesnt work when run from DS routine. It doesn't throw any error though.
The command is:
OsType = 'UNIX'
OsCmd = "tr -d '\000\001\002\003\004\005\006\007\010\011\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\177' < ":FILENAME:" > ":NEWFILENAME
OsCmd := '; perl -i~ -pe "s/\x92/':REPLACECHAR:'/g" < ':NEWFILENAME:' > ':FILENAME:';rm ':NEWFILENAME
Call DSLogInfo('Command is : ':OsCmd ,'rtTrimNonPrintableChars')
Call DSLogInfo('Converting file: ':DIR_PATH:'/':FILE_NAME,'rtTrimNonPrintableChars')
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
Kindly advise what can be the issue. I think the OsType needs to be changed but I dont know the value for AIX server.