Use SessionRotate to select which of your sessions will be the current session.
SessionRotate may also be entered as SessionRot[ate], SessRot[ate], RotateSess[ion], RotSess[ion], or Rot[ate].
Optional Operands
OPT Values for OPT may be:
+ or F indicating the next session on the session chain.
- or B indicating the previous session on the session chain.
sess specifying a session number or a session ID. A value of 99 or less is considered a session number. A value of greater than 99 is considered a session ID.
The session number represents the location of a session in the session chain. As such, the session number for a given session changes as other sessions are inserted or deleted before it in the session chain. The session number for a given session is displayed in the S= item on the session information line.
The session ID is a numeric value that is assigned to the session when the session is created. Session IDs always have a value of greater than 99. Unlike a session number for a given session, the session ID for the session remains constant during the life of the session.
Default: F.
If OPT is not specified, the next session on the session chain will be displayed.
Pressing Ctrl-Down (the Down cursor key) invokes the following command:
=> SessionRotate F
Pressing Ctrl-Up (the Up cursor key) invokes the following command:
=> SessionRotate B
Sessions are maintained on a chain. Any session may be displayed at any time by use of SessionRotate. Rotation is useful when editing or comparing multiple files or when editing a file in response to a JobList session. You may find it desirable to assign SessionRotate + and SessionRotate - to convenient key combinations. The field S= on the session information line shows two values. The first identifies which session is currently displayed. The second value, after the slash, is the total number of active sessions. For example, S= 1/ 4 indicates that the current session is the first of four sessions.
If the session you rotate to is a FileList or FileEdit session, last referenced file will be set. If the session you rotate to is a JobList session, last referenced POWER job entry or last referenced JES data sets will be set.
Return Codes
OK Successful.
Procedure Notes
When an FileEdit or FileList session is rotated to, the TXM variables are set to the attributes of the file for the session rotated to. On DOS/VSE, when a JobList session is rotated, the PWR variables are set to the attributes of the POWER job entry for the session rotated to. On MVS, when a JobList session is rotated to, the JQE, JCT, and PDB variables are set to the attributes of the JES data sets for the session rotated to. A syntax peculiarity occurs if SessionRotate - is used in a procedure. The space dash ( -) that terminates the command will be taken as a line continuation, usually leading to a command error. The simplest way to avoid the error is to use SessionRotate B.
Examples
Rotate to the next session in the chain:
=> rot
Rotate to the previous session in the chain:
=> rot -
Rotate to the first session:
=> rot 1