Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Replace symbolic variable.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
nirmalya sengupta

New User


Joined: 28 May 2007
Posts: 5
Location: kolkata

PostPosted: Sat Jun 07, 2008 8:17 pm    Post subject: Replace symbolic variable.
Reply with quote

Hi,
I need to write a rexx code which will run on a JCl and expand that with adding the proc in it and also replace the symbolic variable used in the proc. But facing problem. Can someone please help me out.
1. If any symbolic variable is given overwrite from JCL then how can that will be replaced?
2. If a File used in PROC is given overwrite in the JOB.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Sat Jun 07, 2008 8:40 pm    Post subject: Reply to: Replace sylbolic variable.
Reply with quote

are You asking perchance how to rewrite a piece of jes/interpreter/converter ...
what I mean is...
given the jcl statements which executes a procedure with parameters and dd override
build, expanding from the proper procedure library and carrying on all the substitutions, a correct jcl..

something like
from:
Code:
//JOBNAM JOB   ......
//PROCNM PROC
//G      EXEC  PGM=IEFBR14
//DDNAME DD    DISP=(OLD,DELETE,DELETE),DSN=&DATASET
//       PEND
//*
//S1     EXEC  PROCNM,DATASET=SOME.DATASET
//

to:
Code:
//JOBNAM JOB   ......
//*
//S1     EXEC  PGM=IEFBR14
//DDNAME DD    DISP=(OLD,DELETE,DELETE),DSN=SOME.DATASET
//

did I understand right?

do You realize that You have to build a lexical scanner/tokenizer
and a parser/recognizer for a language with the odd syntax/grammar like JCL

parameter substitution will certainly be the last of Your problems

what is the business need for such a task ??
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: Sat Jun 07, 2008 10:53 pm    Post subject:
Reply with quote

Hello,

Quote:
But facing problem.
More than one icon_smile.gif

As Enrico asked - is there some business reason to do this?

One way to get the "output" you want could be to submit the jcl you want expanded putting TYPRUN=SCAN in the job statement. The jes output would have the proc(s) expanded and symbolic parameters resolved.

You would still need to parse that output, but that will be far more realistic than trying to re-write the internal code that is executed when you submit a job. Depending on how the info is to be used, you might not need to do anything to the expanded output. . .
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Sun Jun 08, 2008 10:46 am    Post subject: Reply to: Replace symbolic variable.
Reply with quote

as a partial justification,
they might be trying to build a JCL re-enginering, analysis and cross referencing tool

something like... not endorsing nor advertising icon_biggrin.gif
just the result of a quick and dirty google search with the string "mvs jcl analysis and cross reference"
without evaluation of the content
for cross reference
http://www.dcmsi.com/xrefa2.htm
for re-engineering
http://www.convtek.com/SOLU-MVS-JCL-REENG.html
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us