Skip to main content

[archive] Testing 'acu to dotnet' with 'dotnet acu'

  • March 25, 2008
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 20 March 2008]

I don't have any experience with microsoft .net, but i want to know if other .net users kan run my acu .net module.

1st I tested the amort sample wich works.

So i took the sample TestNetToCobol.cbl to create a 'TestNetToCobol .net' module.

The next error message display's when compiling with ccbl32 V8 (not with 7.2 !)
(ccbl32 --netdll -Dis -Znd -Vc -Cf testnettocobol.cbl).

CreateProcess failed for C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\AL.EXE /target:lib /v:1.0.0.0 /embed:"testnettocobol.acu",AcuNet /out:"D:\\test\\kop\\testnettocobol.dll" "D:\\test\\kop\\testnettocobol.NETModule" RC = 2Error occured storing the COBOL program into the DLL's manefest

Next made a cobol program (test2.cbl) to test the TestNetToCobol .net (because i have no experience with microsoft .net).
I expected to get back the "hey whats doin", which was not the case.

Perhaps someone can tell me

- what the compile error causes in V8.
- What goes wrong in my test2.cbl sample (V7.2 and V8) or isn't this way of testing possible.

Regards,

Ed



identification division.
program-id. TestNetToCobol.
environment division.
configuration section.
data division.
working-storage section.

linkage section.
77 string-in-out pic x(32) value spaces.
77 int-in-out USAGE IS SIGNED-INT.

procedure division using string-in-out, int-in-out.
main-logic.

move "hey whats doin" to string-in-out.
entry "int-only" using int-in-out.
move 9999 to int-in-out.
exit program.



identification division.
program-id. Test2.
date-written. 20-March-08
environment division.
configuration section.
special-names.

copy "TestNetToCobol_CVM.def".
.
DATA DIVISION.
WORKING-STORAGE SECTION.

77 screen-1-Handle HANDLE OF WINDOW.

77 Key-Status IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 Exit-Pushed VALUE 27.
88 Message-Received VALUE 95.
88 Event-Occurred VALUE 96.
88 Screen-No-Input-Field VALUE 97.
88 Screen-Time-Out VALUE 99.

COPY "d:\\test\\kop\\acucobol.def".
COPY "d:\\test\\kop\\acugui.def".
COPY "d:\\test\\kop\\crtvars.def".

77 MY-NONGUI-HANDLE-1 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.a_cobol_info".

77 MY-NONGUI-HANDLE-2 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.CVM".

77 string-in-out pic x(32) value spaces.
77 int-in-out-1 USAGE IS SIGNED-INT.
77 int-in-out-2 USAGE IS SIGNED-INT.
77 nLLerror USAGE IS UNSIGNED-INT.

screen section.

01 screen-1.
03 label "test" line 01, column 01.
03 push-button, line 36, column 98,
exception-value 27 title "E&xit" cancel-button self-act.

procedure division.
main-logic.
ACCEPT System-Information FROM System-Info.
ACCEPT Terminal-Abilities FROM Terminal-Info.

DISPLAY Standard graphical WINDOW
LINES 38.00, SIZE 125.00,
AUTO-MINIMIZE, COLOR IS 65793,
WITH SYSTEM MENU,
TITLE "Test programma", TITLE-BAR, NO WRAP,
HANDLE IS screen-1-Handle.

display screen-1 UPON screen-1-Handle.

INITIALIZE Key-Status.

PERFORM UNTIL Exit-Pushed
ACCEPT screen-1
ON EXCEPTION PERFORM Acu-Screen1-Evaluate-Func
END-ACCEPT
END-PERFORM.

Acu-Screen1-Exit.
PERFORM ACU-DOT-NET.
DESTROY screen-1-Handle.
exit program.
stop run.

Acu-DOT-NET.
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "a_cobol_info"
EVENT PROCEDURE IS EVENT-PROCEDURE-1
HANDLE IS MY-NONGUI-HANDLE-1. | Returns a handle

INQUIRE MY-NONGUI-HANDLE-1 @a_cobol_info_size IN int-in-out-1. |Returns 0
*
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "CVM"
EVENT PROCEDURE IS EVENT-PROCEDURE-2
HANDLE IS MY-NONGUI-HANDLE-2. | Returns a handle

MODIFY MY-NONGUI-HANDLE-2 "@Initialize" () giving nLLerror. | Returns 1
MOVE 1422 TO int-in-out-1.
MOVE "The hills are Alive " TO string-in-out.

MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main"
(string-in-out, int-in-out-1, null, int-in-out-2) giving nLLerror. | Returns 6.

display message box string-in-out.

DESTROY MY-NONGUI-HANDLE-1.
DESTROY MY-NONGUI-HANDLE-2.

Acu-Screen1-Evaluate-Func.
EVALUATE TRUE
WHEN Event-Occurred
IF Event-Type = Cmd-Close
PERFORM Acu-Screen1-Exit
END-IF
END-EVALUATE
MOVE 1 TO Accept-Control.

EVENT-PROCEDURE-1.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.

EVENT-PROCEDURE-2.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.

3 replies

[Migrated content. Thread originally posted on 20 March 2008]

I don't have any experience with microsoft .net, but i want to know if other .net users kan run my acu .net module.

1st I tested the amort sample wich works.

So i took the sample TestNetToCobol.cbl to create a 'TestNetToCobol .net' module.

The next error message display's when compiling with ccbl32 V8 (not with 7.2 !)
(ccbl32 --netdll -Dis -Znd -Vc -Cf testnettocobol.cbl).

CreateProcess failed for C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\AL.EXE /target:lib /v:1.0.0.0 /embed:"testnettocobol.acu",AcuNet /out:"D:\\test\\kop\\testnettocobol.dll" "D:\\test\\kop\\testnettocobol.NETModule" RC = 2Error occured storing the COBOL program into the DLL's manefest

Next made a cobol program (test2.cbl) to test the TestNetToCobol .net (because i have no experience with microsoft .net).
I expected to get back the "hey whats doin", which was not the case.

Perhaps someone can tell me

- what the compile error causes in V8.
- What goes wrong in my test2.cbl sample (V7.2 and V8) or isn't this way of testing possible.

Regards,

Ed



identification division.
program-id. TestNetToCobol.
environment division.
configuration section.
data division.
working-storage section.

linkage section.
77 string-in-out pic x(32) value spaces.
77 int-in-out USAGE IS SIGNED-INT.

procedure division using string-in-out, int-in-out.
main-logic.

move "hey whats doin" to string-in-out.
entry "int-only" using int-in-out.
move 9999 to int-in-out.
exit program.



identification division.
program-id. Test2.
date-written. 20-March-08
environment division.
configuration section.
special-names.

copy "TestNetToCobol_CVM.def".
.
DATA DIVISION.
WORKING-STORAGE SECTION.

77 screen-1-Handle HANDLE OF WINDOW.

77 Key-Status IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 Exit-Pushed VALUE 27.
88 Message-Received VALUE 95.
88 Event-Occurred VALUE 96.
88 Screen-No-Input-Field VALUE 97.
88 Screen-Time-Out VALUE 99.

COPY "d:\\test\\kop\\acucobol.def".
COPY "d:\\test\\kop\\acugui.def".
COPY "d:\\test\\kop\\crtvars.def".

77 MY-NONGUI-HANDLE-1 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.a_cobol_info".

77 MY-NONGUI-HANDLE-2 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.CVM".

77 string-in-out pic x(32) value spaces.
77 int-in-out-1 USAGE IS SIGNED-INT.
77 int-in-out-2 USAGE IS SIGNED-INT.
77 nLLerror USAGE IS UNSIGNED-INT.

screen section.

01 screen-1.
03 label "test" line 01, column 01.
03 push-button, line 36, column 98,
exception-value 27 title "E&xit" cancel-button self-act.

procedure division.
main-logic.
ACCEPT System-Information FROM System-Info.
ACCEPT Terminal-Abilities FROM Terminal-Info.

DISPLAY Standard graphical WINDOW
LINES 38.00, SIZE 125.00,
AUTO-MINIMIZE, COLOR IS 65793,
WITH SYSTEM MENU,
TITLE "Test programma", TITLE-BAR, NO WRAP,
HANDLE IS screen-1-Handle.

display screen-1 UPON screen-1-Handle.

INITIALIZE Key-Status.

PERFORM UNTIL Exit-Pushed
ACCEPT screen-1
ON EXCEPTION PERFORM Acu-Screen1-Evaluate-Func
END-ACCEPT
END-PERFORM.

Acu-Screen1-Exit.
PERFORM ACU-DOT-NET.
DESTROY screen-1-Handle.
exit program.
stop run.

Acu-DOT-NET.
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "a_cobol_info"
EVENT PROCEDURE IS EVENT-PROCEDURE-1
HANDLE IS MY-NONGUI-HANDLE-1. | Returns a handle

INQUIRE MY-NONGUI-HANDLE-1 @a_cobol_info_size IN int-in-out-1. |Returns 0
*
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "CVM"
EVENT PROCEDURE IS EVENT-PROCEDURE-2
HANDLE IS MY-NONGUI-HANDLE-2. | Returns a handle

MODIFY MY-NONGUI-HANDLE-2 "@Initialize" () giving nLLerror. | Returns 1
MOVE 1422 TO int-in-out-1.
MOVE "The hills are Alive " TO string-in-out.

MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main"
(string-in-out, int-in-out-1, null, int-in-out-2) giving nLLerror. | Returns 6.

display message box string-in-out.

DESTROY MY-NONGUI-HANDLE-1.
DESTROY MY-NONGUI-HANDLE-2.

Acu-Screen1-Evaluate-Func.
EVALUATE TRUE
WHEN Event-Occurred
IF Event-Type = Cmd-Close
PERFORM Acu-Screen1-Exit
END-IF
END-EVALUATE
MOVE 1 TO Accept-Control.

EVENT-PROCEDURE-1.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.

EVENT-PROCEDURE-2.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.
The compiler error you should report to Tech Support.
As for the other, it is an odd test, I would not use dot net to have COBOL to COBOL. At any rate, you do not state what happens when you run it, does it mean that it runs, just that you do not get what you expect?

[Migrated content. Thread originally posted on 20 March 2008]

I don't have any experience with microsoft .net, but i want to know if other .net users kan run my acu .net module.

1st I tested the amort sample wich works.

So i took the sample TestNetToCobol.cbl to create a 'TestNetToCobol .net' module.

The next error message display's when compiling with ccbl32 V8 (not with 7.2 !)
(ccbl32 --netdll -Dis -Znd -Vc -Cf testnettocobol.cbl).

CreateProcess failed for C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\AL.EXE /target:lib /v:1.0.0.0 /embed:"testnettocobol.acu",AcuNet /out:"D:\\test\\kop\\testnettocobol.dll" "D:\\test\\kop\\testnettocobol.NETModule" RC = 2Error occured storing the COBOL program into the DLL's manefest

Next made a cobol program (test2.cbl) to test the TestNetToCobol .net (because i have no experience with microsoft .net).
I expected to get back the "hey whats doin", which was not the case.

Perhaps someone can tell me

- what the compile error causes in V8.
- What goes wrong in my test2.cbl sample (V7.2 and V8) or isn't this way of testing possible.

Regards,

Ed



identification division.
program-id. TestNetToCobol.
environment division.
configuration section.
data division.
working-storage section.

linkage section.
77 string-in-out pic x(32) value spaces.
77 int-in-out USAGE IS SIGNED-INT.

procedure division using string-in-out, int-in-out.
main-logic.

move "hey whats doin" to string-in-out.
entry "int-only" using int-in-out.
move 9999 to int-in-out.
exit program.



identification division.
program-id. Test2.
date-written. 20-March-08
environment division.
configuration section.
special-names.

copy "TestNetToCobol_CVM.def".
.
DATA DIVISION.
WORKING-STORAGE SECTION.

77 screen-1-Handle HANDLE OF WINDOW.

77 Key-Status IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 Exit-Pushed VALUE 27.
88 Message-Received VALUE 95.
88 Event-Occurred VALUE 96.
88 Screen-No-Input-Field VALUE 97.
88 Screen-Time-Out VALUE 99.

COPY "d:\\test\\kop\\acucobol.def".
COPY "d:\\test\\kop\\acugui.def".
COPY "d:\\test\\kop\\crtvars.def".

77 MY-NONGUI-HANDLE-1 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.a_cobol_info".

77 MY-NONGUI-HANDLE-2 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.CVM".

77 string-in-out pic x(32) value spaces.
77 int-in-out-1 USAGE IS SIGNED-INT.
77 int-in-out-2 USAGE IS SIGNED-INT.
77 nLLerror USAGE IS UNSIGNED-INT.

screen section.

01 screen-1.
03 label "test" line 01, column 01.
03 push-button, line 36, column 98,
exception-value 27 title "E&xit" cancel-button self-act.

procedure division.
main-logic.
ACCEPT System-Information FROM System-Info.
ACCEPT Terminal-Abilities FROM Terminal-Info.

DISPLAY Standard graphical WINDOW
LINES 38.00, SIZE 125.00,
AUTO-MINIMIZE, COLOR IS 65793,
WITH SYSTEM MENU,
TITLE "Test programma", TITLE-BAR, NO WRAP,
HANDLE IS screen-1-Handle.

display screen-1 UPON screen-1-Handle.

INITIALIZE Key-Status.

PERFORM UNTIL Exit-Pushed
ACCEPT screen-1
ON EXCEPTION PERFORM Acu-Screen1-Evaluate-Func
END-ACCEPT
END-PERFORM.

Acu-Screen1-Exit.
PERFORM ACU-DOT-NET.
DESTROY screen-1-Handle.
exit program.
stop run.

Acu-DOT-NET.
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "a_cobol_info"
EVENT PROCEDURE IS EVENT-PROCEDURE-1
HANDLE IS MY-NONGUI-HANDLE-1. | Returns a handle

INQUIRE MY-NONGUI-HANDLE-1 @a_cobol_info_size IN int-in-out-1. |Returns 0
*
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "CVM"
EVENT PROCEDURE IS EVENT-PROCEDURE-2
HANDLE IS MY-NONGUI-HANDLE-2. | Returns a handle

MODIFY MY-NONGUI-HANDLE-2 "@Initialize" () giving nLLerror. | Returns 1
MOVE 1422 TO int-in-out-1.
MOVE "The hills are Alive " TO string-in-out.

MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main"
(string-in-out, int-in-out-1, null, int-in-out-2) giving nLLerror. | Returns 6.

display message box string-in-out.

DESTROY MY-NONGUI-HANDLE-1.
DESTROY MY-NONGUI-HANDLE-2.

Acu-Screen1-Evaluate-Func.
EVALUATE TRUE
WHEN Event-Occurred
IF Event-Type = Cmd-Close
PERFORM Acu-Screen1-Exit
END-IF
END-EVALUATE
MOVE 1 TO Accept-Control.

EVENT-PROCEDURE-1.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.

EVENT-PROCEDURE-2.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.
The compiler error you should report to Tech Support.
As for the other, it is an odd test, I would not use dot net to have COBOL to COBOL. At any rate, you do not state what happens when you run it, does it mean that it runs, just that you do not get what you expect?

[Migrated content. Thread originally posted on 20 March 2008]

I don't have any experience with microsoft .net, but i want to know if other .net users kan run my acu .net module.

1st I tested the amort sample wich works.

So i took the sample TestNetToCobol.cbl to create a 'TestNetToCobol .net' module.

The next error message display's when compiling with ccbl32 V8 (not with 7.2 !)
(ccbl32 --netdll -Dis -Znd -Vc -Cf testnettocobol.cbl).

CreateProcess failed for C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\AL.EXE /target:lib /v:1.0.0.0 /embed:"testnettocobol.acu",AcuNet /out:"D:\\test\\kop\\testnettocobol.dll" "D:\\test\\kop\\testnettocobol.NETModule" RC = 2Error occured storing the COBOL program into the DLL's manefest

Next made a cobol program (test2.cbl) to test the TestNetToCobol .net (because i have no experience with microsoft .net).
I expected to get back the "hey whats doin", which was not the case.

Perhaps someone can tell me

- what the compile error causes in V8.
- What goes wrong in my test2.cbl sample (V7.2 and V8) or isn't this way of testing possible.

Regards,

Ed



identification division.
program-id. TestNetToCobol.
environment division.
configuration section.
data division.
working-storage section.

linkage section.
77 string-in-out pic x(32) value spaces.
77 int-in-out USAGE IS SIGNED-INT.

procedure division using string-in-out, int-in-out.
main-logic.

move "hey whats doin" to string-in-out.
entry "int-only" using int-in-out.
move 9999 to int-in-out.
exit program.



identification division.
program-id. Test2.
date-written. 20-March-08
environment division.
configuration section.
special-names.

copy "TestNetToCobol_CVM.def".
.
DATA DIVISION.
WORKING-STORAGE SECTION.

77 screen-1-Handle HANDLE OF WINDOW.

77 Key-Status IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 Exit-Pushed VALUE 27.
88 Message-Received VALUE 95.
88 Event-Occurred VALUE 96.
88 Screen-No-Input-Field VALUE 97.
88 Screen-Time-Out VALUE 99.

COPY "d:\\test\\kop\\acucobol.def".
COPY "d:\\test\\kop\\acugui.def".
COPY "d:\\test\\kop\\crtvars.def".

77 MY-NONGUI-HANDLE-1 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.a_cobol_info".

77 MY-NONGUI-HANDLE-2 USAGE IS HANDLE OF
"@testnettocobol_CVM.testnettocobol_CVM.CVM".

77 string-in-out pic x(32) value spaces.
77 int-in-out-1 USAGE IS SIGNED-INT.
77 int-in-out-2 USAGE IS SIGNED-INT.
77 nLLerror USAGE IS UNSIGNED-INT.

screen section.

01 screen-1.
03 label "test" line 01, column 01.
03 push-button, line 36, column 98,
exception-value 27 title "E&xit" cancel-button self-act.

procedure division.
main-logic.
ACCEPT System-Information FROM System-Info.
ACCEPT Terminal-Abilities FROM Terminal-Info.

DISPLAY Standard graphical WINDOW
LINES 38.00, SIZE 125.00,
AUTO-MINIMIZE, COLOR IS 65793,
WITH SYSTEM MENU,
TITLE "Test programma", TITLE-BAR, NO WRAP,
HANDLE IS screen-1-Handle.

display screen-1 UPON screen-1-Handle.

INITIALIZE Key-Status.

PERFORM UNTIL Exit-Pushed
ACCEPT screen-1
ON EXCEPTION PERFORM Acu-Screen1-Evaluate-Func
END-ACCEPT
END-PERFORM.

Acu-Screen1-Exit.
PERFORM ACU-DOT-NET.
DESTROY screen-1-Handle.
exit program.
stop run.

Acu-DOT-NET.
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "a_cobol_info"
EVENT PROCEDURE IS EVENT-PROCEDURE-1
HANDLE IS MY-NONGUI-HANDLE-1. | Returns a handle

INQUIRE MY-NONGUI-HANDLE-1 @a_cobol_info_size IN int-in-out-1. |Returns 0
*
CREATE "@testnettocobol_CVM"
NAMESPACE IS "testnettocobol_CVM"
CLASS-NAME IS "CVM"
EVENT PROCEDURE IS EVENT-PROCEDURE-2
HANDLE IS MY-NONGUI-HANDLE-2. | Returns a handle

MODIFY MY-NONGUI-HANDLE-2 "@Initialize" () giving nLLerror. | Returns 1
MOVE 1422 TO int-in-out-1.
MOVE "The hills are Alive " TO string-in-out.

MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main"
(string-in-out, int-in-out-1, null, int-in-out-2) giving nLLerror. | Returns 6.

display message box string-in-out.

DESTROY MY-NONGUI-HANDLE-1.
DESTROY MY-NONGUI-HANDLE-2.

Acu-Screen1-Evaluate-Func.
EVALUATE TRUE
WHEN Event-Occurred
IF Event-Type = Cmd-Close
PERFORM Acu-Screen1-Exit
END-IF
END-EVALUATE
MOVE 1 TO Accept-Control.

EVENT-PROCEDURE-1.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.

EVENT-PROCEDURE-2.
EVALUATE EVENT-TYPE
WHEN MSG-NET-EVENT
CONTINUE
END-EVALUATE.
Thanks for your reaction.

For me it is not the purpose to run cobol as dot net in a cobol application.
Only for better understand how the methods (def) are generated and how it all works.

About running the program.
When running the sample the handles are created and handle numbers are returned.

The MODIFY MY-NONGUI-HANDLE-2 "@Initialize" () giving nLLerror.
Returns nLLerror = 1 ?

The MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main" (string-in-out, int-in-out-1, null, int-in-out-2) giving nLLerror.
Returns nLLerror = 6 ?

As the main logic section from testnettocobol has the instructions
--move "hey whats doin" to string-in-out.
--entry "int-only" using int-in-out.
--move 9999 to int-in-out.
I expected to get this values back. But the string keeps the value
"The hills are Alive " (or spaces when tested with no values before the MODIFY MY-NONGUI-HANDLE-2 "@testnettocobol_CVM_main")

The program runs and ends normal, but I only won't get back what I expected.

Thanks,
Ed