Subfield question

Hello,
Can I define a subfield from a MU-field or fileds of PE?

Thanks in advanced

Did you mean subdescriptor?

Of course you can define a subdescriptor for a part of an PE/MU-Field.
The following example creates a sudescriptor XX for the first 2 bytes of AK (which is part of a PE):

adainv db=12 invert=11 fields 'XX=AK(1,2)' end_of_fields

regarding DDM for Natural:

DB: 012 FILE: 011  - FILE11                           DEFAULT SEQUENCE:
TYPE: ADABAS                                                           
                                                                       
T L DB Name                              F Leng  S D Remark            
- - -- --------------------------------  - ----  - - ------------------
P 1 AJ GRP-AJ
  2 AK PE-AK                             A    8  N
  2 AL PE-AL                             N  7.0  N
  2 AM PE-AM                             N  7.0  N
P 1 XX SUBDES-XX                         A    2    S
*      -------- SOURCE FIELD(S) -------
*      PE-AK(1-2)

Of cource you can make a natural-redefinition of an PE-field as well. This could be your natural-program:

define data local
01 viewname  view of file11
02 grp-aj (1:2)
  03 pe-ak
  03 redefine pe-ak
    04 ak-first3 (A3)
end-define
find viewname with subdes-xx = 'AB'
display *ISN viewname ak-first3(*)
end-find
end

Osman: yes, you can on the mainframe:
http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada814mfr/adamf/util/flddefs.htm#fndef_subfn

OK, it seems to be a mainframe-Feature.
Sorry, I’m only familiar with ADABAS on Open Systems … :oops: