File transfers
File transfers for 5250 terminal is standard feature which Green Screens Web Terminal also support directly from the browser. But this is not the reason we write about file transfer on our blog. In previous posts, we wrote about possibility to call scripts from STPCCMD which opens great new possibilities.
File transfers are not exception and this is the main reason we write this post. Here we will describe 2 short scenarios and we will let you decide by yourself.
Scenario 1
Classic scenario for workstation operator when using ERP system is to create some files as an export result like excel, csv or any other kind of document which should be exported from main system.
Usually, those files are exported in one of following ways:
-
Open shared network folder to access exported file. This can be problematic in companies with remote branches.
-
Get full file path in IFS system on terminal screen, then copy that path into file transfer program to download file. This requires software to be installed on workstation which can be very problematic for maintenance.
-
Use HLL API to create custom software modules for automation. Again, requires installation on workstation and it is maintenance nightmare.
Scenario 2
More modern approach is to completely automate task without any need for any kind of local software installation which is also a heaven for maintenance service as with this approach we cut off all extra steps in the process which could cause problems.
The question is how to do it? Well, don't be surprised how simple and easy it is. Just follow next few instructions...
-
Open GreenScreens Web Terminal and start PC organizer for session with STRPCO command.
-
Find file in IFS file system you want to send to the web terminal workstation operator.
For example: /home/JOHN/data.csv
- Call web terminal script for file transfer from command line.
STRPCCMD PCCMD('script:Tn5250.Application.download("/home/JOHN/data.csv")')
Or use more advanced version with better control:
STRPCCMD PCCMD('script:Tn5250.Prompts.download({ifs:"/home/JOHN/data.csv", user:"JOHN"})')
At the end, this is just a sample to play with. In real world, described steps can be embedded into CL program which will start file download automatically without workstation operator intervention making his life much easier.
NOTE: If workstation operator signed from GreenScreens login screen with username and password (bypass signon) then transfer prompts will not show user login fields.
What about file uploads?
From browser, it is not possible to automatically start file upload because of browser security sandbox, but we can initiate file upload request which will populate all required fields and show file upload popup screen. All workstation operator have to do is to select file he want to upload.
Here is the sample remote command:
STRPCCMD PCCMD('script:Tn5250.Prompts.upload({ifs:"/home/JOHN", user:"JOHN"})')
NOTE: Fields initialized from configuration object will be readonly.
Conclusion
By comparing two scenarios we shown that second scenario completely eliminate many user steps required in classic scenario which minimize operator mistakes and increase work efficiency.