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

How to use symnames with input as a DSN?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Fri Mar 23, 2012 3:10 pm
Reply with quote

Hi,

i used symnames to pass a parameter in the Sort card.It worked fine if i have a single value.
If i use multiple values in SYMNAMES using a DSN ,

eg.
IF i use the SYMNAMES as

//SYMNAMES DD *
CV,C'11'
CV,C'12'
/*

im getting an error

Code:


*** ERRORS IN SYMNAMES STATEMENTS ***
CV,C'12'                             
*                                     
*** DUPLICATE SYMBOL DEFINITION ***   



Code:


//STEP1 EXEC PGM=SORT       
//SORTIN DD *               
11 RAVI                     
11 RAM                     
11 RAJ                     
12 RADSF                   
13 RASDFD                   
/*                         
//SYMNAMES DD *             
CV,C'11'                   
/*                         
//SYSIN DD *               
 SORT FIELDS=COPY           
 INCLUDE COND=(1,2,CH,EQ,CV)
/*                         
//SORTOUT DD SYSOUT=*       
//SYSOUT  DD SYSOUT=*       



Please help us in achieving this using SYMNAMES.
Thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


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

PostPosted: Fri Mar 23, 2012 3:17 pm
Reply with quote

You'll get an error because your symbols have to be unique. When you use CV and then re-use it, the second one is not unique, so error.

If you tell us what you are actually aiming to achieve, there'll be some ideas.

Well done on using SYMNAMES, by the way.
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Fri Mar 23, 2012 4:26 pm
Reply with quote

Raghuraman,

Guess, you are trying to pull records having 11 or 12

Code:


//SYMNAMES DD *                       
CV,C'11,12'                           
/*                                   
//SYSIN DD *                         
 SORT FIELDS=COPY                     
 INCLUDE COND=(1,2,SS,EQ,CV)


Thanks
-3nadh
Back to top
View user's profile Send private message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Fri Mar 23, 2012 5:45 pm
Reply with quote

Thanks 3nadh and Bill.. It worked as expected !
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts force tablespace using LISTDEF input DB2 1
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
Search our Forums:

Back to Top