Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 9
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: 1249
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: 8165
Location: East Dubuque, Illinois, USA

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: 9
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: 1777
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: 7315

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: 1249
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us