Page 2 of 2

Re: Issue with concatenation

PostPosted: Wed Nov 21, 2012 1:18 pm
by enrico-sorichetti
did You notice that people replying use the code tags ???

text displayed with the code tags uses a fixed font,
making easier for the people who spend their time helping You to understand Your code

the same with the code tags


text displayed  with the code tags uses a  fixed font, 
making easier for the people who spend their time helping You to understand Your code

Re: Issue with concatenation

PostPosted: Wed Nov 21, 2012 1:21 pm
by BillyBoyo
Also, since you've insisted on copying 80 columns, you are getting lots of spurious blank lines once Code'd. If you use the Code button and the Preview button, you can make everything look its best for those wanting to assist you.

Re: Issue with concatenation

PostPosted: Wed Nov 21, 2012 1:22 pm
by chenky
Ok will follow Enrico,BillyBoyo

Re: Issue with concatenation

PostPosted: Mon Nov 26, 2012 10:32 pm
by Pedro
Repeating:
you need to strip off the trailing blanks.

Re: Issue with concatenation

PostPosted: Mon Nov 26, 2012 10:34 pm
by Pedro
I have made all the changes as mentioned

I do not believe you made all of the changes that were suggested.

Re: Issue with concatenation

PostPosted: Tue Nov 27, 2012 12:22 am
by Pedro
you need to strip off the trailing blanks.

Perhaps I did not give enough explanation for a beginner forum:
  • In your program, you read a file with EXECIO and put the records in the INPI. stem.
  • If the file has LRECL=80, each row of the INPI. stem will have 80 characters.
  • when you do your string concatenation, it will be as if you did something like this:
    queue "//         DD DSN=MY.DSN                    "||"TST"
  • the string concatenation creates a record about 95 characters long.
  • lets say the dataset name is in column 1 and is 30 characters long... there are 50 other characters that need to be removed.
  • If the dataset name is not in column 1, you have to remove leading characters also.
  • The EXECIO for OUTO probably truncates your records at 80 characters and you never see the last few characters.

Re: Issue with concatenation

PostPosted: Tue Nov 27, 2012 9:56 am
by chenky
Thanks alot Pedro ...I am able to generate the required O/P, what you have mentioned in above reply is absolotely right. The record length of the input file is 80 and Output file record length is also 80 ..which made blanks at the end..I have reduced the input file LRECL to 19 which is the exact size of file and I got the O/P ..again thanks for being patient with me.

Re: Issue with concatenation

PostPosted: Tue Nov 27, 2012 9:57 am
by chenky
And thanks to every one for spending time ..

Re: Issue with concatenation

PostPosted: Tue Nov 27, 2012 12:07 pm
by enrico-sorichetti
why not simply use
STRIP(inpi.i," ","T")
to get rid of the trailing blanks,
or even better use
STRIP(SUBSTR(inpi.i,1,71)," ","T)