How To
Summary
If you edit data sets from an automated tool such as a batch job, you might find that you need to update an edit profile for that tool. You can change an ISPF edit profile without accessing the data set being edited by the tool by either
- adding a step to the automated tool to edit a dummy member with an edit macro to set the profile values, OR
- editing a similar data set from your own user ID and copying the edit profile from your profile data set to the profile data set used by the application.
Objective
Steps
Edit profiles are stored in the ISPPROF data set. Each edit profile is stored in a table called xxxEDIT, where xxx is the application ID. There can be as many edit profiles as is specified in the ISPF configuration table. Each edit profile is identified by the low-level qualifier, lrecl, and recfm of the data set being edited.
Here's how to update an ISPF edit profile when you don't have access to the data set being edited by an automated tool.
From the automated tool
If the data set can only be edited from a particular batch job, you might want to add an edit statement that does nothing but set the edit profile values that you want. Here’s an example of an LMMLIST application run from batch.
The JCL starts the command procedure with a new application ID of BAT.
//SYSTSIN DD *
ISPSTART CMD(%EDALL) NEWAPPL(BAT)
The command procedure EDALL is a REXX exec that loops through all members of a data set and edits each one.
/* rexx exec to edit all members of a library */
TRACE OFF
address ispexec
"CONTROL ERRORS RETURN"
"lminit dataid(datalib) dataset('user1.clist')"
if rc = 0 then
do
'lmopen dataid('datalib')'
if rc = 0 then
do
done = 'no'
mem = ' '
'edit dataid('datalib') member(dummy) macro(setprof)'
/* loop through all members of the library */
do until done = 'yes'
'lmmlist dataid('datalib') option(list) member(mem)'
if rc = 0 then
do
'edit dataid('datalib') member('mem') macro(bated)'
if rc > 8 then /* error occurred */
do
done = 'yes'
end
end
else
do
if rc <= 8 then
say 'list completed'
else
say 'lmmlist failed with rc = ' rc
done = 'yes'
end
end
'lmmlist dataid('datalib') option(free)'
'lmclose dataid('datalib')'
end
else
say 'lmopen failed with rc = ' rc
'lmfree dataid('datalib')'
end
else
do
'setmsg msg(*)'
say 'lminit failed with rc = ' rc
end
The statement
'edit dataid('datalib') member(dummy) macro(setprof)'
edits 'USER1.CLIST(DUMMY)' with edit macro SETPROF. SETPROF sets profile values for a new member called DUMMY and then cancels the edit session, so DUMMY is never saved. However, the profile is saved. Here is an example of what SETPROF could look like:
/* rexx edit macro to set the profile for the application */
address ispexec
trace r
'isredit macro'
'isredit imacro none'
'isredit num off'
'isredit caps off'
'isredit cancel'
SETPROF turns off the initial macro, numbering, and caps. Then, SETPROF cancels the edit session. After the application runs edit with the SETPROF macro, subsequent edits of the same data set use the updated edit profile.
From your userid
If you edit a member of a data set with the same application ID, low-level qualifier, lrecl, and recfm, you can change the edit profile in the ISPPROF data set.
For example, your application, with an application ID of BAT, might edit a data set with a low-level qualifier of SOURCE, which is an FB 80 data set.
- Copy the BATEDIT member from the ISPPROF data set allocated in the application into your own ISPPROF data set
- Start edit with applid BAT. An easy way to start edit with a particular applid is to use Dialog Test.
- Go to option 7.1, Dialog Test Functions.
- Enter ISR@PRIM (or whatever primary option menu you use) in the panel field in the option field. Scroll down, if necessary, and select NEWAPPL and type BAT in the ID field
- Press enter, then select the Edit option.
- Go to option 7.1, Dialog Test Functions.
- Edit a data set that has a low-level qualifier of SOURCE with a recfm of FB and an lrecl of 80.
- Type PROFILE on the command line to see the profile.
- Change the profile by using the appropriate edit primary commands. You do not have to save the member. The profile is saved automatically.
- Exit Dialog Test.
- Copy the BATEDIT member from your ISPPROF data set to the ISPPROF data set allocated by the application.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
29 December 2022
UID
ibm16845946