Welche Art Prozedur ist hier sinnvoller

See this page for the reasons to define a procedure.

I copied it here to allow retranslation.

Without clear purposeful names on those variables and the procedures, there is no basis to choose either of your two options.