View previous topic :: View next topic
|
Author |
Message |
Seppe
New User
Joined: 01 Apr 2009 Posts: 33 Location: Rome - Italy
|
|
|
|
Hi,
i need to unload a table using select into jcl.
What is the instruction to select only the text part from a varchar column?
I want only the text in my ouput file....
Thanks! |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
There is no such instruction; you will have to do it programmatically. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
Hint- look for LOCATE and SUBSTR and combine them . |
|
Back to top |
|
|
Seppe
New User
Joined: 01 Apr 2009 Posts: 33 Location: Rome - Italy
|
|
|
|
I explain...
Select MIO_CAMPO
from MIA_TAB ;
MIO_CAMPO is long 1000 char;
In fileoutput i have:
2 byte with lenght and after MIO_CAMPO.
I want only the value of MIO_CAMPO...
It is possible only with query or i have to take other jcl steps? |
|
Back to top |
|
|
Seppe
New User
Joined: 01 Apr 2009 Posts: 33 Location: Rome - Italy
|
|
|
|
i solved it
CHAR(MIO_CAMPO)
very trivial solution... |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What do you mean by this? What has JCL got to do with it? JCL only tells the operating system which program(s) you want run and the resources required by the program(s). |
|
Back to top |
|
|
Seppe
New User
Joined: 01 Apr 2009 Posts: 33 Location: Rome - Italy
|
|
|
|
nothing...
I have a SELECT in a job and i do outrec sort...
with "char" outerec is not necessary any more. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
first learn to use code tags and second you don't tell the requirements properly or you ain't clear yourself, you are now talking in bits and bytes than simplying your needs.glad whatever you did works for you. |
|
Back to top |
|
|
Seppe
New User
Joined: 01 Apr 2009 Posts: 33 Location: Rome - Italy
|
|
|
|
Sure. Thank's |
|
Back to top |
|
|
|