drop proc aa
go

create proc aa
as
declare @p1 char(2)
declare @p2 char(2)
declare @p3 char(2)
set @p1="xx"
set @p2="xx"
set @p3="xx"
exec bb @p1,@p2 output,@p3 output
select @p1,@p2,@p3

go

drop proc bb
go

create proc bb
@p1 char(2),
@p2 char(2) output,
@p3 char(2) output
as
set @p1="ok"
set @p2="ok"
set @p3="ok"
select @p1,@p2,@p3

go


SELECT * FROM IN_INTRAHEAD WHERE DOCSTATUSID='AN' 

exec aa