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: 75
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: 6966
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: 75
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 SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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