upendrasri
Active User
Joined: 28 Sep 2017 Posts: 124 Location: India
|
|
|
|
Hi All,
I am trying to extract details from SMF records using rexx. I am able to extract all details but failing while extracting details from SMF Date field
My code is as below:
Code: |
SMF18DTE = SUBSTR(RECORD,7,4)
PACKED = PACTDECR(SMF18DTE)
SMF18DTE = SUBSTR(PACKED,3,5)
SMF18DTE = DATE('U',''SMF18DTE'','J')
PACTDECR:
NUMERIC DIGITS 20
PACKED = " "
ARG PACKED
PACN = "PACKED = C2X(''PACKED'')"
INTERPRET PACN
RETURN PACKED |
And trace of above code is as below
Code: |
22 *-* SMF18DTE = SUBSTR(RECORD,7,4)
>L> "RECORD"
>L> "7"
>L> "4"
>F> " "
23 *-* PACKED = PACTDECR(SMF18DTE)
>V> " "
51 *-* PACTDECR:
52 *-* NUMERIC DIGITS 20
>L> "20"
53 *-* PACKED = " "
>L> " "
54 *-* ARG PACKED
>>> " "
55 *-* PACN = "PACKED = C2X(''PACKED'')"
>L> "PACKED = C2X(''PACKED'')"
56 *-* INTERPRET PACN
>V> "PACKED = C2X(''PACKED'')"
*-* PACKED = C2X(''PACKED'')
>L> ""
>V> " "
>O> " "
>L> ""
>O> " "
>F> "40404040"
57 *-* RETURN PACKED
>V> "40404040"
>F> "40404040"
24 *-* SMF18DTE = SUBSTR(PACKED,3,5)
>V> "40404040"
>L> "3"
>L> "5"
>F> "40404"
25 *-* SAY SMF18DTE
>V> "40404"
40404
26 *-* SMF18DTE = DATE('U',''SMF18DTE'','J')
>L> "U"
>L> ""
>V> "40404"
>O> "40404"
>L> ""
>O> "40404"
>L> "J"
26 +++ SMF18DTE = DATE('U',''SMF18DTE'','J')
IRX0040I Error running SMF17, line 26: Incorrect call to routine
***
|
Any suggestions?
Thanks.. |
|