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

Using UNSTRING in COBOL


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

New User


Joined: 08 Sep 2009
Posts: 27
Location: Charlotte

PostPosted: Wed Mar 17, 2010 12:09 am
Reply with quote

I am planning to use the UNSTRING function to decode a variable size message into a Mainframe file with a fixed block.

Is there any restriction in the number of variables to which I could break this input record into, in an UNSTRING statement!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 17, 2010 12:23 am
Reply with quote

Hello,

Look here:

Code:

 Table 59. Compiler limits                                             
 Language element                       Compiler limit                   
 Maximum length of user-defined     
 words (for example, data-name,     
 file-name, class-name)                 30 bytes                         
                                   
                                   
 Size of program                        999,999 lines                     
 Number of literals                     4,194,303((Note 1))               
 Total length of literals               4,194,303 bytes((Note 1))         
 Reserved word table entries            1536                             
 COPY REPLACING . . . BY . . .     
 (items per COPY statement)             No limit                         
                                   
 Number of COPY libraries               No limit                         
 Block size of COPY library             32,767 bytes                     
 Identification division                                               
 Environment division                                                   
 Configuration section                                                 
 Special-names paragraph                                               
 mnemonic-name IS                       18                               
 UPSI-n . . . (switches)                0-7                               
 alphabet-name IS . . .                 No limit                         
 Literal THRU . . . or ALSO . . .       256                               
 Input-Output section                                                   
 File-control paragraph                                                 
 SELECT file-name . . .             
                                        A maximum of 65,535 file names   
 can be assigned external names   
 ASSIGN system-name . . .               No limit                         
 ALTERNATE RECORD KEY data-name . .
 .                                      253                               
                                   
 RECORD KEY length                      No limit((Note 3))               
 RESERVE integer (buffers)              255((Note 4))                     
 I-O-control paragraph                                                 
 RERUN ON system-name . . .             32,767                           
 RERUN integer RECORDS                  16,777,215                       
 SAME RECORD AREA                       255                               
 SAME RECORD AREA FOR file-name . .
 .                                      255                               
                                   
 SAME SORT/MERGE AREA                   No limit((Note 2))               
 MULTIPLE FILE file-name . . .          No limit((Note 2))               
 Data division                                                         
 77 data item size                      134,217,727 bytes                 
 01-49 data item size                   134,217,727 bytes                 
 Total 01 + 77 (data items)             No limit                         
 88 condition-names . . .               No limit                         
 VALUE literal . . .                    No limit                         
 66 RENAMES . . .                       No limit                         
 PICTURE clause, number of         
 characters in character-string         50                               
                                   
 PICTURE clause, numeric item digit
 positions                         
                                        With ARITH(COMPAT): 18           
                                   
 With ARITH(EXTEND): 31           
 PICTURE clause, numeric-edited     
 character positions                    249                               
                                   
 Picture symbol replication ( )         134,217,727 bytes                 
 Picture symbol replication         
 (editing)                              32,767                           
                                   
 Picture symbol replication ( ),   
 class DBCS items                       67,108,863 bytes                 
                                   
 Picture symbol replication ( ),   
 class national items                   67,108,863 bytes                 
                                   
 Elementary item size                   134,217,727 bytes                 
 OCCURS integer                         134,217,727                       
 Total number of ODOs                   4,194,303((Note 1))               
 Table size                             134,217,727 bytes                 
 Table element size                     134,217,727 bytes                 
 ASCENDING or DESCENDING KEY . . . 
 (per OCCURS clause)                    12 KEYS                           
                                   
 Total length of keys (per OCCURS   
 clause)                                256 bytes                         
                                   
 INDEXED BY . . . (index names per 
 OCCURS clause)                         12                               
                                   
 Total number of indexes (index     
 names) per class or program            65,535                           
                                   
 Size of relative index                 32,765                           
 File section                                                           
Revision|  FD record description entry           Revision|  1,048,575 bytes                   
 FD file-name . . .                     65,535                           
 LABEL data-name . . . (if no       
 optional clauses)                      255                               
                                   
 Label record length                    80 bytes                         
 DATA RECORD data-name . . .            No limit((Note 2))               
 BLOCK CONTAINS integer                 2,147,483,647((Note 8))           
 RECORD CONTAINS integer                1,048,575((Note 5))               
 LINAGE clause values                   99,999,999                       
 SD file-name . . .                     65,535                           
 DATA RECORD data-name . . .            No limit((Note 2))               
 Linkage section                                                       
 Total size                             134,213,631 bytes                 
 Local-storage section                                                 
 Total size                             134,217,727 bytes                 
 Working-storage section                                               
 Total size of items without the   
 external attribute                     134,217,727 bytes                 
                                   
 Total size of items with the       
 external attribute                     134,217,727 bytes                 
                                   
 Procedure division                                                     
 Procedure and constant area            4,194,303 bytes((Note 1))         
 Procedure division USING           
 identifier . . .                       32,767                           
                                   
 Procedure-names                        1,048,575((Note 1))               
 Subscripted data-names per         
 statement                              32,767                           
                                   
 Verbs per line (TEST)                  7                                 
 ACCEPT statement, record length on
 input device                           32,760                           
                                   
 ADD identifier . . .                   No limit                         
 ALTER procedure-name-1 TO         
 procedure-name-2 . . .                 4,194,303((Note 1))               
                                   
 CALL . . . BY CONTENT identifier       2,147,483,647 bytes               
 CALL identifier or literal USING   
 identifier or literal . . .            16,380                           
                                   
 CALL literal . . .                     4,194,303((Note 1))               
 Active programs in a run unit          32,767                           
 Number of names called (DYN       
 option)                                No limit                         
                                   
 CANCEL identifier or literal . . .     No limit                         
 CLOSE file-name . . .                  No limit                         
 COMPUTE identifier . . .               No limit                         
 DISPLAY identifier or literal  . .
 .                                      No limit                         
                                   
 DIVIDE identifier . . .                No limit                         
 ENTRY USING identifier or literal 
 . . .                                  No limit                         
                                   
 EVALUATE . . . subjects                64                               
 EVALUATE . . . WHEN clauses            256                               
 GO procedure-name . . . DEPENDING      255                               
 INSPECT TALLYING and REPLACING     
 clauses                                No limit                         
                                   
 MERGE file-name ASC or DES KEY . .
 .                                      No limit                         
                                   
 Total merge key length                 4,092 bytes((Note 6))             
 MERGE USING file-name . . .            16((Note 7))                     
 MOVE identifier or literal TO     
 identifier . . .                       No limit                         
                                   
 MULTIPLY identifier . . .              No limit                         
 OPEN file-name . . .                   No limit                         
 PERFORM                                4,194,303                         
Revision|  PERFORM . . . TIMES identifier or 
Revision|  literal                               Revision|  999,999,999                       
Revision|                                   
 SEARCH . . . WHEN . . .                No limit                         
 SET index or identifier . . . TO       No limit                         
 SET index . . . UP/DOWN                No limit                         
 SORT file-name ASC or DES KEY          No limit                         
 Total sort key length                  4,092 bytes((Note 6))             
 SORT USING file-name . . .             16((Note 7))                     
 STRING identifier . . .                No limit                         
 STRING DELIMITED identifier or     
 literal . . .                          No limit                         
                                   
 UNSTRING DELIMITED identifier or   
 literal  . . .                         255                               
                                   
 UNSTRING INTO identifier or       
 literal . . .                          No limit                         
                                   
 USE . . . ON file-name . . .           No limit                         
 XML PARSE statement, maximum size 
 of identifier                          134,180,862 bytes (67,090,431     
 national character positions)     
 Notes:                                                                 
                                                                       
 1.  Items included in 4,194,303 byte limit for procedure plus constant
     area.                                                             
                                                                       
 2.  Syntax checked, but has no effect on the execution of the program;
     there is no limit.                                                 
                                                                       
 3.  No compiler limit, but VSAM limits it to 255 bytes.               
                                                                       
 4.  QSAM.                                                             
                                                                       
 5.  Compiler limit shown, but QSAM limits it to 32,767 bytes.         
                                                                       
 6.  For QSAM and VSAM, the limit is 4088 bytes if EQUALS is coded on   
     the OPTION control statement.                                     
                                                                       
 7.  SORT limit for QSAM and VSAM.                                     
                                                                       
 8.  Requires large block interface (LBI) support provided by OS/390   
     DFSMS Version 2 Release 10.0 or later. On OS/390 systems with     
     earlier releases of DFSMS, the limit is 32,767 bytes. For more     
     information about using large block sizes, see Setting block sizes
     in the Enterprise COBOL Programming Guide.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top