Kunal Roy
Kunal Roy

Reputation: 787

Query on a display file declaration in RPGLE

Recently I have come across as display file declaration as

F dspfile CF   E  WORKSTN maxdev(*file) usropn

I have never encountered any declaration like this before. Firstly there is no actual file called dspfile, so I assume this is getting file name dynamically. Secondly I don't understand the maxdev(*file) part.

Can someone kindly explain the declaration here to me.

Upvotes: 1

Views: 378

Answers (1)

nfgl
nfgl

Reputation: 3202

DPSPFILE may be a DSPF or ICFF, and maybe it's "declared" at compile/run time through OVRDSPF/OVRICFF

Those device files are able to handle multiple devices. This kind of things has been used for example to handle transactions with multiple workstations using only one job, then ressources used by the program (memory, file opened access path, ...) do not multiply with the number of workstation, making applications more scalable.

That said I have never used such things outside of a training course.

From this point of view the display file use you already know is a particular case where CRTDSPF is used with default values DEV(*REQUESTER) MAXDEV(1)

If your program doesn't use opcodes like ACQ or REL, and if you don't find any (CRT|CHG|OVR)DSPF using DEV or MAXDEV keywords not any ICFF, then probably you can ignore what you found

Read more from the docs : ILE RPG Programmer's guide

Upvotes: 2

Related Questions