View previous topic :: View next topic
|
Author |
Message |
inbasekarmani Warnings : 2 New User
Joined: 20 Apr 2007 Posts: 13 Location: chennai
|
|
|
|
hi,
when i execute the following coding.
perform 5 times
display "*"
end-perform.
it displays
*
*
*
*
*
but in output i need like this *****.
i don't want the character to go into newline.how can i achieve this. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What is wrong with this?
perform 1 times
display "*****"
end-perform. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I don't believe what you're wanting can be done. DISPLAY goes to the next line starting at position one unless WITH NO ADVANCING is used. If WITH NO ADVANCING is added to the DISPLAY, a + carriage control character is used instead of space but the DISPLAY still starts at position one each time.
Either use CICS Guy's suggestion, or use a STRING command to build your output characters and then use a single DISPLAY statement. |
|
Back to top |
|
|
inbasekarmani Warnings : 2 New User
Joined: 20 Apr 2007 Posts: 13 Location: chennai
|
|
|
|
hi robert sample,
please tell how to use no advancing with display with an example.i already know the cicsguy coding which i don't want and i should not use string operation.I am thinking what are other ways to achieve this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why You want to make things more complicated than they are??
express/describe logical/rational/business requirement,
i want/I do not want are not enough to have people spend time to answer You
Quote: |
... am thinking what are other ways to achieve this ... |
go ahead and find them, but do not ask us to do it or You
CICS guy suggestion
is simple and effective, what else |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
Quote: |
please tell how to use no advancing with display with an example |
You wont be able to achieve this with no advancing feature.Please go through the following link :WITH NO ADVANCING
As everyone has suggested,please go by the simple approach.
WTF |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
DISPLAY '*' WITH NO ADVANCING |
is the syntax. To reiterate what I said earlier, though, it will not do what you want -- you will get one asterisk in column 2, repeated 4 times with overprint. There will not be any asterisks in columns 3, 4, 5, or 6. |
|
Back to top |
|
|
ramdantu
New User
Joined: 24 Nov 2004 Posts: 3
|
|
|
|
Hi
Yes, as per your code it will display the "*" line by line only because your display statement is get execute one by one for 5 times. ie., each time it takes as one new line.
To avoid this you can use the Row&Column and display it. |
|
Back to top |
|
|
|