How does an SJP work?
An SJP program provides generic access to the destinations that are available to a RAMP application. An SJP is not designed to talk to a user, it is designed to talk to a RAMP script.
A simple SJP and RAMP script might work together like this:
The RAMP script example used here is associated with a command handler that wants to display the details of a customer using a 5250 program named CUSTINQ.
When it starts to execute it first navigates to the junction screen named JSP.
This causes the SJP program to displays its 5250 screen.
It then sets the field PGMNAME to value "CUSTINQ" and sends the enter key.
This causes the SJP program to receive the screen back.
The CL field &PGMNAME in the SJP program now contains the name "CUSTINQ".
Program CUSTINQ is then called using a generic call.
The RAMP script then gets the program CUSTINQ to display customer number 123456.
Using this simple SJP hundreds of destination screen scripts could be created to access all sorts of System i 5250 programs, providing that they all have a simple CALL interface.