Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Using MODIFY command

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using MODIFY command
 Login/Join
 
Silver Member
posted
I have a legacy FOCUS report that I am trying to figure out.
It uses MODIFY command. I just have a few questions on how the INCLUDE statement works in multiple CASES.
Below is the code (pardon the lengthy example).

I noticed that the code says INCLUDE in both ON MATCH and ON NOMATCH.
Not only this is true in every MATCH section, but also true in every CASE.

I am going to run this in WebFocus 714.
When does a record actually get written in HVPCOST file?
When it loops back to read the next input record?
I don't think it will write a record in HVPCOST on every INCLUDE statement, or would it?
I feel like the other occurrences of INCLUDE should be UPDATE * instead. That is what it looks like what it's trying to do to me.

Thanks in advance for replying.

--------------------------------------------------

MODIFY FILE VCSTLOAD
COMPUTE LYP/A4=;
COMPUTE LDYYPP/A6 = IF LYP EQ ' ' THEN ' '||LYP ELSE
IF LYP EQ '0000' THEN '00'||LYP ELSE
IF LYP LT '2001' THEN '20'||LYP
ELSE '19'||LYP;
FORM CONTRACT/8 CONT_PORT/1 CONT_RL/1 BLOCK1/60
FORM ORIG_ZIP/5 BLOCK1A/36 DEST_ZIP/5 BLOCK1B/7
FORM AGENT_CODE/4 COMMODITY/2 CLASS/1 ACTUAL_WGT/I4
FORM CONST_WGT/I4 BILL_WGT/I4 BRKPT_WGT/I4 CUBIC_FEET/I4
FORM BILL_MILES/I4 EST_MILES/I4 REVENUE/I4 TARIFF/7
FORM SECTION/4 BLOCK2A/38 ACCOUNT_NUM1/8 BLOCK2B/34
FORM REGDATE/6 REGKEYDA/6 BLOCK3/23
FORM APU_DAT/6 APUDAT_CAN/6 BLOCK4/10
FORM DDATE/6 CDATE/6 BLOCK5/26
FORM EXTSTOP_CNT/I2 FREASTR_CNT/I2 OVFLOW_CNT/I2 ACTLOAD_DATE/06
FORM X4 BLOCK6/8
FORM RPPROC1_DATE/06 HLR_LDATE/06 LYP/4
FORM HLR1KEY_DATE/06 LASTACT_DATE/06 RYEAR/02 RPERIOD/02
FORM X183 IMMED_PARENT/8 CORP_PARENT/8 CORP_NAME/15
FORM INVOICED_AMT/P5.2 INV_LH_AMT/P5.2 DISC_RATE/P3.2 DISC_FLAG/1
FORM TFINC_LHRV/P7.2 TFINC_ASSC/P7.2 TFINC_VLDS/P7.2 TFINC_PASS/P7.2
FORM TFINC_TREV/P8.2 TFINC_BOOK/P7.2 TFINC_LDML/P7.2 TFINC_EPML/P7.2
FORM TFINC_LOAD/P7.2 TFINC_UNLD/P7.2 TFINC_APUP/P7.2 TFINC_SETP/P7.2
FORM TFINC_CCDP/P7.2 TFINC_COMM/P7.2 TFINC_OTHE/P7.2 TFINC_TPTE/P8.2
FORM TFINC_LH_PTE/P8.2 X1 TFINC_H302_REV/P7.2 TFINC_H302_PTE/P7.2
FORM TFINC_VALU_REV/P7.2 X24
VALIDATE
BADREC/I1 = IF LYP NE ' ' THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH LDYYPP
ON NOMATCH INCLUDE
ON NOMATCH GOTO HAULER1
ON MATCH CONTINUE
MATCH CONTRACT CONT_PORT CONT_RL
ON NOMATCH INCLUDE
ON NOMATCH GOTO HAULER1
ON MATCH CONTINUE
-***********************************************************************
CASE HAULER1
-***********************************************************************
FORM X-800 X491
FORM HAULER/C6 HLR_PDATE/A6MDY HLRACT_DELDT/A6MDY BLOCK7/6
FORM X285
VALIDATE
NOHLR/I1 = IF HAULER NE ' ' THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH HAULER
ON NOMATCH INCLUDE
ON NOMATCH GOTO SETOFF1
ON MATCH INCLUDE
ON MATCH GOTO SETOFF1
ENDCASE
-***********************************************************************
CASE SETOFF1
-***********************************************************************
FORM X-800 X404
FORM SODATE/A6MDY BLOCK8/12 SOZIP/5 BLOCK8A/6
FORM X367
VALIDATE
SDATE/I1 = IF SODATE NE 0 THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH SODATE
ON NOMATCH INCLUDE
ON NOMATCH GOTO HAULER2
ON MATCH INCLUDE
ON MATCH GOTO HAULER2
ENDCASE
-***********************************************************************
CASE HAULER2
-***********************************************************************
FORM X-800 X515
FORM HAULER/C6 HLR_PDATE/A6MDY HLRACT_DELDT/A6MDY BLOCK7/6
FORM X261
VALIDATE
NOHLR/I1 = IF HAULER NE ' ' THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH HAULER
ON NOMATCH INCLUDE
ON NOMATCH GOTO SETOFF2
ON MATCH INCLUDE
ON MATCH GOTO SETOFF2
ENDCASE
-***********************************************************************
CASE SETOFF2
-***********************************************************************
FORM X-800 X433
FORM SODATE/A6MDY BLOCK8/12 SOZIP/5 BLOCK8A/6
FORM X338
VALIDATE
SDATE/I1 = IF SODATE NE 0 THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH SODATE
ON NOMATCH INCLUDE
ON NOMATCH GOTO HAULER3
ON MATCH INCLUDE
ON MATCH GOTO HAULER3
ENDCASE
-***********************************************************************
CASE HAULER3
-***********************************************************************
FORM X-800 X539
FORM HAULER/C6 HLR_PDATE/A6MDY HLRACT_DELDT/A6MDY BLOCK7/6
FORM X237
VALIDATE
NOHLR/I1 = IF HAULER NE ' ' THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH HAULER
ON NOMATCH INCLUDE
ON NOMATCH GOTO SETOFF3
ON MATCH INCLUDE
ON MATCH GOTO SETOFF3
ENDCASE
-***********************************************************************
CASE SETOFF3
-***********************************************************************
FORM X-800 X462
FORM SODATE/A6MDY BLOCK8/12 SOZIP/5 BLOCK8A/6
FORM X309
VALIDATE
SDATE/I1 = IF SODATE NE 0 THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH SODATE
ON NOMATCH INCLUDE
ON NOMATCH GOTO HAULER4
ON MATCH INCLUDE
ON MATCH GOTO HAULER4
ENDCASE
-***********************************************************************
CASE HAULER4
-***********************************************************************
FORM X-800 X563
FORM HAULER/C6 HLR_PDATE/A6MDY HLRACT_DELDT/A6MDY BLOCK7/6
FORM X213
VALIDATE
NOHLR/I1 = IF HAULER NE ' ' THEN 1 ELSE 0;
ON INVALID GOTO TOP
MATCH HAULER
ON NOMATCH INCLUDE
ON NOMATCH GOTO TOP
ON MATCH INCLUDE
ON MATCH GOTO TOP
ENDCASE
CHECK 100000
DATA ON COSTTAPE
LOG INVALID MSG OFF
LOG DUPL MSG OFF
END


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
 
Posts: 44 | Location: Fort Wayne, IN | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Having the master to look at would be very helpful at this point. But based on the code, I will assume that this is multi-segment data base.

ON MATCH INCLUDE will add child segments from where in the hierarch the include is done based on data in the FIXFORM that is ACTIVE at the time.

My recommendation is that you download a mainframe FOCUS language manual and read the chapter on MODIFY.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
I think you are right.
Here is the masterfile...

FILENAME=HVPCOST,SUFFIX=FOC,
SEGNAME=PERLSEG,SEGTYPE=S1,
FIELDNAME=LDYYPP ,LDYP ,A6 ,$
SEGNAME=ROOT,SEGTYPE=S3,
PARENT=PERLSEG,
FIELDNAME=CONTRACT ,CTRL ,A8 ,FIELDTYPE=I,$
FIELDNAME=CONT_PORT ,CPORT ,A1 ,$
FIELDNAME=CONT_RL ,CRL ,A1 ,$
FIELDNAME=AGENT_CODE ,BAGT ,A4 ,$
FIELDNAME=TARIFF ,TARF ,A7 ,$
FIELDNAME=SECTION ,SECT ,A4 ,$
FIELDNAME=CORP_PARENT ,CPAR ,A8 ,$
FIELDNAME=ACCOUNT_NUM1,ACD1 ,A8 ,$
FIELDNAME=CLASS ,CLASS ,A1 ,$
FIELDNAME=CDATE ,CAND ,YYMD ,$
FIELDNAME=RPPROC1_DATE,RPDATE ,YYMD ,$
SEGNAME=UNQ ,SEGTYPE=U ,
PARENT=ROOT , LOCATION=VCSTUNQ,
FIELDNAME=ORIG_NAME ,ONAME ,A20 ,$
FIELDNAME=ORIG_ADDR ,OADDR ,A30 ,$
FIELDNAME=ORIG_CITY ,OCTY ,A10 ,$
FIELDNAME=ORIG_ZIP ,OZIP ,A5 , FIELDTYPE=I ,$
FIELDNAME=ORIG_STATE ,OSTE ,A2 ,$
FIELDNAME=ORIG_AGNT ,OAGENT ,A4 ,$
FIELDNAME=DEST_NAME ,DNAME ,A20 ,$
FIELDNAME=DEST_CITY ,DCTY ,A10 ,$
FIELDNAME=DEST_ZIP ,DZIP ,A5 , FIELDTYPE=I ,$
FIELDNAME=DEST_STATE ,DSTE ,A2 ,$
FIELDNAME=DEST_AGNT ,DAGENT ,A4 ,$
FIELDNAME=DEST_ALOC ,DAGTLOC ,A1 ,$
FIELDNAME=COMMODITY ,CMTY ,A2 ,$
FIELDNAME=ACTUAL_WGT ,AWGTC ,I5C ,$
FIELDNAME=CONST_WGT ,WGTC ,I5C ,$
FIELDNAME=BILL_WGT ,BLWT ,I7C ,$
FIELDNAME=BRKPT_WGT ,BPWT ,I7C ,$
FIELDNAME=CUBIC_FEET ,CFET ,I5 ,$
FIELDNAME=BILL_MILES ,BMILE ,I7C ,$
FIELDNAME=EST_MILES ,MILES ,I7C ,$
FIELDNAME=REVENUE ,ESLH ,I5CM ,$
FIELDNAME=ITEM ,ITEM ,A8 ,$
FIELDNAME=SEGMENT ,PRLN ,A1 ,$
FIELDNAME=SERV_FLAG ,SFLAG ,A1 ,$
FIELDNAME=HOTS_FLAG ,HSFLAG ,A1 ,$
FIELDNAME=CPUDFROM ,CPUDFROM,A6 ,$
FIELDNAME=CPUDTO ,CPUDTO ,A6 ,$
FIELDNAME=CDELFROM ,CDELFROM,A6 ,$
FIELDNAME=CDELTO ,CDELTO ,A6 ,$
FIELDNAME=COMMBY ,COMMBY ,A3 ,$
FIELDNAME=CUSTOMER ,ACNM ,A15 ,$
FIELDNAME=PO_NUMBER ,PONUMB ,A13 ,$
FIELDNAME=CUSTREF_NO ,CREFNO ,A6 ,$
FIELDNAME=REGDATE ,RNDT ,YYMD ,$
FIELDNAME=REGKEYDA ,RKEYDT ,YYMD ,$
FIELDNAME=REGCLRK ,RCLRK ,A3 ,$
FIELDNAME=REGMOD ,RMOD ,A2 ,$
FIELDNAME=APUFLAG ,APUF ,A1 ,$
FIELDNAME=APU_NO ,ANO ,A8 ,$
FIELDNAME=APU_AGT ,AAGT ,A5 ,$
FIELDNAME=APUAGT_PAY ,APUPAY ,A4 ,$
FIELDNAME=APUDAT_CAN ,APUCAN ,YYMD ,$
FIELDNAME=APU_DAT ,APUD ,YYMD ,$
FIELDNAME=BILLPAR_NO ,BILLNO ,A8 ,$
FIELDNAME=LOAD_EXT ,LEXT ,A1 ,$
FIELDNAME=DELV_EXT ,DEXT ,A1 ,$
FIELDNAME=DDATE ,DELD ,YYMD ,$
FIELDNAME=CLAIM_NO ,CLAMNO ,A10 ,$
FIELDNAME=SALESNO ,SLNO ,A9 ,$
FIELDNAME=MKTSEG_NO ,MSEGNO ,A6 ,$
FIELDNAME=RUSHBIL_FLAG,RBFLAG ,A1 ,$
FIELDNAME=EXTSTOP_CNT ,XSTOPC ,I3 ,$
FIELDNAME=FREASTR_CNT ,FASTRC ,I3 ,$
FIELDNAME=OVFLOW_CNT ,OFLOWC ,I3 ,$
FIELDNAME=ACTLOAD_DATE,ALDDAT ,YYMD ,$
FIELDNAME=HLR_LDATE ,HALD ,YYMD ,$
FIELDNAME=TRDSHW_ORGIN,TSORG ,A4 ,$
FIELDNAME=TRDSHW_DEST ,TSDES ,A4 ,$
FIELDNAME=HLR1KEY_DATE,H1KDAT ,YYMD ,$
FIELDNAME=LASTACT_DATE,LACTDT ,YYMD ,$
FIELDNAME=RYEAR ,RGYR ,A2 ,$
FIELDNAME=RPERIOD ,RGPD ,A2 ,$
FIELDNAME=IMMED_PARENT,IPAR ,A8 ,$
FIELDNAME=CORP_NAME ,CORPNM ,A15 ,$
FIELDNAME=INVOICED_AMT,INVAMT ,P12.2 ,$
FIELDNAME=INV_LH_AMT ,INVLH ,P12.2 ,$
FIELDNAME=DISC_RATE ,DRATE ,P6.2 ,$
FIELDNAME=DISC_FLAG ,DFLAG ,A1 ,$
SEGNAME=UNQ2,SEGTYPE=U ,
PARENT=ROOT , LOCATION=VCSTUNQ2,
FIELDNAME=TFINC_LHRV ,TLHRV ,P14.2 ,$
FIELDNAME=TFINC_ASSC ,TASSC ,P14.2 ,$
FIELDNAME=TFINC_VLDS ,TVLDS ,P14.2 ,$
FIELDNAME=TFINC_PASS ,TPASS ,P14.2 ,$
FIELDNAME=TFINC_TREV ,TREV ,P14.2 ,$
FIELDNAME=TFINC_BOOK ,TBOOK ,P14.2 ,$
FIELDNAME=TFINC_LDML ,TLDML ,P14.2 ,$
FIELDNAME=TFINC_EPML ,TEPML ,P14.2 ,$
FIELDNAME=TFINC_LOAD ,TLOAD ,P14.2 ,$
FIELDNAME=TFINC_UNLD ,TUNLD ,P14.2 ,$
FIELDNAME=TFINC_APUP ,TAPUP ,P14.2 ,$
FIELDNAME=TFINC_SETP ,TSETP ,P14.2 ,$
FIELDNAME=TFINC_CCDP ,TCCDP ,P14.2 ,$
FIELDNAME=TFINC_COMM ,TCOMM ,P14.2 ,$
FIELDNAME=TFINC_OTHE ,TOTHE ,P14.2 ,$
FIELDNAME=TFINC_LH_PTE,TLHPTE ,P14.2 ,$
FIELDNAME=TFINC_TPTE ,TPTE ,P14.2 ,$
FIELDNAME=TFINC_H302_REV ,T302REV ,P14.2 ,$
FIELDNAME=TFINC_H302_PTE ,T302PTE ,P14.2 ,$
FIELDNAME=TFINC_VALU_REV ,TVALUREV ,P14.2 ,$
SEGNAME=HAULER,SEGTYPE=S0,
PARENT=ROOT, LOCATION=VCSTHLR,
FIELDNAME=HAULER ,UNIT ,A6 ,FIELDTYPE=I,$
FIELDNAME=HLR_PDATE ,PALD ,MDYY ,$
FIELDNAME=HLRACT_DELDT,HADDAT ,YYMD ,$
FIELDNAME=LOAD_CAT ,LDCAT ,A1 ,$
FIELDNAME=UNLOAD_CAT ,UNLDCAT ,A1 ,$
FIELDNAME=FLEET_CTLR ,FCTLR ,A2 ,$
FIELDNAME=FLEET_GROUP ,FGRP ,A2 ,$
SEGNAME=SETOFF,SEGTYPE=S0,
PARENT=HAULER, LOCATION=VCSTHLR,
FIELDNAME=SODATE ,SODT ,MDYY ,$
FIELDNAME=SOCITY ,SOCT ,A10 ,$
FIELDNAME=SOSTATE ,SOST ,A2 ,$
FIELDNAME=SOZIP ,SOZP ,A5 , FIELDTYPE=I ,$
FIELDNAME=SOAGENT ,SOAT ,A4 ,$
FIELDNAME=SOTYPE ,SOTY ,A1 ,$
FIELDNAME=SOAGTLOC ,SOAL ,A1 ,$
SEGNAME=FINANC,SEGTYPE=S0,
PARENT=ROOT, LOCATION=HVPFINC,
FIELDNAME=PROC_YYPP ,YYPP ,A6 , FIELDTYPE=I ,$
FIELDNAME=FINC_LHRV ,LHRV ,P10.2 ,$
FIELDNAME=FINC_ASSC ,ASSC ,P10.2 ,$
FIELDNAME=FINC_VLDS ,VLDS ,P10.2 ,$
FIELDNAME=FINC_PASS ,PASS ,P10.2 ,$
FIELDNAME=FINC_BOOK ,BOOK ,P10.2 ,$
FIELDNAME=FINC_LDML ,LDML ,P10.2 ,$
FIELDNAME=FINC_EPML ,EPML ,P10.2 ,$
FIELDNAME=FINC_LOAD ,LOAD ,P10.2 ,$
FIELDNAME=FINC_UNLD ,UNLD ,P10.2 ,$
FIELDNAME=FINC_APUP ,APUP ,P10.2 ,$
FIELDNAME=FINC_SETP ,SETP ,P10.2 ,$
FIELDNAME=FINC_CCDP ,CCDP ,P10.2 ,$
FIELDNAME=FINC_COMM ,COMM ,P10.2 ,$
FIELDNAME=FINC_OTHE ,OTHE ,P10.2 ,$
FIELDNAME=FINC_LH_PTE ,LHPTE ,P10.2 ,$
FIELDNAME=FINC_H302_REV ,H302REV ,P10.2 ,$
FIELDNAME=FINC_H302_PTE ,H302PTE ,P10.2 ,$
SEGNAME=CLAIMS, SEGTYPE=KU, PARENT=ROOT,
CRFILE=VCCNTR01, CRKEY=CONTRACT,$

SEGNAME=OZAREA, SEGTYPE=KU, PARENT=UNQ,
CRFILE=VCSTAREA, CRSEGNAME=SEGONE, CRKEY=ORIG_ZIP
FIELDNAME = OZIP ,ALIAS = AZIP , A5 , FIELDTYPE=I,
TITLE = 'Orig, Zip,Code' ,$
FIELDNAME = OSMSVC ,ALIAS = SMSVC , A3 ,
TITLE = ' Orig, Small,Svc Area' ,$
FIELDNAME = OPLREGN ,ALIAS = PLREGN , A5 ,
TITLE = 'Orig Plan, Region' ,$
FIELDNAME = ODCLOCSVC ,ALIAS = DCLOCSVC , A4 ,
TITLE = ' Orig DC, Local,Svc Area' ,$
FIELDNAME = ODCCNTLAR ,ALIAS = DCCNTLAR , A4 ,
TITLE = 'Orig DC,Control, Area' ,$
FIELDNAME = OSTATE ,ALIAS = OSTATE , A2 ,
TITLE = 'Orig DC, State' ,$
FIELDNAME = OCOUNTY ,ALIAS = OCOUNTY , A18,
TITLE = 'Orig DC, County' ,$

SEGNAME=DZAREA, SEGTYPE=KU, PARENT=UNQ,
CRFILE=VCSTAREA, CRSEGNAME=SEGONE, CRKEY=DEST_ZIP
FIELDNAME = DZIP ,ALIAS = AZIP , A5 , FIELDTYPE=I,
TITLE = 'Dest, Zip,Code' ,$
FIELDNAME = DSMSVC ,ALIAS = SMSVC , A3 ,
TITLE = ' Dest, Small,Svc Area' ,$
FIELDNAME = DPLREGN ,ALIAS = PLREGN , A5 ,
TITLE = 'Dest Plan, Region' ,$
FIELDNAME = DDCLOCSVC ,ALIAS = DCLOCSVC , A4 ,
TITLE = ' Dest DC, Local,Svc Area' ,$
FIELDNAME = DDCCNTLAR ,ALIAS = DCCNTLAR , A4 ,
TITLE = 'Dest DC,Control, Area' ,$
FIELDNAME = DSTATE ,ALIAS = DSTATE , A2 ,
TITLE = 'Dest DC, State' ,$
FIELDNAME = DCOUNTY ,ALIAS = DCOUNTY , A18,
TITLE = 'Dest DC, County' ,$

SEGNAME=SOAREA, SEGTYPE=KU, PARENT=SETOFF,
CRFILE=VCSTAREA, CRSEGNAME=SEGONE, CRKEY=SOZIP
FIELDNAME = SOZIP ,ALIAS = AZIP , A5 , FIELDTYPE=I,
TITLE = 'Setoff, Zip, Code' ,$
FIELDNAME = SOSMSVC ,ALIAS = SMSVC , A3 ,
TITLE = ' Setoff, Small,Svc Area' ,$
FIELDNAME = SOPLREGN ,ALIAS = PLREGN , A5 ,
TITLE = 'Setoff, Plan,Region' ,$
FIELDNAME = SODCLOCSVC ,ALIAS = DCLOCSVC , A4 ,
TITLE = 'Setoff DC, Local, Svc Area' ,$
FIELDNAME = SODCCNTLAR ,ALIAS = DCCNTLAR , A4 ,
TITLE = 'Setoff DC, Control, Area' ,$
FIELDNAME = SOSTATE ,ALIAS = SOSTATE , A2 ,
TITLE = 'Setoff DC, State' ,$
FIELDNAME = SOCOUNTY ,ALIAS = SOCOUNTY , A18,
TITLE = 'Setoff DC, County' ,$
END

DBA=EDWARD,$
USER=TOMMY, ACCESS=R,$
USER=ZAPPER,ACCESS=R,RESTRICT=FIELD ,NAME=TFINC_LHRV ,$
RESTRICT=FIELD ,NAME=TFINC_ASSC ,$
RESTRICT=FIELD ,NAME=TFINC_VLDS ,$
RESTRICT=FIELD ,NAME=TFINC_PASS ,$
RESTRICT=FIELD ,NAME=TFINC_TREV ,$
RESTRICT=FIELD ,NAME=TFINC_BOOK ,$
RESTRICT=FIELD ,NAME=TFINC_LDML ,$
RESTRICT=FIELD ,NAME=TFINC_EPML ,$
RESTRICT=FIELD ,NAME=TFINC_LOAD ,$
RESTRICT=FIELD ,NAME=TFINC_UNLD ,$
RESTRICT=FIELD ,NAME=TFINC_APUP ,$
RESTRICT=FIELD ,NAME=TFINC_SETP ,$
RESTRICT=FIELD ,NAME=TFINC_CCDP ,$
RESTRICT=FIELD ,NAME=TFINC_COMM ,$
RESTRICT=FIELD ,NAME=TFINC_OTHE ,$
RESTRICT=FIELD ,NAME=TFINC_LH_PTE,$
RESTRICT=FIELD ,NAME=TFINC_TPTE ,$
RESTRICT=FIELD ,NAME=TFINC_H302_REV ,$
RESTRICT=FIELD ,NAME=TFINC_H302_PTE ,$
RESTRICT=FIELD ,NAME=INVOICED_AMT,$
RESTRICT=FIELD ,NAME=INV_LH_AMT ,$
RESTRICT=SEGMENT,NAME=FINANC ,$


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
 
Posts: 44 | Location: Fort Wayne, IN | Registered: February 07, 2007Report This Post
Silver Member
posted Hide Post
I guess the fixFORM statements occur 3 times for SETOFF, and 4 times for HAULER as the cases were named accordingly. The only difference is what position in the input record it is pulling the data from for each CASE. It doesn't appear to be loading HVPCOST in a multi segment manner, although the HVPCOST masterfile shows that it is indeed a multi segment database.

Im still confused...


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
 
Posts: 44 | Location: Fort Wayne, IN | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Ronn,

What looks like is happening is that the input record is very long in length and has repeating information on it. For each 'instance' of HAULER and SETOFF data in the input record, the MODIFY is creating a single segment under ROOT for HAULER and under HAULER for SETOFF.

The file may be coming in from an outside source. Is there a problem? Or do you just want to know what is going on? If the latter, then I would diagram the input record in blocks and relate it to the master.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
The secret is the X-800 in the FORM statement. This move the location pointer back 800 characters. ( I am quessing without counting this is the beginning of the record)

Then the X462 jumps the location pointer ahead 462 characters. The is where the read starts.

Without seeing the actual input file I would assume there are multi-record type file, with different layout populating different Data Base Seqments.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Silver Member
posted Hide Post
Jim, that is correct. I guess one of the major things that confuses me is the multiple instances of INCLUDE commands in every CASE. When does MODIFY add a record in the output file? I am inclined to think that every INCLUDE statement will add a record in the output file, right? Or else UPDATE would have been coded instead, right?

Another thought I am playing with in my mind is that MODIFY adds a record in the output file only when it reaches the END statement of the MODIFY section and loops back to the top to read the next input record. I don't think that is true, isnt it?

One more thing... shouldn't MATCH be used against on a unique field? I know for sure the only unique field in this case is the CONTRACT field... and yet, it seems to work fine.

We are a trucking company. Each shipment is identified by a contract. Trucker ID no (HAULER) and set off dates (SODATE). You don't have to be in this business to assume that a single truck can ship multiple contracts all at the same date.

Something is strongly telling me that there's something wrong with this MODIFY report.


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
 
Posts: 44 | Location: Fort Wayne, IN | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Because this is a multi-segment FOCUS file, the way the modify is constructed should only cause it to INCLUDE segments one at a time. The term 'record' really doesn't apply here.

You are correct in that ON MATCH INCLUDE does seem a bit strange and after all of these years, I couldn't be positive about what it is doing.

The one thing that bothers me is that ON NOMATCH INCLUDE on a higher level segment will include all lower level segments for which there is active data. There are no ACTIVATE, DEACTIVATE statements in this MODIFY.

Again I suggest that you dig out the language manual and go over this code with a fine tooth comb.

Another method would be to create a test data base with input transactions where you know the format, just a few of them, then report off of the test file when you are done to see what it did.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Looking over the master: The top segment (PERLSEG) has one child segment, ROOT (an S3). ROOT has two Unique descendents (UNQ and UNQ2), and two unkeyed (S0) descendents (HAULER and FINANC). FINANC does not seem to be involved here.

Uniques require Match verbiage (on match continue to...) only for update or delete, not for include. There is no UPDATE, so no On Match Continue To.

At the end of the top case you have
  MATCH LDYYPP
    ON NOMATCH INCLUDE
    ON NOMATCH GOTO HAULER1
    ON MATCH CONTINUE
  MATCH CONTRACT CONT_PORT CONT_RL
    ON NOMATCH INCLUDE
    ON NOMATCH GOTO HAULER1
    ON MATCH CONTINUE


My recollection is the default ON MATCH action (absent an explicit INCLUDE/UPDATE/DELETE/REJECT) is Reject; in any event, falling thru the end of the TOP case will result in an implicit GOTO TOP (despite the "ON MAQTCH CONTINUE") -- either way, it appears the program will disregard the record if the keys of the first two segments are matched.

  MATCH HAULER
    ON NOMATCH INCLUDE
    ON NOMATCH GOTO SETOFF1
    ON MATCH INCLUDE
    ON MATCH GOTO SETOFF1 
. . .
  MATCH SODATE
    ON NOMATCH INCLUDE
    ON NOMATCH GOTO HAULER2
    ON MATCH INCLUDE
    ON MATCH GOTO HAULER2


It is permissible to match on non-key fields (VERY CAREFULLY -- you have to know how Focus handles the positioning). Since HAULER (and its child SETOFF) are S0 segments, by definition any matching will be on a non-key field.

ON MATCH INCLUDE is also valid syntax (also to be handled with care), and will result in duplicate 'key' values. -- The program is forcing inclusion whether or not a 'matching' record exists (once it is established that the pseudo-key field in question is present in the transaction data). In particular, a given instance of ROOT may have multiple child instances with the same value of HAULER (the sort-of Key field of segment HAULER). -- This intention is implicit in the Master: otherwise they would be coded as S1's rather than S0's. --

Does that help?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Using MODIFY command

Copyright © 1996-2020 Information Builders