Re: What is wrong?
- From: qgenesist@xxxxxxxxxxx
- Date: Thu, 24 Jan 2008 10:22:28 -0800 (PST)
OK, new deal:
H*NOMAIN (note that this is commented)
H DEBUG
H DFTACTGRP(*NO) ACTGRP(*CALLER)
H OPTION(*SRCSTMT:*NODEBUGIO)
D DS_EDCJPF E DS EXTNAME(edcjpf)
/copy proto,rtvctl#
P*RTVCTL# B (commented this
run)
D RTVCTL# PI 6S 0
D WO# 6S 0 const
D CTL# 6S 0
C/EXEC SQL
*NB: (I am on V5R4M0 and it refuses one line)
C+ Set Option commit= *none
C/END-EXEC
C/EXEC SQL
C+ Set Option closqlcsr= *endmod
C/END-EXEC
c #main tag
c exsr $rtvctl
C dump
c exsr $rtvstt
C #end TAG
c eval *inlr = *on
C #rtx TAG
c return ctl#
***********************************************
* Retrieve Controlling Workorder
***********************************************
c $rtvctl begsr
C/EXEC SQL
C+ select cjshid
C+ into :ctl#
C+ from edcjlf02
C+ where cjonbr = :wo#
c+ fetch first row only
C/END-EXEC
c #rtvctl# tag
c endsr
*************************************
* Retrieve SQL State
*************************************
c $rtvstt begsr
c #rtvstt tag
c endsr
P*RTVCTL# E (commented this run)
No compile.
main cannot return value
so uncomment all:
rmv actgrp
makes a program
5 QEXCPML QSYS /00A6
RTVCTL# MCNV _QRNP_PEP_RTVCTL#
RTVCTL# MCNV 2100000001 RTVCTL#
break is at #Main and at b of proc no hit
stuck forever
crtrpgmod does not understand sql.
how do I make this a procedure that I can call and call again from a
service program and how do I test it one proc at a time and debug it?
.
- Follow-Ups:
- Re: What is wrong?
- From: CRPence
- Re: What is wrong?
- From: Hauser@xxxxxxxxxxxxxxx
- Re: What is wrong?
- From: Jonathan Ball
- Re: What is wrong?
- References:
- What is wrong?
- From: qgenesist
- Re: What is wrong?
- From: Saml
- Re: What is wrong?
- From: Hauser@xxxxxxxxxxxxxxx
- Re: What is wrong?
- From: qgenesist
- Re: What is wrong?
- From: CRPence
- What is wrong?
- Prev by Date: Re: Creating a web service, alternatives to WDSC 7.0
- Next by Date: Re: Creating a web service, alternatives to WDSC 7.0
- Previous by thread: Re: What is wrong?
- Next by thread: Re: What is wrong?
- Index(es):