Read and Copy Symbolic parm statement from PROC to driver JC



IBM's Command List programming language & Restructured Extended Executor

Read and Copy Symbolic parm statement from PROC to driver JC

Postby Farhaan4mf » Thu Apr 10, 2014 9:02 pm

driver JCL

     //DM5D724 EXEC DM5D724   
    //*                     
    //DM5D725K EXEC DM5D725K


Procs Look like this

 //DM5D724 PROC PFXMC='ORDUMC.TODAY',       
    //             PFX1=PCJ.P1,                 
    //             PFX1VS=PCJ.P1VS,             
    //             PFX2='PEN.CJ.PROD.STANDARD',
    //             UNITDSK=PROD,               
    //             UNITGDG=PROD   


I want My Test JCL/Driver JCL in below way

 //DM5D724 EXEC DM5D724                       
    //             PFXMC='ORDUMC.TODAY',         
    //             PFX1=PCJ.P1,                 
    //             PFX1VS=PCJ.P1VS,             
    //             PFX2='PEN.CJ.PROD.STANDARD',
    //             UNITDSK=PROD,                 
    //             UNITGDG=PROD                 
    //*                                         
    //DM5D725K EXEC DM5D725K           


In brief, I am looking a way out to read the PROC's symbolic parm statements (e.x. PFX1, PFX2 etc.) and want those to add in the test/driver JCL itself. Please help to get it done in easy way !!
Farhaan4mf
 
Posts: 29
Joined: Mon May 13, 2013 4:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby enrico-sorichetti » Thu Apr 10, 2014 10:52 pm

see here how to parse an exec statement
http://ibmmainframes.com/about32494.html
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby Farhaan4mf » Fri Apr 11, 2014 8:58 pm

Hi Enrico,

Thanks for sharing the links. But the contends are very complex to as I am just a beginner in REXX. After searching the solution for my requirement, it seems that a EDIT Macro ( using REXX) may serve the purpose. But unfortunately I don't have proper knowledge to Code the macro. Please give a heads up, so that I can extract the Symbolic parms from procs and add/include those in driver jcl. Please
Farhaan4mf
 
Posts: 29
Joined: Mon May 13, 2013 4:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby enrico-sorichetti » Fri Apr 11, 2014 10:24 pm

But the contends are very complex to as I am just a beginner in REXX. After searching the solution for my requirement, it seems that a EDIT Macro ( using REXX) may serve the purpose

if You are a beginner in REXX most probably the task is above Your skill level
After searching the solution for my requirement, it seems that a EDIT Macro ( using REXX) may serve the purpose

the ISPF edit environment is relevant only in the INPUT/OUTPUT stages,

Please give a heads up, so that I can extract the Symbolic parms from procs and add/include those in driver jcl

the snippet I posted just does that ...
extract from a jcl stream everything in the format SOME_KEYWORD=SOME_VALUE

the snippet was tested on my pc, but apart the STREAM/LINEOUT functions used for I/O
everything works also under TSO/REXX
and if YOU/YOUR SUPPORT install the rexx STREAM I/O function package everything will work ASIS
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby dick scherrer » Sat Apr 12, 2014 12:02 am

Hello,

Please give a heads up, so that I can extract the Symbolic parms from procs and add/include those in driver jcl. Please
While you can ask what you believe is s simple queston, the answer might not be so simple. . . .

Not everything can be done quickly - especially by one with little/no experience.

Hopefully, there is someone in hyour organization who is familiar/fluent with REXX who can be a mentor/trainer.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby Pedro » Sat Apr 12, 2014 1:20 am

  • so that I can extract the Symbolic parms from procs and
  • add/include those in driver jcl.


You will need two different rexx programs, for the items above. I suggest they communicate through the shared pool.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Read and Copy Symbolic parm statement from PROC to drive

Postby Farhaan4mf » Sun Apr 13, 2014 9:00 pm

Hi Pedro,

You mean
1. First REXX will read the Drivev JCL lib for a selected/supplied job and will build the jobcard with necessary JOBLIB's, JCLLIB/PROCLIB's and EXEC statements to identify the PROC name. and then it will call the second REXX
2. Second REXX will read the the PROCLIB based on the proc name as found in first REXX, then extract the SYMBOLIC PARM statements and include those in the JCL created by the first REXX.

To do the job for point #1, I have a CLIST program that calls a REXX program, but unfortunately this REXX program reads the proc lib and expands it. I have the REXX code for this but, unfortunately as I am new, I am not able identify how to modify this existing REXX program so that it only perform my requirement. I am digging in. Lets see if I can get a breakthrough ...
Farhaan4mf
 
Posts: 29
Joined: Mon May 13, 2013 4:53 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post