Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to add a space after each field value in SQL query job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 78
Location: india

PostPosted: Thu Mar 01, 2012 11:45 am    Post subject: How to add a space after each field value in SQL query job
Reply with quote

Hi,

I have to fetch 3 column fields in a SQL and I want to put a space after each value. For ex:

SELECT A.EMPT, B.REC, B.DATE
FROM EMP A, STDC B

If I wish to run the above query in a IKJEFT job (not in SPUFI) and send the data to a file, the records are coming without any space after each value.. Like
INS120203866ACFBSMNS2012-01-21-13.21.35.042100

So I want to put a space in between. Like:
INS120203866 ACFBSMNS 2012-01-21-13.21.35.042100

Thanks
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Mar 01, 2012 11:54 am    Post subject:
Reply with quote

GHU!

how about:

SELECT A.EMPT,' ', B.REC, ' '.B.DATE
FROM EMP A, STDC B
Back to top
View user's profile Send private message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 78
Location: india

PostPosted: Thu Mar 01, 2012 12:02 pm    Post subject: Reply to: How to add a space after each field value in SQL q
Reply with quote

got it ! Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us