|
View previous topic :: View next topic
|
| Author |
Message |
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
I have below CICS log which have information about what had happened in Online screens.
| Code: |
---------1---------2---------3---------4---------5--------6---------7---------8
REQUEST 18/07/2011 18:55:53 F02 G974650 223856902
RESPONSE 18/07/2011 18:55:54
REQUEST 18/07/2011 18:56:20 F02 G990101 579364447
RESPONSE 18/07/2011 18:56:20
REQUEST 18/07/2011 18:58:19 F02 G974606 789334456
RESPONSE 18/07/2011 18:58:19 ABEND SQL CODE: 803
REQUEST 18/07/2011 19:00:46 F02 G974890 323144410
RESPONSE 18/07/2011 19:00:47
REQUEST 18/07/2011 19:02:23 F02 G974650 112874160
RESPONSE 18/07/2011 19:02:23 ABEND SQL CODE: 803
REQUEST 18/07/2011 19:03:38 F02 G974601 032657752
RESPONSE 18/07/2011 19:03:38 |
In Production, customer support guys were trying to create Insurance policies and it fails with SQL Code 803. We found the cause for sql error .
But, we need to know for what customers it failed.
Position 42-50 have customer id in REQUEST record
Position 60-72 have the error 'SQL CODE: 803' in RESPONSE record
I want to get the Customer Id from REQUEST record for the SQL CODE 803 in RESPONSE record.
The output should be like this
| Code: |
789334456
112874160 |
I've tried using Splice and other methods, but no luck.I've searched this forum for similar posts, but couldn't find any.
Please help. |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
See if below helps. Assuming input is FB/80.
| Code: |
//STEP0001 EXEC PGM=SORT
//SORTIN DD *
REQUEST 18/07/2011 18:55:53 F02 G974650 223856902
RESPONSE 18/07/2011 18:55:54
REQUEST 18/07/2011 18:56:20 F02 G990101 579364447
RESPONSE 18/07/2011 18:56:20
REQUEST 18/07/2011 18:58:19 F02 G974606 789334456
RESPONSE 18/07/2011 18:58:19 ABEND SQL CODE: 803
REQUEST 18/07/2011 19:00:46 F02 G974890 323144410
RESPONSE 18/07/2011 19:00:47
REQUEST 18/07/2011 19:02:23 F02 G974650 112874160
RESPONSE 18/07/2011 19:02:23 ABEND SQL CODE: 803
REQUEST 18/07/2011 19:03:38 F02 G974601 032657752
RESPONSE 18/07/2011 19:03:38
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,BEGIN=(1,7,CH,EQ,C'REQUEST'),
PUSH=(81:42,9))
SORT FIELDS=COPY
OUTFIL INCLUDE=(52,20,CH,EQ,C'ABEND SQL CODE: 803'),BUILD=(81,9)
/*
//SYSOUT DD SYSOUT=*
|
OUTPUT
| Code: |
789334456
112874160 |
Thanks, |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
this
| Code: |
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,BEGIN=(1,7,CH,EQ,C'REQUEST'),
PUSH=(81:42,9)) |
can be changed to
| Code: |
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(81:42,9))
|
Gerry |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Gerry,
Yes I agree,in this case it works but I wanted to make sure about grouping them just in case...
Thanks, |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What happens when the entries are interleaved rather than grouped together (as shown in the example data)? |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|