Page 1 of 1

SYMNAME symbol question

PostPosted: Fri Nov 29, 2013 3:31 pm
by javivi
Hi

I have a SYMNAME file with the next records:

FINI,'2013-01-01'     
FFIN,'2013-11-28'     
INIM,'2013-11-01'     
INIS,'2013-11-21' 



I need to to use the symbol INIS in a sort but only the first four positions (the year).
I tried the nest:

64,4,CH,EQ,INIS,1,4,CH


the sort output say SYNTAX ERROR
(63,4,CH,EQ,C'2013-11-21',1,4,CH
                                         $
ICE007A 0 SYNTAX ERROR   


Any idea how I can do that?

Thanks.

Code'd

Re: SYMNAME symbol question

PostPosted: Fri Nov 29, 2013 4:19 pm
by NicC
Your output does not match your input - your input begins 64 and your output (63. There is obviously soemthing wrong with the ( or something else in the the control card before what you show.

Why do you not just define another symname for the 4 digit year? And why not use the code tags?

Re: SYMNAME symbol question

PostPosted: Fri Nov 29, 2013 4:30 pm
by javivi
Sorry for the mistake (copy and paste....) the right value is 63 not 64.

The symname file is generate by another job and i can't change it, I need to use that symname file.

What you mean with CODE TAGS?

Thanks

Re: SYMNAME symbol question

PostPosted: Fri Nov 29, 2013 4:56 pm
by BillyBoyo
If you look at your question. it has been Code'd. If you click on the Quote button, you'll see how. Code'ing preserves formatting.

Unfortunately you can't do what you want. It would be useful to be able to, and I raised it with Kolusu a few months ago.

For your task, if you are unable to get the SYMNAMES-generator changed, I'd put in another small step which reads that SYMNAMES file, picks out the year, generates another name with the year. Creates a new file. You use that new file.

To get the year from INIS (remembering that around December/January you will have a mix of years) I'd use OUTFIL REMOVECC,TRAILER1=, where you can specify literals and also reference data from the final OUTFIL record, which is the INIS that you want the date from.