I have defined my WORKSTN file globally as a template and then use LIKEFILE to define it locally in my main procedure and as parms on procedures I pass it to. I am having trouble getting the HANDLER keyword specified and the program to compile. Do I specify it at the global or local level? Does anyone have an example they can share.
FYI, I am using full free form RPG (dcl-f).
Passing WORKSTN File as Parm
-
- Profound User
- Posts: 26
- Joined: Wed Jun 24, 2015 9:33 am
- First Name: Robert
- Last Name: Mullis
- Company Name: UFCW
- Contact:
- Glenn
- Profound Logic Staff Member
- Posts: 124
- Joined: Mon Apr 14, 2014 4:08 pm
- First Name: Glenn
- Last Name: Hopwood
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: Passing WORKSTN File as Parm
Would it be possible for you to share the compiler listing?
Glenn
Glenn
-
- Profound User
- Posts: 26
- Joined: Wed Jun 24, 2015 9:33 am
- First Name: Robert
- Last Name: Mullis
- Company Name: UFCW
- Contact:
Re: Passing WORKSTN File as Parm
Here is the compile listing. I hope this helps. I am about to pull out what is left of my hair.
- Attachments
-
- TESTBOX_PNINQSSNR_38_QPRTJOB_RMULLIS_042004_20150626_102146.pdf
- (24.92 KiB) Downloaded 49 times
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Passing WORKSTN File as Parm
Unfortunately, IBM has not added support to RPG that allows the HANDLER and LIKEFILE keywords to be used together. This is documented in the ILE RPG Reference manual here:
http://www-01.ibm.com/support/knowledge ... erules.htm
If IBM ever adds support for this to RPG, Profound Logic will support it. (In fact, most likely, it'll "just work".)
http://www-01.ibm.com/support/knowledge ... erules.htm
If IBM ever adds support for this to RPG, Profound Logic will support it. (In fact, most likely, it'll "just work".)
-
- Profound User
- Posts: 26
- Joined: Wed Jun 24, 2015 9:33 am
- First Name: Robert
- Last Name: Mullis
- Company Name: UFCW
- Contact:
Re: Passing WORKSTN File as Parm
If I understand this correctly then, the WORKSTN file can only be defined globally when the HANDLER is used.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Passing WORKSTN File as Parm
Robert, it doesn't have to be defined globally -- you can use it in a subprocedure as well. You just can't use it with LIKEFILE.
-
- Profound User
- Posts: 26
- Joined: Wed Jun 24, 2015 9:33 am
- First Name: Robert
- Last Name: Mullis
- Company Name: UFCW
- Contact:
Re: Passing WORKSTN File as Parm
Right Scott, but I wouldn't be able to pass the WORKSTN file as parameter to other procedures if I can't define the TEMPLATE globally and use LIKEFILE. Or am I missing something?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Passing WORKSTN File as Parm
Correct, you cannot pass it as a parameter.
Who is online
Users browsing this forum: No registered users and 4 guests