Open Business Objects for EDI
v3.6.0

com.americancoders.samples
Class build997

java.lang.Object
  |
  +--com.americancoders.samples.build997

public class build997
extends java.lang.Object

code template to build
class 997 Functional Acknowledgment
This Draft Standard for Trial Use contains the format and establishes the data contents of the Functional Acknowledgment Transaction Set (997) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to define the control structures for a set of acknowledgments to indicate the results of the syntactical analysis of the electronically encoded documents. The encoded documents are the transaction sets, which are grouped in functional groups, used in defining transactions for business data interchange. This standard does not cover the semantic meaning of the information encoded in the transaction sets.

Author:
OBOECodeGenerator

Field Summary
 com.americancoders.edi.x12.X12Envelope env
           
 
Constructor Summary
build997(com.americancoders.edi.x12.X12Envelope inEnv, com.americancoders.edi.DocumentErrors inDErr)
          constructor for class build997
 
Method Summary
 com.americancoders.edi.Loop buildLoopAndSegmenAK3forTableHeaderLoopAK2(com.americancoders.edi.Loop inLoop, java.lang.String errID, int errPos)
          builds loop and segment AK3 that is part of the TableHeader LoopAK2
Data Segment Note used
To report errors in a data segment and identify the location of the data segment
 com.americancoders.edi.Loop buildLoopAndSegmenAK3forTableHeaderLoopAK2(com.americancoders.edi.Loop inLoop, java.lang.String errID, int errPos, java.lang.String errCode)
          builds loop and segment AK3 that is part of the HeaderAK2
Data Segment Note used
To report errors in a data segment and identify the location of the data segment
 com.americancoders.edi.Loop buildLoopTransactionSetResponseHeaderforTableHeader(com.americancoders.edi.Table inTable, com.americancoders.edi.FunctionalGroup inFG, com.americancoders.edi.DocumentErrors inDErr)
          builds loop AK2 that is part of the TableHeader
Transaction Set Response Header used
 com.americancoders.edi.Segment buildSegmentAK4forTableHeaderLoopAK2LoopAK3(com.americancoders.edi.Loop inLoop, java.lang.Object inErrObject, java.lang.String errCode, java.lang.String errID)
          builds segment AK4 that is part of the HeaderAK2AK3
Data Element Note used
To report errors in a data element or composite data structure and identify the location of the data element
 com.americancoders.edi.Segment buildSegmentFunctionalGroupResponseHeaderforTableHeader(com.americancoders.edi.Table inTable, com.americancoders.edi.FunctionalGroup inFG)
          builds segment AK1 that is part of the TableHeader
Functional Group Response Header used
To start acknowledgment of a functional group
 com.americancoders.edi.Segment buildSegmentFunctionalGroupResponseTrailerforTableHeader(com.americancoders.edi.Table inTable, com.americancoders.edi.FunctionalGroup inFG, boolean inErr, int acceptCnt)
          builds segment AK9 that is part of the TableHeader
 com.americancoders.edi.Segment buildSegmentTransactionSetHeaderforTableHeader(com.americancoders.edi.Table inTable)
          builds segment ST that is part of the TableHeader
Transaction Set Header used
To indicate the start of a transaction set and to assign a control number
 com.americancoders.edi.Segment buildSegmentTransactionSetResponseHeaderforLoopAK2(com.americancoders.edi.Loop inLoop, com.americancoders.edi.TransactionSet inTS, com.americancoders.edi.DocumentErrors inDErr)
          builds segment AK2 that is part of the LoopAK2
Transaction Set Response Header used
To start acknowledgment of a single transaction set
 void buildSegmentTransactionSetResponseTrailerforLoopAK2(com.americancoders.edi.Loop inLoop, java.lang.String accRej, java.lang.String code)
          builds segment AK5 that is part of the HeaderAK2
Transaction Set Response Trailer used
To acknowledge acceptance or rejection and report errors in a transaction set
 com.americancoders.edi.Segment buildSegmentTransactionSetTrailerforTableHeader(com.americancoders.edi.Table inTable)
          builds segment SE that is part of the TableHeader
Transaction Set Trailer used
To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)
 void checkLoop(com.americancoders.edi.Loop loopAK2forAK3, com.americancoders.edi.Loop inLoop, com.americancoders.edi.DocumentErrors inDErr)
          works with loops looking to see if DocumentError object is pointing at any of its elements
 void checkSegment(com.americancoders.edi.Loop loopAK2forAK3, com.americancoders.edi.Segment testSeg, com.americancoders.edi.DocumentErrors inDErr)
          works with individual segments looking to see if DocumentError object is pointing at it
 java.lang.String getNextControlNumber(java.lang.String what)
           
static void main(java.lang.String[] args)
          the application main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

env

public com.americancoders.edi.x12.X12Envelope env
Constructor Detail

build997

public build997(com.americancoders.edi.x12.X12Envelope inEnv,
                com.americancoders.edi.DocumentErrors inDErr)
         throws OBOEException
constructor for class build997

Parameters:
inEnv - an OBOE X12Document object that we are responding to with this 997
inDErr - DocumentErrors object created when inEnv was created.
Throws:
OBOEException - - most likely transactionset not found
Method Detail

buildSegmentTransactionSetHeaderforTableHeader

public com.americancoders.edi.Segment buildSegmentTransactionSetHeaderforTableHeader(com.americancoders.edi.Table inTable)
                                                                              throws OBOEException
builds segment ST that is part of the TableHeader
Transaction Set Header used
To indicate the start of a transaction set and to assign a control number

Parameters:
inTable - table containing this segment
Returns:
segment object ST
Throws:
OBOEException - - most likely segment not found

buildSegmentFunctionalGroupResponseHeaderforTableHeader

public com.americancoders.edi.Segment buildSegmentFunctionalGroupResponseHeaderforTableHeader(com.americancoders.edi.Table inTable,
                                                                                              com.americancoders.edi.FunctionalGroup inFG)
                                                                                       throws OBOEException
builds segment AK1 that is part of the TableHeader
Functional Group Response Header used
To start acknowledgment of a functional group

Parameters:
inTable - table containing this segment
inFG - functional group we are responding to
Throws:
OBOEException - - most likely segment not found

buildLoopTransactionSetResponseHeaderforTableHeader

public com.americancoders.edi.Loop buildLoopTransactionSetResponseHeaderforTableHeader(com.americancoders.edi.Table inTable,
                                                                                       com.americancoders.edi.FunctionalGroup inFG,
                                                                                       com.americancoders.edi.DocumentErrors inDErr)
                                                                                throws OBOEException
builds loop AK2 that is part of the TableHeader
Transaction Set Response Header used

Parameters:
inTable - table containing this segment
inFG - functional group containing transaction sets we're responding to
inDErr - possible errors are contained in this.
Throws:
OBOEException - - most likely segment not found

buildSegmentTransactionSetResponseHeaderforLoopAK2

public com.americancoders.edi.Segment buildSegmentTransactionSetResponseHeaderforLoopAK2(com.americancoders.edi.Loop inLoop,
                                                                                         com.americancoders.edi.TransactionSet inTS,
                                                                                         com.americancoders.edi.DocumentErrors inDErr)
                                                                                  throws OBOEException
builds segment AK2 that is part of the LoopAK2
Transaction Set Response Header used
To start acknowledgment of a single transaction set

Parameters:
inLoop - loop containing this segment
Returns:
segment object AK2
Throws:
OBOEException - - most likely segment not found

checkLoop

public void checkLoop(com.americancoders.edi.Loop loopAK2forAK3,
                      com.americancoders.edi.Loop inLoop,
                      com.americancoders.edi.DocumentErrors inDErr)
works with loops looking to see if DocumentError object is pointing at any of its elements

Parameters:
loopAK2forAK3 - loop to contain the reporting AK3
inDErr - DocumentErrors object

checkSegment

public void checkSegment(com.americancoders.edi.Loop loopAK2forAK3,
                         com.americancoders.edi.Segment testSeg,
                         com.americancoders.edi.DocumentErrors inDErr)
works with individual segments looking to see if DocumentError object is pointing at it

Parameters:
loopAK2forAK3 - loop to contain the reporting AK3
testSeg - segment we are testing
inDErr - DocumentErrors object

buildLoopAndSegmenAK3forTableHeaderLoopAK2

public com.americancoders.edi.Loop buildLoopAndSegmenAK3forTableHeaderLoopAK2(com.americancoders.edi.Loop inLoop,
                                                                              java.lang.String errID,
                                                                              int errPos)
                                                                       throws OBOEException
builds loop and segment AK3 that is part of the TableHeader LoopAK2
Data Segment Note used
To report errors in a data segment and identify the location of the data segment

Parameters:
inLoop - loop containing this subsegment, the AK2 loop
errID - segment ID in error
errPos - int
Throws:
OBOEException - - most likely segment not found

buildLoopAndSegmenAK3forTableHeaderLoopAK2

public com.americancoders.edi.Loop buildLoopAndSegmenAK3forTableHeaderLoopAK2(com.americancoders.edi.Loop inLoop,
                                                                              java.lang.String errID,
                                                                              int errPos,
                                                                              java.lang.String errCode)
                                                                       throws OBOEException
builds loop and segment AK3 that is part of the HeaderAK2
Data Segment Note used
To report errors in a data segment and identify the location of the data segment

Parameters:
inLoop - loop containing this subsegment, the AK2 loop
errID - segment ID containing errors
errPos - int
errCode - String value as reported by parser
Throws:
OBOEException - - most likely segment not found

buildSegmentAK4forTableHeaderLoopAK2LoopAK3

public com.americancoders.edi.Segment buildSegmentAK4forTableHeaderLoopAK2LoopAK3(com.americancoders.edi.Loop inLoop,
                                                                                  java.lang.Object inErrObject,
                                                                                  java.lang.String errCode,
                                                                                  java.lang.String errID)
                                                                           throws OBOEException
builds segment AK4 that is part of the HeaderAK2AK3
Data Element Note used
To report errors in a data element or composite data structure and identify the location of the data element

Parameters:
inLoop - containing this subsegment
inErrObject - object causing the error
errCode - 723 error code
errID - field id in error
Throws:
OBOEException - - most likely segment not found

buildSegmentTransactionSetResponseTrailerforLoopAK2

public void buildSegmentTransactionSetResponseTrailerforLoopAK2(com.americancoders.edi.Loop inLoop,
                                                                java.lang.String accRej,
                                                                java.lang.String code)
                                                         throws OBOEException
builds segment AK5 that is part of the HeaderAK2
Transaction Set Response Trailer used
To acknowledge acceptance or rejection and report errors in a transaction set

Parameters:
inLoop - Loop that will hold the AK5 segment to be built, an AK2.
accRej - - "A" or "R"
code - - 718 code indicating type of error
Throws:
OBOEException - - most likely segment not found

buildSegmentFunctionalGroupResponseTrailerforTableHeader

public com.americancoders.edi.Segment buildSegmentFunctionalGroupResponseTrailerforTableHeader(com.americancoders.edi.Table inTable,
                                                                                               com.americancoders.edi.FunctionalGroup inFG,
                                                                                               boolean inErr,
                                                                                               int acceptCnt)
                                                                                        throws OBOEException
builds segment AK9 that is part of the TableHeader

Parameters:
inTable - table containing the AK9 segment to be built
inFG - functional group reporting on
Throws:
OBOEException - - most likely segment not found

buildSegmentTransactionSetTrailerforTableHeader

public com.americancoders.edi.Segment buildSegmentTransactionSetTrailerforTableHeader(com.americancoders.edi.Table inTable)
                                                                               throws OBOEException
builds segment SE that is part of the TableHeader
Transaction Set Trailer used
To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)

Parameters:
inTable - table containing this segment
Returns:
segment object SE
Throws:
OBOEException - - most likely segment not found

getNextControlNumber

public java.lang.String getNextControlNumber(java.lang.String what)

main

public static void main(java.lang.String[] args)
the application main method.
format: java build997 X12FileToBeParsed

Returns:
nothing. 997 output is written to system.out file

Open Business Objects for EDI
v3.6.0


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.