# Forums migration destoyed some code snippets

**URL:** <https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997>\
**Category:** Feedback & ideas\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [June 22, 2020, 3:36pm UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997 "2020-06-22T15:36:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 22, 2020, 3:36pm UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/1 "2020-06-22T15:36:00Z")

</div>

Hello software AG,

some of the code samples or snippets were destroyed by forums migration.

Here’s an example:

> [@word-wrapping](https://techcommunity.softwareag.com/t/word-wrapping/76564):
>
> Hello all! I wrote a module for word-wrapping. First I thougt about using separate. But I guess this one is smarter. wink Any ideas for improvement? Usage: define data local 1 #a10(a10/1:5) end-define callnat 'wordwrpn' 'xxx xxxxxxxxx xxxx xxxx xxx' #a10(\*) display #a10(\*) end \* Module: wordwrpn \* define data parameter 1 #input-parameter 2 #string (A) DYNAMIC BY VALUE 1 #output-parameter 2 #array (A/1:V) DYNAMIC BY VALUE RESULT /\* no x-array possible here local \* 1 #startlength …

☹

Matthias

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 22, 2020, 3:41pm UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/2 "2020-06-22T15:41:00Z")

</div>

the sample above is topic 76564

If I enter a link, it is resolved immediately…

[https://techcommunity.softwareag.com/t/word-wrapping/[remove-this]76564](https://techcommunity.softwareag.com/t/word-wrapping/%5Bremove-this%5D76564)

---

<div class="post-metadata">

**Author:** ![George\_Cooper](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/george_cooper/32/7831_2.png) [@George\_Cooper](https://techcommunity.softwareag.com/u/George_Cooper)\
**Post date:** [June 23, 2020, 2:33am UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/3 "2020-06-23T02:33:37Z")

</div>

Maybe using the Justify markup before entering code snippets is what is needed. I used the 4 horizontal lines on the right end, just before the settings gear. I had to manually separate your example lines though. Hopefully starting with a fresh piece of code would allow copy and paste into the post and leave individual lines as individual lines.

Let’s see what this looks like when I post it. I’m not getting the preview like normal.

define data local  
1 #a10(a10/1&  
#58;  
5)  
end-define  
callnat ‘wordwrpn’ ‘xxx xxxxxxxxx xxxx xxxx xxx’ #a10(_)  
display #a10(_)  
end

- Module:  
wordwrpn \*  
define data parameter  
1 #input-parameter  
2 #string (A)  
DYNAMIC BY VALUE  
1 #output-parameter  
2 #array (  
A/1:V)  
DYNAMIC BY VALUE RESULT /…

---

<div class="post-metadata">

**Author:** ![George\_Cooper](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/george_cooper/32/7831_2.png) [@George\_Cooper](https://techcommunity.softwareag.com/u/George_Cooper)\
**Post date:** [June 23, 2020, 3:16am UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/4 "2020-06-23T03:16:33Z")

</div>

Well, that looks better, but doesn’t look great.

I found your original post, finally. It looks fine, with the code showing up in a scrolling text box, left-justified and indented. I’m just not sure which control to use to get the same result.

Maybe the Upload button. It says it will insert images or text files, so maybe it’s a dual-purpose button. But it looks like the code would have to be in a text file, and the file would be uploaded as an attachment.

How did you create this post? Copy and paste out of the Natural editor?

---

<div class="post-metadata">

**Author:** ![borislav.hristov](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/borislav.hristov/32/771_2.png) [@borislav.hristov](https://techcommunity.softwareag.com/u/borislav.hristov)\
**Post date:** [June 23, 2020, 6:55am UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/5 "2020-06-23T06:55:09Z")

</div>

Hi @Matthias1 and @George_Cooper,

When you want to paste a code sample or just a few lines you can use the preformatted text control:  
 ![image](https://global.discourse-cdn.com/techcommunity/original/2X/6/6e8e27b90f373386d949cbfb5e860d5958ed64ec.png)

With it the code you wrote will look like this:

> [@George\_Cooper](#):
>
> ```auto
> define data local
> 1 #a10(a10/1&
> #58;
> 5)
> end-define
> callnat ‘wordwrpn’ ‘xxx xxxxxxxxx xxxx xxxx xxx’ #a10( <em>)
> display #a10(</em> )
> end
> 
> * Module:
> wordwrpn *
> define data parameter
> 1 #input-parameter
> 2 #string (A)
> DYNAMIC BY VALUE
> 1 #output-parameter
> 2 #array (
> A/1:V)
> DYNAMIC BY VALUE RESULT /…
> 
> ```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![toni.petrov](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/toni.petrov/32/23700_2.png) [@toni.petrov](https://techcommunity.softwareag.com/u/toni.petrov)\
**Post date:** [June 23, 2020, 8:09am UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/6 "2020-06-23T08:09:45Z")

</div>

Okay, here’s the first snippet on the old forum:  
 ![image](https://global.discourse-cdn.com/techcommunity/original/2X/1/100165aa5f02f53caacb56e89d1ac6a981ff91b0.png)

Looks like the parenthesis get broken and their unicode symbols are shown instead. Will check how to fix that for existing topics.  
For new topics it works as Borislav suggested - just use the Code icon in the Editor:

```auto
    define data local  
    1 #a10(a10/1:5)  
    end-define  
    callnat 'wordwrpn' 'xxx xxxxxxxxx xxxx xxxx xxx' #a10(*)  
    display #a10(*)  
    end  

```

---

<div class="post-metadata">

**Author:** ![toni.petrov](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/toni.petrov/32/23700_2.png) [@toni.petrov](https://techcommunity.softwareag.com/u/toni.petrov)\
**Post date:** [June 23, 2020, 8:20am UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/7 "2020-06-23T08:20:34Z")

</div>

This seems to happen with very old topics - the word-wrapping topic is from 2008.

Newer topic look fine to me:

- [ESCAPE TOP in Subprogram is a goto to a loop in main program?](https://techcommunity.softwareag.com/t/escape-top-in-subprogram-is-a-goto-to-a-loop-in-main-program/207702)
- [Natural crashes hard while DISPLAY #TAB(\*) with \>6000 Lines](https://techcommunity.softwareag.com/t/natural-crashes-hard-while-display-tab-with-6000-lines/202398)
- [What are the DBIDs my current Natural session is connected to?](https://techcommunity.softwareag.com/t/what-are-the-dbids-my-current-natural-session-is-connected-to/200826)

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 23, 2020, 5:51pm UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/8 "2020-06-23T17:51:04Z")

</div>

> How did you create this post? Copy and paste out of the Natural editor?

I’m quite sure it was out of the Solaris-editor. And that means: plain Text.

---

<div class="post-metadata">

**Author:** ![toni.petrov](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/toni.petrov/32/23700_2.png) [@toni.petrov](https://techcommunity.softwareag.com/u/toni.petrov)\
**Post date:** [June 29, 2020, 4:47pm UTC](https://techcommunity.softwareag.com/t/forums-migration-destoyed-some-code-snippets/227997/9 "2020-06-29T16:47:08Z")

</div>

Hi Matthias, the messed up characters are fixed now. Let me know if it looks okay now or you find other issues.

Thanks  
Toni
