View previous topic :: View next topic
|
Author |
Message |
ruchi.jain
New User
Joined: 17 Sep 2007 Posts: 17 Location: Pune
|
|
|
|
Hi,
I have one input file which contains 2 data i.e.
ABDC
ABC
i want in my output file as:
ABCD.LIST
ABC.LIST
please help me in getting this.
I tried using Delimiter by Size/Space but not getting the output as expected.
Appreciate your help.
Thanks, |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Ruchi Jain,
1. you are going from abdc to abcd.list? assume that is a typo.
what do your ws variables look like
and
what is your string statement
and
what output are you getting?
with that info, many here will be able to help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Ruchi Jain and welcome to the forums,
Quote: |
Appreciate your help. |
You need to post the requested info. . . |
|
Back to top |
|
|
ruchi.jain
New User
Joined: 17 Sep 2007 Posts: 17 Location: Pune
|
|
|
|
Dick,
no that is not the typo error.
My input file contains 2 values
ABCD
ABC
i want the output to be:
ABCD.LIST
ABC.LIST
i want to append the '.LIST' word after the value of input file.
I used Delimited by space then i got the output as:
ABCD.LIST
ABC.LIST'
If i use Delimited by size then the output is
ABCD.LIST
ABC .LIST
Can you help me in getting the output mentioned above.
Please specify which function to use. |
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi,
I guess you must be using a variable of length 4 (i.e PIC X(4)).
Thats why when you use Delimited by size you are getting the result as ABC .LIST
You need to use Delimited by space to get the expected result. |
|
Back to top |
|
|
ruchi.jain
New User
Joined: 17 Sep 2007 Posts: 17 Location: Pune
|
|
|
|
Actually the length of the variable which contain the inpur file data is X(04) but there are some value with x(03).
So can you let me know the logic so that i can use that length x(04) for both but after my program runs it will give the output as:
for x(04) ---> ABCD.LIST
for x(03) ----> ABC.LIST |
|
Back to top |
|
|
ruchi.jain
New User
Joined: 17 Sep 2007 Posts: 17 Location: Pune
|
|
|
|
I want the output as
ABCD.LIST
ABC.LIST
not like ABC .LISt or ABC.LIST' |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
ruchi.jain wrote: |
no that is not the typo error. |
I do not agree here, please check the posted inputs in your posts, they differ.
Again, from your last post
I understand you don't need "t" but why would you say so..when you are trying to "append" a capital "T"..
And in this
what's your point - you don't want apostrophe to appear in the output..why would it come when only "LIST" is appended..
Should I assume this
is expected ouput when input is
& first record is ABCD & not ABDC as posted in your very first post.
If above is not true, Please post back the input & expected output, please use BBCode while posting them. |
|
Back to top |
|
|
ruchi.jain
New User
Joined: 17 Sep 2007 Posts: 17 Location: Pune
|
|
|
|
I aplogies for the mistakes. Yes whatever you understand is correct.
I want the output as
ABCD.LIST
ABC.LIST
where as the input is:
ABCD
ABC
Thanks, |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
show us your working storage definitions
show us your code
cut and paste to a bbcode (Code) block.
if you don't understand bbcode, here is the link:
ibmmainframes.com/faq.php?mode=bbcode
and use the preview button, to double check your post.
there are 7 or 8 posts in this thread, and we still don't know what your problem is. |
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
As I wrote earlier, the problem should be that the user has declared a variable of length 4 (say W-X PIC X(4)).
The values from input file is being moved to this variable and String function is used to append .LIST
String
W-X delimited by size
'.LIST'
into W-OUTPUT.
Because of this code the output is ABCD.LIST and ABC .LIST
Instead of the above code you should use
String
W-X delimited by space
'.LIST'
into W-OUTPUT.
Hope this helps. |
|
Back to top |
|
|
|