Highlighted
Absent Member.
Absent Member.
1291 views

Move String to 01 Structur?

Hi, i have a Little Problem with a String under Visual Cobol 2.3 Update 2 / VS 2012

If will move this:

01 MyDataBlock string.

to this 01 Structur:

01 Mein-Link01.

   05 Benutzer-Name PIC X(30).

   05 Benutzer-PW PIC X(08).

   05 Benutzer-Recht-Tabelle.

      10 Benutzer-Rechte-Tab Occurs 999.

         15 Benutzer-Rechte-KZ PIC X.

   05 Benutzer-Abteilung PIC X(30).

This move will not working correct:

move MyDataBlock To Mein-Link01

What is wrong?

Best Regards

Bernd Riemke

Tags (1)
0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Move String to 01 Structur?

Can you please be more specific? What is the error that you receive?

This move works fine for me if I initialize the string to a value first.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Move String to 01 Structur?

How initialize you the string?

INITIALIZE MyDataBlock

?

More Details: (WPF Mask...)

          set DLL-DBOX1       to new WinwvisHP.WWHP_DBOX1.

          move HinHer            to DLL-DBOX1::MyDataBlock

this is ok...

But in the under program...

....

      method-id Window_Closed.

      procedure division using by value sender as object e as type System.EventArgs.

** Normal Working Storage Fields are in the 01 Structure

          move Mein-Link01  to MyDataBlock.

this move will go down...

Best Regards

Bernd Riemke

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Move String to 01 Structur?

sorry:

     move MyDataBlock to Mein-Link01

this move is not running...

Best Regards

Bernd Riemke

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Move String to 01 Structur?

I don't think you can use initialize on the string unless you first give it a size.

Can you please post the entire program source program so I can see it all in one place? If it is small just attach it to the post.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.