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
 

 

How to use symnames with input as a DSN?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to use symnames with input as a DSN?
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Mar 23, 2012 3:17 pm    Post subject: Reply to: How to use symnames with input as a DSN?
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    Post subject: Reply to: How to use symnames with input as a DSN?
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    Post subject:
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    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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 37 Tue Dec 06, 2016 8:04 pm


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