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!
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
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".
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
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
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"
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
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"
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"