View previous topic :: View next topic
|
Author |
Message |
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
Hi, I don't know how to add a single quotes -> ' in outpout file.
my src like that ->
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(C'SRCHFOR ',C' '',1,8)
/*
|
I got a syntax errro, could anybody tell me what's the correct sentence?
Thx. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Kennedy,
Code: |
OUTREC FIELDS=(C'SRCHFOR ',C' ''',1,8) |
Note: All are single quotes in the above outrec statement. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Kennedy,
Quote: |
I don't know how to add a single quotes -> ' in outpout file.
|
You need to code two apostrophes to display one apostrophe, e.g. C'''' to get '. |
|
Back to top |
|
|
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
It works. Thank you very much! : P |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Note that you don't need two constants (C) here. You can do the same thing with one:
Code: |
OUTREC FIELDS=(C'SRCHFOR ''',1,8)
|
If you find the double apostrophes for one apostrophe confusing, you can use X'7D' instead.
Code: |
OUTREC FIELDS=(C'SRCHFOR ',X'7D',1,8)
|
|
|
Back to top |
|
|
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
That's cool, Frank. Thx! |
|
Back to top |
|
|
|