Posted: Wed Oct 08, 2014 2:24 pm Post subject: How to write sort card?
I am working on sort card for the first time, so I need help. I have to unload data from db2 and arrange it in format. I have written unload query but output is not in expected format. now I have to write sort step for that. Please help me in this.
Expected Output should be:
col1(length3) col2(length40)col3(length3)col4(padding char)col5(space) = total length of the file 50
col1(length3) col2(length40) col3(length5)col4(padding) = total length of the file is 51
1 aaaaa 102 byr
2 abdddd 106 byr
3 dssdaaaaa 109 byr
Can you please let me know how to arrange the current output file in expected form?
Thanks in advance _________________ Regards,
Posted: Wed Oct 08, 2014 3:14 pm Post subject: Re: How to write sort card?
You need to use the Code tags when posting something which requires the preservation of spacing. Use the Preview button to see what the post will look like.
It would seem likely that you can get the output you want from the Unload. Can you show the control cards you are using for that. and someone may be able to assist.
It is of course possible to reformat the data with SORT. You will need to use BUILD, it looks like you want leading zeros on your first field. It is not clear, due to the formatting problems, what you need for any other reformatting.
002cccccc 0 byr ---> for this the second if condition is not working
003ddddd 0 byr ---> for this the second if condition is not working
but I want zero padding in the 3rd column when MGR_ID is having 0. Can you please suggest me how to do it? _________________ Regards,
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum