how to find the actual length of the string

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
prakash(jp)
Member
Posts: 2
Joined: Mon Jul 25, 2011 3:03 pm

how to find the actual length of the string

Post by prakash(jp) » Mon Jul 25, 2011 3:31 pm


User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Jul 25, 2011 3:55 pm

string concept is not the same on mainframe cobol as it is on the toys or with c.

data is contained within fixed length fields in working-storage.
data is contained within variable length columns in db2
data is contained within variable length records in files

so you need to understand the mainframe concept of data,
suggest you read the Cobol Programmers Guide to understand all mainframe concepts.

without knowing the delimiter, you can only determine:
  • the length of the variable containing the data
  • the length of data up to but not including trailing spaces
by the way, just using the topic as you discussion is poor manners.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others