have a query in eazytrieve. In one of my codes, I need to move COMP value to NUMERIC and vice versa.
It populates junk values when I try to do that move.
If you can throw some light on this issue,it?ll be really helpful.
Thanks
Naru
Reply With Quote
query in move COMP value to NUMERIC in easytrieve
Moderators: DikDude, Moderator Group
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
an assignment (field-b = field-a) will move and convert
a move (move field-a to field-b) will not convert, only move the data from one address to another.
links:
http://www.easytrieveplus.com/prog_chapter2.html#2.11
http://www.easytrieveplus.com/prog_chapter2.html#2.11.2
a move (move field-a to field-b) will not convert, only move the data from one address to another.
links:
http://www.easytrieveplus.com/prog_chapter2.html#2.11
http://www.easytrieveplus.com/prog_chapter2.html#2.11.2
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Naru,
As dbzTHEdinosauer said you need to see what is your code
an assignment or a move.
I donot see any problem with the below code.
Thanks,
Veera.
As dbzTHEdinosauer said you need to see what is your code
an assignment or a move.
I donot see any problem with the below code.
Code: Select all
PARM ABEXIT(SNAP) PRESIZE 1024
*
DEFINE WS-COMPFLD-A W 3 P VALUE 12345.
DEFINE WS-COMPFLD-B W 3 P VALUE 0.
*
DEFINE WS-NUMFLD-A W 5 N VALUE 12345.
DEFINE WS-NUMFLD-B W 5 N VALUE 0.
*
**********************************************************************
* PROCESSING *
**********************************************************************
*
JOB INPUT (NULL)
*
WS-COMPFLD-B = WS-NUMFLD-A
WS-NUMFLD-B = WS-COMPFLD-A
*
DISPLAY ' VALUES INITAL '
DISPLAY ' COMPFLD-A ' WS-COMPFLD-A
DISPLAY ' WS-NUMFLD-A ' WS-NUMFLD-A
*
DISPLAY ' VALUES AFTER MOVE '
DISPLAY ' COMPFLD-B ' WS-COMPFLD-B
DISPLAY ' WS-NUMFLD-B ' WS-NUMFLD-B
*
STOP
Result:
******
VALUES INITAL
******************
COMPFLD-A 12345
WS-NUMFLD-A 12345
VALUES AFTER MOVE
******************
COMPFLD-B 12345
WS-NUMFLD-B 12345
Veera.
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