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 Wiki Answer Submitted: December 15, 2008 4:23 pm by Gilly40023,625 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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 !!
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.
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
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.
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 !!