Page 1 of 1

Issue in using file path in Routine

Posted: Tue Jan 22, 2013 5:07 am
by dxk9
Hi,

I have a routine which opens a file if it exists else it creates one.

Note: This is only a part of actual routine

Code: Select all

If NOT(Initialized) Then
	* Not initialized. Attempt to open the file.
       Initialized = 1
       Open "EndDateFile" TO StopDateFile Else
	    * Open failed. Create the sequence file.
            EXECUTE "CREATE.FILE EndDateFile"
            Open "EndDateFile" TO StopDateFile Else Ans = -1
       End
    End 
This routine works fine if the file "EndDateFile" is present/created at Account name. But if I define a path in the routine ("/Data/Dev/EndDateFile"), it doesn't work.

I get the error:

Subroutine failed to complete successfully (30107)

Please help me to solve the issue.

Thanks,
dxk9

Posted: Tue Jan 22, 2013 12:44 pm
by ArndW
Does the path "/Data/Dev/" exist as seen from the DataStage server? I note that you are on windows and while the UNIX type paths are legal, I'm not sure on which drive this would be for...

Posted: Tue Jan 22, 2013 2:24 pm
by ray.wurlod
CREATE.FILE can not be used with a pathname. The filename argument to CREATE.FILE ends up being a VOC entry.

If you want to create a pathed hashed file then you need to use the operating system command mkdbfile. Note that this command neither creates nor populates the metadata (dictionary) portion. If you want that to happen you have to organise it yourself.

Posted: Thu Jan 24, 2013 12:22 am
by dxk9
ArndW ,

I am sorry for the confusion, this is a issue with IIS Datastage 8.5 and its installed in unix.

Yes, I am able to view that path via Datastage.

Ray,

I am not able to view your entire reply as I am not a premium member :( Can you please send me again in a format such that non-premium members can view.

Thanks,
dxk9