View previous topic :: View next topic
|
Author |
Message |
shanth555
New User
Joined: 17 Aug 2012 Posts: 35 Location: India
|
|
|
|
Hi all,
I am Using CiCS to get the values from front end and invoking with Cobol.
If the field is 8 bytes field , but the entered value is only 3 bytes field.
How to Identify whether the entered value is 8 bytes field or not?
I would be helpful for your helps.
THanks. |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi,
You can make use of INSPECT TALLYING to check for leading/Trailing Spaces or low-values as per the input data.
After INSPECT check the counter field ,if it's zero then it means all 8 bytes are entered
Regards,
Chandan |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Is the front end passing a length for the field? Is the data coming in through FEPI or EXCI or another API? |
|
Back to top |
|
|
haimzeevi
New User
Joined: 01 Mar 2010 Posts: 27 Location: Israel
|
|
|
|
A few options:
1. If values are received by means of "EXEC CICS RECEIVE MAP", then you have, for each field (defined by means of DFHMDF) the "L"- suffix field, tells you the exact input-length for this field. To extract data, read item #2.
2. When input received any other method: if you need numeric-data from the input, you can issue either an"EXEC CICS BIF DEEDIT" to extract numeric-value from the field, or Cobol's "COMPUTE variable = FUNCTION NUMVAL(input-field)".
For alphanumeric data, follow Chandan.
Good Luck.
Haim Zeevi |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
As noted already you may be able to test the length of the field.
IF MAP-NAME-L = +8
yada-yada-yada
ELSE
something-else
END-IF
05 MAP-NAME-L PIC S9(04) COMP.
05 MAP-NAME-A PIC X(01).
05 MAP-NAME PIC X(##). |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
shanth555,
you need to answer Robert's question if you want any help.
your discription of the problem is very poor.
The source of the data is important.
since you said front-end, one is (potentially) deluded into thinking that you have some kind of JAVA front-end that feeds data to the mainframe.
if that is the case, people are wasting time trying to provide you solutions
based on BMS.
if you can't get the JAVA kids to modify their program,
so that it performs the necessary edits
and provides data lengths to the back-end
you will have to provide us with the data-layout with which you are working. |
|
Back to top |
|
|
|