Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- identification division.
- program-id. DotNetCobol.
- environment division.
- configuration section.
- special-names.
- copy "CobolTest1.def".
- copy "netobject.def".
- .
- input-output section.
- file-control.
- *-----------------------------------------------------------------
- data division.
- *-----------------------------------------------------------------
- file section.
- *-----------------------------------------------------------------
- working-storage section.
- *-----------------------------------------------------------------
- *-----------------------------------------------------------------
- * DotNet
- *-----------------------------------------------------------------
- 77 my-assy-handle-01 USAGE IS HANDLE OF "@CobolTest1.CobolTest1.BasicTypesTest".
- 77 my-assy-handle-02 USAGE IS HANDLE OF "@CobolTest1.CobolTest1.ComplexTypesTest".
- *-77 my-assy-handle-BaseClass USAGE IS HANDLE OF "@CobolTest1.CobolTest1.CustomTypes.StructTest" VALUE 0.
- 77 my-assy-handle-BaseClass USAGE HANDLE OF OBJECT VALUE 0.
- *-"@CobolTest1.CobolTest1.CustomTypes.ClassTest".
- 77 ws-dotnet-GetDateNow pic x(050).
- 77 ws-dotnet-GetDate pic x(050).
- 77 ws-dotnet-IntAdd pic 9(005).
- 77 ws-dotnet-ToString pic x(050).
- 77 ws-dotnet-getdate-value usage double
- value 534.
- 77 ws-parm-string pic x(050).
- 77 ws-parm-int pic 9(005).
- 77 ws-parm-float usage float.
- 77 ws-parm-Double usage double.
- 77 ws-parm-DateTime usage double.
- *-----------------------------------------------------------------
- procedure division.
- *-----------------------------------------------------------------
- declaratives.
- end declaratives.
- *-----------------------------------------------------------------
- * Programmstart
- *-----------------------------------------------------------------
- aa-programmstart section.
- aa-01.
- create "@CobolTest1"
- namespace is "CobolTest1",
- class-name is "BasicTypesTest",
- handle is my-assy-handle-01.
- create "@CobolTest1"
- namespace is "CobolTest1",
- class-name is "ComplexTypesTest",
- handle is my-assy-handle-02.
- modify my-assy-handle-01 "@GetDateNow" () giving ws-dotnet-GetDateNow.
- modify my-assy-handle-01 "@GetDate" (ws-dotnet-getdate-value) giving ws-dotnet-GetDate.
- modify my-assy-handle-01 "@IntAdd" (1,2) giving ws-dotnet-IntAdd.
- modify my-assy-handle-02 "@GetStruct"() giving my-assy-handle-BaseClass.
- inquire my-assy-handle-BaseClass @String ws-dotnet-ToString.
- display message box
- "my-assy-handle (1) " my-assy-handle-01
- x"0A"
- "my-assy-handle (2) " my-assy-handle-02
- x"0A"
- "my-assy-handle-BaseClass (3) " my-assy-handle-BaseClass
- x"0A"
- x"0A"
- x"0A"
- "Resultat:"
- x"0A"
- "@GetDateNow " ws-dotnet-GetDateNow
- x"0A"
- "@GetDate " ws-dotnet-GetDate
- x"0A"
- "@IntAdd " ws-dotnet-IntAdd
- x"0A"
- "@String " ws-dotnet-ToString
- end-display
- destroy my-assy-handle-01.
- destroy my-assy-handle-02.
- destroy my-assy-handle-BaseClass.
- aa-exit.
- exit.
Advertisement
Add Comment
Please, Sign In to add comment