Please bear with me. I am new to the group. I am working on converting a mainframe CICS process from importing and processing data via NJE to doing using SOAP in a straight mainframe-to-mainframe process.
I need to take an imported PIC X(7478) SOAP string and convert it first into multiple fields - some string and some COMP-3 - and then convert it back into a PIC X(6805) [where the difference in length is due to the COMP-3 values and so that it can then be processed internally]. Additionally this string includes group values that have to be worked through.
Earlier portions of the SOAP string tell me if the string contains a claim record, a payment record group, a wage group, or a help group. I am showing the following code for the claim record because it does not contain any group logic, but does show the issues I am having converting the string to COMP-3.
IF R0REC1-S > 0 [there is a field to tell me if a claim record is present]
MOVE REST-S(1:215) TO CLAIM-ITEM [see record definitions below]
MOVE CLAIM-ITEM TO CLAIM-ITEM-C
STRING REST-S(216:) DELIMITED BY SIZE
INIT DELIMITED BY SIZE [INIT is a defined string of spaces]
INTO REMAINDER
MOVE REMAINDER TO REST-S
END-IF
...
(Since I know where the records lay and if they are present, I remove the portion REST-S processed, into REMAINDER with a string of initializing spaces) ...Proceeds onto processing the remaining group record types.
Then, once all the records have been converted as needed to COMP-3, they are all strung back together.
However, the resulting string still shows up in display format.
(The following two records display the issue.)
SEWARD AK996641313.&a?.-a.REG....&.¬.&b.....................
ORLANDO FL32825500201504260160425REG06110000000000
The first record was imported via the current NJE system and does not display the COMP-3 values.
The second was imported with SOAP, but is still displaying everything in text.
My question, since I am relatively new to COBOL processing...
Am I doing the basic conversion of string to numeric to COMP-3 correctly?
To get the data to populate correctly do I have to convert each field separately (i.e. for instance, moving Type, then moving Last, ...) rather trying to use a single move to the parent CLAIM-ITEM.
CLAIM-ITEM.
TYPE PIC X(01).
LAST PIC X(23).
FIRST PIC X(12).
MID PIC X(01).
ADDR1 PIC X(35).
ADDR2 PIC X(35).
CITY PIC X(19).
STATE PIC X(02).
ZIP PIC X(09).
EFF PIC 9(07).
BYE PIC 9(07).
CURPGM PIC X(03).
LLON PIC 9(07).
DQFM PIC 9(07).
DQTO PIC 9(07).
OP PIC 9(05)V99.
BAL PIC 9(05)V99.
WBA PIC 9(03).
MBA PIC 9(05).
EB PIC 9(07).
TRA PIC 9(07).
EXT PIC 9(07).
*
CLAIM-ITEM-C is the exact same layout except that the
straight 9(*) numeric fields are defined as 9(*) COMP-3 fields.
Thank you so much for your assistance.
Complex display to COMP-3 conversion
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 1
- Joined: Thu Mar 10, 2016 4:24 am
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page