Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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 How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us