Need Sugesstions on REXX/ISPF File tailoring service.



IBM's Command List programming language & Restructured Extended Executor

Need Sugesstions on REXX/ISPF File tailoring service.

Postby Viswanathchandru » Mon Jun 18, 2012 8:03 pm

Dear all,

I have a task where i have to extract the list of members in a PDS and write it to a PS and Submit the members sequentially. While submitting this I need to edit a PARM value in all the members. I have an out sketch of how to implement it. But struck at some points. Also, I would need some suggestions on my implementation plan and advice if other way could improve performance.


1. Extract the list of PDS members , Write it to a Temp file ---> I'm planning it with LISTDSI or LMMLIST.
2. Submit with a Change in the PARM -- > Have decided to make it with the ISPF File tailoring services. But here i'm not sure whether i can change a parm value which has got no symbolic value. Please let me know if i'm not clear. Any suggestions or advice would help me a lot. Apologize if i or my thoughts are wrong.


Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Need Sugesstions on REXX/ISPF File tailoring service.

 

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Akatsukami » Mon Jun 18, 2012 8:31 pm

You may be confusing JCL symbols with file-tailoring symbols.

Suppose you have a skeleton, S1, that looks like:
//PATIENCE JOB
//*
//STEPONLY EXEC PGM=FOO,PARM='&BAR'

and your script includes the fragment
bar = "This is a test"
address ispexec "FTOPEN TEMP"
address ispexec "FTINCL S1"
address ispexec "FTCLOSE"

Then your tailored JCL will look like
//PATIENCE JOB
//*
//STEPONLY EXEC PGM=FOO,PARM='This is a test'
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Viswanathchandru » Mon Jun 18, 2012 8:37 pm

Hello Akatsukami,

Thanks for addressing the post. Sorry for not being clear. here you have mentioned like


//STEPONLY EXEC PGM=FOO,PARM='This is a test'
But in my requirement i already have a PARM value there like

//STEPONLY EXEC PGM=FOO,PARM='xxxxx
which i have to replace it by a different PARM say 'yyyyyy' using ISPF File tailoring services. Please let me know if i need to give any more information on this.


Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Pedro » Mon Jun 18, 2012 9:37 pm

Please read Akatsukami example more carefully. He provided three examples. The first is the file tailoring skeleton. The third is an example of result of file tailoring. If that is not what you want, please provide samples of what you want, rather than describing it only.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Akatsukami » Mon Jun 18, 2012 10:54 pm

Viswanathchandru wrote:Hello Akatsukami,

Thanks for addressing the post. Sorry for not being clear. here you have mentioned like


//STEPONLY EXEC PGM=FOO,PARM='This is a test'
But in my requirement i already have a PARM value there like

//STEPONLY EXEC PGM=FOO,PARM='xxxxx
which i have to replace it by a different PARM say 'yyyyyy' using ISPF File tailoring services. Please let me know if i need to give any more information on this.

What is the justification for the immutability of the skeleton?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Viswanathchandru » Tue Jun 19, 2012 1:40 am

Hello akatsukami/pedro, Thanks for addressing the post.


I'm sorry but that is my requirement. I can't edit each JCL manually and change the PARM value as '&XXXX' so that i can pass whatever value i pass before using the ISPEXEC statements. But is there any other way that i can achieve this.? Please advice. Because if i have to edit a JCL manually to insert '&' and then use the tailoring service then submitting it after editing will not be a big work and there fails the requirement. Please suggest.


Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby dick scherrer » Tue Jun 19, 2012 1:55 am

Hello,

In the "library" set up all of the jcl with the same parm value (i.e. 'xxxxxx').

When reading the members for submission, EDIT the value to the needed value for this run and submit. Do NOT change the original member. This way the code does not need to change. You only need to implement a method to take in the run-specific parm(s).

This is a "cheap" way to tailor your jcl . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Akatsukami » Tue Jun 19, 2012 2:02 am

Viswanathchandru wrote:I'm sorry but that is my requirement. I can't edit each JCL manually and change the PARM value as '&XXXX' so that i can pass whatever value i pass before using the ISPEXEC statements.

Ah, so we're really not talking file tailoring at all, but editing a data set (or PDS member...same thing, more or less). I agree with Gospodin Shostakovich; in fact, you can write an edit macro or Rexx script to do all the work for you. Just don't call it "file tailoring".
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Viswanathchandru » Tue Jun 19, 2012 2:18 am

Apologize i'm not calling it as File tailoring service. I'm asking whether this is possible through file tailoring services. In other words i would need out sketch on reading a file and if some string is found that string has to be replaced by a different string. Not sure whether it is possible or not. Still searching. Please advice. Apologize if i or my thoughts are wrong.

Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Need Sugesstions on REXX/ISPF File tailoring service.

Postby Akatsukami » Tue Jun 19, 2012 2:50 am

Viswanathchandru wrote:Apologize i'm not calling it as File tailoring service. I'm asking whether this is possible through file tailoring services. In other words i would need out sketch on reading a file and if some string is found that string has to be replaced by a different string. Not sure whether it is possible or not. Still searching. Please advice. Apologize if i or my thoughts are wrong.

Assume that the PARM in the first (or only) step is to be replaced by whatever the user gives as input:
/* Rexx */                                       
  address isredit "MACRO (ESAN)"                 
  trace o                                         
  address isredit                                 
  "F PARM"                                       
                                                 
  if (rc=4) then exit /*No PARM! */               
                                                 
  "(L1) = CURSOR"                                 
  "(D1) = LINE &L1"                               
  p = pos("PARM",d1)                             
                                                 
  if (substr(d1,p+5,1)="'") then do               
    q = pos("'",d1,p+6)                           
    d1 = substr(d1,1,p+5) || esan || substr(d1,q)
    "LINE &L1 = '&D1'"                           
    "SUB"                                         
    "CAN"                                         
  end                                             
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post