Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Issue in using Depending on

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Tue Feb 24, 2009 6:17 pm    Post subject: Issue in using Depending on
Reply with quote

Hi Team,

I am using depending on in one of my program. Below is my code and I am getting compile errors for this. Can you please suggest me.
Code:

30  GRP-PEPNOTNINFO.                         
35                                  PIC X(012)
      VALUE '<PEPNotnInfo'.                   
35                                  PIC X(001)
      VALUE '>'.                             
35  GRP-PEPNOTN1.                             
40  GRP-PEPNOTN OCCURS 1 TO 25 TIMES         
                DEPENDING ON                 
                WS-PEPNOT-CNT       PIC X(22).
35                                  PIC X(004)
      VALUE '    '.                           
35                                  PIC X(014)
      VALUE '</PEPNotnInfo>'.                 
30  GRP-APPLICANTDATA.                       
35                                  PIC X(014)
      VALUE '<ApplicantData'.                 
35                                  PIC X(001)
      VALUE '>'.                             


Compilation error.
Code:

            35                                  PIC X(004)             
                                                                       
A "VALUE" clause was specified for variably located item "FILLER".  The
"VALUE" clause was discarded.                                         
                                                                       
                  VALUE '    '.                                       
            35                                  PIC X(014)             
                                                                       
A "VALUE" clause was specified for variably located item "FILLER".  The
"VALUE" clause was discarded.                                         
                                                                       
                  VALUE '</PEPNotnInfo>'.                             
            30  GRP-APPLICANTDATA.                                     
            35                                  PIC X(014)             
                                                                       
A "VALUE" clause was specified for variably located item "FILLER".  The
"VALUE" clause was discarded.                                         
                                                                       
                  VALUE '<ApplicantData'.                             
            35                                  PIC X(001)             
                                                                       
A "VALUE" clause was specified for variably located item "FILLER".  The
"VALUE" clause was discarded.                                         
                                                                       
                  VALUE '>'.                                           
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Tue Feb 24, 2009 6:27 pm    Post subject:
Reply with quote

VALUE clauses cannot be placed on variables in a structure after an OCCURS DEPENDING ON. That's what the error message tells you.
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Tue Feb 24, 2009 6:56 pm    Post subject:
Reply with quote

But the group levels ar different here. Even in this scenario we should not do this.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Tue Feb 24, 2009 7:00 pm    Post subject:
Reply with quote

I'm not sure what you're trying to say.
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Tue Feb 24, 2009 7:03 pm    Post subject:
Reply with quote

I have coded 'Depending On' cluase at level 40 under Group level 35(GRP-PEPNOTN1). But I am getting error for the next group level 35(filler having pic X(004)).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Feb 24, 2009 7:19 pm    Post subject:
Reply with quote

aryanpa1,

you need to read the documentation about tables and definitions in the application programmer guide.

this comment
Quote:

I have coded 'Depending On' cluase at level 40 under Group level 35(GRP-PEPNOTN1). But I am getting error for the next group level 35(filler having pic X(004)).



leads me to believe you have little or no understanding of cobol data division.

Robert simply told you that you cannnot assign VALUE clauses to data that follows an ODO.
you have value clauses that follow the ODO.
Remove them or place them in the structure before the ODO.
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Tue Feb 24, 2009 11:04 pm    Post subject: Reply to: Issue in using Depending on
Reply with quote

Thanks for your valuable time guys.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us