‎2006 Dec 13 9:28 AM
Hi all,
I just want to know Flow of the following code. I want to know which Perform will execute First and which one is 2nd ?
PERFORM process_files.
IF NOT px_par IS INITIAL.
PERFORM schedule_jobs.
ELSEIF NOT px_seq IS INITIAL.
PERFORM file_split.
ENDIF.
-
Perform xxx.
Perform yyy
Perform zzz
If we have different No of performs like Above Inner Perform( Perform zzz) will execute first or Perform xxx will execute?
Thanks
Malli
‎2006 Dec 13 9:34 AM
Hi Krish
Flow goes in sequential manner.
Perform xxx.
Perform yyy
Perform zzz
In this case first sub-routine xxx , next yyy and lastly zzz are executed.
PERFORM process_files.
IF NOT px_par IS INITIAL.
PERFORM schedule_jobs.
ELSEIF NOT px_seq IS INITIAL.
PERFORM file_split.
ENDIF.In this case first process_files then either of schedule_jobs or file_split will be executed.
Kind Regards
Eswar
‎2006 Dec 13 9:34 AM
Hi Krish
Flow goes in sequential manner.
Perform xxx.
Perform yyy
Perform zzz
In this case first sub-routine xxx , next yyy and lastly zzz are executed.
PERFORM process_files.
IF NOT px_par IS INITIAL.
PERFORM schedule_jobs.
ELSEIF NOT px_seq IS INITIAL.
PERFORM file_split.
ENDIF.In this case first process_files then either of schedule_jobs or file_split will be executed.
Kind Regards
Eswar
‎2006 Dec 13 9:35 AM
The performs will be executed in the sequence they are called. The first one to be called will be executed first, the second one next and so on..
‎2006 Dec 13 9:47 AM
Hi,
It's not clear what exactly you want. PLz. try to be more specific.
Anyway, if you refer to IF, that 2 performs are executed accordingly with values of IF conditions.
- Both px_par and px_seq are initial => no perform executed
- px_par = initial AND px_seq not => file_split only
- px_par <> initial AND px_seq = initial => schedule_jobs only
- both px_par and px_seq <> initial => schedule_jobs only