Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help in File Tailoring services ( Override Variables)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:04 pm    Post subject: Help in File Tailoring services ( Override Variables)
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Jun 17, 2015 12:34 pm    Post subject: Reply to: Help in File Tailoring services ( Override Variables)
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: 129
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:50 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jun 17, 2015 12:53 pm    Post subject:
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: 129
Location: INDIA

PostPosted: Wed Jun 17, 2015 12:59 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jun 17, 2015 1:11 pm    Post subject:
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: 1715
Location: UK

PostPosted: Wed Jun 17, 2015 1:43 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Wed Jun 17, 2015 2:49 pm    Post subject: Re: Help in File Tailoring services ( Override Variables)
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: 129
Location: INDIA

PostPosted: Wed Jun 17, 2015 3:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us