Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cobol/400 problem

Posted on 2004-04-29
3
Medium Priority
?
1,129 Views
Last Modified: 2012-08-13
hello friends,
I 'm trying to write data to subfile in cobol/400 . When i was moving the data to subfile ,the subfile's first field value replaces the indicator values . e.g i have 2 indicators in SFLCTL (IN45 - CLEAR IN99-DSPLAY )
SO if i moves value e.g james to empname
(first field) then indicator values also changes (IN45 contains 'J' and IN99 contains 'A') . Similarly if make changes to IN45 to '1' using EVAL in debugger then  
empname contains value - 1ames .
So the screen is not showing as the data is incorrect . i.e problem is after write & Read
my subfile screen doesn't stop .

HOPE U GOT MY QUERY .
Thanks n waiting..
0
Comment
Question by:raj28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
daveslater earned 1000 total points
ID: 10950137
Hi
here is the documentation from the DDS manual. you need the INDARA keyword in your forrmat


INDARA (Indicator Area) keyword for display files
Use this file-level keyword to remove option and response indicators from the buffer (also called the record
area) and place them in a 99-byte separate indicator area.
This keyword has no parameters.
Specifying INDARA provides the following advantages:
v Simplifies COBOL programming when both option and response indicators are used. If the same
indicator is used as a response indicator and as an option indicator, both indicators always have the
same value, regardless of the order in which they are specified in the DDS.
v Assists the RPG programmer using program-described WORKSTN files.
If you specify INDARA, you can add, change, or delete option and response indicators in the DDS and
re-create the file without re-creating the high-level language program. This is true because the field
locations in the buffer have not changed and therefore the level check data has not changed. However, if
the program is to take advantage of the new indicators, it would still need to be changed and re-created.
If you specify INDARA, some high-level languages may require that you specify in your program that a
separate indicator area is to be used. See the appropriate high-level language manual.
If you specify INDARA, the LOGINP and LOGOUT keywords do not log response or option indicators
when your program sends I/O operations. This is because response and option indicators do not appear in
the input or output buffers.
Option indicators are not valid for this keyword.
Example:
The following example shows how to specify the INDARA keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A INDARA
00020A CF01(01 ’End program’)
00030A R PROMPT
00040A ACTNBR 10 B 2 2
00050A 41 ERRMSG(’Account number +
00060A not found’ 41)
A
INDARA has been specified; option indicator 41 and response indicators 01 and 41 are removed from the
buffer for record format PROMPT and placed in the separate indicator area. Only ACTNBR, a named
output/input field, remains in the buffer for record format PROMPT.
134 OS/400 DDS Reference: Display Files V5R1
0
 

Author Comment

by:raj28
ID: 10975415
Hi Dave ..
I'm using COPY DDS-ALL-FORMATS for display file and using
indicators directly in program.
I don't want to define seperate indicator area . I think without INDARA it should work .
any suggestions ???
Thanks n waiting.
0
 
LVL 27

Expert Comment

by:tliotta
ID: 10980427
raj28:

Although I'd use a separate indicator area, it's not required, AFAIK. But what _is_ required is that the formats copied into your COBOL source match the formats of the DSPF. If indicators are included in the DSPF buffer area, then those indicators must have space allocated in the buffer definitions in COBOL.

Do a DSPFFD FILE(yourdspf) and compare the buffer layout against your COBOL definitions in your compiled program. (You might want to do a DSPPGMREF to verify that the format-levels match also.) If they all match, verify that you're MOVEing values into the proper buffer locations.

Tom
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
What we learned in Webroot's webinar on multi-vector protection.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question