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
 

 

Passing PARM to SYNCTOOL...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Mar 24, 2009 4:59 pm    Post subject: Passing PARM to SYNCTOOL...
Reply with quote

Hi, is it possible to pass a PARM into a SYNCTOOL and use it in the satements. e.g. in the below attempt, i want to make &CC.. a generic pass to SYNCTOOL step and then use this value inside a CNTL to build the record.

Code:

//STEP20 EXEC PGM=SYNCTOOL,COND=(4,LT)             
//SYSPRINT DD SYSOUT=*                           
//TOOLMSG DD SYSOUT=*                             
//DFMSG DD SYSOUT=*                               
//SSMSG DD SYSOUT=*                               
//IN1 DD DSN=P&CC..FILE.KSDS,DISP=SHR 
//T1  DD DSN=&&T1,DISP=(MOD,PASS)                 
//OUT DD DSN=outfile,         
// DISP=(NEW,CATLG,DELETE),                       
// SPACE=(CYL,(10,5),RLSE)
//TOOLIN DD *                                     
  COPY FROM(IN1) TO(T1) USING(CTL1)               
  SELECT FROM(T1) TO(OUT) ON(1,2,CH) ALLDUPS
/*                                         
//CTL1CNTL DD *                             
  INCLUDE COND=(1,2,CH,EQ,C'BC')           
  OUTREC FIELDS=(C'CC ',1,2,X,3,5,X,24,3)   <<<<---- I want &CC.. here
/*                                         
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 5:26 pm    Post subject:
Reply with quote

No.

O.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Mar 24, 2009 7:41 pm    Post subject:
Reply with quote

genesis786,

If you tell more about your "requirement", somebody would be able to offer suggestions. What is that you're trying to achieve here?
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Mar 24, 2009 9:14 pm    Post subject:
Reply with quote

Hi Arun,

in
Code:

//IN1 DD DSN=P&CC..FILE.KSDS,DISP=SHR 

CC is a variable part which keeps on changing. it's like a region code. and Pcc.FILE.KSDS is there for around 50 different regions with unique cc like X1 X2 X2 (two characters).

when i am building the records out of this file, i want to add these two characters to the output record. so that my output looks like:

Code:

X1 DB 3324 CHF
X1 DB 4432 USD
X2 DB 3324 INR
X2 SE 4432 GBP
.
.


but unfortunately, the cc code is not present in the input files anywhere.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Apr 23, 2009 6:54 pm    Post subject:
Reply with quote

icon_smile.gif found another way to achieve the same using SYNCSORT / SYMNAMES with a PROC.

Code:
   
//MYPROC PROC CC=                                         
//COUNT001 EXEC PGM=SYNCSORT,COND=(4,LT)                   
//SYSOUT DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                     
//SORTIN DD DISP=SHR,                                     
// DSN=A&CC..FILE.KSDS                       
//SORTOUT DD DSN=OUTPUT.SAMF,                     
// DISP=(MOD,KEEP,KEEP)                                   
//SYMNAMES DD DISP=SHR,                                    << set up manually separately
// DSN=MY.SYMNAMES.PARMLIB(SYM&CC)                       
//SYSIN DD DSN=MY.GENERAL.DFSORT(SYSIN),DISP=SHR       
// PEND                                                   
//X0 EXEC PGM=IEFBR14                                     
//O1 DD DSN=OUTPUT.SAMF,DISP=(MOD,DELETE,DELETE) 
//X0 EXEC PGM=IEFBR14                     
//O1 DD DSN=OUTPUT.SAMF,         
// DISP=(MOD,KEEP,KEEP),                 
// DCB=(LRECL=70,BLKSIZE=0,RECFM=FB),     
// SPACE=(CYL,(5,5),RLSE)                 
//X1 EXEC MYPROC,CC=X1                   
//X2 EXEC MYPROC,CC=X2                   


Code:
MY.SYMNAMES.PARMLIB(SYMX1) 


contains

Code:

CC,'X1'


Code:
MY.SYMNAMES.PARMLIB(SYMX2) 


contains

Code:

CC,'X2'



Code:
MY.GENERAL.DFSORT(SYSIN)


contains

Code:

  SORT FIELDS=(1,2,CH,A)             
  INCLUDE COND=(1,2,CH,EQ,C'BC')     
  OUTREC FIELDS=(CC,1,2,X,3,5,X,33,3)
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am
No new posts Use of Parm in SORT Ambili S DFSORT/ICETOOL 2 Mon May 09, 2016 9:16 pm


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