Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Complex display to COMP-3 conversion

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
juneauTracy
Member


Joined: 10 Mar 2016
Posts: 1

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Mar 10, 2016 5:12 am    Post subject: Complex display to COMP-3 conversion Reply with quote

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.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Mar 14, 2016 7:55 pm    Post subject: Reply with quote

If you know the import format, have you looked at the COBOL UNSTRING Statement.
it was developed for this very purpose.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-8297.html