Easytrieve

 View Only
  • 1.  Easytrieve/XML nesting

    Posted Jul 28, 2017 11:48 AM

    Hello - 

    I'm experimenting with the Easytrieve XML function.  My code is currently producing this:

    <REPT1_REPORT>
     <REGION REGION='2'>
      <BRANCH BRANCH='lone tree      '>
       <REPT1>
        <DEPT>fff</DEPT>
        <EE_FIRST>goofy               </EE_FIRST>
        <EE_MIDDLE>steve               </EE_MIDDLE>
        <EE_LAST>thompson            </EE_LAST>
       </REPT1>
      </BRANCH>
     </REGION>
     <REGION REGION='4'>
      <BRANCH BRANCH='orlando        '>
       <REPT1>
        <DEPT>zzz</DEPT>
        <EE_FIRST>minnie              </EE_FIRST>
        <EE_MIDDLE>m                   </EE_MIDDLE>
        <EE_LAST>mouse               </EE_LAST>
       </REPT1>
      </BRANCH>
     </REGION>
    </REPT1_REPORT>

     

    For the name data, I would like to produce something like this:

     

        <EE_NAME>
         <EE_FIRST>minnie              </EE_FIRST>
         <EE_MIDDLE>m                   </EE_MIDDLE>
         <EE_LAST>mouse               </EE_LAST>
        </EE_NAME>

     

    Here's some code snippets:

      REGION                   1   1  A 
      BRANCH                   2  15  A 
      DEPT                    17   3  A 
      EMPLOYEE_NAME           20  60  A 
        EE_FIRST              20  20  A 
        EE_MIDDLE             40  20  A 
        EE_LAST               60  20  A 

    .

    .

    .

    REPORT REPT1 PRINTER REPORT1 XML            
    CONTROL REGION BRANCH                       
     LINE 01 DEPT EE_FIRST EE_MIDDLE EE_LAST    

     

    I tried doing this:

     LINE 01 DEPT EMPLOYEE_NAME

    That just concatenated the name into 1 field of EMPLOYEE_NAME. 

     

    Thanks



  • 2.  Re: Easytrieve/XML nesting

    Broadcom Employee
    Posted Aug 04, 2017 04:32 AM

    Hello Sarah,

     

    This is Ralf from CA Easytrieve support.

    Can you try:

    LINE 01 DEPT '<EE_NAME>' EE_FIRST EE_MIDDLE EE_LAST '<EE_NAME>'

    and let me know whether it meets your needs, please?

    I tested it on z/OS using CA Easytrieve 11.6 + maintenance and the result looks as follows here:

    ...

    <REPT1_REPORT>                                                 
    <REGION REGION='2'>                                            
    <BRANCH BRANCH='lone tree      '>                              
    <REPT1>                                                        
    <DEPT>fff</DEPT>                                               
    <EE_NAME>                                                      
    <EE_FIRST>goofy               </EE_FIRST>                      
    <EE_MIDDLE>steve               </EE_MIDDLE>                    
    <EE_LAST>thompson            </EE_LAST>                        
    <EE_NAME>                                                      
    ...         

     

    Thanks and regards,

    Ralf