Proper assembler housekeeping for an Lterm Autotask used on VTAM Lterms to perform signon and start a user application.
Lterm Autotasks get invoked as the first thing, before a user can execute anything on the Lterm.
Typically clients have such Lterm Autotask programs to do signon #SECSGON and then execute an application that puts out a user application Menu for the user.
The very first thing the Autotask program should do is Clear the Lterm Autotask field to avoid recursive abends if an abend occurs during the autotask processing.
MVI LTEAUTSK,X'00' NULL AUTOTASK
The other end of the Lterm Autotask housekeeping is to have an EXIT 2 (called at signoff time) that stores the autotask name back into the LTEAUTSK field for the next use of the Lterm.