Created
July 11, 2016 00:45
-
-
Save jbratu/4250ea27ec770ef61eb56a746f05964c to your computer and use it in GitHub Desktop.
Given the name of an existing RDK View Name it produces a report of the stored procedures and the modified dates. It could be adapted to list out any other entity type too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function CS_LIST_RDKVIEW_CHANGED(RDKView) | |
| *Name of the RDK to list in the current repository. | |
| If Unassigned(RDKView) Or RDKView EQ '' Then RDKView = 'TEST_RDK' | |
| $Insert Logical | |
| Declare Subroutine Rlist, Set_Status, Run_Report, Msg | |
| Declare Function Get_Status, Run_Report | |
| Err = '' | |
| SysreposPrefix = @APPID<1> : '*STPROC**' | |
| ViewsKey = @APPID<1> : '*' : RDKView | |
| ViewsRec = Xlate('SYSREPOSVIEWS',ViewsKey,'','X') | |
| If ViewsRec EQ '' Then | |
| Msg('RDK Not Found') | |
| Return | |
| End | |
| ViewItems = ViewsRec<11> | |
| ViewItemCount = DCOUNT(ViewItems,@VM) | |
| MatchingKeys = '' | |
| FoundSection = FALSE$ | |
| For i = 1 To ViewItemCount | |
| Entry = Viewitems<1,i> | |
| If Entry EQ 'Stored Procedures' And FoundSection EQ False$ Then | |
| FoundSection = True$ | |
| Goto i_skip | |
| End | |
| If FoundSection EQ True$ Then | |
| If Entry[1,4] EQ '3-3:' Then | |
| MatchingKeys<-1> = '"' : SysReposPrefix : Entry[5,Len(Entry)] : '"' | |
| End Else | |
| FoundSection = False$ | |
| i = ViewItemCount | |
| End | |
| End | |
| i_skip: | |
| Next | |
| Swap @FM With ' ' In MatchingKeys | |
| QRY = 'LIST SYSREPOS @ID JUSTLEN 60 UPDATED BY UPDATED ID-SUPP ' : MatchingKeys | |
| Run_Report('', Qry) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment