IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cobol varaible field length is more then 18 !


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prem_ibm

New User


Joined: 15 Sep 2007
Posts: 31
Location: Chennai

PostPosted: Sat Apr 14, 2012 8:13 am
Reply with quote

Hi Every one !

Unfortunately i got one requirement where i have to divide one field which is more then 18 in length.

i am thinking to devide data in half part.....later this will be merge...to get data length equal to 18 or less then 18.

expected result should be same(whether will dividing in one short or half..half and merging...for final dividation)


Thanks

Prem
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Apr 14, 2012 9:16 am
Reply with quote

Does your compiler support the ARITH(EXTEND) option?

What is your Cobol Version/Release?

If it doesn't support ARITH(EXTEND), then this division is easily accomplished via an Assembler sub-program.

Assembler supports up to 16-Bytes/31-Digits, Packed-Decimal (COMP-3) or you can use the Assembler 64-Bit "Grande" Registers or Aligned-Doublewords along with the "Divide Grande" instruction.

Enterprise PL/I can also do this.

Anyway you look at it, it can be done....
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Apr 14, 2012 2:24 pm
Reply with quote

Surely you are not the first at your site to use a wildly big number? Ask someone who's already done it.

If you are, do as Mr Bill indicates, look at the compile options at the start of your output listing from a compile. Early on, you should/may see ARITH(COMPAT). If so, find out from your support people how to compile with ARITH(EXTEND).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top