cancel
Showing results for 
Search instead for 
Did you mean: 

Error 50306

Former Member
0 Kudos

Hi Gurus,

I am getting an error while running a script:

This script is for moving a file in a different server from one folder to another(Windows).

30815324RUN-0503061/16/2015 8:55:12 AM|Session JOB_TEST_ARCHIVE|Function exec
30815324RUN-0503061/16/2015 8:55:12 AMFunction <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated with
30815324RUN-0503061/16/2015 8:55:12 AMexit code <1>.
30815324RUN-0503041/16/2015 8:55:12 AM|Session JOB_TEST_ARCHIVE
30815324RUN-0503041/16/2015 8:55:12 AMFunction call <exec ( cmd, move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed, 0 ) > failed, due to error <50306>:
30815324RUN-0503041/16/2015 8:55:12 AM<Function <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated
30815324RUN-0503041/16/2015 8:55:12 AMwith exit code <1>.>.
30815324RUN-0530081/16/2015 8:55:13 AM|Session JOB_TEST_ARCHIVE
30815324RUN-0530081/16/2015 8:55:13 AMINFO: The above error occurs in the context <|Session JOB_TEST_ARCHIVE|exec(...) Function Body|>.
30815324RUN-0503061/16/2015 8:55:13 AM|Session JOB_TEST_ARCHIVE|Function exec
30815324RUN-0503061/16/2015 8:55:13 AMFunction <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated with
30815324RUN-0503061/16/2015 8:55:13 AMexit code <1>.

Please help in the above Error. I have pasted the error Log.

Thanks in Advance,

DJ

Accepted Solutions (1)

Accepted Solutions (1)

akhileshkiran
Contributor
0 Kudos

Hi

Please try to create a .bat file in the server using notepad with your command line. Just try to move a sample flat file once by executing/double click the .bat file. 

As shown in the below script am triggering a move.bat by using script at the end of the DF.

I think this should work for you.

Files moved successfully.

Regards,

Akhileshikiran,

Former Member
0 Kudos

Hi Akhilesh Kiran,

Firstly thanks a lot for giving you time from your buzy schedule.

Actually I tried with the Batch JOB after reading your reply, unfortunately it didn't worked for me. 

Can you please help me with some other example.

Regards,

DJ

akhileshkiran
Contributor
0 Kudos

Hi

May be the problem is with in the script. The problem is with escape characters try using \\\ in front on the directory.

Regards,

Akhleshkiran.

Former Member
0 Kudos

Hi Akhilesh Kiran,

Thanks a lot for your wonderful support proud to have a friend like you.

Thanks & Regards,

DJ

Answers (1)

Answers (1)

mageshwaran_subramanian
Active Contributor
0 Kudos

Check if you have customer*.* files in source folder. If you dont have it ,move cmd will give error.To overcome that use something like exec('cmd','move source target',8). Your syntax is right just add ,8

Former Member
0 Kudos

Hi Magesh,

The file already exist in the Specified path but when tried with your way by putting  8 in the script it made the JOB Successful but the file didn't moved.

Regards,

DJ

mageshwaran_subramanian
Active Contributor
0 Kudos

Can you share your script?.also try giving the complete file path instead of mapped drive path in you script

Former Member
0 Kudos

Hi Magesh,

Thanks for your valuable time:

Below is the script and Z:\ is a Temprorary Drive( As this folder is present in some different server so we are making it as a temprorary drvie)

exec('cmd','move Z:\XYZ\LBX\T*.* Z:\XYZ\CCC\Processed');

print('Moving the files to Archived UnProcessed folder');

Thanks in Advance,

DJ

mageshwaran_subramanian
Active Contributor
0 Kudos

Put a slash (\)after Processed and try.Also check if you job server machine has access to the shared drive

Former Member
0 Kudos

Actually it is working fine when I am trying in trying for the same system Mangesh.

mageshwaran_subramanian
Active Contributor
0 Kudos

Check this Print(exec('cmd','move Z:\XYZ\LBX\T*.* Z:\XYZ\CCC\Processed\',8)); to see the actual error.I think your job server machine do not have access to Z:

Former Member
0 Kudos

I tried to run the same script in CMD it ran fine but it is giving error in BODS level.

mageshwaran_subramanian
Active Contributor
0 Kudos

Are you running the DOS script in the machine where the job server installed?

What is the error message this gives - Print(exec('cmd','move Z:\XYZ\LBX\T*.* Z:\XYZ\CCC\Processed\',8));