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
 

 

pic clause on group variable error

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

New User


Joined: 28 Feb 2012
Posts: 5
Location: India

PostPosted: Mon Jul 14, 2014 6:33 pm    Post subject: pic clause on group variable error
Reply with quote

Hi ,
I am getting an error while mapping a copy book to a file using start tool ... It says 'pic clause not allowed on group variable'
On the last variable in the copy book

Can anyone help plss ...
Back to top
View user's profile Send private message

Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Jul 14, 2014 6:43 pm    Post subject:
Reply with quote

What is "start tool"? "Pic clause not allowed on group variable" means exactly that. PIC clauses are allowed only on elementary items.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jul 14, 2014 6:52 pm    Post subject:
Reply with quote

I suspect there is a level number issue -- if the copy book has 05 WS-X and the next variable in your program has 07 WS-Y then WS-X would be a group variable.
Back to top
View user's profile Send private message
CuriousMainframer

New User


Joined: 28 Feb 2012
Posts: 5
Location: India

PostPosted: Mon Jul 14, 2014 7:41 pm    Post subject:
Reply with quote

Well , I have defined by copy book something like this
01 ws-rec.
03 ws-rec-header.
05 ws-rec-action pic x(1).
05 ws-rec-version pic 9(4).
03 ws-rec-data.
05 ws-name pic x(30).
05 ws-city pic x(20).
05 ws-dob pic x(10).

I am getting an error pointing to the last variable
Ws-dob. There are no variables in the file after it.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Jul 14, 2014 8:03 pm    Post subject:
Reply with quote

CuriousMainframer wrote:
Well , I have defined by copy book something like this
01 ws-rec.
03 ws-rec-header.
05 ws-rec-action pic x(1).
05 ws-rec-version pic 9(4).
03 ws-rec-data.
05 ws-name pic x(30).
05 ws-city pic x(20).
05 ws-dob pic x(10).

I am getting an error pointing to the last variable
Ws-dob. There are no variables in the file after it.

But are there variables after it in the copybook; that, as the mad prince of Denmark said, is the question. Copy and paste -- do not type by hand "something like it" -- the copybook here.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Mon Jul 14, 2014 8:38 pm    Post subject: Reply to: pic clause on group variable error
Reply with quote

For the message, you should find that, whether in your copybook, another copybook, or just in the program, that the dob 05-level is followed by a level-number greater than 05.

Code:
    05  dob-thing pic x.
* here's the useful comment saying "end of copybook" but so what....

* here's a great big useless comment block which says "work fields" or similar....

        10  a completely-separate-item PIC X.


If we normalise the names, level-numbers and comments, that is what you have.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Jul 14, 2014 8:38 pm    Post subject:
Reply with quote

Please copy/paste the error message along with the lines before and after and use Code tags. I suspect Akatsukami is correct but we can't tell for sure unless you show us the above.
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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