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: 28
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 Member


Joined: 01 Sep 2015
Posts: 712
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: 2546
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: 28
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 Member


Joined: 01 Sep 2015
Posts: 712
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top