• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Workcentre to WSJ link - Can someone else verify I may have found a link

johndanter

Legendary Poster
Hi List,

Jumping from the F986110 WSJ table to the F0113nn Work Centre tables.

I asked this a while back but I think I may have found something and need someone else to check this theory for me please.

Can someone else check that the link may actually be this:

So for your job #

F986110.JCPROCESSID = F01131.PID

Then use F01131.ZZSERK to link to the rest of them....I can never remember the link but I have it written down somewhere :)

Thanks

John
 

johndanter

Legendary Poster
Done it!!!!

WC messages are written if the job ends in error or successfully.
LM0021 = OK LM0022 = ERROR

I wrote a simple NER BSFN to use OBNM VERS, USER, DATE, TIME to find a match on F01131 then tap into F01131M if needed.
To be honest if the F01131.ZZTMPI says LM0022 or LM0034 then that's enough

Here's the DSTR

Data Structure: D5500002W - RRD WorkCentre Message Retrieval
BF szFoundationFutureUse2 [FNDFUF2]
BF szNameObject [OBNM]
BF szVersion [VERS]
BF szUserId [USER]
BF mnAddressNumber [AN8]
BF jdDateJobSubmitted [SBMDATE]
BF mnTimeJobSubmitted [SBMTIME]
BF mnTimeLastActivity [ACTTIME]
BF szTemplateMessageID [TMPI]
BF szMailBoxDesignator [MBDS]
BF mnKeyValueSerialNumber [SERK]
BF cErrorCode1 [ERRC]
BF cJobEndedinErrorY [EV01]


Here's the NER code

Listing of ER for Named ER: N550002W


=======================================================================
NAMED ER: RRD Work Centre Message Retrieval
=======================================================================
evt_TemplateSubstitValues_TSV
evt_LevelIndented_LV
OPT: Using Defaults
// Object Creation PROJ2724.01.02 John Danter 16/12/2015
//
// This BSFN is to be used to try and obtain the correct PPAT Work Centre SERK
// message key.
// The BSFN will use either OBNM & VERS or FNDFUF2 to try and find a match on
// F01131
//
//
// ======================================
// Obtain F01131.ZZTSV key
// ======================================
//
// F01131.ZZTSV = R5541110|SCH0001|0|
// F986110.JCFNDFUF2 =R5541110_SCH0001_8539346_PDF
//
VA evt_TemplateSubstitValues_TSV = ""
If BF szNameObject is greater than <Blank> And BF szVersion is greater than <Blank>
VA evt_TemplateSubstitValues_TSV = concat([BF szNameObject],"|")
VA evt_TemplateSubstitValues_TSV = concat([VA evt_TemplateSubstitValues_TSV],[BF szVersion])
VA evt_TemplateSubstitValues_TSV = concat([VA evt_TemplateSubstitValues_TSV],"|0|")
Else
Parse Delimited String
BF szFoundationFutureUse2 -> BF szInputObjectID
BF szNameObject <- BF szOutputObjectSegment
<Zero> -> BF mnSegmentNumber
"_" -> BF cDelimiter
Parse Delimited String
BF szFoundationFutureUse2 -> BF szInputObjectID
BF szVersion <- BF szOutputObjectSegment
"1.00" -> BF mnSegmentNumber
"_" -> BF cDelimiter
VA evt_TemplateSubstitValues_TSV = concat([BF szNameObject],"|")
VA evt_TemplateSubstitValues_TSV = concat([VA evt_TemplateSubstitValues_TSV],[BF szVersion])
VA evt_TemplateSubstitValues_TSV = concat([VA evt_TemplateSubstitValues_TSV],"|0|")
End If
//
// ======================================
// Get USER ID AN8
// ======================================
If BF mnAddressNumber is less than or equal to <Zero>
Get User Address Book Number
BF szUserId -> BF szUserIdentifier
BF mnAddressNumber <- BF mnAddressBookNumber
End If
//
// ======================================
// Defaults
// ======================================
! If BF szTemplateMessageID is less than or equal to <Blank>
! BF szTemplateMessageID = "LM0022"
! End If
//
! // 01 = Personal In Basket
! // 02 = Submitted Jobs
! If BF szMailBoxDesignator is less than or equal to <Blank>
! BF szMailBoxDesignator = "01"
! End If
//
// ======================================
// Check Job on F01131 F01131M
// ======================================
//
// Here we use values fed in from F986110 to try and find a match on the WC
// tables:
// UBE and VERS of Job Submitted (FNDFUF2 converted to OBNM|VERS)
// Date Job Submitted
// Time Job Submitted (Greater than or Equal To)
// User of Job submitted (converted to AN8)
//
//
VA evt_LevelIndented_LV = "1"
BF cJobEndedinErrorY = ""
//
// Now get SERK from F01131 (use index on AN8 + SERK)
// SERK is incremental so feeds into a chronological index by nature.
//
F01131.Open
F01131.Select ([Index 3: AddressNumber, SerialNumber])
BF mnAddressNumber = TK Address Number
BF jdDateJobSubmitted = TK Date - Tickler
BF mnTimeJobSubmitted <= TK Time - Last Updated
BF mnAddressNumber = TK Address Number - Parent
VA evt_LevelIndented_LV = TK Level of Indention
VA evt_TemplateSubstitValues_TSV = TK Template Substitution Values
F01131.Fetch Next ([Index 3: AddressNumber, SerialNumber])
BF mnKeyValueSerialNumber <- TK Key Value Serial Number
BF szTemplateMessageID <- TK Template ID
//
If SV File_IO_Status is equal to CO SUCCESS
F01131M.Fetch Single ([Index 2: ParentParent])
BF mnKeyValueSerialNumber = TK ParentKeyValueSerialNumberA
If SV File_IO_Status is equal to CO SUCCESS
BF cJobEndedinErrorY = "Y"
// FUTURE USE
// Check to see if the WC message from F01131.ZZTMPI is in the list of errors
// is in UDC 55 WC
//
End If
End If
//
F01131.Close
//
//

Tuesday December 22, 2015 03:32
 
Last edited:

peterbruce

Legendary Poster
John,

Well done!

This might be a little of "closing the gate after the horse has bolted" but a few years ago (2011 and 2012, I think) I gave a couple of presentations at the local (Australia and New Zealand) Quest Conference on the work Centre. If you want a copy of either or both send me a private message.
 
Top