Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Edit Members dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
theone1987

New User


Joined: 14 Sep 2009
Posts: 60
Location: Milan

PostPosted: Thu Nov 19, 2009 5:17 pm    Post subject: Edit Members dataset
Reply with quote

hello,
I have a dataset with 40 members inside. Each member has its internal parameters.
Is there a way to change all the parameters inside without having to change one member at a time?
I have to create 7740 members, if I were to change them by hand one by one could never finish!


if I were in the wrong forum, please tell me!

thanks
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 19, 2009 5:22 pm    Post subject:
Reply with quote

DO NOT post the same topic in multiple forums. If you post in the wrong one a moderator will move it.

This topic is probably better suited to the TSO/ISPF forum.

You can use an ISPF edit macro to do the changes for all members of a PDS.

There are examples on the forum, as I have posted at least one.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Thu Nov 19, 2009 9:15 pm    Post subject: Reply to: Edit Members dataset
Reply with quote

rewording the OP ( original post )
if You have 40 members and must create 7740 members,
a simple math will give 193.5 clones for each original... icon_biggrin.gif

You did not describe
the modificationa to be carried on for each member and
the naming scheme for the newly created members
Back to top
View user's profile Send private message
theone1987

New User


Joined: 14 Sep 2009
Posts: 60
Location: Milan

PostPosted: Thu Nov 19, 2009 9:32 pm    Post subject: Re: Reply to: Edit Members dataset
Reply with quote

enrico-sorichetti wrote:
rewording the OP ( original post )
if You have 40 members and must create 7740 members,
a simple math will give 193.5 clones for each original... icon_biggrin.gif


I have the following parameters:
PARM_1 = '_field1_'
PARM_2 = '_field2_'
PARM_3 = '_field3_'
PARM_4 = '_field4_'
PARM_5 = '_field5_'
PARM_6 = '_field6_'
PARM_7 = '_field7_'
PARM_8 = '_field8_'

instead of each field must set a defined value.

is quite clear?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 19, 2009 9:39 pm    Post subject:
Reply with quote

Hello,

Quote:
is quite clear?
Not really. . .

You have not explained anything about the "40" and the "7740". The list of PARMs doesn't provide any info. . .

Keep in mind that your requirement is completely clear to you, but no one else has this requirement. You need to explain clearly what you have and what you want to do with it. Showing sample "input" and the output wanted from that sample input is the usual way. To go along with the input and output data, you need to explain the processing "rules".
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Thu Nov 19, 2009 9:51 pm    Post subject: Reply to: Edit Members dataset
Reply with quote

You quoted something and replied to something else

here is a working sample, modify according to Your needs

here is a working sample of

for the docs and installation see ...
http://ibmmainframes.com/viewtopic.php?t=25947&highlight=

where it says 3/4 use 4/5 ( how many members should be created)
1 for the $APPLY ( DRIVER )
4 FOR THE INNER MACROS

Code:

/* comment  $apply is an edit macro which will aplly the edit macro passed as a
/* comment  parameter to all the member of a pds
/* comment  to use it .... open a new, emty pds member and..
/* comment  type in the command line "$APPLY name_of_the_macro"
/* comment
/* comment  included are 4 samples 
/* comment  $CHANGE.. the name tells
/* comment  $UNPACK.. the name tells
/* comment  $RENUM...
/* comment  $UNNUM...
/* comment


/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* $APPLY                                                            */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"

Parse Source _system _called _commnd .

If Sysvar(SYSISPF) /= "ACTIVE" Then Do
   Say left(_commnd,8)"- Ispf is not active. Command not executed"
   Exit 4
End

call $init_

call $ispex "CONTROL ERRORS RETURN"

if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
   _parms = strip(translate(zparms))
end
else do
   zerrsm = "Invocation ERROR"
   zerrlm = left(_commnd,8)"- Must be invoked as an edit macro"
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end

call getopt_

if _help then do
   call  $ispex "DISPLAY PANEL("zerrhm") "
   exit 1
end

If _parms = ""  Then do
   zerrsm = left(_commnd,8)"- No Parms"
   zerrlm = left(_commnd,8)"- Enter The 'MACRO' to be run ....."
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end

macro = _parms

call $isred "(DATASET) = DATASET"
call $isred "(CURRNT)  = MEMBER"
call $isred("(DATAID)  = DATAID" )

call $isred("DELETE .ZFIRST .ZLAST" )

lmo_rc = $ispex("LMOPEN DATAID("dataid") OPTION(INPUT) ")

count  = 0
member = ""

lmmlist  = "LMMLIST DATAID("dataid") OPTION(LIST) MEMBER(MEMBER) "
do while 0 = $ispex(lmmlist)
   if strip(member) /= strip(currnt) then do
      done = "EDITED"
      edit = "EDIT DATAID("dataid") MEMBER("member") MACRO("macro") "
      if 0 = $ispex(edit) then ,
         done = "SAVED"
      else
         done = "NOT CHANGED"
      count = count + 1
      line  = dataset"("member")"
      call  $isred "LINE_AFTER " Line " = DATALINE (LINE) "
   end
   else ,
      done = "NOT SELECTD"
   line  = left(done,13) dataset"("member")"
   call  $isred "LINE_AFTER .ZLAST = DATALINE (LINE) "
end

lmo_rc = $ispex("LMMLIST DATAID("dataid") OPTION(FREE) " )
lmo_rc = $ispex("LMCLOSE DATAID("dataid") " )

if _endmsg then do
   zedsmsg = left(_commnd,8)"- Done "count
   zedlmsg = left(_commnd,8)"- " || Count || " Members Modified"
   call   $ispex "SETMSG MSG(ISRZ000) "
   exit 1
end

Exit

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$init_:

   ini_0tr  = trace("O")
   _help    = 0
   _endmsg  = 1
   zerralrm = "YES"
   zerrhm   = "ISR2MACR"

   _plis.0   = 2
   _plis.1   = "? H HELP"
   _pset.1   = "_help = 1"

   trace value(ini_0tr)
   return

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
   isp_0tr = trace("O")
   Address ISPEXEC arg(1)
   isp_0rc = rc
   trace value(isp_0tr)
   return isp_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
   isr_0tr = trace("O")
   Address ISREDIT arg(1)
   isr_0rc = rc
   trace value(isr_0tr)
   return isr_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
   tso_0tr = trace("O")
   Address TSO arg(1)
   tso_0rc = rc
   trace value(tso_0tr)
   return tso_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
getopt_:
opt_0tr = trace()
do _l = 1 to _plis.0
   _parm._l = ""
   do _w = 1 to words(_plis._l)
      _p = wordpos(word(_plis._l,_w),_parms)
      if _p /= 0 then do
         if _parm._l = "" then do
            _parm._l = strip(word(_parms,_p))
            if symbol("_pset._l._w") = "VAR" then ,
               interpret _pset._l._w
            else ,
               interpret _pset._l
         end
         _parms = delword(_parms,_p,1)
      end
   end
end
Trace value(opt_0tr)
return

/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* $CHANGE                                                           */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"

Parse Source _system _called _commnd .

If Sysvar(SYSISPF) /= "ACTIVE" Then Do
   Say left(_commnd,8)"- Ispf is not active. Command not executed"
   Exit 4
End

call $init_

call $ispex "CONTROL ERRORS RETURN"

if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
   _parms = strip(translate(zparms))
end
else do
   zerrsm = "Invocation ERROR"
   zerrlm = left(_commnd,8)"- Must be invoked as an edit macro"
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end

call $isred "CHANGE '_field1_' '_new_field1_' ALL"
call $isred "CHANGE '_field2_' '_new_field2_' ALL"
/* ... */
/* ... repeat as many times as You want */
/* ... */
call $isred "CHANGE '_fieldn_' '_new_fieldn_' ALL"
call $isred "END"

Exit

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$init_:
   ini_0tr  = trace("O")
   zerralrm = "YES"
   zerrhm   = "ISR2MACR"
   ini_0rc  = 0
   trace value(ini_0tr)
   return ini_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
   tso_0tr = trace("O")
   Address TSO arg(1)
   tso_0rc = rc
   trace value(tso_0tr)
   return tso_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
   isp_0tr = trace("O")
   Address ISPEXEC arg(1)
   isp_0rc = rc
   trace value(isp_0tr)
   return isp_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
   isr_0tr = trace("O")
   Address ISREDIT arg(1)
   isr_0rc = rc
   trace value(isr_0tr)
   return isr_0rc

/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*  $UNPACK                                                          */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"

Parse Source _system _called _commnd .

If Sysvar(SYSISPF) /= "ACTIVE" Then Do
   Say left(_commnd,8)"- Ispf is not active. Command not executed"
   Exit 4
End

call $init_

call $ispex "CONTROL ERRORS RETURN"

if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
   _parms = strip(translate(zparms))
end
else do
   zerrsm = "Invocation ERROR"
   zerrlm = left(_commnd,8)"- Must be invoked as an edit macro"
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end

call $isred "(PACK) = PACK "
if pack = "ON" then do
   call $isred "PACK OFF"
   call $isred "END"
end
else do
   call $isred "CANCEL"
end

Exit

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$init_:
   ini_0tr  = trace("O")
   zerralrm = "YES"
   zerrhm   = "ISR2MACR"
   ini_0rc  = 0
   trace value(ini_0tr)
   return ini_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
   tso_0tr = trace("O")
   Address TSO arg(1)
   tso_0rc = rc
   trace value(tso_0tr)
   return tso_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
   isp_0tr = trace("O")
   Address ISPEXEC arg(1)
   isp_0rc = rc
   trace value(isp_0tr)
   return isp_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
   isr_0tr = trace("O")
   Address ISREDIT arg(1)
   isr_0rc = rc
   trace value(isr_0tr)
   return isr_0rc
   
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* $RENUM                                                            */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"

Parse Source _system _called _commnd .

If Sysvar(SYSISPF) /= "ACTIVE" Then Do
   Say left(_commnd,8)"- Ispf is not active. Command not executed"
   Exit 4
End

call $init_

call $ispex "CONTROL ERRORS RETURN"

if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
   _parms = strip(translate(zparms))
end
else do
   zerrsm = "Invocation ERROR"
   zerrlm = left(_commnd,8)"- Must be invoked as an edit macro"
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end

call $isred "(NUMB) = NUMBER"
numb = translate(strip(word(numb,2)))
if numb = "OFF" then ,
   call $isred "NUMBER ON"

call $isred "RENUM"
call $isred "END"

Exit

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$init_:
   ini_0tr  = trace("O")
   zerralrm = "YES"
   zerrhm   = "ISR2MACR"
   ini_0rc  = 0
   trace value(ini_0tr)
   return ini_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
   tso_0tr = trace("O")
   Address TSO arg(1)
   tso_0rc = rc
   trace value(tso_0tr)
   return tso_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
   isp_0tr = trace("O")
   Address ISPEXEC arg(1)
   isp_0rc = rc
   trace value(isp_0tr)
   return isp_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
   isr_0tr = trace("O")
   Address ISREDIT arg(1)
   isr_0rc = rc
   trace value(isr_0tr)
   return isr_0rc
   
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* $UNNUM                                                            */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"

Parse Source _system _called _commnd .

If Sysvar(SYSISPF) /= "ACTIVE" Then Do
   Say left(_commnd,8)"- Ispf is not active. Command not executed"
   Exit 4
End

call $init_

call $ispex "CONTROL ERRORS RETURN"

if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
   _parms = strip(translate(zparms))
end
else do
   zerrsm = "Invocation ERROR"
   zerrlm = left(_commnd,8)"- Must be invoked as an edit macro"
   call   $ispex "SETMSG MSG(ISRZ002) "
   Exit 1
end


call $isred "(NUMB) = NUMBER"
numb = translate(strip(word(numb,2)))
if numb = "OFF" then ,
   call $isred "NUMBER ON"

call $isred "RENUM"
call $isred "END"

Exit

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$init_:
   ini_0tr  = trace("O")
   zerralrm = "YES"
   zerrhm   = "ISR2MACR"
   ini_0rc  = 0
   trace value(ini_0tr)
   return ini_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
   tso_0tr = trace("O")
   Address TSO arg(1)
   tso_0rc = rc
   trace value(tso_0tr)
   return tso_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
   isp_0tr = trace("O")
   Address ISPEXEC arg(1)
   isp_0rc = rc
   trace value(isp_0tr)
   return isp_0rc

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
   isr_0tr = trace("O")
   Address ISREDIT arg(1)
   isr_0rc = rc
   trace value(isr_0tr)
   return isr_0rc
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us