Help with COBOL field definition.

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Sunita R
New Member
Posts: 9
Joined: Mon Jan 19, 2015 10:39 pm

Help with COBOL field definition.

Post by Sunita R »

Does any one know ...what is the defination of highlighted field
IMG_20230209_231419_202.jpg
    You do not have the required permissions to view the files attached to this post.
    User avatar
    Robert Sample
    Global Moderator
    Global Moderator
    Posts: 1895
    Joined: Fri Jun 28, 2013 1:22 am
    Location: Dubuque Iowa
    United States of America

    Re: Help with COBOL field definition.

    Post by Robert Sample »

    It has 5 alphanumeric bytes followed by one space followed by 4 alphanumeric bytes followed by a space followed by a single alphanumeric byte.
    Sunita R
    New Member
    Posts: 9
    Joined: Mon Jan 19, 2015 10:39 pm

    Re: Help with COBOL field definition.

    Post by Sunita R »

    Thanks Robert. What is the meaning of 'B' here?
    User avatar
    Robert Sample
    Global Moderator
    Global Moderator
    Posts: 1895
    Joined: Fri Jun 28, 2013 1:22 am
    Location: Dubuque Iowa
    United States of America

    Re: Help with COBOL field definition.

    Post by Robert Sample »

    Your question is easily answered by looking in the Enterprise COBOL Language Reference manual, which tells you that the PICTURE clause character B is used for
    For usage DISPLAY, a character position into
    which an alphanumeric space is inserted.
    Picture clauses can contain: A, B, E, G, N, P, S, V, X, Z, CR, DB along with 9, 0, /, period, comma, plus, minus, asterisk, and the currency symbol. Some of these are floating, some of them are fixed, some of them can occur just once while others can occur multiple times.
    Sunita R
    New Member
    Posts: 9
    Joined: Mon Jan 19, 2015 10:39 pm

    Re: Help with COBOL field definition.

    Post by Sunita R »

    Thanks Robert.

    Sorry to bother you but I have not seen this kind of picture clause and was taken aback. Thank you so much for your explanation, this gives a lot more to learn.
    Post Reply

    Create an account or sign in to join the discussion

    You need to be a member in order to post a reply

    Create an account

    Not a member? register to join our community
    Members can start their own topics & subscribe to topics
    It’s free and only takes a minute

    Register

    Sign in

    Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”