Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write Interactive COBOL application in AS/400 ILE COBOL?

Status
Not open for further replies.

mikrom

Programmer
Mar 27, 2002
2,999
SK
Hi,

I have to write a screen application in AS/400 ILE COBOL.
Writing interactive application in AS/400 COBOL is very different from doing it with other COBOL (Windows or DOS) compilers due to AS/400 screens descriptions with DDS. This is for me a problem because of lack of informations.

I need a little help. Has anyone some very simple code examples with corresponding DDS display file descriptions?

Thanks
 
One way is to create a custom display file and use that display file to either display the results or to accept input, or make one to do each. I had a book specifically on AS400 COBOL that explained how to do it. This allows you to use the function keys to start and stop the program and to display error messages along the bottom of the display screen.

For instance if you were reading an inventory file you would not use an at end. You would run the program in a loop and exit the program when the operator presses F3. You may want to make sure there is an alternate way to end the program if you do not get the F3 key to work like a specific part number that always works like 000-0000-000-0000. You could also accept commands like A for add, D for delete, C for change and Q for quit. I dont have an example I can send you so look for a book on AS400 COBOL.

You can use the command

write display-record
format is "screen1"
indicators are ws-indicator-list

once the fields are populated to write it to the screen. If you do not like my post feel free to point out your opinion or my errors.
 
Thank you for your post.
Now I have an AS/400 COBOL book too. I must read it and then I will see.
 
If you want, I can email you the first Cobol program for as/400 source I wrote. It's a very small program that browses through a file, using subfile. Lemme know if you want it.
 
Hallo NVSbe,

Thank you. I would be very glad if you send me this small proggie to the address rmiklos@pss.sk
 
mikrom,

The book I found quite helpful is called "DDS Programming for Display and Printer Files" by James Coolbaugh. Only about the last quarter deals with printer files, though. I don't know if that section is any good-I bought it only for display files.

Melissa confusedlady
 
confusedlady,

Thank you for the tip. I have the book "Programming in COBOL/400" from Cooper/Stern/Stern. It contains some infos how to write interactive applications. But unfortunately I can´t try it now. At the moment I'm working on other problems.

Roman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top