Create Alias In Rexx
155 pts.
0
Q:
Create Alias In Rexx
I am trying to execute the sql create alias in a rexx source however it fails with sql error 901, have tried command manually & works fine
ASKED: Dec 12 2008  4:27 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
155 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Hi,

Can you post the relevant source, so we can take a look at what you're trying to do?

Regards,

Martin Gilbert.

Here is the source code I am running

parse arg Libd Liba File Member
address EXECSQL

execsql "rollback"
execsql "set transaction isolation level none"
execsql "SET OPTION NAMING = *SYS"

crtal = "Create Alias " Liba||"/"||Member
crtal = crtal "FOR " Libd||"/"||File" (" Member ")"

execsql crtal
Last Answered: Dec 15 2008  4:23 PM GMT by Markpg   155 pts.
Latest Contributors: Gilly400   23625 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Gilly400   23625 pts.  |   Dec 15 2008  5:07PM GMT

Hi,

Try inserting the following line just before your “execsql crtal” :-

‘SNDUSRMSG MSG(&crtal)’

Check if you see the values you’re expecting to have in your SQL command.

Regards,

Martin Gilbert.

 

Markpg   155 pts.  |   Dec 16 2008  2:11PM GMT

I did this and the command was as follows

Create Alias TCTRNS/HM0153001 FOR PCPSRVDTA/TCTRNS ( HM0153001 )

I ran this under strsql and it worked fine owever in rex it fails

 

Gilly400   23625 pts.  |   Dec 16 2008  3:28PM GMT

Hi,

Are you sure the parameters are correct? Liba (where you want to create your alias) seems to be the same as your file name (TCTRNS)?

Regards,

Martin Gilbert.

 

Markpg   155 pts.  |   Dec 17 2008  9:13AM GMT

Hi,

yes the parameters are correct, grnated it looks a bit weird :-), I find it strange that it works if run manually ! I ven tried doing the same thing in sqplrpgle and it complained about the : used to pass in parameters sating it was invalid ad pgm wouldnt compile. I wonder if it is a command that doesnt like parameters like that !!

 
0