MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any Design Alternative on extending copybook length

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
srinuibm
Beginner


Joined: 06 Jun 2006
Posts: 2
Topics: 1

PostPosted: Tue Jun 06, 2006 3:13 pm    Post subject: Any Design Alternative on extending copybook length Reply with quote

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
View user's profile Send private message
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Tue Jun 06, 2006 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jun 06, 2006 9:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
srinuibm
Beginner


Joined: 06 Jun 2006
Posts: 2
Topics: 1

PostPosted: Wed Jun 07, 2006 4:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Kathi
Beginner


Joined: 14 May 2003
Posts: 25
Topics: 0
Location: Mission Viejo, California

PostPosted: Fri Jun 09, 2006 8:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group