PhillipPetermann607578

Rebuild Prompt - Substitution VARA in ":READ - Command"

Discussion created by PhillipPetermann607578 on Aug 2, 2018
Latest reply on Aug 21, 2018 by Michael_Lowry

hi everyone,

 

I am looking for a solution to the following problem:

"By default, we only assign prompts to workflows. However, if a JOBS is executed individually in development other than in production, the workflow prompt should be executed first so that all required variables are defined.

 

My solution was to use SQLI to find out the parent and the prompt and then use :BEGINREAD... :ENDREAD or :READ and run it in the pre-script. However, I now fail because I have the value "TEST#" (variable name in the prompt) in the variable "&PRPT_VARA_NAME#" via PREP_PROCESS_PROMPTSET.

 

Now, if I ever execute the :READ - command
":READ &PRPT_VARA_NAME#, "Input Text"... "the error message
"Runtime error in object 'SCRI.NEW.CREATE_PRPT', line '00025'. An attempt was made to use a READ statement to set variable '&PRPT_VARA_NAME#' twice within a block READ."

 

Is there a way to pass the resolved variable "&PRPT_VARA_NAME#" to the :READ command so that during execution " : READ &TEST#, "......" "arrives?

 

here is the place of my script problem:

:BEGINREAD "REBUILD Prompt"
:SET &PPP_PARENT# = PREP_PROCESS_PROMPTSET("PRPT.NEW.JOBP")
:PROCESS &PPP_PARENT#
:  SET &LINE# = GET_PROCESS_LINE(&PPP_PARENT#)
:  P "P-LINE  : &LINE#"
:  SET &PRPT_VARA_NAME# = GET_PROCESS_LINE(&PPP_PARENT#,1)
:  SET &PRPT_VARA_DEFAULT# = GET_PROCESS_LINE(&PPP_PARENT#,3)
:  READ &PRPT_VARA_NAME#, "08", "Please enter Value",&PRPT_VARA_DEFAULT#, M
:ENDPROCESS
:CLOSE_PROCESS &PPP_PARENT#
:ENDREAD

 

 

prompts promptset:read prompt set variables variable substitution

Outcomes