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

Help in File Tailoring services ( Override Variables)


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 154
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:04 pm
Reply with quote

Hi All,

After lot of search on forums and google I am posting this requirement since I could not get it , I remember reseraching spme skeltons in my last organization but its a quite long time I am not in touch .. Please help me out

I have below JCl which have some variables to be override form my rexx thru File Tailoring service , Variables are liek &GRP,&PRFX,&LIBNBS,&FIL,&FILE etc


Code:

//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-' 
//JSTEP&NM EXEC PGM=CHECKCC,                   
//             PARM='PGMA=IDCAMS,ABEND=0001'   
//SYSOUT   DD  SYSOUT=*                         
//SYSPRINT DD  SYSOUT=*                         
//SYSIN    DD  DSN=&LIBNBS(&GRPDF&FIL),DISP=SHR
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-' 
//JSTEP&NM EXEC PGM=CHECKCC,                   
//             PARM='PGMA=IDCAMS,ABEND=0001'   
//&PRFXI   DD  DSN=&GRPRP.CICS.RMS.&PRFX,       
//             DISP=SHR,UNIT=AFF=RMSHISI       
//&PRFXO   DD  DSN=&GRPP.CICS.RMS.&PRFX,       
//             DISP=OLD                         
//SYSOUT   DD  SYSOUT=*                         
//SYSPRINT DD  SYSOUT=*                         
//SYSIN    DD  DSN=&LIBNBS(&GRPCMSA),DISP=SHR   
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-' 
//JSTEP&NM EXEC PGM=CHECKCC,'                                         
//             PARM='PGMA=IDCAMS,ABEND=0001''                         
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//SYSIN    DD  DSN=&LIBNBS(&GRPDX&FIL),DISP=SHR                       
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%-%%-%-%-%-%-%
//JSTEP&NM EXEC PGM=CHECKCC,                                         
//             PARM='PGMA=IDCAMS,ABEND=0001'                         
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//&FILBASE  DD  DSN=&FILE,                                           
//             DISP=OLD                                               
//&FIL1    DD  DSN=&FILEA1,                                           
//             DISP=OLD                                               
//&FIL2    DD  DSN=&FILE2,                                           
//             DISP=OLD                                               
//&FIL3    DD  DSN=&FILEA3                                           
//SYSIN    DD  DSN=&LIBNBS(&GRPBX&FIL),DISP=SHR


Below is the method I am using to override the variables

Code:
O = outtrap('OUT.','*')                                 
 Address ISPEXEC                                         
 "LIBDEF ISPSLIB DATASET ID('nbdhbfy.rmcopy.skellib')"   
 "FTOPEN TEMP"                                           
 "FTINCL MSTRJCL"                                       
 grp = RMS                                               
 prfx = RMSMSA                                           
 FIL  = MSA                                             
 file = RMSMSA                                           
 LIBNBS = NBDHBFY.RMCOPY.PARMLIB                         
 grpr  = rmpp                                           
 "FTCLOSE"                                               
 "VGET ZTEMPN"   


Below is the output I am getting whihc is not desired . It is removing the lines having "&" in the file
Code:

//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-'         
//JSTEP EXEC PGM=CHECKCC,                             
//             PARM='PGMA=IDCAMS,ABEND=0001'           
//SYSOUT   DD  SYSOUT=*                               
//SYSPRINT DD  SYSOUT=*                               
//SYSIN    DD  DSN=(),DISP=SHR                         
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-'         
//JSTEP EXEC PGM=CHECKCC,                             
//             PARM='PGMA=IDCAMS,ABEND=0001'           
//   DD  DSN=CICS.RMS.,                               
//             DISP=SHR,UNIT=AFF=RMSHISI               
//   DD  DSN=CICS.RMS.,                               
//             DISP=OLD                               
//SYSOUT   DD  SYSOUT=*                               
//SYSPRINT DD  SYSOUT=*                               
//SYSIN    DD  DSN=(),DISP=SHR                         
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-'         
//             PARM='PGMA=IDCAMS,ABEND=0001''                         
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//SYSIN    DD  DSN=(),DISP=SHR                                       
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%-%%-%-%-%-%-%
//JSTEP EXEC PGM=CHECKCC,                                             
//             PARM='PGMA=IDCAMS,ABEND=0001'                         
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//  DD  DSN=,                                                         
//             DISP=OLD                                               
//    DD  DSN=,                                                       
//             DISP=OLD                                               
//    DD  DSN=,                                                       
//             DISP=OLD                                               
//    DD  DSN=                                                       
//SYSIN    DD  DSN=(),DISP=SHR                                       
//*%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%%-%-%-%-%-%%-%-%-%-%-%       

Code:


Can you please help me to understand the way how it works and how can I achieve which I am looking for .
'
Many Thanks in Advance !!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Wed Jun 17, 2015 12:34 pm
Reply with quote

You haven't set those to a value. So they get blank. Have you tried setting on to itself so it preserves the content?

However, some documentation checking may reveal a better way to do it.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 154
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:50 pm
Reply with quote

Thanks Bill!!

Do I need to use a different way to set a value for them?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1099
Location: Dublin, Ireland

PostPosted: Wed Jun 17, 2015 12:53 pm
Reply with quote

When I came across this, I changed the JCL skeleton to have double-& and the problem was resolved. e.g.

Code:
//FIL1    DD  DSN=&&FILEA1,                                           
//             DISP=OLD   


I didn't have an & in the label field, however.

Garry
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 154
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:59 pm
Reply with quote

Thanks Garry!!

I tried it just now but it produced the output which is same as input with no change icon_smile.gif
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1099
Location: Dublin, Ireland

PostPosted: Wed Jun 17, 2015 1:11 pm
Reply with quote

Sorry, I misunderstood. I thought you required JCL with &variables remaining after the File Tailoring had completed. Have you tried setting the values within quotes? (e.g. fil1 = 'ABC' and FILEA = 'AFILE' )

Garry
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2448
Location: Hampshire, UK

PostPosted: Wed Jun 17, 2015 1:43 pm
Reply with quote

You have not supplied variables for FIL1 and FIL2 - you simply did FIL. If you want FIL! and FIL2 to change to MSA1 and MSA2 then I suggest you try &FIL.1 and &FIL.2
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1348
Location: Israel

PostPosted: Wed Jun 17, 2015 2:49 pm
Reply with quote

thesumitk wrote:
Below is the method I am using to override the variables

Code:
O = outtrap('OUT.','*')                                 
 Address ISPEXEC                                         
 "LIBDEF ISPSLIB DATASET ID('nbdhbfy.rmcopy.skellib')"   
 "FTOPEN TEMP"                                           
 "FTINCL MSTRJCL"                                       
 grp = RMS                                               
 prfx = RMSMSA                                           
 FIL  = MSA                                             
 file = RMSMSA                                           
 LIBNBS = NBDHBFY.RMCOPY.PARMLIB                         
 grpr  = rmpp                                           
 "FTCLOSE"                                               
 "VGET ZTEMPN"   

You need to initialize the variables BEFORE the FTINCL
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 154
Location: INDIA

PostPosted: Wed Jun 17, 2015 3:13 pm
Reply with quote

Thanks Much Marso .. it worked as you suggested .. Many thanks

Thanks Much to all for your time and help !!
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Record count of RECFM=U tape file DFSORT/ICETOOL 17
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Checking the total counts inside a re... JCL & VSAM 5
No new posts File-aid batch how to repeat a line... Compuware & Other Tools 2
Search our Forums:

Back to Top