View previous topic :: View next topic
|
Author |
Message |
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi All
Im using a proc which is using symbolic parameter for dataset names.
Is there any possibility that i can expand the name in the o/p while doing
any function such as search.
For example:
i want to find the string/DSN name used in the proc as
BL7314.CTA1.OMAF.KE
The complete symbolic name is :-
&CTAFN..OMAF.&CTAKE
Now the op which im getting is in the symbolic format i.e
&CTAFN..OMAF.&CTAKE
And the desired O/P is
BL7314.CTA1.OMAF.KE
Is it possible to expand the symbolic name and get the o/p without the symbolic
parameters?
I'm doing this for the entire region which has thousands of symbolic name file.
After taking the o/p im changing it manually. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
what is this o/p that you are talking about? |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi,
Quote: |
what is this o/p that you are talking about? |
Now the o/p which im getting is in the symbolic format i.e
&CTAFN..OMAF.&CTAKE
And the desired O/P is
BL7314.CTA1.OMAF.KE |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
o/p of what process? |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
I need to do search.
Is it possible to get the full name not with the symbolic parameter? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
*sigh*
you are not making much sense. if you are seaching for the symbolic, search for the symbolic.
the symbolic parms only becomes BL7314.CTA1.OMAF.KE
when the symbolics are provided values.
you need to search the JOB statements that set the symbolic parms.
the fact that this is a combination of several, makes the search a little more complicated.
answer to:
Quote: |
Is it possible to get the full name not with the symbolic parameter?
|
NO the full name is only generated after substitution, which is done by JES during initialization after a JOB has been submitted. |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
NO the full name is only generated after substitution, which is done by JES during initialization after a JOB has been submitted |
After search i need to do many operation one would be comparision with the files which are not in symbolic format.
One way of doing it is through this
OPTION COPY
INREC FINDREP=(INOUT=(C'&CTAFN',C'BL7314.CTA1',C'&CTAKE ',C'KE'))
Is there any easier way to do? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
The proc may be used in many jobs with a different file DSN in each job how would you know what substitutions to make without knowing what jobs it is used in. |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
The proc may be used in many jobs with a different file DSN in each job how would you know what substitutions to make without knowing what jobs it is used in |
Thats true however in our system we are calling another proc which has the naming convention standard.Initially i thought called proc might expand but i was wrong.
I dont think there is another option apart from changing it through sort? |
|
Back to top |
|
|
cicsknow
New User
Joined: 11 Mar 2009 Posts: 28 Location: India
|
|
|
|
himanshu7,
May I know, from where you want to see output means from JCL, PROC or joblog........
I think, you can find from joblog also of entire dataset name which substitue by JES as said by dbzTHEdinosauer. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You need to use a multi-stage approach
scan the jcl libraries to find out the values assigned to each parm
scan the procedure libraries to fund where the parm is used
run as many cross references as You wish
cannot be done in a single pass |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Yes Enrico,
The approach im using is as follows.
1.Scanning the procs and parms to get the list of Dataset in symbolic format.
2.filtering the dsn with unwanted records.
3.Sorting and removing duplicates.
4.The last step i need to compare the files.The Files which i need to compare it with are not in symbolic format and there are thousands of file.
while doing so i found the DSN name doesnot expand after inclusion of the symbolic parameter.So i tried changing it with FINDREP, however FINDREP is available only with SYNCSORT 1.3.2 and in our shop we have 1.3.1,
The second approach i tried is as below-->
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
SAN JOSE - MAX = 54201, MIN = 203
LOS ANGELES - MAX = 1072, MIN = 203
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC FINDREP=(INOUT=(C'MAX',C'MAXIMUM',C'MIN',C'MINIMUM'))
/* |
But got an error as follows:
Code: |
SYSIN :
OPTION COPY
INREC FINDREP=(INOUT=(C'MAX',C'MAXIMUM',C'MIN',C'MINIMUM'))
*
WER268A INREC STATEMENT : SYNTAX ERROR |
There are 20+ unique symbolic names.
Is there any other approach i can follow?
Please let me know if we can achieve this in any other simpler ways.
Thank you in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
How does Your sample relate to the original request ??
my impression is that You will never make it with a generic fin tool
process the procedure library
with a parser/scanner (You will have to write one) to identify all the tokens of the format
DSN=......<term_char>
where <term_char> can be a <" "> a <","> a <"("> for GDGs
having identified all he dsname ( fixed or variable ) You will need to identify all the symblic parms
same logic as above, something starting with a & and terminated by a .(dot) or a space
You have the list of all the symbolic parms and the:
ddname,stepname,procname where it is defined,
pretty easy to write it in REXX
now the only thing left is to process the JCL libraries
carrying on the relevant substitutions
and You will have a list with...
jobname stepname, procedure invoked,
and You can build for each ddname the final dsname used
the only thing that will not be processed are the nested procs,
but that' a wrong approach anyway |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi enrico-sorichetti,
Thank you for the reply,
I have got the entire list of Symbolic DSN.
I also have the other file with which i need to compare it.This file has complete DSN name without symbolic parameter.
The only thing i need to do is to compare both files and for comparision i need to have the complete name of the DSN of the first file.
Am new to rexx.Do you have sample rexx code?
Or any other approach to accomplish this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Am new to rexx.Do you have sample rexx code?
Or any other approach to accomplish this? |
1) no
2) the approach I described is the one I would follow
so I do not see any need to spend more time devising another one.
if You do not like it just follow any other approach of Your choice |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Thank you For the reply Enrico,
Quote: |
having identified all he dsname ( fixed or variable ) You will need to identify all the symblic parms
same logic as above, something starting with a & and terminated by a .(dot) or a space
You have the list of all the symbolic parms and the:
ddname,stepname,procname where it is defined,
pretty easy to write it in REXX |
Could you please elaborate the above with an example? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Am new to rexx.Do you have sample rexx code?
Or. .
|
Was something in the reply not clear? |
|
Back to top |
|
|
|