× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If by "properly" you mean so it will compile I suggest you go to the Ansa forum (http://forum.asna.com/ <http://forum.asna.com/>). This RPG400 list may have one or two Visual RPG users but most of us use RPG IV. And this ain't that!


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Aug 11, 2017, at 4:23 PM, Osmany Jorge <ojorge@xxxxxxxxxxxxxx> wrote:

Hi everyone,

This code was written using ASNA visual RPG, I need to figure out how to code it properly

BegClass ThreadFactory Access(*Public)

DclFld strResult Type( *String)

//Task Approuch
DclFld taskFirstSplit Type( Task )
DclFld taskSecondSplit Type( Task )
DclFld actionMethod1 Type( Action )
DclFld actionMethod2 Type( Action )
DclProp ListTask Type(List(*Of Task)) Access( *Public )

BegConstructor Access(*Public)
EndConstructor

BegFunc GetAdrXml *String Access( *Public )

actionMethod1 = *New Action(GetAdrXmlSplit1())
actionMethod2 = *New Action(GetAdrXmlSplit2())

taskFirstSplit = *new Task(actionMethod1 )
//taskFirstSplit.id

taskSecondSplit = *new Task(actionMethod2 )
//taskFirstSplit.Id
taskFirstSplit.Start()
taskSecondSplit.Start()

ListTask.Add( taskFirstSplit )
ListTask.Add( taskSecondSplit )

Task.WaitAll(ListTask.ToArray())

//merge everything

LeaveSr strResult
EndFunc


BegFunc GetAdrXmlSplit1 *String Access( *Public )
//Do different things
LeaveSr strResult
EndFunc

BegFunc GetAdrXmlSplit2 *String Access( *Public )
//Do different things
LeaveSr strResult
EndFunc
EndClass

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rpg400-l-request@xxxxxxxxxxxx
Sent: Friday, August 11, 2017 1:00 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RPG400-L Digest, Vol 16, Issue 388

Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=izptjdsbV65u3K2jRt-IurZOorI7XqgS2d147hWzNgQ&e=
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than "Re: Contents of RPG400-L digest..."


*** NOTE: When replying to this digest message, PLEASE remove all text unrelated to your reply and change the subject line so it is meaningful.

Today's Topics:

1. Re: Service program / procedure design and naming conventions
(Mark Murphy/STAR BASE Consulting Inc.)
2. Thread Pool using Task (Osmany Jorge)
3. Re: Thread Pool using Task (JRusling@xxxxxxxxxxx)


----------------------------------------------------------------------

message: 1
date: Fri, 11 Aug 2017 09:45:07 -0400
from: "Mark Murphy/STAR BASE Consulting Inc."
<mmurphy@xxxxxxxxxxxxxxx>
subject: Re: Service program / procedure design and naming conventions

I may have mentioned this at some time in the past, here, or maybe in a blog post somewhere.

Mark Murphy
Atlas Data Systems
mmurphy@xxxxxxxxxxxxxxx


-----JRusling@xxxxxxxxxxx wrote: -----
To: "RPG programming on the IBM i \(AS/400 and iSeries\)" <rpg400-l@xxxxxxxxxxxx>
From: JRusling@xxxxxxxxxxx
Date: 08/09/2017 10:19AM
Subject: Re: Service program / procedure design and naming conventions


Mark,

I read about this methodology on the group? awhile back and am moving in
the same direction.

John

<snip>
... I keep a single universal binding directory for creating programs
(*PGM), but for service programs (*SRVPGM) I create individual special
purpose binding directories. ...
</snip>
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=izptjdsbV65u3K2jRt-IurZOorI7XqgS2d147hWzNgQ&e=
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_rpg400-2Dl&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=gYAQ_mbvMbhPsolo1v4yOoBxGDEL8LfVPIsWy1NQ904&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support https://urldefense.proofpoint.com/v2/url?u=http-3A__midrange.com&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=mm1xTroPYyyKrubeFvN7RSE7DYk5HXmSBnB3lJxSUPE&e= by shopping at https://urldefense.proofpoint.com/v2/url?u=http-3A__amazon.com&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=6sVzP9v17v-fK13MBjUOT0yGEHUUM2LP1k6OjlPDYks&e= with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_2dEadiD&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=J3RIOsQXbl9RZ1w_IhiI6lUPs668iAe0ETRUgdNffJk&e=


------------------------------

message: 2
date: Fri, 11 Aug 2017 15:33:36 +0000
from: Osmany Jorge <ojorge@xxxxxxxxxxxxxx>
subject: Thread Pool using Task

This is my code I'm new using AVR, I have this error (ErrorDelegate constructor requires a single argument: a method with the same signature as the delegate.)

Please help me to fix this problem ASAP

BegClass ThreadFactory Access(*Public)

DclFld strResult Type( *String)

//Task Approuch
DclFld taskFirstSplit Type( Task )
DclFld taskSecondSplit Type( Task )
DclFld actionMethod1 Type( Action )
DclFld actionMethod2 Type( Action )
DclProp ListTask Type(List(*Of Task)) Access( *Public )

BegConstructor Access(*Public)
EndConstructor

BegFunc GetAdrXml *String Access( *Public )

actionMethod1 = *New Action(GetAdrXmlSplit1())
actionMethod2 = *New Action(GetAdrXmlSplit2())

taskFirstSplit = *new Task(actionMethod1 )
//taskFirstSplit.id

taskSecondSplit = *new Task(actionMethod2 )
//taskFirstSplit.Id
taskFirstSplit.Start()
taskSecondSplit.Start()

ListTask.Add( taskFirstSplit )
ListTask.Add( taskSecondSplit )

Task.WaitAll(ListTask.ToArray())

//merge everything

LeaveSr strResult
EndFunc


BegFunc GetAdrXmlSplit1 *String Access( *Public )
//Do different things
LeaveSr strResult
EndFunc

BegFunc GetAdrXmlSplit2 *String Access( *Public )
//Do different things
LeaveSr strResult
EndFunc
EndClass




------------------------------

message: 3
date: Fri, 11 Aug 2017 11:13:55 -0500
from: JRusling@xxxxxxxxxxx
subject: Re: Thread Pool using Task

Jorge - Did you mean to post this to the java400-l list? (heh, i 'think'
it's java)
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_java400-2Dl_index.htm&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=bewhlmySVz1d9wapEf2kHXRtsCcLkKhUbmBnZJDE47s&e=

John
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.


------------------------------

Subject: Digest Footer

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) digest list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=izptjdsbV65u3K2jRt-IurZOorI7XqgS2d147hWzNgQ&e=
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_rpg400-2Dl&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=gYAQ_mbvMbhPsolo1v4yOoBxGDEL8LfVPIsWy1NQ904&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support https://urldefense.proofpoint.com/v2/url?u=http-3A__midrange.com&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=mm1xTroPYyyKrubeFvN7RSE7DYk5HXmSBnB3lJxSUPE&e= by shopping at https://urldefense.proofpoint.com/v2/url?u=http-3A__amazon.com&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=6sVzP9v17v-fK13MBjUOT0yGEHUUM2LP1k6OjlPDYks&e= with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_2dEadiD&d=DQICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=pf5ps34nDK5U4__KA_TL0JsXGQOQP4z3NOFEujWu6Hc&m=DDL-uvDdWNT2X_sFtnnHgb50mmjOC77fHMm9UIyGLhk&s=J3RIOsQXbl9RZ1w_IhiI6lUPs668iAe0ETRUgdNffJk&e=

------------------------------

End of RPG400-L Digest, Vol 16, Issue 388
*****************************************
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.