COBOL User Groups COBOL COBOL Programming
Home | Search | COBOL Forums | Join COBUG | Change COBUG Account | Support us | Advertise with us | Contact us | About us | Site Map

 COBOL White Paper:  Top 10 Tips For Legacy Rejuvenation
 COBOL Data Access Tools:  Reduce the risks in your z/OS Data Migration Projects by eliminating surprises
 Programming Software:  DCD III - COBOL Program Documentation | OpenSCL - Batch COBOL Migration | RPV - Graphical COBOL Print

COBOL Jobs

 >  COBOL Job Listing
 >  COBOL Job Seekers
 >  Post COBOL Jobs
 >  Interview Questions
 >  Job Resources

COBOL Resources

 >  Blogs
 >  Books
 >  Computer Timeshare
 >  COBOL Examples
 >  Forums
 >  Knowledge Bases
 >  Magazines
 >  Manuals
 >  Portals
 >  Support
 >  Training
 >  Tutorials
 >  User Groups
 >  White Papers

COBOL Software

 >  Change Management
 >  COBOL Compilers
 >  Data Access
 >  Database
 >  Documentation
 >  COBOL Editors
 >  File Conversion
 >  GUI
 >  Legacy Migration
 >  Legacy Modernization
 >  Mainframe Security
 >  Report Generators
 >  Sort
 >  Terminal Emulators
 >  Test
 >  Tools
 >  Trans. Processing

COBOL Information

 >  Events
 >  News Articles
 >  Newsletters
 >  Product News
 >  COBOL Standards

IBM Enterprise Modernization

Enterprise Modernization: Maintain, Extend, and Integrate with IBM Rational on System z

An Analyst perspective to learn how modernizing your core mainframe assets can help you respond to prevailing business challenges, decrease costs and increase agility.

IBM Enterprise Modernization

The Business Value of Enterprise Modernization

Gain insight into making your existing System z™ mainframe applications more flexible and robust behind reg: The Smarter Supply Chain of the Future, Global Chief Supply Chain Officer Study

COBOL Migration, COBOL Conversion - UV Software Ad
UV Software has a complete solution for conversion of mainframe MVS or VSE JCL, COBOL, & DATA batch systems to Unix, Linux, or Windows/SFU.

Over 50 successful conversions including global corporations & government agencies. Please see demo conversions & detailed explanations at: www.uvsoftware.ca

You may send samples of your files for conversion & return by email. You may download 1 free utility from: www.uvsoftware.ca/ libuvhd.htm

'uvhd' displays data files with packed/binary fields in 'vertical hexadecimal', and includes many interactive functions (browse, search, select, update, print, etc).

COBOL Report Generator

Print graphical COBOL reports in Windows with RPV Reports. Insert graphics (images, photos, logos, charts, etc.) into your COBOL reports to improve the print quality of your COBOL reports. See how RPV Reports can be used to preview or print graphical COBOL reports in Windows.

COBOL Documentation

Are your mainframe COBOL applications properly documented? DCD III is a comprehensive COBOL documentation and application understanding tool that will allow you to reduce COBOL maintenance, development, and mainframe migration costs. Learn more about how you can document and understand your mainframe COBOL applications with DCD III.

COBOL Migration

Migrate your batch mainframe COBOL applications to open systems platforms, such as Windows, AIX and Linux, with OpenSCL. OpenSCL is a mainframe emulator that runs on a PC or server with Windows and Unix-based operating systems. OpenSCL is your batch mainframe COBOL applications migration solution.

COBOL Email List Rental

You can reach a highly targeted, qualified, opt-in audience of COBOL users by renting the COBUG email list. Contact us today advertise@cobug.com for our email list rental rates.

Website Advertisement

Advertise on the COBUG website and reach tens of thousands of COBOL users. Increase your COBOL sales leads. Contact COBUG at advertise@cobug.com for advertising rates.
 

COBOL Forums

 
Fujitsu [ return ]
From Message
cobolnut

 Email

6/05/2009
15:38:22
Subject: Write to COM1 port


Message:
Using Fujitsu Cobol I want to write to a Point Of Sale Customer display unit. How do I write to the display device directly. If I set the device as a printer rubbish is displayed. I would appreciate any help - Thanks


jwl

6/08/2009
03:32:05
RE: Write to COM1 port


Message:
Hi,

Here is some code that you can use for the customer display. The code covers file, working storage and procedures.

******* The select statement for the customer display.

000280 SELECT CUSDSP ASSIGN W02-CUSDSP
000290 ORGANIZATION SEQUENTIAL
000300 ACCESS SEQUENTIAL.

******** The file definition for the customer display.

000530 FD CUSDSP LABEL RECORD OMITTED.
000550 01 CUS-REC.
03 CUS-LINE PIC X(40).

******* The port to be used will be inserted here before opening
the customer display.

03 W02-CUSDSP PIC X(04) VALUE SPACES.

******* Working storage definitions for customer display

03 W15-CUSDSP.
05 W15-CUSDESC.
07 W15-HD1 PIC X(10).
07 W15-DUE PIC Z(06)9.99.
05 W15-CUS2.
07 W15-HD2 PIC X(10).
07 W15-NO-CHARGE.
09 W15-CHG PIC Z(06)9.99.

******** Is there a customer display and which port to use

03 W85-CUSDISP PIC X(01).
03 W85-CUSPORT PIC 9(01).


******** Company name for customer display.

003640 03 W95-COMP.
05 W95-DSP-L1 PIC X(20).
05 W95-DSP-L2 PIC X(20).


******* Setup the port to be used for the customer display.

IF W85-CUSDISP = "Y"
IF W85-CUSPORT = 1
MOVE "COM1" TO W02-CUSDSP
ELSE
IF W85-CUSPORT = 2
MOVE "COM2" TO W02-CUSDSP
ELSE
IF W85-CUSPORT = 3
MOVE "COM3" TO W02-CUSDSP
ELSE
IF W85-CUSPORT = 4
MOVE "COM4" TO W02-CUSDSP
END-IF
OPEN OUTPUT CUSDSP
MOVE SPACES TO CUS-LINE.
MOVE PAR-DSP-HDG TO W95-COMP.

******* Close the Display.

IF W85-CUSDISP = "Y"
CLOSE CUSDSP.

******* This is the company name being displayed.

IF W85-CUSDISP = "Y"
MOVE W95-COMP TO CUS-LINE
WRITE CUS-REC.

******* This is the product description

IF W85-CUSDISP = "Y"
MOVE W10-DESC TO W15-CUSDESC
MOVE W15-CUSDESC TO CUS-LINE
WRITE CUS-REC.

*
* Show the items price on the customer display
*
* PRICE- ZZZZZZ9.99
*
IF W85-CUSDISP = "Y"
MOVE " PRICE-" TO W15-HD2
IF W10-SELL = ZERO
MOVE " N/C" TO W15-NO-CHARGE
ELSE
MOVE W10-SELL TO W15-CHG
END-IF
MOVE W15-CUSDSP TO CUS-LINE
WRITE CUS-REC.

***** Display the amount due.

IF W85-CUSDISP = "Y"
MOVE "AMT DUE:-" TO W15-HD1
MOVE W90-TOTAL TO W15-DUE
MOVE W15-CUSDESC TO CUS-LINE
WRITE CUS-REC.

******* Display change.

IF W85-CUSDISP = "Y"
MOVE " CHANGE:-" TO W15-HD2
MOVE W90-CHANGE TO W15-CHG
MOVE W15-CUSDSP TO CUS-LINE
WRITE CUS-REC.

Hope this helps.

James (jwl)


cobolnut

6/08/2009
11:13:46
RE: Write to COM1 port


Message:
Thanks for the help
I tried your code - getting JMP0310I-u open error. file=com3. 'ERFLD=0001'. PGM=CUSTDISP When I change the COM3 to XCOM it created an output file - so the COM3 is being seen as something. Thanks


 
[ Go to Top of Page ]
COBOL Documentation, Application Mapping - EZ Legacy Ad
Micro Focus Live Ad
Mainframe Electronic Information Delivery Solutions - CASI Ad
COBOL Legacy Mainframe Migration - Transoft Ad
Mainframe Legacy Data Access - Arbutus Software Ad
netCOBOL Compiler, Legacy Mainframe Migration - Alchemy netCOBOL Ad
COBOL, Modernization, Application - MigrationWare Ad
COBOL, Modernization, Application - SeaSoft Ad
COBOL Code, Source Code - Source Recovery Company Ad
COBOL XML - XMLThunder Ad
COBOL Tools, Graphics - Flexus Ad
COBOL Legacy CICS Mainframe Migration - MacKinney Systems Ad
COBOL Sort, COBOL Tools - CoSort Ad





Call for Articles
COBOL Newsletters Articles are being sought for the COBUG newsletters.
Will you help us in our efforts to provide newsletters for the COBOL community at large? Contribute to the COBUG newsletters! Answer this call for COBOL and related legacy articles.

Local COBOL User Groups
COBOL User Group Check out the list of local COBOL user groups from around the world and join a user group near you.


Call for User Group Leaders!
COBOL User Groups Get Involved! We are looking for user group leaders to help organize and coordinate a local COBOL user group.

Join COBUG!
COBOL User Groups Become a part of the COBUG community today. Join Now ...


COBOL Forums
COBOL Forum Try our forums for help!
Let the COBUG members help you. Post your issues!



COBOL Jobs
COBOL Jobs Employers submit your COBOL job openings. Job seekers submit your resumes.

COBOL (c) Information Computing Services. All Rights Reserved. COBOL