COBOL & Formdef

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
User avatar
socker_dad
New Member
Posts: 1
Joined: Tue Nov 26, 2019 5:53 am

COBOL & Formdef

Post by socker_dad »

I'm new here, so if this is the wrong forum, please be nice!

I've been a mainframe programmer for 30 years and never have had the "joy" of working with forms in a COBOL program. Now I've been handed a rush job and have no idea how to do it. No - no one else in the agency knows how to do it either (at least, not that they're admitting).

The form (overlay?) is defined and accessible, but I don't know how to put the controls(?), whatever in the COBOL program to make the form work when it gets sent to the printer.

How do you do it?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: COBOL & Formdef

Post by Anuj Dhawan »

I've prepared the reply many times but one way or other ran into call of duty... this is off the bat.

FORMDEF and PAGEDEF are defined separately and used in JCL at run time. Usually IBM should provide you with a sample program to use the different parameters, that's a good place to start.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: COBOL & Formdef

Post by Anuj Dhawan »

PAGEDEF parameter used to identify a library member that contains statements to tell the Print Services Facility™ (PSF) how to print the sysout data set on a page-mode printer (such as the Infoprint 4000). The data set may be sysout or a data set that is allocated directly to a printer. The statements can specify the following:
  1. Logical page length and width.
  2. Fonts.
  3. Page segments.
  4. Multiple page types or formats.
  5. Lines within a page; for example:
  6. Line origin.
  7. Carriage controls.
  8. Spacing.
  9. Multiple logical pages on a physical page.
The member must be in the library named in the cataloged procedure that was used to initialize PSF, or in a library specified in the USERLIB parameter.

Further read:

Specifying a page definition: https://www.ibm.com/support/knowledgece ... expdef.htm

Specifying a form definition: https://www.ibm.com/support/knowledgece ... htm#exfdef

Page-printer defaults form: https://www.ibm.com/support/knowledgece ... .htm#dform
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: COBOL & Formdef

Post by Robert Sample »

Normally, COBOL programs rarely (if ever) get involved in FORMDEF / PAGEDEF matters -- that is JCL, not code (as pointed out elsewhere). In those rare cases when you do need characters sent from the program, most likely you'd define the string of characters in COBOL and write it to the DD statement as the first record. I've dealt with forms in the past, but we used CA-SPOOL which contained all the printer definition data in it (including HP's PCL strings).
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.”