IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Proc which is using symbolic parameter for dataset names


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Apr 16, 2009 2:51 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 16, 2009 4:40 pm
Reply with quote

what is this o/p that you are talking about?
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Apr 16, 2009 4:47 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 16, 2009 5:01 pm
Reply with quote

o/p of what process?
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Apr 16, 2009 5:10 pm
Reply with quote

I need to do search.
Is it possible to get the full name not with the symbolic parameter?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 16, 2009 5:29 pm
Reply with quote

*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
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Apr 16, 2009 5:58 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 16, 2009 6:04 pm
Reply with 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.
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Apr 16, 2009 6:26 pm
Reply with quote

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
View user's profile Send private message
cicsknow

New User


Joined: 11 Mar 2009
Posts: 28
Location: India

PostPosted: Thu Apr 16, 2009 6:49 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 16, 2009 6:49 pm
Reply with quote

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
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Fri Apr 17, 2009 9:33 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 17, 2009 11:22 am
Reply with quote

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
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Fri Apr 17, 2009 12:24 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 17, 2009 12:33 pm
Reply with quote

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
icon_evil.gif
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Fri Apr 17, 2009 5:49 pm
Reply with quote

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? icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Apr 17, 2009 9:06 pm
Reply with quote

Hello,

Quote:
Am new to rexx.Do you have sample rexx code?
Or. .
Quote:
1) no


Was something in the reply not clear?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
Search our Forums:

Back to Top