Search found 10 matches

by sandeepforever007
Thu Jun 12, 2014 3:43 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: How to remove extra spaces from a column
Replies: 2
Views: 2767

How to remove extra spaces from a column

Hi Team, We are using unload utility to unload the data from the tables and sort the extracted data as per the req Found that there is null issue accuring for the 2 columns mentioned Pls find the code used for the same 1. Th code mentioned below is used to extract first name from the name and save i...
by sandeepforever007
Tue Jun 03, 2014 2:53 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: HOW to Copy HEADER from Input file to Destination File
Replies: 1
Views: 1687

HOW to Copy HEADER from Input file to Destination File

Hi Team, We are using SYNCSORT and needs solution for our requirement Input File : 20140601 ABC BCD AAA Comments : First line is header,Followed by Detail Line. OUTPUT file shoud be of the following format 0,20140601,20140603 12:30:00:00 1,ABC 1,BCD 1,AAA 9,00000003 COMMENTS : 1. HEADER should have ...
by sandeepforever007
Thu May 08, 2014 8:25 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Concatenate multiple columns into one columns with comma sep
Replies: 7
Views: 6969

Hi Nic,

We can not go with the suggested solution , Because we are having 11 Indicator variables hence writing combinations is very difficult .

As this req is very much needed for us . Could you pls suggest an appropriate Query for the same .

With Regards
Sandeep
by sandeepforever007
Wed May 07, 2014 4:14 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Concatenate multiple columns into one columns with comma sep
Replies: 7
Views: 6969

HI Nic, I have tried out the way you mentioned. there is a problem with the comma. SELECT col1,col2, '"'|| CASE IND1 WHEN 'Y' THEN 'IND1,' WHEN 'N' THEN '' END CONCAT CASE IND2 WHEN 'Y' THEN 'IND2,' WHEN 'N' THEN '' END ||'"', col4 when IND1 is Y and IND2 is N then i am getting a comma after IND1 wh...
by sandeepforever007
Wed May 07, 2014 9:16 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Concatenate multiple columns into one columns with comma sep
Replies: 7
Views: 6969

Concatenate multiple columns into one columns with comma sep

Hi , We have a table in the following format . EMPNO EMPNAME IND1 IND2 IND3 SALARY 1 x y n y 500 2 y n y n 501 3 z n n y 302 4 p n n n 210 Desired OUTPUT : 1,x,"IND1,IND3",500 2,Y,"IND2",501 3,Z,"IND3",302 4,P,"",210 COnditions : 1. IF IND is Y , then we have to display the column name 2. IF IND is ...
by sandeepforever007
Fri Apr 11, 2014 8:44 am
Forum: DFSORT , ICETOOL & Utilities
Topic: How to remove extra spaces by using sync sort
Replies: 5
Views: 5909

Hi Sir, Extremely sorry for the confusion created by me in my earlier posts . I am having the input file in the following format Pos 1 - 5 EMP_ID POS 6 EMPTY SPACE POS 7-9 LAST NAME POS 10 EMPTY SPACE POS 11-13 FIRST NAME Pls find the input file attached =COLS> ----+----1----+-- ****** *************...
by sandeepforever007
Thu Apr 10, 2014 4:50 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: How to remove extra spaces by using sync sort
Replies: 5
Views: 5909

Hi ,

When we execute the code mentioned we are still getting the spaces between the two commas .

COuld you please guide us
by sandeepforever007
Thu Apr 10, 2014 3:38 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: How to remove extra spaces by using sync sort
Replies: 5
Views: 5909

Hi Williams, Thanks for the fast responce , We are having input file in the following format AAAAA,, BBBBBBB, AAAAA,BBBBBBB,, COuld you please let us know if the code mentioned above will work to my scenerio AAAAA,,BBBBBBB, -- > 3 Columns AAAAA,BBBBBBB,, -- > 3 Columns Let us know if we need to remo...
by sandeepforever007
Thu Apr 10, 2014 3:01 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: How to remove extra spaces by using sync sort
Replies: 5
Views: 5909

How to remove extra spaces by using sync sort

Hi Team, We have a PS File with the following format Login ID Salary ID F12345 A12345 A12345 C12345 D12345 D12345 We are using SYNCSORT in the Job to format the file and we are getting the output in the following fashion INREC FIELDS=(1:1,6, 7:C',', 8:8,6, 14:C',') SORT FILEDS=COPY F12345, , A12345,...
by sandeepforever007
Wed Apr 02, 2014 10:17 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: need Header in this format yyyymmddhhmm,im using SYNCSORT
Replies: 4
Views: 3478

need Header in this format yyyymmddhhmm,im using SYNCSORT

Hi,
My jcl (using syncsort) sorts some records fetched from the db. I need to add header and trailer to it.
Header should contain datestamp and should be like this
0,YYYYMMDDHHMM

Trailer
Should have the number of records fetched.
How can I achieve this
Pls help
Thanks in advance