CLOB stands for Character Large Object, CLOB stores large amounts of character data ,up to 4GB in size. CLOB data may be very large, some database management systems do not store the text directly in the table. Instead, the CLOB field serves as an address, which references the location of the data.

New Stuff:- How to increase no. of characters in Line text entry using import template

How to address CLOB in X3 Script file and Screen, tables and reports:

In X3,Clbfile is the keyword used to declare the variables of the type CLOB.

Syntax:

          Local Clbfile Name_of_the_Variable(Length)

          Local Clbfile Name_of_the_Variable(Length)(Dimensions)

Example:

          Local Clbfile YMYCLOB(200)

          Local Clbfile YMYCLOB(200)(1..10)

          Dimension: having index range 1 to 10

In X3 ,ACB is the data types that can be used in all the dictionaries where the CLOB data is defined  in screen fields, table fields, report setups, etc.

ACB data type stores the information more than 250 characters in the database.

When saving file date to the field of table if you find any “Text file length too long error”, then declare the field as ACB to rectify the error.

Create Subprogram based Web service:

STEP 1: Create a script with subprogram for storing input data to the table.

Create a table named YCLOBTAB with following fields

S.No

Name of the Field

Datatype

Length

1

YLEG

A

10

2

YFILENAM

A

50

3

YFILESTR

ACB

 

4

YSTA

A

50

Click on Create and Validate the table in X3.

Create the Script file name: YSAVEENCRYPT and write the subprogram below:

Subprog  YSAVECLOB(YLEG,YFILENAM,YFILESTR,YSTA) 

Value    Char     YLEG

Value    Char     YFILENAM

Value    Clbfile   YFILESTR

Variable Char     YSTA

##OPENING Table for storing CLOB data FILE

If !clalev([F:YCLB]) Local File YCLOBTAB[F: YCLB] :Endif

####ERROR HANDLING

ONERRGO YCATCH

         [F: YCLB]YLEG           = YLEG

          [F: YCLB]YFILENAM = YFILENAM

          [F: YCLB]YFILESTR  = YFILESTR

          WRITE[F: YCLB]

          YSTA = “SUCCESS”

ONERRGO

#####

Close File[F: YCLB]

End

## ERROR HANDLING CATCH METHOD

$YCATCH

   YSTA = “FAIL”

Resume

STEP 2: Create Subprograms by referring script file and subprogram created on step 1

Navigational Path: Development>Script dictionary>Subprograms.

Creating Subprograms
Creating Subprograms

Enter the Script file name in File field “YSAVEENCRYPT”

Enter the subprogram name in Subprograms field “YSAVECLOB”

Enter the appropriate description in Description field “Save CLOB data”

Then click on Create button, then publication button gets enabled then click on publication button to create web service.

Creating Webservices
Creating Webservices

STEP 4:Invoking the Web service by XML input

For Invoking Webservices, Please refer the blog “How to invoke Import/Export Template through Webservices”

Place the below XML in  Input XML/JSON field

<PARAM>

<GRP ID=”GRP1″>

<FLD NAM=”YSLEG”  TYP=”Char”>AUS</FLD>

<FLD NAM=”YSFILENAM”  TYP=”Char”>FIL002</FLD>

<FLD NAM=”YSFILESTR”  TYP=”Clob”>

hQEMA/KwatWd7FffAQf/Zh/GVgozLWaVOVzVrJT9KZvjJ0QKs4p698zA2oCb9LhK

QRprExhgALKZp7qdtnK5LRC9P1VNt0lKduZ23BjxXWlaxY5V+TwxdAcVXEonWhB2

3SbK9wDjgB1w0zItOC+dz5TEYvzXJMlb9mGqVKwVWqRYYaKgjg3AHF4+iu4VSUns

sImvvOvnNDQ/3KPX3NE3F3RS9XeTajU4zozbYkry+mcxGbj9wAsNASMLWqBTb2sN

NGG5EAqkqTBxsIbHv+m5J8GZbpTrJgIkiek+shVrH0nNnIGyz6I7bedxIupFY5xQ

lYAuupvuIuSK4DcOuiXazUvKx81kSFGvKTnsadMCcsnBHaOE6dEW9crEd5itDsWE

yJflofoO2WR7B1vQ5O2Vd8pBLJ7xxtt3SVzQToO4921wRd99BROeMfUDVLXwqR5/

AGUbyw+Y383AFSfdjYvxK2XSW3Fit6JVNZ1SqXVVuMzpyA9+nchkffzL4WiI+p7m

I7VnuAjrltUqTcC+7cd1viTVcH6GD9liaElQnbwVJt12FYOe0JYio9FWOdFPBeIJ

Vhm0RjPm/fDffbGhPm/mzkbhJLskRFXek1e//wt9SEmSgJ6U/erYerfxwOYPDE2n

y3qrP7Kz5ROQn15cU8Fh8zoTBJT53pvAH6GFvpzoQoPyv35Oy1YWulHTRkWoCRoG

kJVbvL2pUftyxZBWc1tufQKZ9VO7s+WqiS1BJWvwj2U1JdbLgbt+1mQXU+T86KHg

xfKTjMBnjZFLKXJxvyn+efx6zfQ5EDiaw7SmsLoQe4stA9RHQcYRuN0UAGR4qxVS

Lm6QAPQImLnz+17Uqt449w5s9OEOlRAva+6aN9tJmp+roeQOT813Mn6BPz51KX65

/gbPUDRgPp30NQsEDbqusrqLVCCEikYGwLteNNShbz2+IR1mDtsEsDsRFJPNOaaL

t05eLvB4DPjCZWL27lKkOXMeXuj3kzYdXDVyl0YHyw===Z1hp

</FLD>

<FLD NAM=”YSTA”  TYP=”Char”></FLD>

</GRP>

</PARAM>

The field YSFILESTR contains more than 255 characters.

STEP 5: Response after invoking Web services

<RESULT>

<GRP ID=”GRP1″>

<FLD NAME=”YSLEG” TYPE=”Char”>AUS</FLD>

<FLD NAME=”YSFILENAM” TYPE=”Char”>FIL002</FLD>

<FLD NAME=”YSFILESTR” TYPE=”Clob”>hQEMA/KwatWd7FffAQf/Zh/GVgozLWaVOVzVrJT9KZvjJ0QKs4p698zA2oCb9LhK QRprExhgALKZp7qdtnK5LRC9P1VNt0lKduZ23BjxXWlaxY5V+TwxdAcVXEonWhB2 3SbK9wDjgB1w0zItOC+dz5TEYvzXJMlb9mGqVKwVWqRYYaKgjg3AHF4+iu4VSUns sImvvOvnNDQ/3KPX3NE3F3RS9XeTajU4zozbYkry+mcxGbj9wAsNASMLWqBTb2sN NGG5EAqkqTBxsIbHv+m5J8GZbpTrJgIkiek+shVrH0nNnIGyz6I7bedxIupFY5xQ lYAuupvuIuSK4DcOuiXazUvKx81kSFGvKTnsadMCcsnBHaOE6dEW9crEd5itDsWE yJflofoO2WR7B1vQ5O2Vd8pBLJ7xxtt3SVzQToO4921wRd99BROeMfUDVLXwqR5/ AGUbyw+Y383AFSfdjYvxK2XSW3Fit6JVNZ1SqXVVuMzpyA9+nchkffzL4WiI+p7m I7VnuAjrltUqTcC+7cd1viTVcH6GD9liaElQnbwVJt12FYOe0JYio9FWOdFPBeIJ Vhm0RjPm/fDffbGhPm/mzkbhJLskRFXek1e//wt9SEmSgJ6U/erYerfxwOYPDE2n y3qrP7Kz5ROQn15cU8Fh8zoTBJT53pvAH6GFvpzoQoPyv35Oy1YWulHTRkWoCRoG kJVbvL2pUftyxZBWc1tufQKZ9VO7s+WqiS1BJWvwj2U1JdbLgbt+1mQXU+T86KHg xfKTjMBnjZFLKXJxvyn+efx6zfQ5EDiaw7SmsLoQe4stA9RHQcYRuN0UAGR4qxVS Lm6QAPQImLnz+17Uqt449w5s9OEOlRAva+6aN9tJmp+roeQOT813Mn6BPz51KX65 /gbPUDRgPp30NQsEDbqusrqLVCCEikYGwLteNNShbz2+IR1mDtsEsDsRFJPNOaaL t05eLvB4DPjCZWL27lKkOXMeXuj3kzYdXDVyl0YHyw== =Z1hp</FLD>

<FLD NAME=”YSTA” TYPE=”Char”>SUCCESS</FLD>

</GRP>

</RESULT>

This blog helps us to understand what is CLOB, what is the keyword used in script and database in X3 and how to store the CLOB data to the table using subprogram based web service.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation competence.

Greytrix caters to a wide range of Sage X3, a Sage Business Cloud Solution, offerings. Our unique GUMU™ integrations include Sage X3 for Sage CRMSalesforce.com, Dynamics 365 CRM and Magento eCommerce along with Implementation and Technical Support worldwide for Sage X3. Currently we are Sage X3 Implementation Partner in East Africa, Middle East, Australia, Asia, US, UK. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight  and Letter of Credit and India Legislation for Sage X3 to Sage business partners, end users and Sage PSG worldwide.

Greytrix is a recognized Sage champion ISV Partner for GUMU™ Sage X3 – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage X3 – Salesforce is a 5-star rated app listed on Salesforce AppExchange and GUMU™ integration for Dynamics 365 CRM – Sage ERP listed on Microsoft AppSource.

For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com, We will like to hear from you.

Welcome
Book an Appointment img

Book Your Appointment

Our schedule for April 2025

 
MoTuWeThFrSaSu
 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 
MoTuWeThFrSaSu
April 1, 2025
8:00 am
8:15 am
8:30 am
8:45 am
9:00 am
9:15 am
9:30 am
9:45 am
10:00 am
10:15 am
10:30 am
10:45 am
11:00 am
11:15 am
11:30 am
11:45 am
12:00 pm
12:15 pm
12:30 pm
12:45 pm
1:00 pm
1:15 pm
1:30 pm
1:45 pm
2:00 pm
2:15 pm
2:30 pm
2:45 pm
3:00 pm
3:15 pm
3:30 pm
3:45 pm
4:00 pm
4:15 pm
4:30 pm
4:45 pm
Holiday
Not Possible
Busy
Free
Today

Please check the appointment details below and confirm: