Which will take more memory?

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS
nikhilgalgate
Posts: 9
Joined: Tue Dec 25, 2007 1:12 pm
Skillset: COBOL,DB2,JCL,VSAM,CICS
Referer: From www.google.com

Which will take more memory?

Postby nikhilgalgate » Wed Dec 26, 2007 8:13 pm

Hi

Please any one can tell me if I have to store a number and alphanumeric or alphabatic value which one will take less memory space. If we see in terms of example. if I have to store number 1 and alphabate A which will take less memory?. :?

arunprasad.k
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Skillset: Known little stuffs to answer a few queries!!
Referer: Google
Contact:

Re: Which will take more memory?

Postby arunprasad.k » Fri Jan 04, 2008 12:30 am

nikhilgalgate,

As far as I know,

1. If you are storing it in a variable, then the storage depends on the the PICTURE cluase of the variable.
2. If you are storing it in a file, then it depends on the SPACE parameter specified in the JCL.

Arun.

sureshbabu
Posts: 7
Joined: Tue Dec 18, 2007 12:39 pm
Skillset: cobol
jcl
db2
cics
Referer: from friend

Re: Which will take more memory?

Postby sureshbabu » Mon Jan 07, 2008 2:48 pm

01 ws-data picx(n) value data

here ws-data is called literal
here if data is numeric you can store max of 18 digits
if data is alphabitic you can store 160 characters
i hope you done the problem

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: Which will take more memory?

Postby dick scherrer » Wed Jan 16, 2008 2:40 am

Hello,
if I have to store number 1 and alphabate A which will take less memory?.

Either could take as little as one byte. If you are looking for some other info, please clarify.
Hope this helps,
d.sch.