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

maximum characters accepted by accept statement


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

New User


Joined: 02 May 2008
Posts: 42
Location: chennai

PostPosted: Thu Sep 04, 2008 4:00 pm
Reply with quote

Can anybody tell me the maximum characters accepted by accept statement in cobol?

sathish
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 04, 2008 4:35 pm
Reply with quote

Hi,

please check this link -

ibmmainframes.com/about15634.html
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 04, 2008 5:21 pm
Reply with quote

Did you check the manual link at the top of the page? I've found the Language Reference is real good at telling you what the limits are in COBOL.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 04, 2008 5:53 pm
Reply with quote

Quote:

ACCEPT: record length on input device 32,760


As could have been surmised.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 04, 2008 9:31 pm
Reply with quote

Hi,

Let's consider:
Code:
ACCEPT--identifier-1 FROM mnemonic-name.

If mnemonic-name is System input device- The length of a data transfer is the same as the length of the record on the input device, with a maximum of 32,760 (as Kevin has said).

From the manuals:
Quote:
The system input device is read until identifier-1 is filled or EOF is encountered. If the length of identifier-1 is not an even multiple of the system input device record length, the final record will be truncated as required. If EOF is encountered after data has been moved, and before identifier-1 has been filled, identifier-1 is padded with blanks. If EOF is encountered before any data has been moved to identifier-1, padding will not take place and identifier-1 contents will remain unchanged. Each input record is concatenated with the previous input record.

If the input record is of a fixed-length format, the entire input record is used. No editing is performed to remove trailing or leading blanks.

If the input record is of the variable-length format, the actual record length is used to determine the amount of data received. With variable format records, the Record Definition Word (RDW) is removed from the beginning of the input record. Only the actual input data is transferred toidentifier-1.
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 Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Count the number of characters in a f... CA Products 1
No new posts SORT ERROR PARAMETER VALUE EXCEEDS M... DFSORT/ICETOOL 12
Search our Forums:

Back to Top