View previous topic :: View next topic |
Author |
Message |
mitvvce Beginner
Joined: 04 Jan 2007 Posts: 2 Topics: 3
|
Posted: Tue Jun 10, 2008 10:58 am Post subject: How to extract only one column's data into an output file |
|
|
Hi,
I am a beginner and i think this is a very basic question..
suppose i have the following input record
aaaaa 11111
bbbbb 22222
Out Put should like
11111
22222
Can anybody help me with the JCL |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jun 10, 2008 11:12 am Post subject: |
|
|
JCL cannot help you with this. I presume this is a DB2 table in that you mention COLUMN in the topic title.
Assume the table is called ATABLE and the columns are called COL1 and COL2:
SELECT COL2
FROM ATABLE; _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
mitvvce Beginner
Joined: 04 Jan 2007 Posts: 2 Topics: 3
|
Posted: Tue Jun 10, 2008 11:23 am Post subject: |
|
|
Thanks for the quick response.
I wanted to use some sort utility in JCL to extract only the second column values from the Input Sequential file. I tried OUTREC and it Worked.. |
|
Back to top |
|
 |
|
|