01 STORE-MESSAGE VIEW OF INCOMING-MESSAGE-QUEUE
02 COUNTER-PARTY-REFERENCE
02 ERROR-CODE
02 ERROR-MESSAGE
02 RECON-SEQ
02 DATE-RECEIVE
02 TIME-RECEIVE
02 SENDER-ADDRESS
02 RECEIVER-ADDRESS
02 MESSAGE-SOURCE
02 C*MESSAGE-CONTENT
02 MESSAGE-CONTENT (1:100)
02 LAST-CHANGE-USER
02 LAST-CHANGE-DATE
02 LAST-CHANGE-TIME
What is the use of C* variable and why this MESSAGE-CONTENT variable has mentioned 2 times ?
What is the use of C*variable ?
-
- Posts: 90
- Joined: Sun Mar 14, 2010 5:12 pm
- Skillset: Natural,Adabas,jcl
- Referer: friend
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: What is the use of C*variable ?
The following line tells Adabas to return up to 100 occurrences of the field.
This line tells Adabas to return the actual count of the number of occurrences returned, so that you know how many to process.In your code you can use C*MESSAGE-CONTENT like any other numeric variable (with a few limitations).
Code: Select all
02 MESSAGE-CONTENT (1:100)
This line tells Adabas to return the actual count of the number of occurrences returned, so that you know how many to process.
Code: Select all
02 C*MESSAGE-CONTENT
-
- Posts: 90
- Joined: Sun Mar 14, 2010 5:12 pm
- Skillset: Natural,Adabas,jcl
- Referer: friend
Re: What is the use of C*variable ?
Can you please explain me C*MESSAGE-CONTENT with a example ?
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: What is the use of C*variable ?
Sure. Here's a stripped-down sample from my Introduction to Natural class. (hint hint, nudge nudge, wink wink
) It uses the standard EMPLOYEE file provided by Software AG.
And here is the output:

Code: Select all
DEFINE DATA LOCAL
1 EMP VIEW EMPLOYEES
2 PERSONNEL-ID (HD='Personnel')
2 NAME
2 FIRST-NAME
2 C*INCOME (HD='C*')
2 CURR-CODE (10) (HD='Cur')
2 SALARY (10) (HD='Salary')
1 #C (N3) (HD='Cnt')
END-DEFINE
READ (5) EMP BY PERSONNEL-ID
ASSIGN #C = C*INCOME
DISPLAY (ZP=F SG=F ES=T)
PERSONNEL-ID
NAME
FIRST-NAME
#C
C*INCOME
CURR-CODE (*)
SALARY (*)
END-READ
END
And here is the output:
Code: Select all
Page 1 05/20/10 23:38:56
Personnel NAME FIRST-NAME Cnt C* Cur Salary
--------- -------------------- -------------------- --- --- --- ---------
11100102 SCHINDLER EDGAR 4 4 EUR 24615
EUR 23589
EUR 22307
EUR
11100105 SCHIRM CHRISTIAN 2 2 EUR 34871
EUR 33846
11100106 SCHMITT REINER 4 4 EUR 26153
EUR 24358
EUR 23076
EUR 22051
11100107 SCHMIDT HELGA 2 2 EUR 18461
EUR 16410
11100108 SCHNEIDER WOLFGANG 4 4 EUR 22564
EUR 21538
EUR 20000
EUR 18974
-
- Posts: 90
- Joined: Sun Mar 14, 2010 5:12 pm
- Skillset: Natural,Adabas,jcl
- Referer: friend
Re: What is the use of C*variable ?
1)Can we write C* in place of C*INCOME ?
Personnel NAME FIRST-NAME Cnt C* Cur Salary
--------- -------------------- -------------------- --- --- --- ---------
11100102 SCHINDLER EDGAR 4 4 EUR 24615
EUR 23589
EUR 22307
EUR
2)In salary colum only 3 values are populated so value of C*INCOME should be 3 but you have mentioned it as 4 . can you please exlain me this ?
Personnel NAME FIRST-NAME Cnt C* Cur Salary
--------- -------------------- -------------------- --- --- --- ---------
11100102 SCHINDLER EDGAR 4 4 EUR 24615
EUR 23589
EUR 22307
EUR
2)In salary colum only 3 values are populated so value of C*INCOME should be 3 but you have mentioned it as 4 . can you please exlain me this ?
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: What is the use of C*variable ?
1) No, C* can be used only as a prefix of an MU or PE. The display header shows C* only because I specified 'C*' as the header value (HD parameter).
2) There are four values. INCOME is composed of two fields - SALARY and CURR-CODE. The fourth occurrence of INCOME contains EUR and 0.
2) There are four values. INCOME is composed of two fields - SALARY and CURR-CODE. The fourth occurrence of INCOME contains EUR and 0.
-
- Posts: 90
- Joined: Sun Mar 14, 2010 5:12 pm
- Skillset: Natural,Adabas,jcl
- Referer: friend
Re: What is the use of C*variable ?
Thanks a alott for clearing my doubt.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 5
- 3998
-
by sergeyken
View the latest post
Wed Jun 16, 2021 6:23 pm
-
- 1
- 2130
-
by chaat
View the latest post
Wed Sep 22, 2021 11:40 pm
-
- 1
- 1243
-
by sergeyken
View the latest post
Tue Nov 08, 2022 7:22 pm
-
- 1
- 4418
-
by TERMEN
View the latest post
Thu Mar 04, 2021 2:29 am
-
- 2
- 8429
-
by prino
View the latest post
Sat Mar 13, 2021 4:47 am