View previous topic :: View next topic |
Author |
Message |
srinuibm Beginner
Joined: 06 Jun 2006 Posts: 2 Topics: 1
|
Posted: Tue Jun 06, 2006 3:13 pm Post subject: Any Design Alternative on extending copybook length |
|
|
Hi,
All the fillers in my copybook are used out. If I have to add new fields I have to increase the size of the copybook, then I need to alter the size of all the files in my system that uses this copybook. The files are many. So, is there any other design alternative to handle this without effecting the file size.
Thanks,
Nivas |
|
Back to top |
|
 |
Grant Beginner
Joined: 02 Dec 2002 Posts: 45 Topics: 1 Location: Sydney, NSW, Australia
|
Posted: Tue Jun 06, 2006 8:02 pm Post subject: |
|
|
Is there the chance to use packed decimal rather than display numeric ?
e.g.
xyz pic 99999 (5 bytes) could become pic s9(5) packed-decimal (3 bytes)
you would need to analyse how it is populated etc.. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Jun 06, 2006 9:25 pm Post subject: |
|
|
srinuibm,
How about redefining the old copy book with a bigger lay out.
ex: If your old copy book is as follows( a total length of 100 bytes)
Code: |
01 EMP-RECORD.
05 EMP-ID PIC X(9).
05 EMP-NAME PIC X(50).
05 EMP-SAL PIC S9(7)V9(2) COMP-3.
05 EMP-ADDRESS PIC X(36).
|
Now define another 01 field which redefines the EMP-RECORD
Code: |
01 NEW-EMP-RECORD REDEFINES EMP-RECORD.
05 FILLER PIC X(100).
05 NEW-FIELD-1 PIC X(10).
05 NEW-FIELD-2 PIC X(20).
|
Now use this layout wherever it is necessary.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
srinuibm Beginner
Joined: 06 Jun 2006 Posts: 2 Topics: 1
|
Posted: Wed Jun 07, 2006 4:00 pm Post subject: |
|
|
Kolusu,
Thank you for the reply.
But when I redefine the record area adding new fields, I need to increase the length of the file right. That way again I need to change the file size. Please clarify me.
Thanks,
Nivas |
|
Back to top |
|
 |
Kathi Beginner

Joined: 14 May 2003 Posts: 25 Topics: 0 Location: Mission Viejo, California
|
Posted: Fri Jun 09, 2006 8:46 pm Post subject: |
|
|
Clearly the answer is if you add fields to the record by increasing it's length, then you will have to change the copybook member and recompile ALL the programs that use it.
But then if you did not change the length, but changed fillers by making them accessible fields, then surely best practice means you would compile them too. |
|
Back to top |
|
 |
|
|