T24 : BATCH JOB fails to update local TABLES

2,380 views
Skip to first unread message

M Rizwan

unread,
Mar 10, 2010, 3:00:16 AM3/10/10
to jB...@googlegroups.com
T24 : R06 / Jbase 4.1.5.7

Hello
 
I have created a routine which updates certain local tables. This routine works fine when I run it from the "Classic" mainline, with "M" as type mentioned in PGM.FILE.
However the same routine fails to update the tables, when I run it as a "JOB" at COB where it has "B" as type in PGM.FILE, though the status in BATCH shows it has successfully compelted the task.
 
Can anybody tell me what's wrong...
 
 
Thanks
 
Riz. 

jaro

unread,
Mar 10, 2010, 1:53:06 PM3/10/10
to jBASE
Hard to say if you don't provide the code.
did you enter the field BATCH.JOB in the PGM.FILE with your routine
name?
and check JOB.TIMES outputs, EB.EOD.ERROR and COMO outputs from the
COB and search for your particular job.

Talha Naushahi

unread,
Mar 11, 2010, 12:21:48 AM3/11/10
to jb...@googlegroups.com
Dear Riz,
 
I would suggest you to first test it as service and see the results. if it works fine then hopefully it will work on cob too.
 
regards,
Talha

--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines
 
IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Deepak Kumar

unread,
Mar 11, 2010, 2:13:44 AM3/11/10
to jb...@googlegroups.com
Hi can you please post the code....

--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24

To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en



--
Deepak Kumar

Srinivas

unread,
Mar 11, 2010, 11:31:07 AM3/11/10
to jb...@googlegroups.com
Hi,
 
As per your mail , you said that it works fine when you are running as Mainline program . This means you have used JOURNAL.UPDATE in your code if you are using F.WRITE statement. 
 
Check your batch routine , and if JOURNAL.UPDATE is there , remove it from the code since it is a BATCH program.
 
I guess this might be one reason . Anyways post your code as well BATCH record also along with PGM.FILE.

Regards,

SrinivasYadav. G
Mobile No: 00966 - 540625165

Yohan

unread,
Mar 11, 2010, 5:46:30 PM3/11/10
to jb...@googlegroups.com
Hi

In T24 batch routine even if you include JOURNAL.UPDATE ,inside journal update itself check whether system is  running under batch .if it is then journal update routine will not process ahead

since you have not post the routine here its hard to give a solution

 
Best Regards
Yohan

M Rizwan

unread,
Mar 15, 2010, 2:03:54 AM3/15/10
to jb...@googlegroups.com
Dear Guys,

Please find the relevant part of coding and screen shot of PGM.FILE.
As said before, this code works fine thru mainline but not in BATCH
mode. The only difference is JOURNAL.UPDATE is used in mainline
program and I removed this in the BATCH mode.

Y.NO.OF.FACI = DCOUNT(R.CAL.FACI,@FM)
FOR I = 1 TO Y.NO.OF.FACI

IDD = R.CAL.FACI<I>
CALL F.READ(FN.API.SL.FACI.BALANCES,IDD,R.API.SL.FACI.BALANCES,F.API.SL.FACI.BALANCES,Y.LM.ERR)

FIND Y.YEAR.MONTH IN
R.API.SL.FACI.BALANCES<API.SFB.YEAR.MONTH> SETTING F.FM,F.VM,F.SM THEN
R.API.SL.FACI.BALANCES<API.SFB.LIBOR.LCY,F.VM> += R.CAL.LIBOR.LCY<I>
R.API.SL.FACI.BALANCES<API.SFB.MARGIN.LCY,F.VM> +=
R.CAL.MARGIN.LCY<I>
R.API.SL.FACI.BALANCES<API.SFB.LIBOR.FCY,F.VM> += R.CAL.LIBOR.FCY<I>
R.API.SL.FACI.BALANCES<API.SFB.MARGIN.FCY,F.VM> +=
R.CAL.MARGIN.FCY<I>
END ELSE
R.API.SL.FACI.BALANCES<API.SFB.YEAR.MONTH,-1> = Y.YEAR.MONTH
R.API.SL.FACI.BALANCES<API.SFB.OUTS.AMOUNT,-1> = 0
R.API.SL.FACI.BALANCES<API.SFB.DRAWDOWN,-1> = 0
R.API.SL.FACI.BALANCES<API.SFB.REPAYMENT,-1> = 0
R.API.SL.FACI.BALANCES<API.SFB.LIBOR.LCY,-1> +=
R.CAL.LIBOR.LCY<Y.FM>
R.API.SL.FACI.BALANCES<API.SFB.MARGIN.LCY,-1> +=
R.CAL.MARGIN.LCY<Y.FM>
R.API.SL.FACI.BALANCES<API.SFB.LIBOR.FCY,-1> +=
R.CAL.LIBOR.FCY<Y.FM>
R.API.SL.FACI.BALANCES<API.SFB.MARGIN.FCY,-1> +=
R..CAL.MARGIN.FCY<Y.FM>
END

CALL F.WRITE(FN.API.SL.FACI.BALANCES,IDD,R.API.SL.FACI.BALANCES)

NEXT

**************

PGM.FILE Screen Shot :

PROGRAM API.PGM.BUILD.SL.INT
------------------------------------------------------------------------------
1 TYPE.............. B
2. 1 GB SCREEN.TITLE BATCH JOB TO UPDATE SL INTEREST
3 ADDITIONAL.INFO... IN THE SL BALANCE FILE
4. 1 BATCH.JOB...... @API.PGM.BUILD.SL.INT
5 PRODUCT........... SL
14 CURR.NO........... 1


--
Rizwan

Deepak Kumar

unread,
Mar 15, 2010, 7:28:30 AM3/15/10
to jb...@googlegroups.com
There is no need for BATCH.JOB in PGM.ENTRY. Please revert me what I said is wrong..


--
Deepak Kumar

rakesh pemmadi

unread,
Mar 15, 2010, 12:08:39 PM3/15/10
to jb...@googlegroups.com
hi ,

If u r running this as SINGLE thread u need to define the BATCH.JOB field with @ followed by the routine name

for BATCH this field can null or BATCH.JOB.CONTROL

Check the template u r writing is local template ,if so use JOURNAL.UPDATE("")

Regards,
Rakesh.

Srinivas

unread,
Mar 15, 2010, 1:09:18 PM3/15/10
to jb...@googlegroups.com
Dear Rizwan,
 
Could you paste the BATCH reocrd , please . I guess, the frequency is not set in the BATCH record .It might be in 'ADHOC' mode.

Sai Prasanna

unread,
Mar 19, 2010, 1:20:04 PM3/19/10
to jb...@googlegroups.com
Hi,
 
Is the txn mgmt failing within the job. Is it SingleThreaded or M/t Job
 

 

--

Talha Naushahi

unread,
Mar 23, 2010, 1:43:05 AM3/23/10
to jb...@googlegroups.com
Hi,
 
Riz try only WRITE
 
e.g WRITE R.API.SL.FACI.BALANCES TO F.API.SL.FACI.BALANCES, IDD

regards,
Talha

Deepak Kumar

unread,
Mar 24, 2010, 6:30:39 AM3/24/10
to jb...@googlegroups.com
Hi,

I also faced a same kind of situation where F.WRITE failed. But when I use WRITE it worked. Can anyone explain me the reason behind this..
--
Deepak Kumar

Talha Naushahi

unread,
Mar 29, 2010, 8:41:28 AM3/29/10
to jb...@googlegroups.com
hi deepak,
 
what i have understood is that F.WRITE wirte the data in cache and when the transaction is complete it then writes to the table in the end. Although WRITE directly writes to the table. And i think thts why when we use JOURNAL.UPDATE with F.WRITE it works cause JOURNAL.UPDATE seems to update table from cache. My experience is tht main line routines using F.WRITE does not updates tables neither do OFS.POST.MESSAGE works unless JOURNAL.UPDATE is used.
 
kindly correct my concept if im wrong too :D.
 
regards,
Talha 

--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines
 
IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
 
To unsubscribe from this group, send email to jbase+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

gowtham natarjan

unread,
Mar 29, 2010, 2:33:11 PM3/29/10
to jb...@googlegroups.com
Guys,

F.WRITE writes to a FWC array and unless a commit is issued for a transaction it will not flush it to the disk.

The Journal.update is an equivalent of commit operation in oracle.

Thats y when a main line program is executed and if u are using F.WRITE then u need to  call a jounal.update. TRANS END happens only in journal update and thats where the boundary of a transaction ends.

G

jaro

unread,
Mar 31, 2010, 2:51:28 PM3/31/10
to jBASE
with the transaction management it is different. in the COB or service
oriented process the main control process (BATCH.JOB.CONTROL) handle
the transaction boundary, e.g. start and end. The journal update
should has no meaning in this case, only usefull for online
transactions.

Long time back I asket the author of this request to check the
corresponding output in &COMO&, JOB.TIMES and EB.EOD.ERROR. At least
we should be able to confirm whether the COB tried to call the
particular job and the problem is within the program, or is not called
at all and the problem is related to setup only. without this it's
just an academic debate.

On Mar 29, 8:33 pm, gowtham natarjan <gowth...@gmail.com> wrote:
> Guys,
>
> F.WRITE writes to a FWC array and unless a commit is issued for a
> transaction it will not flush it to the disk.
>
> The Journal.update is an equivalent of commit operation in oracle.
>
> Thats y when a main line program is executed and if u are using F.WRITE then
> u need to  call a jounal.update. TRANS END happens only in journal update
> and thats where the boundary of a transaction ends.
>
> G
>

> On Mon, Mar 29, 2010 at 4:41 PM, Talha Naushahi <talha.naush...@gmail.com>wrote:
>
>
>
> > hi deepak,
>
> > what i have understood is that F.WRITE wirte the data in cache and when the
> > transaction is complete it then writes to the table in the end.
> > Although WRITE directly writes to the table. And i think thts why when we
> > use JOURNAL.UPDATE with F.WRITE it works cause JOURNAL.UPDATE seems to
> > update table from cache. My experience is tht main line routines using
> > F.WRITE does not updates tables neither do OFS.POST.MESSAGE works unless
> > JOURNAL.UPDATE is used.
>
> > kindly correct my concept if im wrong too :D.
>
> > regards,
> > Talha
>

M Rizwan

unread,
Apr 4, 2010, 1:35:29 AM4/4/10
to jb...@googlegroups.com
Thanks all of you for your useful comments and time.
The problem is solved now.
 
We can close this issue here.
 
With Best Wishes

To unsubscribe, reply using "remove me" as the subject.



--
Rizwan

Talha Naushahi

unread,
Apr 4, 2010, 4:32:41 AM4/4/10
to jb...@googlegroups.com
jaro is right.... in batch jobs or services the variable RUNNING.UNDER.BATCH is set as 1, which means it will directly writes to disk. so writing is not a problem.
 
debate or not im gaining knowledge :)
 
regards,
Talha

Reply all
Reply to author
Forward
0 new messages