Passing WORKSTN File as Parm

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
rmullis99
Profound User
Posts: 26
Joined: Wed Jun 24, 2015 9:33 am
First Name: Robert
Last Name: Mullis
Company Name: UFCW
Contact:

Passing WORKSTN File as Parm

Post by rmullis99 »

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).
User avatar
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

Post by Glenn »

Would it be possible for you to share the compiler listing?

Glenn
rmullis99
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

Post by rmullis99 »

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
Scott Klement
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

Post by Scott Klement »

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
6-26-2015 9-51-34 AM.png
6-26-2015 9-51-34 AM.png (8.67 KiB) Viewed 424 times
If IBM ever adds support for this to RPG, Profound Logic will support it. (In fact, most likely, it'll "just work".)
rmullis99
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

Post by rmullis99 »

If I understand this correctly then, the WORKSTN file can only be defined globally when the HANDLER is used.
Scott Klement
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

Post by Scott Klement »

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.
rmullis99
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

Post by rmullis99 »

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?
Scott Klement
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

Post by Scott Klement »

Correct, you cannot pass it as a parameter.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests