on 06-20-2016 7:38 AM
Please help me with command fix,
I am trying to create a file after cycle completing in location.
Below is the command using in the script :
print('Attempting to create [$GV_OUTBOUND_DIR][$GV_FILE_NAME]');
print(exec('/bin/sh','-c "touch [$GV_OUTBOUND_DIR]/[$GV_FILE_NAME]"',8));
Variables :
$GV_OUTBOUND_DIR] - added path O:\Project\++Projects\Cube\ETL_Unit_test
[$GV_FILE_NAME] - File name with extension, eg: FILEGEN.txt
Error Message:
25023 | 353486624 | PRINTFN | 6/20/2016 2:37:37 AM | Attempting to create O:\Project\++Projects\Cube\ETL_Unit_testFILEGEN.txt |
25023 | 353486624 | PRINTFN | 6/20/2016 2:37:37 AM | 1: touch: cannot touch `O:Project++ProjectsCubeETL_Unit_test/FILEGEN.txt': No such file or directory |
\ is the escape character in DS scripting.
Replace any \ by \\.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I replaced \ with \\ but I think I am still missing something, it not generating file
print('Attempting to create [$GV_OUTBOUND_DIR][$GV_FILE_NAME]');
print(exec('/bin/sh','-c "touch [$GV_OUTBOUND_DIR]\\[$GV_FILE_NAME]"',8));
[$GV_OUTBOUND_DIR] O:\Project\++Projects\Cube\ETL_Unit_test
[$GV_FILE_NAME] FILEGEN.txt
Error message:
28445 | 3815888672 | PRINTFN | 6/20/2016 8:11:07 AM | O:\Project\++Projects\Cube\ETL_Unit_test |
28445 | 3815888672 | PRINTFN | 6/20/2016 8:11:07 AM | FILEGEN.txt |
28445 | 3815888672 | PRINTFN | 6/20/2016 8:11:07 AM | Attempting to create O:\Project\++Projects\Cube\ETL_Unit_testFILEGEN.txt |
28445 | 3815888672 | PRINTFN | 6/20/2016 8:11:07 AM | 0: |
28445 | 3815888672 | JOB | 6/20/2016 8:11:08 AM | Job <JB_CYCLECOMPLETE> is completed successfully. |
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.