View previous topic :: View next topic
|
Author |
Message |
CuriousMainframer
New User
Joined: 28 Feb 2012 Posts: 9 Location: India
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
CuriousMainframer
New User
Joined: 28 Feb 2012 Posts: 9 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|