Please enable JavaScript to view this site.

This program will retrieve contact details from the Aurora Contact Management file T1P1A in library AULT1F1 [or similar]. We have to supply this as program source as this needs to be compiled over your version of Aurora.

Creating the program

If you look in QUSRTOOLLE source file in library CPPD you will see the source for a program called COBCONTACT [from version 5.2 onwards of the Cobwebb Server software].

1.In order to use this program you will need to compile it over your version of Aurora i.e. have the correct Aurora library in the library list where the T1P1A01P file resides [usually AULT1F1].

2.We would suggest that you compile this program into the library COBEXIT which is the library name that is most commonly used for Cobwebb Exit Programs.  

Note: Please do not compile it into library CPPD otherwise this will be lost when you next upgrade your Cobwebb Server software.

3.The program will then need to be owned by AULOWNER and have the USRPRF parameter set to be *OWNER in order for CPPD to be able to access the data. You can do this either when you compile the program or by using the CHGPGM command and pressing F4.

You can use the following steps from your server session:

1.ADDLIBLE AULT1F1 (or your Aurora version of the library where T1P1A01P resides)

2.CRTBNDRPG PGM(COBEXIT/COBCONTACT) SRCFILE(CPPD/QUSRTOOLLE) SRCMBR(COBCONTACT) DFTACTGRP(*NO) DBGVIEW(*NONE) OPTIMIZE(*FULL) REPLACE(*YES) USRPRF(*OWNER)

3.CHGOBJOWN OBJ(COBEXIT/COBCONTACT) OBJTYPE(*PGM) NEWOWN(AULOWNER)

If you require any help with the above process please call or email support@cobwebb.co.uk and we will be pleased to assist you.

Using COBCONTACT in your PPD file

There are two ways of using this program. You may call it:

once passing in the Contact Number for the Contact details you wish to return in PARM6.

multiple times leaving PARM6 blank which will return the next set of Contact details matching the supplied PARM1-5 each time you call the program. When all Contact details have been returned you will see *NORECS returned in PARM1. Once you have this entry you will need to call the program once more, specifying *LAST in PARM6 to close the program.

In your PPD you need to call the Exit program COBCONTACT, with the parameters listed below. You will need to add both COBEXIT (the library where you have complied this program) and AULT1F1 (the Aurora library where the file T1P1A resides) libraries to the list of libraries.

Parameter

In

Len

Out

Len

Aurora Field Name

PARM1

Company Number

2

Contact Name or *NORECS

35

CNTN1A

PARM2

Selection Criteria - see below for details.

7

Correspondence Name

35

CRNM1A

PARM3

Customer/Supplier Account No

8

Email Address

80

EMIL1A

PARM4

Delivery Sequence No

3

Fax Number

30

Depends on Selection Criteria - see below for details.

PARM5

Contact Type [blank for all]

4

General Text 1 (&2)

32(65)

GTX11A

GTX21A

PARM6

Contact Number or *LAST - see below for details.

9

Contact Type

4

CTCT1A

Note: If there are no more contact records to retrieve the program will pass back *NORECS in PARM1 instead of the Contact Name so that this must be tested for. Once *NORECS has been returned in PARM1; then you need to make one last call to the program specifying *LAST in PARM6 to close the program.

Selection Criteria

This parameter is manually entered in the Data box in the following format:

Position 1–2

GL Code (e.g. 01)

Position 3–4

Application code (e.g. SL, PL)

Position 5–5

Fax field No – this is a number (1-4) which represents the telephone number entry that is used for the fax number. Please refer to the table below for the number to use for the Fax field No.

Fax Field No

Field Name on T1P1A

Description

1

HMNB1A

Home Telephone Number

2

PFNB1A

Preferred Telephone Number

3

OFNB1A

Office Telephone Number

4

MBNB1A

Mobile Telephone Number

Position 6–6

Record Selection Flag

(1=Select if Email address found)

 

(2=Select if designated Fax number found)

 

(3=Select if either Email or Fax entry found)

 

(0=Return all entries regardless)

Position 7–7

Text Flag (Y=Concatenate two “General Text” fields, N=Only Text 1). Note: Depending upon your selection here the returned value will be up to 32 or 65 characters.

Contact Number or *LAST

This parameter is used for two different scenarios.

1.If you know the actual Contact Number whose details you wish to retrieve, you may pass this in here and the program will only select the unique contact record. The selection criteria passed in PARM2 and PARM5 will also be honored.

2.If you wish to return all Contact details matching PARM1-5 then you need to leave this entry blank and call the program multiple times until you see *NORECS returned in PARM1; then you need to make one last call to the program specifying *LAST in this parameter (PARM6) to close the program. Note: With the *LAST call it doesn't matter what is in PARM1-5.