Error
Moderators: chulett, rschirm, roy
Error
Hi
I'm getting the following error while running the job.
DataStage Job 1277 Phantom 3097
Program "DSU.GetNextElemSequence": Line 22, Improper data type.
Attempting to Cleanup after ABORT raised in stage COM_SERV_TEST..Transformer_22
DataStage Phantom Aborting with @ABORT.CODE = 3
Regards
JK
I'm getting the following error while running the job.
DataStage Job 1277 Phantom 3097
Program "DSU.GetNextElemSequence": Line 22, Improper data type.
Attempting to Cleanup after ABORT raised in stage COM_SERV_TEST..Transformer_22
DataStage Phantom Aborting with @ABORT.CODE = 3
Regards
JK
-
- Premium Member
- Posts: 252
- Joined: Mon Sep 19, 2005 10:28 pm
- Location: Melbourne, Australia
- Contact:
You have an error in a Server Routine called GetNextElemSequence().
Go to Routines in the Navigator pane of Developer, and look for this routine. Look in the vicinity of Line 22 - this is where the error is occurring.
I think I've had this error before trying to do a hash file lookup with a NULL key. Your error may not be the same, but consider whether a NULL or other inappropriate value could be passed in to that line of the routine.
Go to Routines in the Navigator pane of Developer, and look for this routine. Look in the vicinity of Line 22 - this is where the error is occurring.
I think I've had this error before trying to do a hash file lookup with a NULL key. Your error may not be the same, but consider whether a NULL or other inappropriate value could be passed in to that line of the routine.
Ross Leishman
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ray
I'm using this following routine to create a hash file in my hash_dir, but when in delete the hash from hash_dir and try creating hash_file with the same name i get the folloing error.
DataStage Job 1277 Phantom 13649
Program "DSU.GetNextElemSequence": Line 22, Improper data type.
Attempting to Cleanup after ABORT raised in stage COM_SERV_TEST..Transformer_22
DataStage Phantom Aborting with @ABORT.CODE = 3
Routine as follows.
$INCLUDE UNIVERSE.INCLUDE FILENAMES.H
Common /ElemSequencesGem/ Initialized, NextVal, SeqFile
If NOT(Initialized) Then
* Not initialised. Attempt to open the file.
Initialized = 1
OpenPath pHASH_DIR:'/':pFILE_NAME:'_':pBILL_CYCLE TO SeqFile Else
DataPathname = pHASH_DIR : UV.FSEP : pFILE_NAME:'_':pBILL_CYCLE
DictPathname = pHASH_DIR : UV.FSEP : "D_" : pFILE_NAME:'_':pBILL_CYCLE
Command = "CREATE TABLE " : pFILE_NAME:'_':pBILL_CYCLE
Command := " DATA " : DataPathname
Command := " DICT " : DictPathname
Command := " (field1 VARCHAR NOT NULL,"
Command := " PRIMARY KEY (field1));"
Call DSExecute("UV", Command, Output, ExitStatus)
OpenPath pHASH_DIR:'/':pFILE_NAME:'_':pBILL_CYCLE TO SeqFile Else Ans = -1
End
End
* Read the named record from the file.
* This obtains the lock (waiting if necessary).
Readu NextVal From SeqFile, aSequenceName Else
NextVal = 1
End
Ans = NextVal
NextVal = NextVal + 1
* Increment the sequence value, and write back to file.
* This releases the lock.
Write NextVal On SeqFile, aSequenceName Else Ans = -1
Regards
JK
I'm using this following routine to create a hash file in my hash_dir, but when in delete the hash from hash_dir and try creating hash_file with the same name i get the folloing error.
DataStage Job 1277 Phantom 13649
Program "DSU.GetNextElemSequence": Line 22, Improper data type.
Attempting to Cleanup after ABORT raised in stage COM_SERV_TEST..Transformer_22
DataStage Phantom Aborting with @ABORT.CODE = 3
Routine as follows.
$INCLUDE UNIVERSE.INCLUDE FILENAMES.H
Common /ElemSequencesGem/ Initialized, NextVal, SeqFile
If NOT(Initialized) Then
* Not initialised. Attempt to open the file.
Initialized = 1
OpenPath pHASH_DIR:'/':pFILE_NAME:'_':pBILL_CYCLE TO SeqFile Else
DataPathname = pHASH_DIR : UV.FSEP : pFILE_NAME:'_':pBILL_CYCLE
DictPathname = pHASH_DIR : UV.FSEP : "D_" : pFILE_NAME:'_':pBILL_CYCLE
Command = "CREATE TABLE " : pFILE_NAME:'_':pBILL_CYCLE
Command := " DATA " : DataPathname
Command := " DICT " : DictPathname
Command := " (field1 VARCHAR NOT NULL,"
Command := " PRIMARY KEY (field1));"
Call DSExecute("UV", Command, Output, ExitStatus)
OpenPath pHASH_DIR:'/':pFILE_NAME:'_':pBILL_CYCLE TO SeqFile Else Ans = -1
End
End
* Read the named record from the file.
* This obtains the lock (waiting if necessary).
Readu NextVal From SeqFile, aSequenceName Else
NextVal = 1
End
Ans = NextVal
NextVal = NextVal + 1
* Increment the sequence value, and write back to file.
* This releases the lock.
Write NextVal On SeqFile, aSequenceName Else Ans = -1
Regards
JK
You've got the do the deleting in a complimentary manner to how the creation was done. When you create it with CREATE.FILE you can delete it with DELETE.FILE - however, when it's a 'CREATE TABLE' statement, you need to use a 'DROP TABLE' to delete it.
All without deleting anything at the O/S level first manually, of course.
All without deleting anything at the O/S level first manually, of course.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Craig
When i drop the table from UVSH i get the following message on the screen.
>DROP TABLE CUS_REF_99;
Dropping Table CUS_REF_99
rm: directory /usr/users/khartij/datastage/hash/CUS_REF_99 not removed. Permission denied
Could not delete file CUS_REF_99. continuing ...
rm: /usr/users/khartij/datastage/hash/D_CUS_REF_99 not removed. Permission denied
Could not delete file /usr/users/khartij/datastage/hash/D_CUS_REF_99. continuing ...
Many Thanks
JK
When i drop the table from UVSH i get the following message on the screen.
>DROP TABLE CUS_REF_99;
Dropping Table CUS_REF_99
rm: directory /usr/users/khartij/datastage/hash/CUS_REF_99 not removed. Permission denied
Could not delete file CUS_REF_99. continuing ...
rm: /usr/users/khartij/datastage/hash/D_CUS_REF_99 not removed. Permission denied
Could not delete file /usr/users/khartij/datastage/hash/D_CUS_REF_99. continuing ...
Many Thanks
JK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The original problem seems to relate to the SeqFile variable in the ReadU statement. (Unrelated question: why use this name for a hashed file? It only confuses future developers.) For some reason there is a path through your code where SeqFile does not get a value (or Initialized has a non-zero value but the file is not open).
The subsequent questions about CREATE TABLE and DROP TABLE don't really belong in this thread. But "permission denied" is a fairly specific diagnostic message. Either operating system permissions or SQL privileges are preventing you from dropping the table.
The subsequent questions about CREATE TABLE and DROP TABLE don't really belong in this thread. But "permission denied" is a fairly specific diagnostic message. Either operating system permissions or SQL privileges are preventing you from dropping the table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.