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

JCL & VSAM :: Unable to copy data from spool in a dataset via Batch job.

$
0
0
Author: srikant314
Subject: Unable to copy data from spool in a dataset via Batch job.
Posted: Fri Jul 28, 2017 9:10 pm (GMT 5.5)

Hello all,

I have tried extract the spool data of a job in a dataset but not have been unable to do so.Not sure what exactly i am missing.

//TDPSPARM JOB 0000,
// 'LIVE TEMPLATE QUERY',CLASS=D,MSGCLASS=U,
// NOTIFY=&SYSUID
//BSDSF EXEC PGM=ISFAFD,PARM='++30,256'
//ISFOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//ISFIN DD *
PRE TDPSPARM
ST
++?
FIND 'SYSTSPRT'
++S
PRINT ODSN 'TIM.SPOOL.NEW' * SHR
PRINT 1 9999
PRINT CLOSE
END
EXIT
/*
//

I also tried giving dataset name in SYSPRINT above but dataset is blank.
Is that due to some authorization error or the environment doesnot support this utility.Not sure though.
Can you all help me in figuring out if i have missed anything.I checked some of the earlier post but they seem to be dormant so i posted here.My humble apologies just incase i broke any standard norms followed on this forum.

regards
_________________
Always test your limits.


JCL & VSAM :: RE: Unable to copy data from spool in a dataset via Batch job.

$
0
0
Author: Robert Sample
Posted: Fri Jul 28, 2017 9:21 pm (GMT 5.5)

You have a JOB named SYSTSPRT? That is what your FIND command is saying.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

CLIST & REXX :: RE: Iterative use of a REXX script causing insufficient storage

$
0
0
Author: Pedro
Subject: Reply to: Iterative use of a REXX script causing insufficient storage
Posted: Fri Jul 28, 2017 9:42 pm (GMT 5.5)

I thought any storage used by rexx would be released when the rexx program ended.

For that reason, I think it likely that your DB2 access is getting storage and not releasing it. Tell us about how you access DB2; more importantly, how cleanup is done when you end the rexx program. (I say 'us', because I am not familiar with how rexx does DB2 stuff)
_________________
Pedro Vera

JCL & VSAM :: RE: Unable to copy data from spool in a dataset via Batch job.

$
0
0
Author: daveporcelan
Posted: Fri Jul 28, 2017 10:04 pm (GMT 5.5)

I encountered this recently and this is how I got it to work.

I will modify your JCL.

Your dataset will contain more than just the output you want. The screens traversed will be shown.

I added a SORT step to extract the data I really wanted.

There may be a better way, but this worked for me.

Code:
/TDPSPARM JOB 0000,
// 'LIVE TEMPLATE QUERY',CLASS=D,MSGCLASS=U,
// NOTIFY=&SYSUID
//BSDSF EXEC PGM=ISFAFD,PARM='++30,256'
//ISFOUT DD DSN=TIM.SPOOL.NEW,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//ISFIN DD *
PRE TDPSPARM
ST
++?
FIND 'SYSTSPRT'
++S
++ALL
/*
//

CLIST & REXX :: RE: Iterative use of a REXX script causing insufficient storage

$
0
0
Author: vasanthz
Posted: Sat Jul 29, 2017 12:02 am (GMT 5.5)

I believe you need to first understand whart memory is not being freed up.
If you go by the route to increase TSO logon region size, then you have to increase to a number higher than 32768. You would face issues if you increase it slightly from say 8M to 10M.

For indepth understanding of how TSO LOGON REGION size works. Look at this link talking about "Size matters" - That's what she said
http://www.askthezoslady.com/tag/how-to-increase-tso-logon-region-size/

Quote:
– You specify less than 16 Meg
– you specify more than 32 Meg
– you specify between 16 Meg and 32 Meg (boring)

Specifying less than 16 Meg

Any user-specified logon SIZE value less than 16 Meg just controls the amount of 24-bit memory you can use.

The limit on how much you can get for 24-bit memory will vary depending on how much your own particular system has reserved for its own use (such as the z/OS "nucleus" and what not), and for the system to use for you on your behalf, for example for building tables in memory from the DD statements in your JCL. (Yes, you have JCL when you are logged onto TSO, you just don't see it unless you look for it. The Logon screen has a field for a logon proc, remember that? It's a JCL proc.)Any 24-bit memory the system doesn’t reserve for itself to use, you can get. This is called private area storage (subpools 229 and 230).

Typical mistake: A user who thinks he has an 8 Meg region size may try to increase it to 9 Meg by typing in 9216 for size. The LOGON attempt may fail. It may fail because there is not nine Meg of leftover 24-bit storage that the system isn’t using. Such a user might easily but mistakenly conclude that it is not possible for him to increase the region size above what he had before. Ha ha wrong, you say to yourself (possibly with a little smile). Because you now know that they have to specify a number bigger than 32768 — that is, more than 32 Meg.

Specifying more than 32 Meg

To increase the actual Region size, of course, as you now know, the user needs to specify a number bigger than 32 Meg (bigger than SIZE==>32768). When you specify a value above 32Meg, it governs how much 31-bit storage you get. The maximum that can be specified is 2096128 (2 Gigabytes).

Specifying any value above 32 Meg ALSO causes the user to get all available 24-bit memory (below the 16mb line). This has the potential to cause problems related to use of 24-bit memory (subpools 229/230). This could happen if the program you’re running uses a lot of 24-bit memory and then requests the system to give it some resource that makes the system need to allocate more 24-bit memory, but it can’t, because you already took it all. The request fails. The program abends, flops, falls over or hangs. This happens extremely rarely, but it can happen, so it’s something for you to know as a possibility.

Specifying between 16 Meg and 32 Meg

What happens if you specify a number bigger than 16 Meg but smaller than 32 Meg? You still get the 32 Meg region size, of course. You also get all the 24-bit storage available — The 24-bit memory is allocated in the same way as it would have been if you had specified a number above 32 Meg. So asking for 17 Meg or 31 Meg has EXACTLY the same identical effect: It increases the request for 24-bit storage to the maximum available, but it leaves the overall region size at the default of 32 Meg. Having this ability must be of use to someone in some real world situation I suppose, or why would IBM have bothered to provide it? but imagining such a situation evades the grasp of my own personal imagination.


Vasanth.S
_________________
My therapist told me "write letters to people you hate and then burn them".
Did that, but now I don't know what to do with the letters.

CLIST & REXX :: I want to retire TRX and use only Rexx for this code

$
0
0
Author: Abhinav Sharma
Subject: I want to retire TRX and use only Rexx for this code
Posted: Sat Jul 29, 2017 2:53 am (GMT 5.5)

Hi I want to retire TRX and use only Rexx for this code can anyone help me on this?



SetFileDSN:
arg fileName, inputDSN

"trx list file("fileName") var"

i = 0
interpret "dsn = trxdsn#"i
do while(dsn ¬= "NOMOREDS")
if inputDSN = dsn then,
do
return 1
end
i = i + 1
interpret "dsn = trxdsn#"i
end

"TRX ADD DA('"inputDSN"') FI("fileName")"
return 0
_________________
AS

CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

$
0
0
Author: Robert Sample
Subject: Reply to: I want to retire TRX and use only Rexx for this code
Posted: Sat Jul 29, 2017 4:25 am (GMT 5.5)

Presumably TRX is some vendor product? If you know what each TRX command is doing you may be able to code replacements.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

$
0
0
Author: Abhinav Sharma
Posted: Sat Jul 29, 2017 4:28 am (GMT 5.5)

TRX is no more used anywhere, i tried to search for it and i think the code is extracting a dataset from concatenation and then the file from it But i want to know what would be the function in rexx to do so.
_________________
AS


CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

$
0
0
Author: Abhinav Sharma
Posted: Sat Jul 29, 2017 4:31 am (GMT 5.5)

This subroutine gets passed a dataset and file name. Then it
uses TRX to look for that dataset in the the DD concatenation
for that file name. If it finds the dataset in the concatenation
it returns a 1. If it doesn't find the dataset, it uses TRX to
place it into the concatenation and returns a zero.
_________________
AS

CLIST & REXX :: RE: How to save expanded jcl's into one library

$
0
0
Author: krishna417
Subject: How to save expanded jcl's into one library
Posted: Sat Jul 29, 2017 12:51 pm (GMT 5.5)

Hi Magesh,

we are using PRO JCL product

Regards
Krishna
_________________
Krishna

CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

JCL & VSAM :: RE: Unable to copy data from spool in a dataset via Batch job.

$
0
0
Author: Willy Jensen
Posted: Sat Jul 29, 2017 1:46 pm (GMT 5.5)

I strongly advise using the SDSF REXX API, see the manual 'SDSF Operation and Customization' chapter 'Using SDSF with the REXX programming
language'. It can be a bit daunting at first, but it provides a much better interface to spool data.
_________________
WJ

CLIST & REXX :: RE: How to save expanded jcl's into one library

$
0
0
Author: Nic Clouston
Posted: Sat Jul 29, 2017 3:04 pm (GMT 5.5)

Run your JJSCAN in batch. Refer to the documentation AND your tech support.

Now locking.
_________________
Regards
Nic

JCL & VSAM :: RE: Unable to copy data from spool in a dataset via Batch job.

$
0
0
Author: enrico-sorichetti
Subject: Reply to: Unable to copy data from spool in a dataset via Batch job.
Posted: Sat Jul 29, 2017 4:41 pm (GMT 5.5)

once upon a time I posted quite a few snippets ( TESTED AND WORKING ) on how to use the SDSF REXX interface to access a job output
search the forum with
"SDSF REXX"
checking the search for all the words button
and with enrico* as user

one of them
http://ibmmainframes.com/viewtopic.php?t=54926&highlight=
_________________
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

CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

$
0
0
Author: enrico-sorichetti
Subject: Reply to: I want to retire TRX and use only Rexx for this code
Posted: Sat Jul 29, 2017 6:46 pm (GMT 5.5)

I do not remember if BPXWDYN will return all the datasets in a concatenation

if it does not ...
here is a snippet that might help You



Code:

/* $listdd     */
$listdd:procedure
   Trace "O"
   parse arg ddnm
   ddnm      = translate(strip(ddnm))
   list      = ""
   if ddnm = ""      then ,
      return list
   tiotptr=24+ptr32(12+ptr32(ptr32(ptr32(16))))
   tioelen=c2d(stg(tiotptr,1))
   do until ( tioelen = 0 | tioeddn = ddnm )
       tioeddn = strip(stg(tiotptr+4,8))
       if tioeddn \= ddnm then ,
           tiotptr=tiotptr+tioelen
       tioelen=c2d(stg(tiotptr,1))
   end
   if tioeddn = ddnm then ,
   Do Until ( tioelen=0 | stg(4+tiotptr,1) \= " " )
      jfcb = swareq(stg(tiotptr+12,3))
      list = list      strip(stg(jfcb,44))
      tiotptr=tiotptr+tioelen
      tioelen=c2d(stg(tiotptr,1))
   End
   list = space(list)
   return list

/* $ctlblks    */
ptr32: Return c2d(Storage(d2x(Arg(1)),4))
ptr64: Return c2d(Storage(d2x(Arg(1)),8))
stg:   Return Storage(d2x(Arg(1)),Arg(2))

/* swareq      */
swareq:procedure
    If right(c2x(Arg(1)),1) \= 'F' Then
       return c2d(Arg(1))+16
    sva = c2d(Arg(1))
    tcb = ptr32(540)
    jscb = ptr32(tcb+180)
    qmpl = ptr32(jscb+244)                                           
    qmat = ptr32(qmpl+24)
    do while (sva>65536)
      qmat = ptr32(qmat+12)
      sva = sva - 65536
    end
    return ptr32(qmat+sva+1)+16



invoked with ...
Code:
dslist = $listdd("SOMEDD")
say dslist

it should return tha dataset names allocated to SOMEDD

the snippet is pretty old but it was tested and running ...
I still use it in my logon proc ( zOS pre 2.xxx )

see here for my TSO setup script
http://ibmmainframes.com/viewtopic.php?t=60112&highlight=listdd
_________________
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


CLIST & REXX :: RE: I want to retire TRX and use only Rexx for this code

$
0
0
Author: Willy Jensen
Posted: Sun Jul 30, 2017 3:17 pm (GMT 5.5)

BPXWDYN INFO will only return the first datasetname in a concatenation.
If you are running under ISPF then QBASELIB can be used as shown in this sample:
Code:
 "alloc dd(tcc) da('sys1.help' 'ISP.AISPHELP') shr reuse"
 address ispexec "qbaselib tcc id(ds1)"                   
 say 'tcc before:' ds1                                   
 "alloc dd(tcc) da("ds1 "'ISP.SISPHELP') shr reuse"       
 address ispexec "qbaselib tcc id(ds2)"                   
 say 'tcc after:' ds2                                     

_________________
WJ

Mainframe Jobs :: Allianz Technology - Mainframe 3+ Years (Trivandrum)

$
0
0
Author: sooraj184
Subject: Allianz Technology - Mainframe 3+ Years (Trivandrum)
Posted: Mon Jul 31, 2017 2:17 pm (GMT 5.5)

Allianz Technology is looking for candidate who can join immediately in Mainframe Trivandrum Location.

Job Description
- 3-5 yrs of experience in mainframe technologies - COBOL, CICS, JCL,
SQL, DB2, EZT etc
- preferably in the Production Support/maintenance of Applications in the
Insurance / Financial Services Domain
- Good communication skills
- Willing to work in 4:30-13:30 shift timing.
- Industry knowledge - insurance products & processes for different
channels/divisions (3-5 years)
- Knowledge, application, & implementation of SDLC methodologies.
- Good problem analysis and resolution skills.
- location will be in Trivandrum,Kerala

Interested candidate please send the resume to sooraj.valliot@gmail.com
_________________
Sooraj

CLIST & REXX :: Calling CLIST through job and REXX

$
0
0
Author: Sahasra K
Subject: Calling CLIST through job and REXX
Posted: Tue Aug 01, 2017 10:25 am (GMT 5.5)

Hi Good Morning ,

I am new to REXX so please bear with me if this simple question.

I have Coded REXX

1. Main REXX program (XYZ)

Code:

 /************** DATASET RECALL *************************/
 DATASETR:                                                 
    USER=USERID()                                         
    SKEL = ''                                             
    HLQ  = RQUAL                                           
 SELECT                                                   
  WHEN SYS='CCA0' THEN                                     
     DO                                                   
         IF RSS = 'A1' THEN                               
           DO                                             
            OWN1 = 'LK'                                   
            SKEL = 'SAVELST'                               
            CALL RUNJOB                                   



2. Savelist CLIST .

Code:

ADDRESS ISPEXEC                                                     
/****************************************************************/   
/* CHANGE THE QUALIFIERS AS PER REQUIREMENT                     */   
/****************************************************************/   
/*                     ASM FILES                                */   
/****************************************************************/   
DSNLEV = '&HLQ..AS&RSS..F*.&HLQ..A&RSS..*'                           
"LMDINIT LISTID("LSTASMF") LEVEL("DSNLEV")"                         
"LMDLIST LISTID("LSTASMF") OPTION(SAVE) GROUP(ASMFFB) STATS(YES)"   
"LMDLIST LISTID("LSTASMF") OPTION(FREE) GROUP(ASMFFB) STATS(YES)"   
DSNLEV = '&HLQ..AS&RSS..O*.&HLQ..A&RSS..*'                           
"LMDINIT LISTID("LSTASMO") LEVEL("DSNLEV")"                         
"LMDLIST LISTID("LSTASMO") OPTION(SAVE) GROUP(ASMONS) STATS(YES)"   
"LMDLIST LISTID("LSTASMO") OPTION(FREE) GROUP(ASMONS) STATS(YES)"   
DSNLEV = '&HLQ..AS&RSS..V*.&HLQ..A&RSS..*'                           
"LMDINIT LISTID("LSTASMV") LEVEL("DSNLEV")"                         
"LMDLIST LISTID("LSTASMV") OPTION(SAVE) GROUP(ASMVS) STATS(YES)"     



Where HLQ and RSS needs to pass from main REXX program

SAVELST is the job which need to be exeuted to take the save list.


Code:

//&USER.SV JOB (AR),'SAVE LIST ',                                       
//            CLASS=S,MSGCLASS=T,                                       
//            NOTIFY=&SYSUID                                           
//*                                                                     
//*                                                                     
//EQQDELDS EXEC PGM=EQQDELDS,COND=(00,NE)                               
//*                                                                     
//PS050   EXEC PGM=IKJEFT01,PARM='ISPSTART CMD(SVLSTHKR'               
//*             COND=(00,NE,PS040)                                     
//*                                                                     
//SYSEXEC  DD  DSN=P31511.PDS.TOOLS.REXX,                               
//             DISP=SHR                                                 
//SYSOUT   DD  SYSOUT=*                                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSDBOUT DD  SYSOUT=*                                                 
//ASMI01    DD  DSN=&USER..ASMFFB.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI02    DD  DSN=&USER..ASMONS.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI03    DD  DSN=&USER..ASMVS.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
%SVLSTHKR                                             
/*                                                   



2nd Option i tired.

Code:


//PS050   EXEC PGM=IKJEFT01,PARM='ISPSTART CMD(SVLSTHKR'               
//*             COND=(00,NE,PS040)                                     
//*                                                                     
//SYSEXEC  DD  DSN=P31511.PDS.TOOLS.REXX,                               
//             DISP=SHR                                                 
//SYSOUT   DD  SYSOUT=*                                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSDBOUT DD  SYSOUT=*                                                 
//**********************************************************************
//*********** ASM FFB, ONS, VSO, VSB SAVELIST **************************
//**********************************************************************
//ASMI01    DD  DSN=P31511.ASMFFB.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI02    DD  DSN=P31511.ASMONS.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI03    DD  DSN=P31511.ASMVS.DATASETS,                             



But both jobs failed with ABEND U0102

Can any one help..

CLIST & REXX :: RE: Calling CLIST through job and REXX

$
0
0
Author: Sahasra K
Subject: Reply to: Calling CLIST through job and REXX
Posted: Tue Aug 01, 2017 10:28 am (GMT 5.5)

Continaution to above

I have tired like below as well

Code:

//PS050   EXEC PGM=IKJEFT01,DYNAMNBR=200                               
//*             COND=(00,NE,PS040)                                     
//*                                                                     
//SYSEXEC  DD  DSN=P31511.PDS.TOOLS.REXX,                               
//             DISP=SHR                                                 
//SYSOUT   DD  SYSOUT=*                                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSDBOUT DD  SYSOUT=*                                                 
//**********************************************************************
//*********** ASM FFB, ONS, VSO, VSB SAVELIST **************************
//**********************************************************************
//ASMI01    DD  DSN=P31511.ASMFFB.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI02    DD  DSN=P31511.ASMONS.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),                               
//             DCB=(RECFM=FB,LRECL=140)                                 
//ASMI03    DD  DSN=P31511.ASMVS.DATASETS,                             
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(10,10),RLSE),
//             DCB=(RECFM=FB,LRECL=140)
%SVLSTHKR           
/*                 


But got the same issue ... not able to find the rootcause for the issue

CLIST & REXX :: RE: Calling CLIST through job and REXX

$
0
0
Author: steve-myers
Posted: Tue Aug 01, 2017 10:55 am (GMT 5.5)

You have multiple issues here.
  • Running services like LMDLIST in batch requires additional DD statements in the the JCL so ISPF can run. That may be the proximate cause of the U0102 ABEND.
  • You can invoke a CLIST in a Rexx EXEC in two ways.
    • As a pseudo TSO line command

      clist-member ...

      If you do this the CLIST must be a member in a partitioned data set specified by a SYSPROC DD statement.
    • As a TSO EXECUTE (EX) command

      EX clist ' ... '

      where clist is the data set name of a data set containing your CLIST or dataset(clist)

  • I believe the Rexx CALL command usually references a procedure in the same member as the CALL command. RUNJOB is not a procedure in your prototype Rexx exec. I know a Rexx CALL can reference an external procedure, but I am not enough of a Rexx expert to coach you in the requirements to call an external procedure.

Viewing all 8500 articles
Browse latest View live