View previous topic :: View next topic
|
Author |
Message |
vsrao_2k
New User
Joined: 12 Dec 2005 Posts: 13
|
|
|
|
Hi
Could you please help me in Sort problem.
I want to include single quote in output file. How I can do that?
for example:
My output file should contain: '2007-10-10'
Inthe input file the year value is :
----+----1----+----2----+----3----+----4---
20071121
----+----1----+----2----+----3----+----4---
My sort cord contains the below code:
OUTREC FIELDS=(C''',2:15,4,C'-',7:17,2,C'-',
11:19,2, C''')
IF i put C''', the single quote value is thoughing an error.
Please help me.
Thanks
VS Rao. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Please find attached sort card If you want that job out put should be '2007-11-21'
Code: |
OPTION COPY
OUTREC FIELDS=(1:X'7D',2:1,4,C'-',7:5,2,C'-',10:7,2,12:X'7D') |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
or you could use the following code although I'm a bit confused about the input and output data.
How does 20071121 become '2007-10-10' ?
Gerry
Code: |
OPTION COPY
OUTREC FIELDS=(1:C'''',2:1,4,C'-',7:5,2,C'-',10:7,2,12:C'''') |
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
gcichet,
Quote: |
How does 20071121 become '2007-10-10' ?
|
That should be a typo. |
|
Back to top |
|
|
vsrao_2k
New User
Joined: 12 Dec 2005 Posts: 13
|
|
|
|
Thank you so much for you help.
Now I can able to get the required output.
Thank, Thanks, Thanks. |
|
Back to top |
|
|
|