View previous topic :: View next topic
|
Author |
Message |
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
My requirement is to removie NOTIFY=&SYSUID on all the members in a pds.
In some jobs the NOTIFY parameter is like
//jobanme xxxx,MSGCLASS=A,REGION=99M,
// NOTIFY=&SYSUID
in the above case we can actually delete the line
// NOTIFY=&SYSUID
But then my JOBCARD changes as
//jobanme xxxx,MSGCLASS=A,REGION=99M,
here after REION=99M parameter a comma is there which should also be deleted.
In some other jobs
//jobanme xxxx,MSGCLASS=A,NOTIFY=&SYSUID,REGION=99M
In this case we can use ISREDIT macro by specifying
C All 'NOTIFY=&SYSUID,' ''
Like this there several permutations for different JOBCARDS so ultimately i have to remove NOTIFY=&SYSUID parameter from all them members in a PDS.
My Second requirement is
I have to chnage a value like
SET CNTL=&X to SET CNTL=&P
but the values of X can change like there are several values for X in above example like X can be A,B,C,D or M1 OR M2 .... so irrespective of that X value i need to change it to P |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i would do a find on sysuid,
determine line number - call it sysln
then do a find for '//*' in 1 between lines 1 and sysln
if found:
write a report saying this member too hard
exit and process the next pds member.
if not found:
su** all the lines from 1 to sysin into a stem.
then build a continuous line from the stem contents (omitting col 72-80 and 1 and 2)
remove ',NOTIFY=&SYSUID'
rebuild the lines into the stem
replace the lines 1 thru sysin.
Second requirement is easier.
in a loop (if there can be more than 1 "SET CNTL" in a member)
find 'SET CNTL'
su** the line data into a variable
find the position of SET CNTL (pray that there are no SET CNTL with two or more spaces between SET and CNTL)
replace the SET ... with what you want in your variable
use your variable to replace the line in the member.
by the way 'suc*' is being used to replace s u c k
because some second rate webpage coder decided that
it was a bad fucking word. |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Hi,
Could you please explain below
once i do a find command on SYSUID i will take that line into a SYSLN
then on that line how would i do a find on first two lines?
is there a way to read letter by letter in that line i.e. SYSLN line....??
I didnt understand this part could you please code or guide me to any post where this is done.
Thank you for your reply. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Possibly not a good thought, however, would not just changing "NOTIFY=&SYSUID" to "NOTIFY=" suffice instead of removing it completely? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
will NOTIFY=
generate a JCL error?
as a side note:
at many sites that I have worked at,
(that are not overrun with the uneducated idiots
always whining about performance and disc utilization,
even though they have not bothered to learn
that hardware is cheaper of that and software maintenance)
all JOB and EXEC statement parameters are always one (1) to a line. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
dbzTHEdinosauer wrote: |
will NOTIFY=
generate a JCL error? |
That was the very first thought, however, with z/OS 01.11.00, JES2 - both of this worked, no JCL error. I've not verified with manuals much though:
Code: |
//JOBNAME JOB (@),'SORT',
// CLASS=0,TIME=(,30),NOTIFY=
|
and
Code: |
//JOBNAME JOB (@),'SORT',
// NOTIFY=,CLASS=0,TIME=(,30) |
|
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Anuj Dhawan wrote: |
dbzTHEdinosauer wrote: |
will NOTIFY=
generate a JCL error? |
That was the very first thought, however, with z/OS 01.11.00, JES2 - both of this worked, no JCL error. I've not verified with manuals much though:
Code: |
//JOBNAME JOB (@),'SORT',
// CLASS=0,TIME=(,30),NOTIFY=
|
and
Code: |
//JOBNAME JOB (@),'SORT',
// NOTIFY=,CLASS=0,TIME=(,30) |
|
Anuj Thank you.
But According to the Clients requirement (These changes are maded to the JOB cards during the Production install) The NOTIFY=&SYSUID parameter whole Including NOTIFY= should be removed so i was working the way DBZ suggested.
Your idea works fine if my requirement would have been to dummy &sysuid parameter. But there are some standards that need to be followed when installing in production so that time my job card should not have Notify parameter itself. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
thx for the feedback, Anuj
Southee,
if you were to do a 3.12 of the pds's searching for NOTIFY=
and another for CNTL
you could visualize what your logic would have to be to make the necessary modification. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Do you have any tools that "understand" JCL such as Job/Scan?
If so, they should do what you want quite easily. |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
David Robinson wrote: |
Do you have any tools that "understand" JCL such as Job/Scan?
If so, they should do what you want quite easily. |
We have JJ scan or JJ for knowing the Syntax errors in the JCL. But how would JJ or JJSCAN help my requirement?? |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
I'm not familiar with JJ or JJSCAN, but if it has the same functionality as Job/Scan then you can also use it to change JCL as well as check it.
Because it understands the syntax of JCL statements, it will maintain their integrity when doing changes. So, for example, if you remove a particular statement, and this statement is the last statement, then it knows that the previous statement has to have it's comma removed, even if that is on a previous line. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
You need handle multiple cases. Write an editor macro that:
If comma precedes it, there are other parameters on the same line and you only need to make the change
CHANGE ',NOTIFY=&SYSUID' '' ALL
For the second case with comma following, there are other parameters on the same line and you only need to make the change:
CHANGE 'NOTIFY=&SYSUID,' '' ALL
For the third case, it is guaranteed that there is only one parameter on the line and you need to worry about the continuation:
1. FIND 'NOTIFY=&SYSUID'
2. CHANGE ',' ' ' PREV
3. FIND 'NOTIFY=&SYSUID'
4. DELETE .ZCSR |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
For the second case with comma following, there are other parameters on the same line and you only need to make the change:
CHANGE 'NOTIFY=&SYSUID,' '' ALL |
Maybe that was not the right assumption. You probably also need to handle the case where it is the only parameter on the line, but there are more on the next line. You should delete the line. |
|
Back to top |
|
|
|