I have a requirement like this. From my display file, when an F5 is taken, it should display a subfile. It is displaying the window with the SFLCTL fields, but no values for the subfile field. Can anyone help me here to identify the problem?
This is the DSPF code
A S@PRODD5 70A O 8 3
A*==========================================================
A R CTL01 SFLCTL(SFL01)
A*==========================================================
A SFLSIZ(0999)
A SFLPAG(0002)
A WINDOW(FMT03)
A OVERLAY
A PROTECT
A KEEP
A 20 SFLDSP
A 21 SFLDSPCTL
A 22 SFLCLR
A 23 SFLEND(*MORE)
A PAGEUP(25 'ROLL_UP')
A PAGEDOWN(26 'ROLL_DOWN')
A H@TOP1 4S 0H SFLRCDNBR
A D@INSC 11A O 1 1
A COLOR(WHT)
A 1 23'Heading'
A COLOR(WHT)
A 2 1'Date/Time'
A COLOR(WHT)
A 2 30'User'
A COLOR(WHT)
A 2 40'Description'
A COLOR(WHT)
A*==========================================================
A R FMT03
A*==========================================================
A WINDOW(05 02 15 73)
A OVERLAY
A 14 2'F7=Return'
A COLOR(BLU)
C When *In05 = *On
C ExSR Sr@Audit
C EndSL
*********************************************************************
* SUBR/Sr@Audit - Subroutine to show the Audit Log *
*********************************************************************
C Sr@Audit BegSR
C Clear SFL01
C Eval *In22 = *On
C Write Ctl01
C Eval *In22 = *Off
C Eval W#RRN1 = *Zeros
C
C *Loval SetLL filename
C KeyLst ReadE filename
C DoW Not %Eof(filename)
C Eval W#RRN1 = W#RRN1 + 1
C Write SFL01
C Eval *In23 = *Off
C KeyLst ReadE filename
C EndDo
C Eval D@INSC = VlValr + '-' + VlValS
C Eval *In21 = *On
C Write Fmt03
C ExFmt Ctl01
C EndSR
After FMT03, there is a...
I don't think it matters what's after FMT03. But we should see the full subfile definition. All we see is the subfile control record (CTL01) and what seems to be a single field (S@PRODD5) from the subfile. Where is the rest of the subfile record?
I am moving values to the subfile fields...
How?
If the database fields and display fields are named the same, that could help explain how you're doing it. But we need to know that. By looking at it, it looks like you aren't moving anything into the subfile.
Tom
A R SFL01 SFL
A*==========================================================
A S@UPDDT Z O 3 3
A S@USRID 7A O 3 34
A S@PRODD1 70A O 4 3
A S@PRODD2 70A O 5 3
A S@PRODD3 70A O 6 3
A S@PRODD4 70A O 7 3
A S@PRODD5 70A O 8 3
A*==========================================================
A R CTL01 SFLCTL(SFL01)
A SFLSIZ(0999)
A SFLPAG(0002)
A WINDOW(FMT03)
A OVERLAY
A PROTECT
A* KEEP
A 20 SFLDSP
A 21 SFLDSPCTL
A 22 SFLCLR
A 23 SFLEND(*MORE)
A PAGEUP(25 'ROLL_UP')
A PAGEDOWN(26 'ROLL_DOWN')
A H@TOP1 4S 0H SFLRCDNBR
A D@INSC 11A O 1 1
A COLOR(WHT)
A 1 23'Securities Extension Audit Log'
A COLOR(WHT)
A 2 1'Date/Time'
A COLOR(WHT)
FfielnameCF E WORKSTN SFILE(SFL01:W#RRN1)
D W#Rrn1 S 2S 0
/*some codes to display the screen and after taking F5 -
C When *In05 = *On
C ExSR Sr@Audit
C EndSL
*********************************************************************
* SUBR/Sr@Audit - Subroutine to show the Audit Log *
*********************************************************************
C Sr@Audit BegSR
C Clear SFL01
C Eval *In22 = *On
C Write Ctl01
C Eval *In22 = *Off
C Eval W#RRN1 = *Zeros
C
C *Loval SetLL filename
C KeyLst ReadE filename
C DoW Not %Eof(filename)
C Eval W#RRN1 = W#RRN1 + 1
C Eval W#RRN1 = W#RRN1 + 1
C Eval S@UPDDT = field1
C Eval S@USRID = field2
C Eval S@PRODD1 = field3
C Eval S@PRODD2 = field4
C Eval S@PRODD3 = field5
C Eval S@PRODD4 = field6
C Eval S@PRODD5 = field7
C Write SFL01
C Eval *In23 = *Off
C K@VAHPF ReadE filename
C EndDo
C Eval D@INSC = VlValr + '-' + VlValS
C Eval *In21 = *On
C Write Fmt03
C ExFmt Ctl01
C EndSR
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 10  Replies