IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

XML GENERATE with empty occurs


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Fri Apr 18, 2008 10:52 pm
Reply with quote

HI,

i have this copy and i want to generate an xml code.
the compiler not allow me to replace the second occurs, for
"occurs depending on", and i put an occurs of 70 times.
Some times, this occurs appear empty, and i don't want to transmit
xml empty occurs. How I do it?

Tks...for your time.
Gra

de value of occurrency, of second OCCURS are in field: NoMov

05 Response.
07 Request PIC 9(4).
07 ResponseCode PIC 9(04).
07 NoTx PIC 9(04).
07 Brancx PIC X(25).
07 LastOper PIC X(10).
07 Name PIC X(30).
07 Currencx PIC X(03).
07 CloseBalanceDate PIC 9(08).
07 LastCloseBalance PIC S9(16)V99.
07 MoreTxKex PIC x(66).
07 Responset.
10 TX-DAY OCCURS 0 to 70 TIMES depending on numitem.
12 Datx PIC 9(08).
12 DailyOpenBalance PIC S9(16)V99.
12 DailyCloseBalance PIC S9(16)V99.
12 NoMov PIC 9(04).
12 Tx OCCURS 70 TIMES
14 TransCheq-RF PIC x(20).
14 TranReference PIC x(20).
14 TranDate PIC 9(08).
14 TranCode PIC 9(03).
14 TranAmount PIC S9(16)V99.
14 TransNroEF PIC x(10).
14 TransDesc PIC x(50).
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 18, 2008 11:00 pm
Reply with quote

The only way I can see is to have a second definition, with Responset omited or defined as an elementary item....
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Fri Apr 18, 2008 11:22 pm
Reply with quote

Sorry Guy,

can you explain me? i don't understand.
TKS
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 19, 2008 12:01 am
Reply with quote

Code:
         01 Long-XML.
          05 Response.
            07 Request                 PIC  9(4).
            07 ResponseCode            PIC  9(04).
            07 NoTx                    PIC  9(04).
            07 Brancx                  PIC  X(25).
            07 LastOper                PIC  X(10).
            07 Name                    PIC  X(30).
            07 Currencx                PIC  X(03).
            07 CloseBalanceDate        PIC  9(08).
            07 LastCloseBalance        PIC  S9(16)V99.
            07 MoreTxKex               PIC  x(66).
            07 Responset.
              10 TX-DAY OCCURS 0 to 70 TIMES depending on numitem.
                 12 Datx                 PIC  9(08).
                 12 DailyOpenBalance     PIC  S9(16)V99.
                 12 DailyCloseBalance    PIC  S9(16)V99.
                 12 NoMov                PIC  9(04).
                 12 Tx OCCURS 70 TIMES
                   14 TransCheq-RF       PIC  x(20).
                   14 TranReference      PIC  x(20).
                   14 TranDate           PIC  9(08).
                   14 TranCode           PIC  9(03).
                   14 TranAmount         PIC  S9(16)V99.
                   14 TransNroEF         PIC  x(10).
                   14 TransDesc          PIC  x(50).
         01 Short-XML.
          05 Response.
            07 Request                 PIC  9(4).
            07 ResponseCode            PIC  9(04).
            07 NoTx                    PIC  9(04).
            07 Brancx                  PIC  X(25).
            07 LastOper                PIC  X(10).
            07 Name                    PIC  X(30).
            07 Currencx                PIC  X(03).
            07 CloseBalanceDate        PIC  9(08).
            07 LastCloseBalance        PIC  S9(16)V99.
            07 MoreTxKex               PIC  x(66).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts EMPTY file check scenario JCL & VSAM 6
No new posts Updating a 1 byte thats in occurs mul... DFSORT/ICETOOL 6
Search our Forums:

Back to Top