Hi ProfoundUI team, i'm testing your product. (Congratulation for the job done).
My question is about RPG logic for screens.
I have converted an old program (DDS is OK) and have add the handler in the beginning of the RPG code.
When i test it, i have a strange behavior of the screen :
I'm not able to go back and to exit.
The code is an old fashion one :
DEBUT : TAG
......some code
RFM1 : TAG
EXFMT FM1
*IN03 CABEQ '1' FIN
*IN12 CABEQ '1' DEBUT
EXSR CHECHFM1
60 GOTO RFM1
RFM2 : TAG
EXFMT FM2
*IN03 CABEQ '1' FIN
*IN12 CABEQ '1' RFM1
EXSR CHECHFM2
60 GOTO RFM2
FIN:TAG (SETON LR)
This kind of code is what it was done in the past (without structured code).
I have a lot of program running this way.
Is it possible to run like that in ProfundUI or need i to review the code ?
Thanks for your help !
Old RPG Code
-
- New User
- Posts: 19
- Joined: Fri Jan 09, 2015 5:21 am
- First Name: Patrice
- Last Name: Vincent
- Company Name: Saphir Systèmes
- Contact:
-
- 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: Old RPG Code
Your RPG code will work with Profound UI the same way it always has.
Profound UI only changes the display file. You are still using IBM's RPG compiler for your RPG code, so if your code worked before you used Profound UI, it should work exactly the same afterwards, since you are using the same RPG compiler.
You'll need to troubleshoot your code and find out why it's not working. Maybe one of the DDS keywords wasn't supported when you converted the screen, and therefore an indicator is not being set on?
Profound UI only changes the display file. You are still using IBM's RPG compiler for your RPG code, so if your code worked before you used Profound UI, it should work exactly the same afterwards, since you are using the same RPG compiler.
You'll need to troubleshoot your code and find out why it's not working. Maybe one of the DDS keywords wasn't supported when you converted the screen, and therefore an indicator is not being set on?
-
- New User
- Posts: 19
- Joined: Fri Jan 09, 2015 5:21 am
- First Name: Patrice
- Last Name: Vincent
- Company Name: Saphir Systèmes
- Contact:
Re: Old RPG Code
Hi Scott,
Thanks for your reply. In the DDS convertion, i have only 3 errors (print and keep).
The RPG code run well in 5250 mode.
Something complementary, it's a SQLRPGLE program.
I have added a small part of the code (the first screen is working well but it is not possible to quit ...)
Sorry, perhaps i have miss something ...
Thanks again for your help
Thanks for your reply. In the DDS convertion, i have only 3 errors (print and keep).
The RPG code run well in 5250 mode.
Something complementary, it's a SQLRPGLE program.
I have added a small part of the code (the first screen is working well but it is not possible to quit ...)
Sorry, perhaps i have miss something ...
Thanks again for your help
Code: Select all
0000.01 H DFTACTGRP(*NO)
0000.02 H/DEFINE profoundui
0001.00 FVISEDISF CF E WORKSTN HANDLER('PROFOUNDUI(HANDLER)')
0002.00 F SFILE(SELSFL:ZRECNO)
0003.00 FXDISPOL2 IF E K DISK
0003.01 FXGRPDEPL1 IF E K DISK
0004.00 FXDPOL1 IF E K DISK
0005.00 FSKEMPLLC IF E K DISK
0006.00 * Tables
0007.00 D ERR S 70 DIM(2) CTDATA PERRCD(1)
0008.00 D REQ S 80 DIM(6) CTDATA PERRCD(1)
0009.00 D TB S 1 DIM(80) CTDATA PERRCD(80)
0010.00 * R{cup{ration du nom de programme
0011.00 D SDS
0012.00 D ZPROG 1 10
0013.00 * DS externes
0014.00 D LDA E DS
0015.00 * DS requête SQL
0016.00 D DSREQ DS
0017.00 D DS1 1 80
0018.00 D DS2 81 160
0019.00 D DS3 161 240
0020.00 * D{finition des cl{s
0021.00 C KDISPO KLIST
0022.00 C KFLD ZIART
0023.00 C KEMPLLC KLIST
0024.00 C KFLD ZISOC
0025.00 C KFLD ZIART
0026.00 C KFLD ZIVRS
0027.00 C KFLD ZIMAG
0028.00 C KFLD ZICHX
0029.00 C KFLD ZILONG
0030.00 C KFLD ZISTK
0031.00 * D{finition du paramêtre
0032.00 C *ENTRY PLIST
0033.00 C PARM XSELEC 30
0034.00 C PARM XART 12
0035.00 C PARM XVRS 12
0036.00 C PARM XCHX 2
0037.00 C PARM XLNG 5 3
0038.00 C PARM XDPOCLT 5 0
0039.00 *-------------------------------------------------------------------------
0040.00 * CHOIX DES ENREGISTREMENTS
0041.00 *-------------------------------------------------------------------------
0042.00 C *LIKE DEFINE ZRECNO WRECNO
0042.01 C* *LIKE DEFINE ARPDCT WILONG
0043.00 C *DTAARA DEFINE *LDA LDA
0044.00 C IN LDA
0045.00 C MOVE DEPCOM WDEP 2
0046.00 * Ecran de sélection
0047.00 C DEBUT TAG
0048.00 C EXSR CLOCUR
0049.00 C XSELEC IFEQ *BLANKS
0050.00 C EXFMT MASEL
0051.00 C SETOFF 60
0052.00 C *IN03 CABEQ '1' FIN
0053.00 C *IN12 CABEQ '1' FIN
0053.01 C *IN08 IFEQ '1'
0053.02 C *IN56 IFEQ '0'
0053.03 C SETON 56
0053.04 C ELSE
0053.05 C SETOFF 56
0053.06 C END
0053.07 C GOTO DEBUT
0053.08 C END
.
.
.
0293.00 * Fin de programme
0294.00 C FIN TAG
0295.00 C SETON LR
-
- 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: Old RPG Code
Can you run the code in debug and find out what's going wrong?
It looks very simple to me. When the *IN03 or *IN12 indicators are on, it goes to the FIN tag, and that turns on the LR indicator, and I'm assuming this is at the end of the calcs, so the program ends.
Can you tell us why it's not exiting? Are the *IN03 or *IN12 indicators not getting turned on?
It looks very simple to me. When the *IN03 or *IN12 indicators are on, it goes to the FIN tag, and that turns on the LR indicator, and I'm assuming this is at the end of the calcs, so the program ends.
Can you tell us why it's not exiting? Are the *IN03 or *IN12 indicators not getting turned on?
-
- New User
- Posts: 19
- Joined: Fri Jan 09, 2015 5:21 am
- First Name: Patrice
- Last Name: Vincent
- Company Name: Saphir Systèmes
- Contact:
Re: Old RPG Code
Scott, i have run it in debug mode and your right, *in03 is not on :
Programme: VISEDISG Bibliothèque: PUISAMPLES Module: VISEDISG
51 C DEBUT TAG
52 C EXSR CLOCUR
53 C XSELEC IFEQ *BLANKS
54 C EXFMT MASEL
55 C SETOFF 60
56 C *IN03 CABEQ '1' FIN
57 C *IN12 CABEQ '1' FIN
58 C *IN08 IFEQ '1'
59 C *IN56 IFEQ '0'
60 C SETON 56
61 C ELSE
62 C SETOFF 56
63 C END
64 C GOTO DEBUT
65 C END
66 C *IN11 IFEQ '1'
67 C *IN55 IFEQ '0'
68 C SETON 55
A suivre...
Débogage
F3=Arrêter programme F6=Ajouter/Effacer pt arrêt F9=Rappel F10=Pas à pas F11=Variable F12=Reprendre
F14=Gérer liste de modules F15=Choisir vue F16=Relancer FIND F17=Guet de variable F18=Gérer le guet F24=Autres touches
*IN03 = '0'
Visual designer have made an hiperlink, value is Exit, and i have a response into *in03
Thanks again for your help
Patrice
Programme: VISEDISG Bibliothèque: PUISAMPLES Module: VISEDISG
51 C DEBUT TAG
52 C EXSR CLOCUR
53 C XSELEC IFEQ *BLANKS
54 C EXFMT MASEL
55 C SETOFF 60
56 C *IN03 CABEQ '1' FIN
57 C *IN12 CABEQ '1' FIN
58 C *IN08 IFEQ '1'
59 C *IN56 IFEQ '0'
60 C SETON 56
61 C ELSE
62 C SETOFF 56
63 C END
64 C GOTO DEBUT
65 C END
66 C *IN11 IFEQ '1'
67 C *IN55 IFEQ '0'
68 C SETON 55
A suivre...
Débogage
F3=Arrêter programme F6=Ajouter/Effacer pt arrêt F9=Rappel F10=Pas à pas F11=Variable F12=Reprendre
F14=Gérer liste de modules F15=Choisir vue F16=Relancer FIND F17=Guet de variable F18=Gérer le guet F24=Autres touches
*IN03 = '0'
Visual designer have made an hiperlink, value is Exit, and i have a response into *in03
Thanks again for your help
Patrice
-
- 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: Old RPG Code
So the problem appears to be in the display file. For some reason it's not setting on the *IN03 indicator. That is very strange, I have not seen that happen before.
Can you post the code for the display file so I can try it myself and debug it if needed?
Can you post the code for the display file so I can try it myself and debug it if needed?
-
- New User
- Posts: 19
- Joined: Fri Jan 09, 2015 5:21 am
- First Name: Patrice
- Last Name: Vincent
- Company Name: Saphir Systèmes
- Contact:
Re: Old RPG Code
Yes strange, perhaps i have miss something...
In debug mode, if i seton *IN03 thats ok, the program stop correctly.
Attached, you will find the DDS screen in 5250 mode, the same converted and the SQLRPGLE program.
Thanks again,
Patrice
In debug mode, if i seton *IN03 thats ok, the program stop correctly.
Attached, you will find the DDS screen in 5250 mode, the same converted and the SQLRPGLE program.
Thanks again,
Patrice
- Attachments
-
- visedisf5250.txt
- DPSF 5250 MODE
- (10.57 KiB) Downloaded 50 times
-
- visedisg.txt
- SQLRPGLE
- (36.26 KiB) Downloaded 42 times
-
- visedisf.txt
- DSPF CONVERTED
- (71.51 KiB) Downloaded 43 times
Who is online
Users browsing this forum: No registered users and 4 guests