Michael_Lowry

CREATE_PROCESS returns $PROCESS02 instead of contents of data sequence

Discussion created by Michael_Lowry on Jul 22, 2016
Latest reply on Jul 25, 2016 by Michael_Lowry
I am trying out the CREATE_PROCESS and PUT_PROCESS_LINE scripting statements for the first time, and have run into a roadblock. The data sequences do not return the correct results when accessed, but return some sort of process reference ID instead. Here is the script. It is in the post-process of an SQL job. It parses the results of the SQL query, and builds a new data sequence based on them.
: SET &SQL_RC# = GET_UC_OBJECT_STATUS(, , "RETCODE")= 0
:IF &SQL_RC# = 0
:  P "Query RC: 0"
:  SET &Counter# = 0
:  SET &ProfileList# = PREP_PROCESS_REPORT(, , "REP", "*", "COL=DELIMITER", "DELIMITER=@;

)
:  PROCESS &ProfileList#
:    SET &Counter# = &Counter# + 1
:    SET &Profile# = GET_PROCESS_LINE(&ProfileList#,1)
:    SET &Counter_Fmt# = FORMAT(&Counter#)
:    IF &Profile# <>

"
:      PRINT "Profile #&Counter_Fmt#: &Profile#"
:    ENDIF
:    IF &Counter# = 1
:      SET &ProfileListResults# = CREATE_PROCESS(NEW)
!:      SET &ProfileListResults# = CREATE_PROCESS(DUPLICATE,&ProfileList#)
:    ENDIF
:    IF &Profile# <> ""
:      SET &RC# = PUT_PROCESS_LINE(&ProfileListResults#,&Profile#,";")
:    ENDIF
:  ENDPROCESS
:  CLOSE_PROCESS &ProfileList#
:  ELSE
:    P "Query RC: &SQL_RC#"
:ENDIF
:PUBLISH &ProfileListResults#

When I access this data sequence in the calling object (an EXEC VARA), one result with two columns is returned. Each coliumn contains $PROCESS02.

RESULT EXEC
$PROCESS02
$PROCESS02

If I run the SQL job by itself, the post-process report shows that there were results.
2016-07-22 16:02:15 - U00020408 Query RC: 0
2016-07-22 16:02:15 - U00020408 Profile #1: DEV
2016-07-22 16:02:15 - U00020408 Profile #2: EXP
2016-07-22 16:02:15 - U00020408 Profile #3: ITE
2016-07-22 16:02:15 - U00020408 Profile #4: PROD
I also tried
  • runningCREATE_PROCESSinDUPLICATEmode, duplicating the original data sequence from the report.
  • runningCREATE_PROCESSoutside of any otherPROCESSloop, and passing an array toPUT_PROCESS_LINE.
The first case had the same results. In the second case, the only difference was that the results contained $PROCESS01 instead of $PROCESS02.

Has anyone seen this before? Am I overlooking something?

FWIW, this is AE v11.2.2.

Outcomes