IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Variable tso ISR


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Renato Zangerolami

New User


Joined: 06 Dec 2019
Posts: 26
Location: Brazil

PostPosted: Fri Feb 07, 2020 7:30 pm
Reply with quote

I created a variable in 7.3, p (profile). What are the ways that I can use this variable? I tried to call it with ISPF NAME VARIABLE but it didn't work.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 416
Location: Denmark

PostPosted: Fri Feb 07, 2020 8:39 pm
Reply with quote

Assuming REXX: ADDRESS ISPEXEC "VGET varname PROFILE". For details see the 'ISPF Services Guide' manual.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2214
Location: Silicon Valley

PostPosted: Sat Feb 08, 2020 11:58 am
Reply with quote

There are two services:
Code:

Address ISPEXEC
"VPUT  myvar PROFILE"
"VGET  myvar PROFILE"

There is also a VERASE service, but it is not commonly used... most developers just leave the variables lingering forever.

My suggestion is to use VGET first and if you get RC=8 (for variable not found) then you set a default value. If the user changes from the default value, then use VPUT to save the user's setting.
Back to top
View user's profile Send private message
Renato Zangerolami

New User


Joined: 06 Dec 2019
Posts: 26
Location: Brazil

PostPosted: Mon Feb 10, 2020 7:48 pm
Reply with quote

Thanks for the answers.
can the profile option be used only for my user? Can I create a variable where all users can use it?
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 416
Location: Denmark

PostPosted: Mon Feb 10, 2020 11:36 pm
Reply with quote

Not like that. Create a REXX which everyone can execute. There are ways, one I kinda like is:

Rexx with variables, sample name SETVAR:

Return "v1='Kilroy';v2='was';v3='here'"

Rexx using the variables:

Interpret SetVar()
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 2
No new posts Unable to display comp variable COBOL Programming 4
No new posts IWS/TWS build dinamic or variable APp... IBM Tools 0
No new posts Determine what library member is in, ... JCL & VSAM 9
No new posts COBOL - Array result in single variab... COBOL Programming 3
Search our Forums:

Back to Top