As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Bonjour, I want to associate a Technical Key number to a Reference Data Base. The Data Bases are loaded monthly (24 'sliding' Month kept => The Technical Key must be kept if the referenced material is an old one, and calculated only for New References) I created a technical DataBase BSDITEC : Key S01 : NOM_TABLE A08 and 1 Field CLE_TECMAX I009 that would deliver the wanted Tech Key and be the Garant of its coherence (not very new idea, sorry) I then tried to reactivate forgotten know-how : COMBINE FILES BSDITEC BSDIATM AS BSATM85 + MODIFY FILE BSATM85 [ECHO] I activated the Echo Facility to check what Focus understood of my Code ( I realy love him, but I keep cautious ) and I realised that in the case MAJSDIATM where BSDITEC should not be concerned, here it was, unexpected ... Could some experienced Guy help me to hold Focus Hand so that My Cases separate the DataBases access, as I Wish. ( Or Indicate me a different Way to associate a Technical Key to a DataBase ; Focus DB under MVS, this time ) Cordialement
CASE MAJSDIATM
-------------------------------------------------------------------------------
ACTIVATE RET
ACTIVATE RET
COMPUTE
SEGMENT: SDITEC
------------------
MATCH NOMATCH
----- -------
UPDATE REJECT
UPDATE
SEGMENT: SDIATM
------------------
MATCH NOMATCH
----- -------
UPDATE INCLUDE
CONTINUE TO SDIATM01 GOTO ENDCASE
UPDATE
SEGMENT: SDIATM01
------------------
MATCH NOMATCH
----- -------
UPDATE INCLUDE
UPDATE GOTO ENDCASE
GOTO ENDCASE GOTO ENDCASE
GOTO ENDCASE
-------------------------------------------------------------------------------
This message has been edited. Last edited by: Kerry,
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO
Bonjour et Thanks for answering, LookUp is much simpler than Combine but, in so far as I know, it cannot be used for Modifying the Look-Uped Data. My Fonctionnal point is to have a way to get a new (unique) technical Key for a new instance in a given Data Base. The difficulty being that for entities that existed before that month, the key has been delivered and must be kept as it was given previously. Just 'first-time met' entities must be given a 'new' technical key which must be coherent (uniqueness) with those given previously. I don't remember the Out-of-Time DataBase that had a _N technical key for all the tables of this DB Organisation, but my point is just as silly (or basic) as that (Some kind of remanent over time FocList).
Here I am making a 'maquette' in Focus DB under MVS FOCUS 7.6.11 . (And I'll probably turn to SQL/DB2 in the end)
I Used Combine which is designed for 'modifying' different Data Bases in a single Modify Request. And this Modify generates Orders that I would Like him not to.
I Deactivated (Retain) the fields of the Data Base I Want not to be concerned by such or such Case Logic. Perhaps, this drives me wrong. Could someone take the time to read and understand my tiny problem and help ? Cordially
PS : I hope that the exceptional portability of Focus will go as far as making my Combine / Modify work for SQL/DB2 if I come to turn to it. Or am I asking too much ? In Many a Company, it is far easier to build Focus 'maquettes' than DB2 'maquettes' ( The birthdate of your ancestors till the 5th generation being demanded when you come to the point of creating whatsoever in DB2 ... Without forgetting that people who are responsible for DB2 in a Company have a very big responsability and can't let People 'Try for Fun') )
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO
I read and understand what it is your trying to do. But, without any actual code there is no telling why the echo shows what it shows. So, if the Modify isn't too large, please post it, or if it is too large, just post the 'offending' case.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Real Thanks for reading, So, I'll play the game : I created a Focus DataBase whose name is BASECAR. 2 Segments : SEGCAR : S04 : I made one Segment With First 4 Segments of Car SPECS : Unique : Son of SEGCAR I got rid of WARRANTY and STANDARD
The Idea is that : 'I receive CAR DataBases and I want to Load My BASECAR with the CARs received each month from Here and There' I Decide to associate a technical Key to The 4 Fields actually Keing SegCar My DataBase BSDITEC (S01 : NOM_TABLE A08, CLE_TECMAX I09) hold The Last delivered Chrono of NOM_TABLE DataBase
Before the Modify, a Focexec Unloads CAR ( Including Unique, or Not, depending on DM Variable) The Modify must Work on FIXFORM From
The Focexec has a Pilot Driver named PILCAR85 and I can't see why BSDITEC is concerned in Case MAJSDICAR
Cordially and Focusely
PS : I'm not afraid of Combine, Just cautious
Echo Trace
------------------------------------------------------------------------------
CASE MAJSDICAR
------------------------------------------------------------------------------
ACTIVATE RET
ACTIVATE RET
COMPUTE
SEGMENT: SDITEC
------------------
MATCH NOMATCH
----- -------
UPDATE REJECT
UPDATE
SEGMENT: SEGCAR
------------------
MATCH NOMATCH
----- -------
UPDATE INCLUDE
CONTINUE TO SPECS GOTO ENDCASE
UPDATE
SEGMENT: SPECS
------------------
MATCH NOMATCH
----- -------
UPDATE INCLUDE
UPDATE GOTO ENDCASE
GOTO ENDCASE GOTO ENDCASE
GOTO ENDCASE
-------------------------------------------------------------------------------
Modify :
COMBINE FILES BSDITEC BASECAR AS NBCAR85
----------------------------------------------------------------------
FOCUS 7.6.11 16.04.08 05/31/2011 NBCAR85 LINE 21 2286.01
MODIFY FILE NBCAR85 ECHO
NBCAR85 ON 05/31/2011 AT 16.04.08
COMPUTE
W_NOM_TABLE/A08 =;
K_NEW_KEY /A01 =;
NB_NEW_KEY/I08 =;
W_CLE_TECNIC/I08 =;
GOTO PILCAR85
CASE PILCAR85
DEACTIVATE RETAIN ALL
PERFORM IS_IT_NEWCAR
IF K_NEW_KEY EQ 'O' PERFORM CAL_NEWCLE ;
PERFORM MAJSDICAR
GOTO TOP
ENDCASE PILCAR85
CASE IS_IT_NEWCAR
COMPUTE
K_NEW_KEY = 'N' ;
FIXFORM FROM NBDET82A
ACTIVATE RETAIN SEG.COUNTRY
MATCH COUNTRY CAR MODEL BODYTYPE
ON NOMATCH COMPUTE K_NEW_KEY = 'O' ;
ON NOMATCH GOTO ENDCASE
ON MATCH COMPUTE K_NEW_KEY = 'N' ;
ON MATCH COMPUTE W_CLE_TECNIC = D.CLE_TECNIC ;
ON MATCH GOTO ENDCASE
GOTO ENDCASE
DATA ON NBDET82A
ENDCASE IS_IT_NEWCAR
CASE CAL_NEWCLE
DEACTIVATE RETAIN SEG.NOM_TABLE
COMPUTE
NB_NEW_KEY = NB_NEW_KEY + 1 ;
NOM_TABLE = W_NOM_TABLE ;
MATCH NOM_TABLE
ON MATCH COMPUTE
CLE_TECMAX = D.CLE_TECMAX + 1 ;
W_CLE_TECNIC = CLE_TECMAX ;
ON MATCH UPDATE CLE_TECMAX
ON NOMATCH COMPUTE
CLE_TECMAX = 1 ;
W_CLE_TECNIC = CLE_TECMAX ;
ON NOMATCH INCLUDE
ON MATCH/NOMATCH GOTO ENDCASE
GOTO ENDCASE
ENDCASE CAL_NEWCLE
CASE MAJSDICON
ACTIVATE RETAIN SEG.COUNTRY
DEACTIVATE RETAIN SEG.LENGTH
COMPUTE
CLE_TECNIC = W_CLE_TECNIC ;
MATCH COUNTRY CAR MODEL BODYTYPE
ON NOMATCH INCLUDE
ON MATCH UPDATE *
ON MATCH/NOMATCH GOTO ENDCASE
GOTO ENDCASE
ENDCASE MAJSDICON
CASE MAJSDICAR
ACTIVATE RETAIN SEG.COUNTRY
ACTIVATE RETAIN SEG.LENGTH
COMPUTE
CLE_TECNIC = W_CLE_TECNIC ;
MATCH COUNTRY CAR MODEL BODYTYPE
ON NOMATCH INCLUDE
ON NOMATCH GOTO ENDCASE
ON MATCH UPDATE *
ON MATCH CONTINUE TO LENGTH
ON NOMATCH INCLUDE
ON MATCH UPDATE *
ON MATCH/NOMATCH GOTO ENDCASE
GOTO ENDCASE
ENDCASE MAJSDICAR
CASE APRESLEC
GOTO ENDCASE
ENDCASE APRESLEC
CASE AT START
COMPUTE
NB_NEW_KEY = 0 ;
W_NOM_TABLE = 'BASECAR' ;
ENDCASE AT START
START 1
STOP 99999999
LOG INVALID MSG ON
CHECK 10000
END
FIN DE ECHO:
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO
NEVER EVER DO AN UPDATE * Always mention the fields you wish to update, or say 'UPDATE SEG.fieldname NONKEYS'. If you say UPDATE *, it will do exactly that, update all available fields....
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Bonjour and great thanks, First, at my little place, I feel part of the Focus Community again. I really thought it was a 'good one' as Waz says. But Gentle Focus keeps on playing with our nerves, his favorite :
MATCH CLEAGR_GEO NIV_GEO CODE_WSID ORIG_CODE
ON NOMATCH COMPUTE K_NEW_KEY = 'O' ;
ON NOMATCH PERFORM CAL_NEWCLE
ON NOMATCH COMPUTE TYP_MAJ = 'I' ;
ON NOMATCH COMPUTE CLE_TECNIC = W_CLE_TECNIC ;
ON NOMATCH INCLUDE
ON MATCH COMPUTE TYP_MAJ = 'U' ;
ON MATCH COMPUTE CLE_TECNIC = D.CLE_TECNIC ;
ON MATCH UPDATE SEG.CLE_TECNIC NONKEYS
0(INF32073) ERREUR A OU PRES DE LA LIGNE 105 DANS LA PROCEDURE LSATM85 FOCEX
0(FOC406) LE NOM DE CHAMP EST INCONNU : SEG.CLE_TECNIC
(INF32074) SAUT VERS LA FIN DE LA COMMANDE
ON MATCH/NOMATCH GOTO ENDCASE
The Master being (For the first fields)
FILENAME=BSDIATM,SUFFIX=FOC,$
SEGNAME=SDIATM,SEGTYPE=S4,$
FIELD=CLEAGR_GEO , ,A001 ,A001 ,$ Clé Niveau de Regroupement
FIELD=NIV_GEO , ,A003 ,A003 ,$ Type de regroupement
FIELD=CODE_WSID , ,A008 ,A008 ,$ Identifiant de l'Automate
FIELD=ORIG_CODE , ,A009 ,A009 ,$ Origine Physique
$
FIELD=CLE_TECNIC , ,I009 ,I004 ,FIELDTYPE=I,$
$ $ Idt Technique
One point of my Focus's brain was surprised by UPDATE SEG. since Modify get navigating through Segments only on an ON NOMATCH INCLUDE If Father does not Exist : No more questions about Sons, as a matter of fact, they do NOT exist. => So automatic INCLUDE for Everybody on the activated path.
On an ON MATCH, the proved existence of the Father does not give any indication regards to the existence or not of the Sons. So, I really thought (and 'd be ready to bet a beer on) you had to manually drive Focus's way through Segments CONTINUE TO being typical of this necessary syntax. In this case, (I think) Focus do not cross the Border Line of the segment and UPDATE * has an implied SEG. (You might think that The sinner wants to continue in his turpitude, be sure it's not the case )
But, once again, too much verbose and out of Focus Community ...
Real thanks for your very cute (and sharp) answers
Cordially and Focusely
Please Waz, don't pick the image for 'Not such a good one' on my message
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO
I know update seg.xxx was a possibility in focus releases years and years ago. But apparently that does not work anymore. So you're advised (strongly I might add) to just individually name all fields you need to update. That will yield te best results, also for the echo. For INCLUDE you're correct, just everything on the path that is active will be included in the database. For defining the position in the database there are two type os continue. The first, just ON MATCH CONTINUE is used to navigate to a lower segment which is matchable, the CONTINUE TO is meant to navigate to a lower unique segment. The first has to be followed by a match to establish existance, the second may not be followed by a match, instead by a ON MATCH or ON NOMATCH. In this case (and any other) UPDATE * means to update everything in the path downwards that's active, but since you're working with a combine, there is no path between both databases and thus focus will attempt to update every active field in the other database as well. Which is why I always advise to name the field(s) you want to work with explicitely.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007