View previous topic :: View next topic
|
Author |
Message |
Sudeshna Sarkar
New User
Joined: 11 Sep 2008 Posts: 29 Location: Kolkata
|
|
|
|
Hi All friends,
A parallel team has asked me for some help. They are trying to parse a COBOL formatted data(using COBOL copybook) into Abintio.
They ask me what is the meaning of the following?
88 (**)-MLR-TRAILER VALUE X'00'.
Also they have a requirement where they want to check if the Bit 1 is on or off or Bit 2 is on or Off. Its something like follwoing.
===============================================
01 (**)-DISK-REC-R REDEFINES
(**)-DISK-REC.
05 FILLER PIC X(16).
05 (**)-MLR-DETAIL-REC.
* *-------------------------------------------------------*
* * MLR - CONTROL INFORMATION (ACCOUNT NUMBER) 12*
* * - SEE SECTION 1 FOR THE REDEFINE OF CNTL-ACCT-NUM*
* *-------------------------------------------------------*
10 (**)-CNTL-ACCT-NUM-MLR PIC X(12).
10 (**)-CNTL-ACCT-NUM-MLR-R REDEFINES
(**)-CNTL-ACCT-NUM-MLR.
20 FILLER PIC X(11).
20 (**)-MLR-TRAILER-TYPE PIC X(01).
88 (**)-MLR-TRAILER VALUE X'00'.
please share some information if you would like.
Thanks
[/img] |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Sudeshna,
Haven't heard of Abintio before, guessing its some open systems and your team is worried about only the layout they are receiving from a COBOL program. It that's the case I suggest you to ignore the 88 level variable as its usually used for condition check.
So as per what u send...
first 16 bytes are FILLER .... followed by 12 bytes for ACCT-NUM-MLR. The last one byte (12th byte) of ACCT-NUM-MLR will have the TRAILER-TYPE of 1 byte.
Bitwise Operations is a "bit" complicated in COBOL.. Please refer the thread for some inputs
Out of curiosity... Are u sure that your team want to check a particular bit or a byte |
|
Back to top |
|
|
Sudeshna Sarkar
New User
Joined: 11 Sep 2008 Posts: 29 Location: Kolkata
|
|
|
|
Thanks Binop.
I know 'Bit' is causing bit problem to my fellow colleagues here. Actually that layout is just an example. Yes Abinitio is an open system concept, they have an interface like Vi editor in Unix, and they have very well tools for reading COBOL copybooks, codes in their own editor.
The copybook which I mentioned above was an example to read that X’00’, and ofcourse I did not know the significance of using X’00’ for a value.
Here they have to check the Bit 0, Bit 1, Bit 2 and so on of a Particular Variable which is actually a One Byte variable X(1).
15 (**)-MLFLG2-FLAG-2 PIC X(01).
I have got some more info reg their requirement.
-------------------------------------------------------------------------------------
| | Closed End (from CELMLR):
| | VOIDS: MLFLG2 BIT 1 ON
| | PAID OUT: MLPOCD NOT = X'FF'
| | CHARGED OFF: MLFLG2 BIT 2 ON
| |
| |
| |Open End (from OELMLR):
| |VOIDS: MOFLG1 BIT 3 ON
| |CHARGED OFF:
| | M10DAT NOT = ZERO OR
| | MOFLG8 BIT 0 ON OR
| | MOFLG8 BIT 1 ON OR
| | MOFLG8 BIT 2 ON OR
| | MOFLG8 BIT 3 ON OR
| | MOFLG8 BIT 4 ON OR
| |
| |
LOAN_ | ACCOUNT_ |If account is not VOID, PAIDOUT or ACCOUNT_ |ACTIVE_FLG |CHARGED OFF
DETAIL | | then the account is active.
In this case how do you check whether the Bit 1/Bit 2 of MLFLG2 is on or off? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Apparently, you're dealing with a Bit-Map. How long is the Bit-Map (in bytes)?
Bill |
|
Back to top |
|
|
|