View previous topic :: View next topic
|
Author |
Message |
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
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 |
|
|
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
Thanks 3nadh and Bill.. It worked as expected ! |
|
Back to top |
|
|
|