How to fetch only package name from the report



IBM's Command List programming language & Restructured Extended Executor

How to fetch only package name from the report

Postby dhana venkatesh » Thu Jul 13, 2017 4:13 pm

I have a project to fetch the package names which is unapproved in changeman. I am able to get the report and place the report in a PS and from that PS an email will be sent to user with the report. The report which is received in email looks like below. But now the challenge is i need only the package name and install date from the below report, is there any chance we can fetch that ? I guess by using REXX it is possible, As i don't have experience in Rexx , can anyone help me with the REXX code ?

1Report CMN970 generated from subsystem: A by: ***** on: 11 Jul 2017 at: 10:28:16 Page: 1 0Date Range 1 Jan 1960 to 11 Jul 2017
-------------------------------------------------------------------------
Packages Pending Approval by Application: Input Package Parm = KW02*
-------------------------------------------------------------------------
Appl Packge Site Install Instal Approver Package Package Prom Sched Requestor name Req
uestor phone
Name Number Name Date Time Entity Status Type Levl System

---- ------ -------- -------- ------ -------- ----------------- -------------- ---- ------ ------------------------- ---
------------
KW02 00000 SITE 20160813 060000 APPSUPA Backed Out Unplanned Perm 00 CMN ABC 137
59
KW02 00000 SITE 20170711 090000 APPSUPA Frozen Planned Perm 00 CMN DEF 989
4184134
dhana venkatesh
 
Posts: 31
Joined: Thu Mar 06, 2014 6:53 pm
Has thanked: 3 times
Been thanked: 0 time

Re: How to fetch only package name from the report

Postby prino » Thu Jul 13, 2017 5:03 pm

Learn REXX, this is a help forum,not a "We do your work for you" one!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: How to fetch only package name from the report

Postby Robert Sample » Thu Jul 13, 2017 6:06 pm

If you ask for code on this forum, you should expect to pay the going rate for it -- 500 to 2000 US dollars per day, depending upon the person. If you don't want to pay, then either learn the language and code it yourself, or use another language you DO know to code what is needed.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to fetch only package name from the report

Postby Pedro » Thu Jul 13, 2017 9:37 pm

The requirements are still sketchy... where is this report? Are you the person sending the report or the person receiving the report?

To do this in rexx, you need to study EXECIO, PARSE and maybe SUBSTR. Also, learn how to do a loop.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to fetch only package name from the report

Postby NicC » Thu Jul 13, 2017 11:22 pm

You could also probably do it using your sort product but, as you have not used the code tags to show what you are getting nor given an example of what you want, again using the code tags, then it is only a guess,
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to fetch only package name from the report

Postby dhana venkatesh » Tue Jul 18, 2017 8:16 pm

Pedro wrote:The requirements are still sketchy... where is this report? Are you the person sending the report or the person receiving the report?

To do this in rexx, you need to study EXECIO, PARSE and maybe SUBSTR. Also, learn how to do a loop.



Below which is highlighted is the report . I created a JCL to fetch the report from changeman and same will be getting an email . In this report if you see the last line " KW02 00000 " this is the package name and 20160813 install date which is fetching from changeman, . This report which is below will be saved in a DSN. The person receiving the report in email needs only package name and install date. So I need to work on this report to fetch only package name and install date from this dsn. I hope only using REXX it is possible to fetch these details.

1Report CMN970 generated from subsystem: A by: ***** on: 11 Jul 2017 at: 10:28:16 Page: 1 0Date Range 1 Jan 1960 to 11 Jul 2017
-------------------------------------------------------------------------
Packages Pending Approval by Application: Input Package Parm = KW02*
-------------------------------------------------------------------------
Appl Packge Site Install Instal Approver Package Package Prom Sched Requestor name Req
uestor phone
Name Number Name Date Time Entity Status Type Levl System

---- ------ -------- -------- ------ -------- ----------------- -------------- ---- ------ ------------------------- ---
------------
KW02 00000 SITE 20160813 060000 APPSUPA Backed Out Unplanned Perm 00 CMN ABC 137
59
KW02 00000 SITE 20170711 090000 APPSUPA Frozen Planned Perm 00 CMN DEF 989
4184134
dhana venkatesh
 
Posts: 31
Joined: Thu Mar 06, 2014 6:53 pm
Has thanked: 3 times
Been thanked: 0 time

Re: How to fetch only package name from the report

Postby dhana venkatesh » Tue Jul 18, 2017 8:19 pm

NicC wrote:You could also probably do it using your sort product but, as you have not used the code tags to show what you are getting nor given an example of what you want, again using the code tags, then it is only a guess,



Thanks Nic, I explained the requirement to Pedro, i hope you were also looking for the same. Can you please check the reply to Pedro ?
dhana venkatesh
 
Posts: 31
Joined: Thu Mar 06, 2014 6:53 pm
Has thanked: 3 times
Been thanked: 0 time

Re: How to fetch only package name from the report

Postby Pedro » Tue Jul 18, 2017 9:41 pm

To do this in rexx, you need to study EXECIO, PARSE and maybe SUBSTR. Also, learn how to do a loop.

1. EXECIO to read from your input file
2. a loop to check all input lines
3. use POS built-in function to search for your target text, 'KW02 00000'.
4. EXECIO to write to a new file
5. send the new file to your customer.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to fetch only package name from the report

Postby dhana venkatesh » Wed Jul 19, 2017 6:56 pm

Pedro wrote:To do this in rexx, you need to study EXECIO, PARSE and maybe SUBSTR. Also, learn how to do a loop.

1. EXECIO to read from your input file
2. a loop to check all input lines
3. use POS built-in function to search for your target text, 'KW02 00000'.
4. EXECIO to write to a new file
5. send the new file to your customer.


Thanks Pedro. Will try it.
dhana venkatesh
 
Posts: 31
Joined: Thu Mar 06, 2014 6:53 pm
Has thanked: 3 times
Been thanked: 0 time

Re: How to fetch only package name from the report

Postby NicC » Fri Jul 21, 2017 11:25 am

Well, you still have not used the code tags - you found the colour tags so you should have found the code tags. You, also, have still not given the required output from the input that you showed.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post