CICS-DB2

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
rahul_rajan
Member
Posts: 4
Joined: Sun May 20, 2012 11:43 am

CICS-DB2

Post by rahul_rajan » Sun May 20, 2012 8:03 pm

I have a map which accept an input( in a field name [value]) from the user and its need to be passed to a table's query:

select salary into :ws-salary from employee
where exp = :ws-exp

now this query(at where clause) doesnt accept the data type of [value] (i.e my field name)because the employee.exp is of s9(2)v9(1) comp-3 data type. i tired changing the data type of my field [value] (using picout and picin) as s9(2) v9 comp-3 but still its showing me ASAR ABEND.

Any idea????

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun May 20, 2012 10:16 pm

Possibly the data is invalid. . .

Or does not conform to the "picture".
Have a good one

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Sun May 20, 2012 10:26 pm

???????????

your map input/output field can not possibly be comp-3.

you must proof the data coming in from your map,
then you must populate a pic s9(2)v9 comp-3 Working-Storage field,
which will then be used as a host variable in the WHERE clause.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

rahul_rajan
Member
Posts: 4
Joined: Sun May 20, 2012 11:43 am

Post by rahul_rajan » Mon May 21, 2012 10:48 am

@DikDude:

ya its not.. what i am really trying to do is to take an input(as decimal 9(2)v9) which is to be put into an host variable ( of comp-3 data type).






Sounds confusing????[\b]

rahul_rajan
Member
Posts: 4
Joined: Sun May 20, 2012 11:43 am

Post by rahul_rajan » Mon May 21, 2012 10:55 am

@dbzTHEdinosauer

I tired but its not passing anything ,only blank spaces... as if the data got truncated( or whatever) while moving into host variable...

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon May 21, 2012 3:24 pm

don't know what your problem is, you have not provided any details.

you may want to look into 1.13 BIF DEEDIT
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

rahul_rajan
Member
Posts: 4
Joined: Sun May 20, 2012 11:43 am

Post by rahul_rajan » Tue May 22, 2012 2:29 pm

how can i pass a DECIMAL from map to host variable and vice versa???[/b]

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed May 23, 2012 1:11 am

If i understand, there is no "decimal" on the map. You need to move the value from to the host variable and from the host variable to the map.
Have a good one

Post Reply

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



Other References
Mainframe Tools and others