Savita, You do not say whether you are running UniVerse or UniData. The following will work for UniVerse:
PROGRAM CallingProgram $OPTIONS PICK Get(Arg.) FirstArg Else FirstArg = "" End Get(Arg.) SecondArg Else SecondArg = "" End Call YourSubroutine(FirstArg, SecondArg) This has the advantage that it will take quoted arguments that contain spaces. This should work for UniData (from memory - I don't have access to a copy here): PROGRAM CallingProgram TCL = @SENTENCE Ix = INDEX(TCL, "CallingProgram",1) ;* skip over RUN and other invocation types TCL = TRIM(TCL[Ix + LEN("CallingProgram")+1, LEN(TCL)]) CONVERT " " TO @FM IN TCL CALL YourSubroutine(TCL<1>,TCL<2>) Brian ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/