Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sat Sep 30, 2017 4:09 pm (GMT 5.5)

Hi Prino,

If am not wrong, TGPCT is showing only two digits after dot(.)

From my above example Spool percentage from Jes command is : 0.0019

TGPCT Value is : 0.00

Seems it is not considering 3rd and 4th digits. I have tried with another example.

JOB63237 00000090 $HASP890 JOB(TTSYTKSR) 689
689 00000090 $HASP890 JOB(TTSYTKSR) SPOOL=(VOLUMES=(SPS101),TGS=15,
689 00000090 $HASP890 PERCENT=0.0299)

TGPCT Value is : 0.02

Correct me in case if my understanding is wrong.

Thanks!
_________________
Upen


CLIST & REXX :: RE: Rexx to execute spool commands

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: steve-myers
Posted: Sat Sep 30, 2017 5:04 pm (GMT 5.5)

Well, if you really need all that precision - unlikely, but that's only my opinion - you can calculate the percentage yourself by adding the total track groups from the spool volumes from the SDSF SP comand and then use the TGNUM value from the job status display to compute the percentage to any precision you like. As prino sometimes says, sheesh.

On the other hand, if you want the largest spool usage, just use TGNUM from job status and don't get bent out of shape by percentage. Then, at least, you don't have fractions and rounding or truncation!

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: Willy Jensen
Posted: Sat Sep 30, 2017 5:48 pm (GMT 5.5)

As prino quite correctly states, the value is truncated by the x.xx pct. Question is, how precise do you really need the result? Truncating or rounding, the value will still not be precise.
By the way, the REXX API shows values with the same precision as the screens. The width of TGPCT is defined as 6 bytes.

REXX API sample (just in case):
Code:
 parse value '* STA* **' with isfprefix isfowner isfsysname isfdest   
 zz=isfcalls('ON')                                                   
 Address SDSF "ISFEXEC ST (delayed prefix @.)"                       
 if rc<>0 then ....
 zz=isfcalls('OFF')                                                   
 do n=1 to @.jname.0                                                 
   say @.jname.n @.jobid.n @.queue.n @.status.n space(@.retcode.n,0),
       @.ownerid.n @.tgpct.n                                         
 end

_________________
WJ

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sat Sep 30, 2017 11:04 pm (GMT 5.5)

Hi Prino,

I tried getting TGPCT Full value from SDSF Panel but I failed in getting full value.

Can you please give me a hint or assist me on this?

Thanks!
_________________
Upen

DFSORT/ICETOOL :: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Subject: How to insert a value on specific position based on conditio
Posted: Sun Oct 01, 2017 3:04 am (GMT 5.5)

Hi All,

I have a PS file which is 18 bytes long. Each record is exactly 18 byte long. I have to insert a 3-byte character on position 1 in the file based on some conditions. Below is the sort card i am currently using :

//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,
IFTHEN=(WHEN=(9,3,CH,EQ,'000'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(9,3,CH,EQ,'IM1'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(10,3,CH,EQ,' 4'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(10,3,CH,EQ,' 3'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(9,2,CH,EQ,'WG'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,3,CH,EQ,'IUL'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,2,CH,EQ,'UL'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(7,3,CH,EQ,' T'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,2,CH,EQ,'23'),OVERLAY=(1:C'023'))),
/*

After several hit and trials i am still getting the error. I am missing something here. Can anyone please help me to complete this.

Input File : (Each record is exactly 18 bytes long. Every record has variable number of spaces in the beginning. Spaces may not be visible after posting this.)

----+----1----+---

0000L01762
4875851
IM10000929
3400009
WG10004785
IUL1000016
UL10000006
T700000011
2307900026

Expected Output : (Output file will also have length of 18 bytes)

CGA 0000L01762
CGA 4875851
CGA IM10000929
CGA 3400009
LFG WG10004785
LFG IUL1000016
LFG UL10000006
LFG T700000011
023 2307900026


Thanks a lot in advance !!
_________________
Thanks !

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Posted: Sun Oct 01, 2017 3:28 am (GMT 5.5)

Just a small correction -

Expected Output : (Output file will also have length of 18 bytes)

GGA 0000L01762
GGA 4875851
GGA IM10000929
GGA 3400009
AFG WG10004785
AFG IUL1000016
AFG UL10000006
AFG T700000011
023 2307900026
_________________
Thanks !

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: magesh23586
Subject: Reply to: How to insert a value on specific position based on conditio
Posted: Sun Oct 01, 2017 3:30 am (GMT 5.5)

Code'd for you, Please do it yourself in future

I have a PS file which is 18 bytes long. Each record is exactly 18 byte long. I have to insert a 3-byte character on position 1 in the file based on some conditions. Below is the sort card i am currently using :

Code:

//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,
IFTHEN=(WHEN=(9,3,CH,EQ,'000'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(9,3,CH,EQ,'IM1'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(10,3,CH,EQ,' 4'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(10,3,CH,EQ,' 3'),OVERLAY=(1:C'GGA')),
IFTHEN=(WHEN=(9,2,CH,EQ,'WG'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,3,CH,EQ,'IUL'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,2,CH,EQ,'UL'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(7,3,CH,EQ,' T'),OVERLAY=(1:C'AFG')),
IFTHEN=(WHEN=(9,2,CH,EQ,'23'),OVERLAY=(1:C'023'))),
/*



After several hit and trials i am still getting the error. I am missing something here. Can anyone please help me to complete this.

Input File : (Each record is exactly 18 bytes long. Every record has variable number of spaces in the beginning. Spaces may not be visible after posting this.)


Code:

----+----1----+---

0000L01762
4875851
IM10000929
3400009
WG10004785
IUL1000016
UL10000006
T700000011
2307900026



Expected Output : (Output file will also have length of 18 bytes)
Code:

CGA 0000L01762
CGA 4875851
CGA IM10000929
CGA 3400009
LFG WG10004785
LFG IUL1000016
LFG UL10000006
LFG T700000011
023 2307900026

_________________
Regards,
Magesh


DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Posted: Sun Oct 01, 2017 3:40 am (GMT 5.5)

This is the expected output. By mistake i wrote the wrong expected output in my topic. Below is the correct expected output :

Code:

GGA 0000L01762
GGA 4875851
GGA IM10000929
GGA 3400009
AFG WG10004785
AFG IUL1000016
AFG UL10000006
AFG T700000011
023 2307900026


_________________
Thanks !

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Posted: Sun Oct 01, 2017 3:42 am (GMT 5.5)

Thanks Magesh. I will keep this in mind going forward.
_________________
Thanks !

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sun Oct 01, 2017 6:37 am (GMT 5.5)

Hi,

I tried getting TGPCT Value without truncation using existing ST Panel exec, But its really confusing for me.

Is there any ISPF Function related to TGPCT value? or is there any Rexx variable like ISFTGPCT From which we can access this value based on Jobid?

Thanks!
_________________
Upen

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sun Oct 01, 2017 6:52 am (GMT 5.5)

Hi,

I tried getting TGPct value without truncation from SDSF ST Panel exec but its really confusing for me.

Can somebody help me in getting TGpct full value? or provide me some hint to get that value.

Thanks!
_________________
Upen

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sun Oct 01, 2017 6:55 am (GMT 5.5)

Hello All,

My apologies for the above 3 posts for same question, Some problem with my internet web page after submitting first 2 messages it showed page not found even I didn't get them after login to this forum.

Hope you will understand.

Thanks!
_________________
Upen

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sun Oct 01, 2017 7:14 am (GMT 5.5)

Hi Steve and Willy Jensen,

I will explain why I need exact PCT Value.

Some time back we had a spool shortage issue in our environment, After our verification we came to know that thousands of user jobs submitted by the app users. Though each Job is using very less spool percentage but because of the volume of the Jobs were high so we had that issue.

Now am writing a rexx which will lists user jobs and their spool usage , We just keep an eye on those Jobs on daily basis and in case if we feel number of Jobs are more , we will share this report with users and ask them to take copy of their Jobs and delete them from spool.

We can achieve this by using Jes commands against each Job but number of jobs are more and we cannot hide commands/outputs from spool.


Thanks!
_________________
Upen

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: magesh23586
Subject: Reply to: How to insert a value on specific position based on conditio
Posted: Sun Oct 01, 2017 8:23 am (GMT 5.5)

All your conditions are matching with 1,3(offset,length) or 1,2 or 1,1 why are you handling at 9th byte or 10th byte ?

Instead of
Code:

IFTHEN=(WHEN=(9,3,CH,EQ,'000'),OVERLAY=(1:C'GGA')),


you should have ?

Code:

IFTHEN=(WHEN=(1,3,CH,EQ,C'000'),OVERLAY=(1:C'GGA',4:1,15)),


May be you can try below code, untested
Code:

  SORT FIELDS=COPY

  OUTREC IFTHEN=(WHEN=(1,3,CH,EQ,C'000'),
                 OVERLAY=(1:C'GGA',4:1,15)),
         
         IFTHEN=(WHEN=(1,3,CH,EQ,C'IM1'),
                 OVERLAY=(1:C'GGA',4:1,15)),

         IFTHEN=(WHEN=(1,1,CH,EQ,C'4'),
                 OVERLAY=(1:C'GGA',4:1,15)),
 
         IFTHEN=(WHEN=(1,1,CH,EQ,C'3'),
                 OVERLAY=(1:C'GGA',4:1,15)),

         IFTHEN=(WHEN=(1,2,CH,EQ,C'WG'),
                 OVERLAY=(1:C'AFG',4:1,15)),

         IFTHEN=(WHEN=(1,3,CH,EQ,C'IUL'),
                 OVERLAY=(1:C'AFG',4:1,15)),

         IFTHEN=(WHEN=(1,2,CH,EQ,C'UL'),
                 OVERLAY=(1:C'AFG',4:1,15)),

         IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),
                 OVERLAY=(1:C'AFG',4:1,15)),

         IFTHEN=(WHEN=(1,2,CH,EQ,C'23'),
                 OVERLAY=(1:C'023',4:1,15)),

         IFTHEN=(WHEN=NONE,
                 OVERLAY=(1:3X,4:1,15)))   

_________________
Regards,
Magesh


CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: steve-myers
Posted: Sun Oct 01, 2017 8:59 am (GMT 5.5)

upendrasri wrote:
Hi Steve and Willy Jensen,

I will explain why I need exact PCT Value.

Some time back we had a spool shortage issue in our environment, After our verification we came to know that thousands of user jobs submitted by the app users. Though each Job is using very less spool percentage but because of the volume of the Jobs were high so we had that issue.

Now am writing a rexx which will lists user jobs and their spool usage , We just keep an eye on those Jobs on daily basis and in case if we feel number of Jobs are more , we will share this report with users and ask them to take copy of their Jobs and delete them from spool.

We can achieve this by using Jes commands against each Job but number of jobs are more and we cannot hide commands/outputs from spool.


Thanks!

There are three major capacity issues in JES2.
  • SPOOL space
  • Number of jobs
  • Number of elements in the Job Output Table
Running out of any of them is usually pretty catastrophic.

What you are trying to do is sort of useful, but you may be going in too much of a micro detail.

SPOOL Space

When you're running low on SPOOL space, more often than not you''ll find there are a few - often just one - jobs using a lot of space. Find them and do something about them. I grant a lot of jobs can nibble you to death, but that may not be your fundamental problem, even though that seems to be your concern. One way of fighting little jobs is to establish and enforce aging rules - limit the amount of time jobs can stay in the spool.

Number of jobs and Number of elements in the Job Output Table

Here is where little jobs - especially work held for TSO - can really nibble you to death. To fight this, establish and enforce aging rules. Look at the $PO JES2 command.

CLIST & REXX :: RE: Rexx to execute spool commands

$
0
0
Author: upendrasri
Posted: Sun Oct 01, 2017 9:12 am (GMT 5.5)

Hi Steve,

Am totally accepting whatever you said. We have aging rules in our environment but After we had that Spool shortage problem, We have given suggestion to App team if they use a specific job class, all their Job outputs will archive to JMR . But its really tough for us to talk and convince business team about these things until we have some data in hand.

With this we want to monitor for few months and see how App jobs are floated in Spool .

Thanks!
_________________
Upen

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Posted: Sun Oct 01, 2017 2:05 pm (GMT 5.5)

Hi Magesh,

Thanks for the quick reply. I have tried your code but getting some errors. The input file was created after FTP a notepad file to Mainframe.

The data in the input is starting from 9th or 10th byte. When the post was pasted here, it somehow removed the leading spaces from all the records that is why it is showing that the data is starting from 1st byte. I am pasting the input file below :

Code:

        0000L01762
           4875851
        IM10000929
           3400009
        WG10004785
        IUL1000016
        UL10000006
        T700000011
        2307900026


Error i am getting :

Code:

           SORT FIELDS=COPY                                                   
           OUTREC IFTHEN=(WHEN=(9,3,ZD,EQ,000),OVERLAY=(1:C'GGA',4:4,15)),     
                  IFTHEN=(WHEN=(9,3,CH,EQ,'IM1'),OVERLAY=(1:C'GGA',4:4,15)),   
                                          $                                   
ICE113A E COMPARISON FIELD ERROR                                               
                  IFTHEN=(WHEN=(10,3,ZD,CH,'  4'),OVERLAY=(1:C'GGA',4:4,15)), 
                  $                                                           
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY         
                  IFTHEN=(WHEN=(10,3,CH,EQ,'  3'),OVERLAY=(1:C'GGA',4:4,15)), 
                  $                                                           
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY         
                  IFTHEN=(WHEN=(9,2,CH,EQ,'WG'),OVERLAY=(1:C'AFG',4:4,15)),   
                  $                                                           
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY         
                  IFTHEN=(WHEN=(9,3,CH,EQ,'IUL'),OVERLAY=(1:C'AFG',4:4,15)),   
                  $


I can really use some guidance here because i need to deliver this tomorrow anyhow. As of now i am testing this on a sample data. Once it works here then i need to run same conditions on a file which contains more than 600,000 records so Please help !!

Thanks a lot in advance.
_________________
Thanks !

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: enrico-sorichetti
Posted: Sun Oct 01, 2017 2:20 pm (GMT 5.5)

Quote:
I can really use some guidance here because i need to deliver this tomorrow anyhow.


You should remember that people answer
ON THEIR OWN TIME
FREE OF CHARGE

if You have time constraints a forum is not the place to ask for help
a paid consultant - for the proper fee - will be happy to provide assistance according to your plans
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort icon_cool.gif

DFSORT/ICETOOL :: RE: How to insert a value on specific position based on conditio

$
0
0
Author: Poha Eater
Posted: Sun Oct 01, 2017 2:41 pm (GMT 5.5)

Hi Enrico,

You are right, my bad !


Thanks !
_________________
Thanks !

Viewing all 8500 articles
Browse latest View live