View previous topic :: View next topic
|
Author |
Message |
piyushksah
New User
Joined: 15 Dec 2008 Posts: 10 Location: INDIA
|
|
|
|
i have six copy book
1 is generic and other defines the record
i have to declare its structre but i am bit confuse can anyone please help...
description of copybook is given below
Code: |
1)
MAIN.CPY
10 (P)-PRIMARY-KEY PIC X(23).
10 (P)-DATA.
15 FILLER PIC X(4476).
2)
ONE.CPY
10 (P)-KEY.
15 ABC PIC X(29).
3)
TWO.CPY
15 (P)-REC PIC X(421).
4)
THREE.CPY
10 (P)-HEADER.
15 (P)-REC PIC X(420).
5)
FOUR.CPY
15 (P)-REC-TY PIC X(420).
6)
FIVE.CPY
15 (P)-REC-T PIC X(420). |
how to declare it i am confuse
i have written like this (P)-DATA has to be redefines...
Thanks in advance |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
piyush,
why do you think anyone
outside your organization
would know how to put this puzzle together? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Since afternoon (IST) I was thinking how to reply this question -
- thought to suggest to look into some similar program at your shop
- then wanted to ask decide on - what do you want ? Do you want to drive your program or progrm should drive you..phew..then I give up didn't post anything.
However Dbz beats me anyway..
May be posting your question in rather structured manner would give me one more chance to compete dbzTHEdinosauer.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If these copybooks define a "record" you need to tell more about the record(s). Is this file fixed or variable? Why are there 6? Why do you believe you need 6? Why the level numbers used? What does the data look like (show a few example data records)?
Quote: |
i have to declare its structre but i am bit confuse can anyone please help... |
You are likely less confused than we are. . .
Once some clear information is posted about what you want to do , someone should be able to help. |
|
Back to top |
|
|
piyushksah
New User
Joined: 15 Dec 2008 Posts: 10 Location: INDIA
|
|
|
|
hi my actual copybook looks like..these declaration
i have these copybook and i have to use the variable declared in this copybook into my program...for making changes and using some conditions..
Code: |
1)MAIN(total=4499)
10 (P)00-PRIMARY-KEY.
15 (P)00-CUID PIC S9(05) COMP-3.
15 (P)00-CU-BR PIC S9(03) COMP-3.
15 (P)00-RPT-NBR PIC X(05).
15 (P)00-SUB-RPT PIC X(10).
10 (P)00-DATA.
15 FILLER PIC X(4476).
2)ONE(total=29)
10 (P)X100-KEY.
15 (P)X100-STATE PIC X(02).
15 (P)X100-ID PIC S9(05) COMP-3.
..
..
..
15 FILLER PIC X(03).
3)TWO(total=420)
15 (P)X100-REC-TYPE0 PIC X(01).
88 (P)X100-TYPE-0 VALUE '0'.
15 (P)X10000-TOT-HEADER PIC S9(03) COMP-3.
15 (P)X10000-FILLER-1 PIC X(417).
4)THREE(total=420)
10 (P)X10001-HEADER-A.
15 (P)X10001-REC-TYPE PIC X(01).
88 (P)X100-TYPE-A VALUE '1'.
15 (P)X10001-FILLER-1 PIC X(02).
15 (P)X10001-XMIT-SQ-NBR PIC X(03).
..
..
15 (P)X10001-MATCH-IND PIC X(01).
15 (P)X10001-FILLER-5 PIC X(49).
5)FOUR(total=420)
15 (P)X10002-REC-TYPEB PIC X(01).
88 (P)X100-TYPE-B VALUE '2'.
15 (P)X10002-CCYYMM-B PIC X(06).
15 (P)X10002-PAYEE-CNTL PIC X(04).
15 (P)X10002-FILLER-1 PIC X(03).
..
..
..
15 (P)X10002-2ND-PAYEE-TIN PIC X(09).
15 (P)X10002-REGION-ID PIC X(01).
6)FIVE(total=420)
15 (P)X10003-REC-TYPET PIC X(01).
88 (P)X100-TYPE-T VALUE '3'.
15 (P)X10003-TOT-ACCTS PIC S9(09).
..
..
..
15 (P)X10003-TOT-DOLLAR-AMT PIC S9(09).
15 (P)X10003-TOT-IRA PIC S9(09).
15 (P)X10003-FILLER-3 PIC X(320).
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
piyushksah
New User
Joined: 15 Dec 2008 Posts: 10 Location: INDIA
|
|
|
|
thanks for the help..i'll chek the link |
|
Back to top |
|
|
piyushksah
New User
Joined: 15 Dec 2008 Posts: 10 Location: INDIA
|
|
|
|
i have tried after reading in the given links..
Code: |
05 9T12-IN-REC.
COPY MAIN REPLACING ==(P)== BY ==PKS==.
10 9T12-RT-DATA PIC X(420) REDEFINES PKS-DATA.
05 9T12-W-DATA.
COPY ONE REPLACING ==(P)== BY ==PKS==.
COPY TWO REPLACING ==(P)== BY ==PKS==.
COPY THREE REPLACING ==(P)== BY ==PS==.
10 9T12-W-HEADER REDEFINES PKS-DATA.
COPY FOUR REPLACING ==(P)== BY ==PKS==.
COPY FIVE REPLACING ==(P)== BY ==PKS==.
|
could anyone help...
it is showing the following compilation error
REDEFINES" object "PKS-DATA" was not the immediately preceding level
Clause was discarded. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When the code specifies REDEFINES, the field names must exist.
Your MAIN copybook has no PKS-DATA field. You do have a PKS00-DATA field. . . |
|
Back to top |
|
|
|