IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SMF Record Date conversion failing


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 121
Location: India

PostPosted: Thu Oct 20, 2022 6:58 pm
Reply with quote

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..
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 121
Location: India

PostPosted: Thu Oct 20, 2022 7:53 pm
Reply with quote

I have rectified it. Extracting wrong filed into Date.

Thanks..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top