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

Passing PARM to SYNCTOOL...


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2358
Location: Israel

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

No.

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

Moderator


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

PostPosted: Tue Mar 24, 2009 7:41 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
Search our Forums:

Back to Top