3jjqwer
3jjqwer

Reputation:

Simulate local file specifications in RPGLE subprocedure

I'm very excited about the new "local F specs" coming in V6R1 - see:

http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html

Does anyone know a way to simulate this in V5R4 in a SRVPGM procedure?

Upvotes: 2

Views: 1807

Answers (2)

squarefox
squarefox

Reputation: 232

You can only simulate that by making modules that only processes one file globally. So the file scope is still global, but you don't share it with other files. if you really would want to have a file per procedure you'd have to make a module for each procedure. I don't recommend that. Just too many modules. But maybe your happy with the one-module-per-file style, otherwise you have to wait like me for v6r1 ;)

Upvotes: 1

Mike Wills
Mike Wills

Reputation: 21265

As far as I know, you can only define them globally, but you can process just that file in a single subprocedure.

Upvotes: 1

Related Questions