Sort INCLUDE problem

2023-04-28 Thread Jack Zukt
Hi
I have this file in which each record has a tape dataset name, the creation
date, the last ref date, size and management class.
I need to summarize the size by high level qualifier and to create a file
with all the record that have one specific management class, and do the
same for the records that have a different management class.
What is troubling me is that I have at least one HLQ that is present on
both  files with the records separated by the management class, but that
HLQ is only present on the summarized by HLQ file that does not have that
specific management class. And the INCLUDE that I am using is the same for
both cases

INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,EQ,C'&MGMT'),

INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,NE,C'&MGMT'),

So, what am I missing?

This is the JCL that I am using:

//*
//EXP#VARS EXPORT SYMLIST=MGMT
//*
//SET#IHLQ SET IHLQ=INHLQ
//SET#OHLQ SET OHLQ=OUTHLQ
//SET#MGMT SET MGMT=MCVT2DR
//*
//APAGA001 EXEC PGM=IEFBR14
//DL001DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
// DISP=(MOD,DELETE),SPACE=(TRK,(1))
//DL002DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
// DISP=(MOD,DELETE),SPACE=(TRK,(1))
//DL003DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.TXT,
// DISP=(MOD,DELETE),SPACE=(TRK,(1))
//DL004DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.TXT,
// DISP=(MOD,DELETE),SPACE=(TRK,(1))
//*
//* +-+
//* | |
//* |  SUMMARIZE THE BRS USED TAPE SPACE BY HIGH LEVEL QUALIFIER  |
//* | |
//* +-+
//SORT001  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SYMNOUT  DD  SYSOUT=*
//SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
//HLQ#BRS  DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
// DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
// RECFM=FB,LRECL=30
//SYMNAMES DD *
INP-DSNAME,02,44,CH
INP-CRDATE,47,10,CH
INP-LRDATE,58,10,CH
INP-XPDATE,69,10,CH
INP-FLSIZE,80,10,UFF
INP-K#CHAR,90,01,CH
INP-MGMTCL,92,30,CH
SKIP,1
BRS-HLQ,*,08,CH
SKIP,1
BRS-BYT,*,16,PD
//SYSINDD *,SYMBOLS=EXECSYS

  INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(BRS-HLQ:%01,
 BRS-BYT:INP-FLSIZE,TO=PD,LENGTH=16)
  SORT FIELDS=(BRS-HLQ,A)
   SUM FIELDS=(BRS-BYT)
 OUTFIL FNAMES=HLQ#BRS,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,EQ,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
BRS-HLQ,
X,
BRS-BYT,MUL,+4,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
/*
//*
//* +---+
//* |   |
//* | SUMMARIZE THE NOT BRS USED TAPE SPACE BY HIGH LEVEL QUALIFIER |
//* |   |
//* +---+
//SORT002  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SYMNOUT  DD  SYSOUT=*
//SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
//HLQ#LX   DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
// DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
// RECFM=FB,LRECL=30
//SYMNAMES DD *
INP-DSNAME,02,44,CH
INP-CRDATE,47,10,CH
INP-LRDATE,58,10,CH
INP-XPDATE,69,10,CH
INP-FLSIZE,80,10,UFF
INP-K#CHAR,90,01,CH
INP-MGMTCL,92,30,CH
SKIP,1
LX-HLQ,*,08,CH
SKIP,1
LX-BYT,*,16,PD
//SYSINDD *,SYMBOLS=EXECSYS
  INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(LX-HLQ:%01,
 LX-BYT:INP-FLSIZE,TO=PD,LENGTH=16)
  SORT FIELDS=(LX-HLQ,A)
   SUM FIELDS=(LX-BYT)
 OUTFIL FNAMES=HLQ#LX,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,NE,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
LX-HLQ,
X,
LX-BYT,MUL,+2,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
/*
//*
//* +---+
//* |   |
//* |LIST THE BRS TAPE FILES|
//* |LIST THE NOT BRS TAPE FILES|
//* |   |
//* +---+
//SORT003  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SYMNOUT  DD  SYSOUT=*
//SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
//BRS#RMM DD   DSN=&OHLQ..RMM.TAPE.SPACE.BRS.TXT,
// DISP=(NEW,CATLG),SPACE=(CYL,(150,150),RLSE),
// RECFM=FB,LRECL=87
//LX#RMM DDDSN=&OHLQ..RMM.

Re: Inexplicable 0C4!

2023-04-28 Thread Robin Atwood
Thanks, Michael, that is the problem. The next page is available, but the one 
after that isn't. Obviously, I had read the entry for TRE in the PoOps but 
didn't take in the significance of the Access Exceptions clause. (In fact, I 
still don't understand it:
"may or may not"!)

The problem is I maintain legacy C code originally developed with SAS/C, which 
had a strupr(s) function. There is no length
parameter, so I was at a loss what to set R1+1 to for the TRE instruction. I 
could search for the zero bytes using SRST but
presumably that would hit the same problem going off the end of a page. 
Although, the SRST will wrap at top of storage - what does that imply? I could 
invent the strnupr(s,n) function but that will involve many code changes. ☹

@Ed Jaffe: thanks for the tip about the TEA, but where do you find it? IPCS 
STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 both have zero 
in the address part.

Thanks to all who replied.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Michael Stein
Sent: Thursday, April 27, 2023 10:20 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:
> I have had two of these during the course of two months, so it's 
> getting serious!
> 
> The abend happens in my implementation of a C strupr() function when 
> the TRE instruction is executed:
> 
> TST  TRE   R2,R1  fold string  
>
> R0   R1   R2   R3PSW
> 
>  0009C5EC 1AA748F8 7FFF  078D04008009BD14

from principles of operation TRE:

  Access exceptions for the portion of the first operand to the right of
  the last byte processed may or may not be recognized. For an operand
  longer than 4K bytes, access exceptions are not recognized for locations
  more than 4K bytes beyond the last byte processed.

  Access exceptions for all 256 bytes of the second operand may be
  recognized, even if not all bytes are used.

The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of the next 
page?

R1 looks ok as the 2nd operand only needs to clear 256 bytes.

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Attila Fogarasi
"may or may not" simply signifies that the behaviour can change in
different hardware implementations, typically by machine model but even by
engineering change level.  I've run into this often, but IBM is rigorous in
only doing this for instruction behaviour that is incidental to the correct
operation of the instruction.  Valid programs will never run into the "may
or may not" condition;  invalid programs can have unpredictable and
inconsistent results.  Seems fair to me, as this tradeoff is essential for
instruction speed and performance.

On Fri, Apr 28, 2023 at 6:33 PM Robin Atwood  wrote:

> Thanks, Michael, that is the problem. The next page is available, but the
> one after that isn't. Obviously, I had read the entry for TRE in the PoOps
> but didn't take in the significance of the Access Exceptions clause. (In
> fact, I still don't understand it:
> "may or may not"!)
>
> The problem is I maintain legacy C code originally developed with SAS/C,
> which had a strupr(s) function. There is no length
> parameter, so I was at a loss what to set R1+1 to for the TRE instruction.
> I could search for the zero bytes using SRST but
> presumably that would hit the same problem going off the end of a page.
> Although, the SRST will wrap at top of storage - what does that imply? I
> could invent the strnupr(s,n) function but that will involve many code
> changes. ☹
>
> @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 both
> have zero in the address part.
>
> Thanks to all who replied.
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Michael Stein
> Sent: Thursday, April 27, 2023 10:20 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Inexplicable 0C4!
>
> On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:
> > I have had two of these during the course of two months, so it's
> > getting serious!
> >
> > The abend happens in my implementation of a C strupr() function when
> > the TRE instruction is executed:
> >
> > TST  TRE   R2,R1  fold string
> >
> > R0   R1   R2   R3PSW
> >
> >  0009C5EC 1AA748F8 7FFF  078D04008009BD14
>
> from principles of operation TRE:
>
>   Access exceptions for the portion of the first operand to the right of
>   the last byte processed may or may not be recognized. For an operand
>   longer than 4K bytes, access exceptions are not recognized for locations
>   more than 4K bytes beyond the last byte processed.
>
>   Access exceptions for all 256 bytes of the second operand may be
>   recognized, even if not all bytes are used.
>
> The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of the
> next page?
>
> R1 looks ok as the 2nd operand only needs to clear 256 bytes.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: interfacing C with Rexx

2023-04-28 Thread Rony G. Flatscher

On 28.04.2023 01:07, David Crayford wrote:

... cut ...


I'll fork the repo and then push up my changes  on a zos branch and post here. I'm will be turning 
issues off!!


I have to say that Regina REXX is quite good compared to z/OS REXX. Of course, it doesn't have the 
TSO/ISPF integrations but it does come with a utilities library with extra features such as 
copying/sorting stem variables etc. It also ships with a "rxstack" daemon which can be used for 
IPC. There are also extensions for associated arrays which can be passed to functions unlike stem 
variables. It's 3x faster then z/OS REXX, although that doesn't surprise me! As you mentioned, 
it's dirt easy to extend with C so it would be trivial to write a package that supports MVS data 
set I/O similar to my pyzfile Python package or sorted sets, algorithms etc.


... cut ...

Very interesting! Also applauding making your Regina port available!

If it is 3x faster then z/OS REXX then one could expect that speed improvement 
for ooRexx as well.

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


IKJDAIR DA14CD (return qualifiers)

2023-04-28 Thread Binyamin Dissen
I have inherited some code which issues IKJDAIR X'14' .

According to the doc , if the buffer is too small to receive all of the
qualifiers, the buffer is filled as much as possible and return code x'28' is
issued.

I am finding that if the buffer is too small that nothing is returned and
return code x'28' is issued. The length field in the return buffer is zeroed.

I haven't found an applicable APAR.

Anyone still using IKJDAIR?

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Michael Stein
On Fri, Apr 28, 2023 at 03:32:59PM +0700, Robin Atwood wrote:
> Thanks, Michael, that is the problem. The next page is available,
> but the one after that isn't.

> The problem is I maintain legacy C code originally developed with
> SAS/C, which had a strupr(s) function. There is no length parameter,
> so I was at a loss what to set R1+1 to for the TRE instruction.

You could look at the TRE instrucion as an optimization and not
expect it to do all the work.

How about setting the length to include just to the end of the current
page.  Then as the first operand doesn't cross a page boundary it should
avoid the 0C4 since the original address was to a valid storage location
and it won't go outside that 4K page.

After the TRE the CC is set:

For CC 3 the TRE hasn't found the end and there still are bytes
to process in the first operand so you loop back to the TRE.

For CC 1 the TRE has found the end character so you are done.

For CC 0 the TRE has landed on the start of the next page without
finding the end character so you give it 4K more (set the length
to 4K) branch back to the TRE.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Jeremy Nicoll
On Fri, 28 Apr 2023, at 12:31, Michael Stein wrote:

> How about setting the length to include just to the end of the current
> page.  Then as the first operand doesn't cross a page boundary ...

Just imagine if the first operand started on the last byte of the page!

Wouldn't it be better to getmain a page (or a few more), just for the
first operand to reside in, and then follow your "do it in chunks"
approach?

-- 
Jeremy Nicoll - my opinions are my own.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


GPMSERVE Certificate/Ring define....

2023-04-28 Thread Shaffer, Terri
Hi,
  So my certificate knowledge is lacking and I can normally find samples to 
change the text and define them.

So I was trying a few more functions out in z/OSMF and System Status Failed due 
to GPMSERVE 5003 errors.

I found the pagent definitions and added them but apparently I never defined 
the Keyring or certificates required.

I already have a CA defined that I can use. But need the Server and Server 
private key definitions?

I was wondering if anyone could send me a sample job for the RACDCERT commands 
needed?

According to the manual.

TTLSKeyringParms: Keyring
Specifies the key ring name of the RMF DDS server, which is DDSServerKeyring in 
the example. The key ring must contain the server certificate, the associated 
server private key, and the certificate of the trusted Certificate Authority 
(CA).

Thank You

Ms Terri E Shaffer
Senior Systems Engineer,
z/OS Support:
ACIWorldwide – Telecommuter
H(412-766-2697) C(412-519-2592)
terri.shaf...@aciworldwide.com


 [https://go.aciworldwide.com/rs/030-ROK-804/images/aci-footer.jpg] 

This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Robin Atwood
I need to know the length of the string, preferably without needing a new 
parameter and altering a lot of code. At which
point I remembered that the XL/C compiler generates inline code for the 
strlen(s) function. For those who are interested,
this is:

 LRR4,R2  copy string ptr  
 XRR0,R0  search for zero byte 
 SRST  R0,R4   search   
 BO*-4   resume search
 SLR   R0,R2 get length   

I assume some magic causes the SRST not to "recognize an access exception" 
because normally the first register
(R0 here) contains an address limiting the search. Well, that was an 
interesting exercise!

Thanks

On Fri, Apr 28, 2023 at 6:33 PM Robin Atwood  wrote:

> Thanks, Michael, that is the problem. The next page is available, but 
> the one after that isn't. Obviously, I had read the entry for TRE in 
> the PoOps but didn't take in the significance of the Access Exceptions 
> clause. (In fact, I still don't understand it:
> "may or may not"!)
>
> The problem is I maintain legacy C code originally developed with 
> SAS/C, which had a strupr(s) function. There is no length parameter, 
> so I was at a loss what to set R1+1 to for the TRE instruction.
> I could search for the zero bytes using SRST but presumably that would 
> hit the same problem going off the end of a page.
> Although, the SRST will wrap at top of storage - what does that imply? 
> I could invent the strnupr(s,n) function but that will involve many 
> code changes. ☹
>
> @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 
> both have zero in the address part.
>
> Thanks to all who replied.
>
> -Original Message-
> From: IBM Mainframe Discussion List  On 
> Behalf Of Michael Stein
> Sent: Thursday, April 27, 2023 10:20 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Inexplicable 0C4!
>
> On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:
> > I have had two of these during the course of two months, so it's 
> > getting serious!
> >
> > The abend happens in my implementation of a C strupr() function when 
> > the TRE instruction is executed:
> >
> > TST  TRE   R2,R1  fold string
> >
> > R0   R1   R2   R3PSW
> >
> >  0009C5EC 1AA748F8 7FFF  078D04008009BD14
>
> from principles of operation TRE:
>
>   Access exceptions for the portion of the first operand to the right of
>   the last byte processed may or may not be recognized. For an operand
>   longer than 4K bytes, access exceptions are not recognized for locations
>   more than 4K bytes beyond the last byte processed.
>
>   Access exceptions for all 256 bytes of the second operand may be
>   recognized, even if not all bytes are used.
>
> The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of 
> the next page?
>
> R1 looks ok as the 2nd operand only needs to clear 256 bytes.
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Robin Atwood
I was thinking along those lines but then had a better idea. See my other
post.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Michael Stein
Sent: Friday, April 28, 2023 6:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

On Fri, Apr 28, 2023 at 03:32:59PM +0700, Robin Atwood wrote:
> Thanks, Michael, that is the problem. The next page is available, but 
> the one after that isn't.

> The problem is I maintain legacy C code originally developed with 
> SAS/C, which had a strupr(s) function. There is no length parameter, 
> so I was at a loss what to set R1+1 to for the TRE instruction.

You could look at the TRE instrucion as an optimization and not expect it to
do all the work.

How about setting the length to include just to the end of the current page.
Then as the first operand doesn't cross a page boundary it should avoid the
0C4 since the original address was to a valid storage location and it won't
go outside that 4K page.

After the TRE the CC is set:

For CC 3 the TRE hasn't found the end and there still are bytes to process
in the first operand so you loop back to the TRE.

For CC 1 the TRE has found the end character so you are done.

For CC 0 the TRE has landed on the start of the next page without finding
the end character so you give it 4K more (set the length to 4K) branch back
to the TRE.

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Seymour J Metz
Set the initial length to the remaining bytes on the "page". After that, use 
the "page size". That leaves the question of how an unpriveleged program 
determines the "page size".

Scare quotes because a 1 MiB "page" is actually a segment in the nomenclature 
of PoOps.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Jeremy Nicoll [jn.ls.mfrm...@letterboxes.org]
Sent: Friday, April 28, 2023 7:48 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

On Fri, 28 Apr 2023, at 12:31, Michael Stein wrote:

> How about setting the length to include just to the end of the current
> page.  Then as the first operand doesn't cross a page boundary ...

Just imagine if the first operand started on the last byte of the page!

Wouldn't it be better to getmain a page (or a few more), just for the
first operand to reside in, and then follow your "do it in chunks"
approach?

--
Jeremy Nicoll - my opinions are my own.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Jay Maynard
Treat the page size as 4K and drive on. The difference in execution speed
probably isn't worth the issues.

On Fri, Apr 28, 2023 at 7:15 AM Seymour J Metz  wrote:

> Set the initial length to the remaining bytes on the "page". After that,
> use the "page size". That leaves the question of how an unpriveleged
> program determines the "page size".
>
> Scare quotes because a 1 MiB "page" is actually a segment in the
> nomenclature of PoOps.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Jeremy Nicoll [jn.ls.mfrm...@letterboxes.org]
> Sent: Friday, April 28, 2023 7:48 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Inexplicable 0C4!
>
> On Fri, 28 Apr 2023, at 12:31, Michael Stein wrote:
>
> > How about setting the length to include just to the end of the current
> > page.  Then as the first operand doesn't cross a page boundary ...
>
> Just imagine if the first operand started on the last byte of the page!
>
> Wouldn't it be better to getmain a page (or a few more), just for the
> first operand to reside in, and then follow your "do it in chunks"
> approach?
>
> --
> Jeremy Nicoll - my opinions are my own.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


-- 
Jay Maynard

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: IBM RCF Documentation email address?

2023-04-28 Thread Seymour J Metz
Are you referring to KC web pages? What about manuals in PDF format?

I've never had problems sending an RCF e-mail to the address in the manual.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Roger Bolan [rogerbo...@gmail.com]
Sent: Friday, April 28, 2023 12:40 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: IBM RCF Documentation email address?

RCF?  Email?  Do you mean the old "reader's comment form"?I use the
"site feedback" button on the web pages.  For example, see z/OS 2.5.0 - IBM
Documentation 
I always seem to get a timely response.  I haven't used the old email
address in years.

On Mon, Apr 24, 2023 at 9:31 AM Farley, Peter <
031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

> Is there a different documentation error / omission address then this one
> for IBM manuals?
>
> mhvr...@us.ibm.com
>
> I sent one to that address on April 4 and have yet to receive any reply,
> not even an acknowledgement that the email was received.
>
> Peter
>
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by
> e-mail and delete the message and any attachments from your system.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Seymour J Metz
K3wl. Using R0 as R_1 reminds me of the BXH/BXLE trick for testing successive 
bits.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Robin Atwood [abend...@gmail.com]
Sent: Friday, April 28, 2023 7:57 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

I need to know the length of the string, preferably without needing a new 
parameter and altering a lot of code. At which
point I remembered that the XL/C compiler generates inline code for the 
strlen(s) function. For those who are interested,
this is:

 LRR4,R2  copy string ptr
 XRR0,R0  search for zero byte
 SRST  R0,R4   search
 BO*-4   resume search
 SLR   R0,R2 get length

I assume some magic causes the SRST not to "recognize an access exception" 
because normally the first register
(R0 here) contains an address limiting the search. Well, that was an 
interesting exercise!

Thanks

On Fri, Apr 28, 2023 at 6:33 PM Robin Atwood  wrote:

> Thanks, Michael, that is the problem. The next page is available, but
> the one after that isn't. Obviously, I had read the entry for TRE in
> the PoOps but didn't take in the significance of the Access Exceptions
> clause. (In fact, I still don't understand it:
> "may or may not"!)
>
> The problem is I maintain legacy C code originally developed with
> SAS/C, which had a strupr(s) function. There is no length parameter,
> so I was at a loss what to set R1+1 to for the TRE instruction.
> I could search for the zero bytes using SRST but presumably that would
> hit the same problem going off the end of a page.
> Although, the SRST will wrap at top of storage - what does that imply?
> I could invent the strnupr(s,n) function but that will involve many
> code changes. ☹
>
> @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8
> both have zero in the address part.
>
> Thanks to all who replied.
>
> -Original Message-
> From: IBM Mainframe Discussion List  On
> Behalf Of Michael Stein
> Sent: Thursday, April 27, 2023 10:20 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Inexplicable 0C4!
>
> On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:
> > I have had two of these during the course of two months, so it's
> > getting serious!
> >
> > The abend happens in my implementation of a C strupr() function when
> > the TRE instruction is executed:
> >
> > TST  TRE   R2,R1  fold string
> >
> > R0   R1   R2   R3PSW
> >
> >  0009C5EC 1AA748F8 7FFF  078D04008009BD14
>
> from principles of operation TRE:
>
>   Access exceptions for the portion of the first operand to the right of
>   the last byte processed may or may not be recognized. For an operand
>   longer than 4K bytes, access exceptions are not recognized for locations
>   more than 4K bytes beyond the last byte processed.
>
>   Access exceptions for all 256 bytes of the second operand may be
>   recognized, even if not all bytes are used.
>
> The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of
> the next page?
>
> R1 looks ok as the 2nd operand only needs to clear 256 bytes.
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread David Crayford

On 28/4/23 19:57, Robin Atwood wrote:

I need to know the length of the string, preferably without needing a new 
parameter and altering a lot of code. At which
point I remembered that the XL/C compiler generates inline code for the 
strlen(s) function. For those who are interested,
this is:


Why don't you just use TRT like the C/C++ compiler does for it's inline 
string handling optimizations? In our experience those interruptible 
instructions
may seem like syntactic sugar but they don't perform better. The only 
noticeable difference was the introduction of the SIMD instructions.





  LRR4,R2  copy string ptr
  XRR0,R0  search for zero byte
  SRST  R0,R4   search
  BO*-4   resume search
  SLR   R0,R2 get length

I assume some magic causes the SRST not to "recognize an access exception" 
because normally the first register
(R0 here) contains an address limiting the search. Well, that was an 
interesting exercise!

Thanks

On Fri, Apr 28, 2023 at 6:33 PM Robin Atwood  wrote:


Thanks, Michael, that is the problem. The next page is available, but
the one after that isn't. Obviously, I had read the entry for TRE in
the PoOps but didn't take in the significance of the Access Exceptions
clause. (In fact, I still don't understand it:
"may or may not"!)

The problem is I maintain legacy C code originally developed with
SAS/C, which had a strupr(s) function. There is no length parameter,
so I was at a loss what to set R1+1 to for the TRE instruction.
I could search for the zero bytes using SRST but presumably that would
hit the same problem going off the end of a page.
Although, the SRST will wrap at top of storage - what does that imply?
I could invent the strnupr(s,n) function but that will involve many
code changes. ☹

@Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8
both have zero in the address part.

Thanks to all who replied.

-Original Message-
From: IBM Mainframe Discussion List  On
Behalf Of Michael Stein
Sent: Thursday, April 27, 2023 10:20 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:

I have had two of these during the course of two months, so it's
getting serious!

The abend happens in my implementation of a C strupr() function when
the TRE instruction is executed:

TST  TRE   R2,R1  fold string

R0   R1   R2   R3PSW

 0009C5EC 1AA748F8 7FFF  078D04008009BD14

from principles of operation TRE:

   Access exceptions for the portion of the first operand to the right of
   the last byte processed may or may not be recognized. For an operand
   longer than 4K bytes, access exceptions are not recognized for locations
   more than 4K bytes beyond the last byte processed.

   Access exceptions for all 256 bytes of the second operand may be
   recognized, even if not all bytes are used.

The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of
the next page?

R1 looks ok as the 2nd operand only needs to clear 256 bytes.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Robin Atwood
The interruptible instructions (usually) only get interrupted if the string is 
longer than 256 bytes, which is not usually the case. 
We just need a simple function for operating on short strings, very often. Some 
of the suggestions to allocate lots of extra pages
were somewhat missing the point!

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Friday, April 28, 2023 7:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

On 28/4/23 19:57, Robin Atwood wrote:
> I need to know the length of the string, preferably without needing a 
> new parameter and altering a lot of code. At which point I remembered 
> that the XL/C compiler generates inline code for the strlen(s) function. For 
> those who are interested, this is:

Why don't you just use TRT like the C/C++ compiler does for it's inline string 
handling optimizations? In our experience those interruptible instructions may 
seem like syntactic sugar but they don't perform better. The only noticeable 
difference was the introduction of the SIMD instructions.


>
>   LRR4,R2  copy string ptr
>   XRR0,R0  search for zero byte
>   SRST  R0,R4   search
>   BO*-4   resume search
>   SLR   R0,R2 get length
>
> I assume some magic causes the SRST not to "recognize an access 
> exception" because normally the first register
> (R0 here) contains an address limiting the search. Well, that was an 
> interesting exercise!
>
> Thanks
>
> On Fri, Apr 28, 2023 at 6:33 PM Robin Atwood  wrote:
>
>> Thanks, Michael, that is the problem. The next page is available, but 
>> the one after that isn't. Obviously, I had read the entry for TRE in 
>> the PoOps but didn't take in the significance of the Access 
>> Exceptions clause. (In fact, I still don't understand it:
>> "may or may not"!)
>>
>> The problem is I maintain legacy C code originally developed with 
>> SAS/C, which had a strupr(s) function. There is no length parameter, 
>> so I was at a loss what to set R1+1 to for the TRE instruction.
>> I could search for the zero bytes using SRST but presumably that 
>> would hit the same problem going off the end of a page.
>> Although, the SRST will wrap at top of storage - what does that imply?
>> I could invent the strnupr(s,n) function but that will involve many 
>> code changes. ☹
>>
>> @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
>> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 
>> both have zero in the address part.
>>
>> Thanks to all who replied.
>>
>> -Original Message-
>> From: IBM Mainframe Discussion List  On 
>> Behalf Of Michael Stein
>> Sent: Thursday, April 27, 2023 10:20 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Inexplicable 0C4!
>>
>> On Thu, Apr 27, 2023 at 07:58:23PM +0700, Robin Atwood wrote:
>>> I have had two of these during the course of two months, so it's 
>>> getting serious!
>>>
>>> The abend happens in my implementation of a C strupr() function when 
>>> the TRE instruction is executed:
>>>
>>> TST  TRE   R2,R1  fold string
>>>
>>> R0   R1   R2   R3PSW
>>>
>>>  0009C5EC 1AA748F8 7FFF  078D04008009BD14
>> from principles of operation TRE:
>>
>>Access exceptions for the portion of the first operand to the right of
>>the last byte processed may or may not be recognized. For an operand
>>longer than 4K bytes, access exceptions are not recognized for locations
>>more than 4K bytes beyond the last byte processed.
>>
>>Access exceptions for all 256 bytes of the second operand may be
>>recognized, even if not all bytes are used.
>>
>> The first operand is > 4K bytes, R2 is 1AA748F8, what's the status of 
>> the next page?
>>
>> R1 looks ok as the 2nd operand only needs to clear 256 bytes.
>>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: interfacing C with Rexx

2023-04-28 Thread Dave Jones
Thanks, David. 
Wonder if that could be made to run on z/VM-CMS...?
DJ

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Unlike data sets concatenation - revised 2

2023-04-28 Thread Pierre Fichaud
I thought that the 2nd display of the DCB would show the lrecl to be 230 and 
the blksize to be 1150.
I'm reading the documentation for the umpteenth time and can't see what I've 
missed or done wrong.

08.51.43 JOB12479  +Ptr to SYNAD exit placed in DCB
08.51.43 JOB12479  +reread off, OFPPC on
08.51.43 JOB12479  +file OPENed

 SVC 13 and SVCR 13 in system trace table

 DCB after open
 000224D8    01D0 00F43026 002FE5A2 05025C70 
4000 00027E08  * }...4  . Vs  * .. .. = *
 000224F8  02010580 5000 00A44848 008C4064 1AE30E68 00CA99F8 
0A018240 020903E8  *&u  .T  . r8  bY*
 00022518  30013030 00027E78   00C8  
 80E37A58  *. = ...H T: *
08.51.43 JOB12479  +Ptr to exit list placed in DCB
08.51.43 JOB12479  +get
08.51.43 JOB12479  +get
08.51.43 JOB12479  +get
...
...
08.51.43 JOB12479  +get
08.51.43 JOB12479  +get

 SVC  37 and SVCR 37 in system trace table 

08.51.43 JOB12479  +open exit (I can see the SVC 23 and SVCR 23 entries)
08.51.43 JOB12479  +reread
 DCB prior to reread
 000224D8    01D1 00F43026 002FE5A2 05025C70 
4000 00027390  * J...4  . Vs  * .. ..   *
 000224F8  02010580 5000F208 00B84848 008C5A6C 1AE30E68 00CA99F8 
0A018240 020903E8  *&.2 .   . !% T  . r8  bY*
 00022518  30013030 00027400   00C8  
 80E37A58  *.  H T: *
08.51.43 JOB12479  +get


 SVC  37 and SVCR 37 in system trace table 


08.51.43 JOB12479  +synad
I/O error. Buffer=00026060 Bytes read=1000. DevNbr=0A97 Type=D Oper=GET
Errmsg=WRNG.LEN.RECORD AcMeth=QSAM  RBN=01D100
08.51.43 JOB12479  +synad x

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


FTPS/HTTPS to testcase sites via proxy (cross posted from IBMTCP-L)

2023-04-28 Thread Peter Vander Woude
Has anyone been able to setup their jobs, that send diagnostic data to IBM, via 
ftps or https using a proxy?

Now for us, the https is not as straight forward as a normal proxy.  Ours 
requires us to pass and indicate it's to use ntlm authentication (that's what 
we have to specify in the smp/e receive order job).  In the receive order, we 
have to specify that information, in the java options.

Regards,
Peter

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Michael Stein
On Fri, Apr 28, 2023 at 08:51:22AM -0500, Pierre Fichaud wrote:
> I thought that the 2nd display of the DCB would show the lrecl to be
> 230 and the blksize to be 1150.

As did others, which is why a dump of the DCB was requested to see
the actual values. 

> I'm reading the documentation for the umpteenth time and can't see
> what I've missed or done wrong.

Likely you are not setting the unlike concatenation bit in DCBOFLGS
as it isn't set in the dump of the DCB.

>From Seymour J Metz 's message
> DCBOFLGS='30'X=DCBOFEOV+DCBOFOPN

Possibly you are setting the DCBOFEOV bit or the system is setting it.
A quick view of your source would show which...

Seymour (and the manual) says you need to set:

>   OIDCBOFLGS,DCBOFPPC

from z/OS 2.5 DFSMS Using Data Sets IBM SC23-6855-50

  Chapter 25. Processing Sequential Data Sets

  Concatenating unlike data sets

  To concatenate unlike sequential data sets, you must modify the DCBOFLGS
  field of the DCB before the end of the current data set is reached. This
  informs the system that you are concatenating unlike data sets.

  DCBOFPPC is bit 4 of the DCBOFLGS field. Set bit 4, DCBOFPPC,
  to 1 by using the instruction OI DCBOFLGS,X'08'. If DCBOFPPC is 1,
  end-of-volume processing for each data set issues a close for the data
  set just read, and an open for the next concatenated data set. This
  closing and opening procedure updates the fields in the DCB and,
  performs the other functions of CLOSE and OPEN. 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: FTPS/HTTPS to testcase sites via proxy (cross posted from IBMTCP-L)

2023-04-28 Thread Jousma, David
FTPs works for us.  Have to use your IBM file transfer ID and password, 
anonymous no longer works.   For a passive connection, there are some high 
numbered range of ports you need to setup firewall to allow.  My JCL looks like 
this

//FTP  EXEC PGM=FTP,REGION=64M,PARM='(EXIT=8'
//CEEOPTS DD *
ENVAR("GSK_PROTOCOL_TLSV1=0")
ENVAR("GSK_PROTOCOL_TLSV1_2=1")
/*
//SYSFTPD  DD *
SECURE_FTPALLOWED
SECURE_MECHANISM  TLS
TLSRFCLEVEL   CCCNONOTIFY
TLSMECHANISM  FTP
SECURE_DATACONN   PRIVATE
KEYRING   *AUTH*/*
EPSV4 TRUE
FWFRIENDLYTRUE
/*
//SYSPRINT DD SYSOUT=*
//SYSINDD *


From: IBM Mainframe Discussion List  on behalf of 
Peter Vander Woude 
Date: Friday, April 28, 2023 at 10:33 AM
To: IBM-MAIN@LISTSERV.UA.EDU 
Subject: FTPS/HTTPS to testcase sites via proxy (cross posted from IBMTCP-L)
Has anyone been able to setup their jobs, that send diagnostic data to IBM, via 
ftps or https using a proxy? Now for us, the https is not as straight forward 
as a normal proxy. Ours requires us to pass and indicate it's to use ntlm 
authentication
ZjQcmQRYFpfptBannerStart

ZjQcmQRYFpfptBannerEnd

Has anyone been able to setup their jobs, that send diagnostic data to IBM, via 
ftps or https using a proxy?



Now for us, the https is not as straight forward as a normal proxy.  Ours 
requires us to pass and indicate it's to use ntlm authentication (that's what 
we have to specify in the smp/e receive order job).  In the receive order, we 
have to specify that information, in the java options.


This e-mail transmission contains information that is confidential and may be 
privileged.
It is intended only for the addressee(s) named above. If you receive this 
e-mail in error,
please do not read, copy or disseminate it in any manner.  If you are not the 
intended 
recipient, any disclosure, copying, distribution or use of the contents of this 
information
is prohibited. Please reply to the message immediately by informing the sender 
that the 
message was misdirected. After replying, please erase it from your computer 
system. Your 
assistance in correcting this error is appreciated.




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Sri h Kolusu
>> What is troubling me is that I have at least one HLQ that is present on both 
>>  files with the records separated by the management class, but that HLQ is 
>> only present on the summarized by HLQ file that does not have that specific 
>> management class. And the INCLUDE that I am using is the same for both cases

Jack,

It is quite difficult to debug the issue without knowing which step is causing 
the error.  You have 3 different steps and all of them are using the INCLUDE 
cond.  But if I had to take an educated guess it is because the first 2 steps 
are summarizing, and you will not have the MGMT class when doing that as you 
are ONLY sorting on the HLQ.  Technically you don't need SORT002 step as you 
can do it in SORT001 step itself.

So, try this JCL (combined 001 and 002 steps into a single one)

//SORT001  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SYMNOUT  DD  SYSOUT=*
//SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
//HLQ#BRS  DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
// DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
// RECFM=FB,LRECL=30
//HLQ#LX   DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
// DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
// RECFM=FB,LRECL=30
//SYMNAMES DD *
INP-DSNAME,02,44,CH
INP-CRDATE,47,10,CH
INP-LRDATE,58,10,CH
INP-XPDATE,69,10,CH
INP-FLSIZE,80,10,UFF
INP-K#CHAR,90,01,CH
INP-MGMTCL,92,30,CH
SKIP,1
BRS-HLQ,*,08,CH
SKIP,1
BRS-BYT,*,16,PD
//SYSINDD *,SYMBOLS=EXECSYS
  INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(BRS-HLQ:%01,
 BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)

  SORT FIELDS=(BRS-HLQ,A,
   INP-MGMTCL,A)

 OUTFIL FNAMES=HLQ#BRS,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,EQ,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
BRS-HLQ,
X,
BRS-BYT,EDIT=(I.III.III.III.III.IIT))

 OUTFIL FNAMES=HLQ#LX,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,NE,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
BRS-HLQ,
X,
BRS-BYT,EDIT=(I.III.III.III.III.IIT))
/*



Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: IBM RCF Documentation email address?

2023-04-28 Thread Roger Bolan
I never had problems with the email address either.  Somebody else said
that.  I just hadn't used it in a while.  I just said I use the web pages
with the "site feedback" button.  I always go to the IBM Documentation on
the web.  If you go to the main section links like z/OS MVS - IBM
Documentation  you
have links to both the web pages and the PDF books.
IBM also has other links where you can download indexed collections of PDFs
for those rare times when you need the books but don't have web access.

On Fri, Apr 28, 2023 at 6:25 AM Seymour J Metz  wrote:

> Are you referring to KC web pages? What about manuals in PDF format?
>
> I've never had problems sending an RCF e-mail to the address in the manual.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Roger Bolan [rogerbo...@gmail.com]
> Sent: Friday, April 28, 2023 12:40 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: IBM RCF Documentation email address?
>
> RCF?  Email?  Do you mean the old "reader's comment form"?I use the
> "site feedback" button on the web pages.  For example, see z/OS 2.5.0 - IBM
> Documentation 
> I always seem to get a timely response.  I haven't used the old email
> address in years.
>
> On Mon, Apr 24, 2023 at 9:31 AM Farley, Peter <
> 031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:
>
> > Is there a different documentation error / omission address then this one
> > for IBM manuals?
> >
> > mhvr...@us.ibm.com
> >
> > I sent one to that address on April 4 and have yet to receive any reply,
> > not even an acknowledgement that the email was received.
> >
> > Peter
> >
> > This message and any attachments are intended only for the use of the
> > addressee and may contain information that is privileged and
> confidential.
> > If the reader of the message is not the intended recipient or an
> authorized
> > representative of the intended recipient, you are hereby notified that
> any
> > dissemination of this communication is strictly prohibited. If you have
> > received this communication in error, please notify us immediately by
> > e-mail and delete the message and any attachments from your system.
> >
> > --
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: IBM RCF Documentation email address?

2023-04-28 Thread Seymour J Metz

I normally use 
,
 which points to the PDF books.


From: IBM Mainframe Discussion List  on behalf of 
Roger Bolan 
Sent: Friday, April 28, 2023 10:50 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: IBM RCF Documentation email address?

I never had problems with the email address either.  Somebody else said
that.  I just hadn't used it in a while.  I just said I use the web pages
with the "site feedback" button.  I always go to the IBM Documentation on
the web.  If you go to the main section links like z/OS MVS - IBM
Documentation  you
have links to both the web pages and the PDF books.
IBM also has other links where you can download indexed collections of PDFs
for those rare times when you need the books but don't have web access.

On Fri, Apr 28, 2023 at 6:25 AM Seymour J Metz  wrote:

> Are you referring to KC web pages? What about manuals in PDF format?
>
> I've never had problems sending an RCF e-mail to the address in the manual.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Roger Bolan [rogerbo...@gmail.com]
> Sent: Friday, April 28, 2023 12:40 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: IBM RCF Documentation email address?
>
> RCF?  Email?  Do you mean the old "reader's comment form"?I use the
> "site feedback" button on the web pages.  For example, see z/OS 2.5.0 - IBM
> Documentation 
> I always seem to get a timely response.  I haven't used the old email
> address in years.
>
> On Mon, Apr 24, 2023 at 9:31 AM Farley, Peter <
> 031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:
>
> > Is there a different documentation error / omission address then this one
> > for IBM manuals?
> >
> > mhvr...@us.ibm.com
> >
> > I sent one to that address on April 4 and have yet to receive any reply,
> > not even an acknowledgement that the email was received.
> >
> > Peter
> >
> > This message and any attachments are intended only for the use of the
> > addressee and may contain information that is privileged and
> confidential.
> > If the reader of the message is not the intended recipient or an
> authorized
> > representative of the intended recipient, you are hereby notified that
> any
> > dissemination of this communication is strictly prohibited. If you have
> > received this communication in error, please notify us immediately by
> > e-mail and delete the message and any attachments from your system.
> >
> > --
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Jack Zukt
Hello Kolusu,

Thank you for your quick answer.
As you have guessed, my problem is on the two first steps, which you have
consolidated in one. The management class is only relevant for spiting the
information into two files; what I need is to summarize the size by high
level qualifier for the files with that specific management class, and for
the files with any other management class. The tapes that have that
management class have four copies (hence the MUL,+4) the tapes that have
other management classes have only two copies (so, MUL,+2).
The problem is that at least one high level qualifier should be present on
both files but is only showing up in one. I wonder if that is the only one.
You job is not summarizing by HLQ; instead is creating one record by each
input record with HLQ and size.
Best wishes
Jack

On Fri, 28 Apr 2023 at 15:44, Sri h Kolusu  wrote:

> >> What is troubling me is that I have at least one HLQ that is present on
> both  files with the records separated by the management class, but that
> HLQ is only present on the summarized by HLQ file that does not have that
> specific management class. And the INCLUDE that I am using is the same for
> both cases
>
> Jack,
>
> It is quite difficult to debug the issue without knowing which step is
> causing the error.  You have 3 different steps and all of them are using
> the INCLUDE cond.  But if I had to take an educated guess it is because the
> first 2 steps are summarizing, and you will not have the MGMT class when
> doing that as you are ONLY sorting on the HLQ.  Technically you don't need
> SORT002 step as you can do it in SORT001 step itself.
>
> So, try this JCL (combined 001 and 002 steps into a single one)
>
> //SORT001  EXEC PGM=SORT
> //SYSOUT   DD  SYSOUT=*
> //SYMNOUT  DD  SYSOUT=*
> //SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
> //HLQ#BRS  DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
> // RECFM=FB,LRECL=30
> //HLQ#LX   DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
> // RECFM=FB,LRECL=30
> //SYMNAMES DD *
> INP-DSNAME,02,44,CH
> INP-CRDATE,47,10,CH
> INP-LRDATE,58,10,CH
> INP-XPDATE,69,10,CH
> INP-FLSIZE,80,10,UFF
> INP-K#CHAR,90,01,CH
> INP-MGMTCL,92,30,CH
> SKIP,1
> BRS-HLQ,*,08,CH
> SKIP,1
> BRS-BYT,*,16,PD
> //SYSINDD *,SYMBOLS=EXECSYS
>   INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
> OVERLAY=(BRS-HLQ:%01,
>  BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)
>
>   SORT FIELDS=(BRS-HLQ,A,
>INP-MGMTCL,A)
>
>  OUTFIL FNAMES=HLQ#BRS,
>INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
> INP-MGMTCL,EQ,C'&MGMT'),
>REMOVECC,
>HEADER1=(01:'HLQ   BRS TOTAL KB',/,
> 01:' - ---'),
>  BUILD=(X,
> BRS-HLQ,
> X,
> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
>
>  OUTFIL FNAMES=HLQ#LX,
>INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
> INP-MGMTCL,NE,C'&MGMT'),
>REMOVECC,
>HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
> 01:' - ---'),
>  BUILD=(X,
> BRS-HLQ,
> X,
> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
> /*
>
>
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: IBM RCF Documentation email address?

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 15:04:14 +, Seymour J Metz wrote:
>
>I normally use 
>,
> which points to the PDF books.
>
... about three dozen of which were updated this week.

That page also has a link to the GA level for several releases with Adobe 
keyword indices.

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Pierre Fichaud
I set DCBOFPPC before the OPEN.

 DCB after open
 000224D8    01D0 00F43026 002FE5A2 05025C70 
4000 00027E08  * }...4  . Vs  * .. .. = *
 000224F8  02010580 5000 00A44848 008C4064 1AE30E68 00CA99F8 
0A018240 020903E8  *&u  .T  . r8  bY*
 00022518  30013030 00027E78   00C8  
 80E37A58  *. = ...H T: *

DCBOFLGS is at X'30'. 
At x'30', the value is x'1A'. The value of DCBOFPPC is X'08'.
This means that the bit is on.




DCB prior to reread
 000224D8    01D1 00F43026 002FE5A2 05025C70 
4000 00027390  * J...4  . Vs  * .. ..   *
 000224F8  02010580 5000F208 00B84848 008C5A6C 1AE30E68 00CA99F8 
0A018240 020903E8  *&.2 .   . !% T  . r8  bY*
 00022518  30013030 00027400   00C8  
 80E37A58  *.  H T: *

At x'30', the value is x'1A'. DCBOFPPC is on.

Regards, Pierre.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Jack Zukt
Hello Kolusu,

I think that this DFSORT statements should work:

SKIP,1
BRS-BYT,*,16,PD
LX-BYT,*,16,PD
//SYSINDD *,SYMBOLS=EXECSYS
  INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(BRS-HLQ:%01,
 BRS-BYT:INP-FLSIZE,TO=PD,LENGTH=16,
 LX-BYT:INP-FLSIZE,TO=PD,LENGTH=16)
   SUM FIELDS=(BRS-BYT,LX-BYT)
  SORT FIELDS=(BRS-HLQ,A)
 OUTFIL FNAMES=HLQ#BRS,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,EQ,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
BRS-HLQ,
X,
BRS-BYT,MUL,+4,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
 OUTFIL FNAMES=HLQ#LX,
   INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,NE,C'&MGMT'),
   REMOVECC,
   HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
01:' - ---'),
 BUILD=(X,
BRS-HLQ,
X,
LX-BYT,MUL,+2,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
/*

However I do not understand why there is at least one HLQ that should be
present on both files is present only in one, the one referenced by the
first OUTFIL.
Best wishes
Jack

On Fri, 28 Apr 2023 at 16:20, Jack Zukt  wrote:

> Hello Kolusu,
>
> Thank you for your quick answer.
> As you have guessed, my problem is on the two first steps, which you have
> consolidated in one. The management class is only relevant for spiting the
> information into two files; what I need is to summarize the size by high
> level qualifier for the files with that specific management class, and for
> the files with any other management class. The tapes that have that
> management class have four copies (hence the MUL,+4) the tapes that have
> other management classes have only two copies (so, MUL,+2).
> The problem is that at least one high level qualifier should be present on
> both files but is only showing up in one. I wonder if that is the only one.
> You job is not summarizing by HLQ; instead is creating one record by each
> input record with HLQ and size.
> Best wishes
> Jack
>
> On Fri, 28 Apr 2023 at 15:44, Sri h Kolusu  wrote:
>
>> >> What is troubling me is that I have at least one HLQ that is present
>> on both  files with the records separated by the management class, but that
>> HLQ is only present on the summarized by HLQ file that does not have that
>> specific management class. And the INCLUDE that I am using is the same for
>> both cases
>>
>> Jack,
>>
>> It is quite difficult to debug the issue without knowing which step is
>> causing the error.  You have 3 different steps and all of them are using
>> the INCLUDE cond.  But if I had to take an educated guess it is because the
>> first 2 steps are summarizing, and you will not have the MGMT class when
>> doing that as you are ONLY sorting on the HLQ.  Technically you don't need
>> SORT002 step as you can do it in SORT001 step itself.
>>
>> So, try this JCL (combined 001 and 002 steps into a single one)
>>
>> //SORT001  EXEC PGM=SORT
>> //SYSOUT   DD  SYSOUT=*
>> //SYMNOUT  DD  SYSOUT=*
>> //SORTIN   DD  DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
>> //HLQ#BRS  DD  DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
>> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
>> // RECFM=FB,LRECL=30
>> //HLQ#LX   DD  DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
>> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
>> // RECFM=FB,LRECL=30
>> //SYMNAMES DD *
>> INP-DSNAME,02,44,CH
>> INP-CRDATE,47,10,CH
>> INP-LRDATE,58,10,CH
>> INP-XPDATE,69,10,CH
>> INP-FLSIZE,80,10,UFF
>> INP-K#CHAR,90,01,CH
>> INP-MGMTCL,92,30,CH
>> SKIP,1
>> BRS-HLQ,*,08,CH
>> SKIP,1
>> BRS-BYT,*,16,PD
>> //SYSINDD *,SYMBOLS=EXECSYS
>>   INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
>> OVERLAY=(BRS-HLQ:%01,
>>  BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)
>>
>>   SORT FIELDS=(BRS-HLQ,A,
>>INP-MGMTCL,A)
>>
>>  OUTFIL FNAMES=HLQ#BRS,
>>INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
>> INP-MGMTCL,EQ,C'&MGMT'),
>>REMOVECC,
>>HEADER1=(01:'HLQ   BRS TOTAL KB',/,
>> 01:' - ---'),
>>  BUILD=(X,
>> BRS-HLQ,
>> X,
>> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
>>
>>  OUTFIL FNAMES=HLQ#LX,
>>INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
>> INP-MGMTCL,NE,C'&MGMT'),
>>REMOVECC,
>>HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
>> 01:' - ---'),
>>  BUILD=(X,
>> BRS-HLQ,
>> X,
>> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
>> /*
>>
>>
>>
>> Thanks,
>> Kolusu
>> DFSORT Development
>> IBM Corporation
>>
>>
>>
>> ---

Re: GPMSERVE Certificate/Ring define....

2023-04-28 Thread Colin Paice
I've just posted  Setting up z/OS for TLS clients

and Setting
up Linux to z/OS certificates


If you get stuck, please feel free to contact me offline

Colin

On Fri, 28 Apr 2023 at 12:52, Shaffer, Terri <
017d5f778222-dmarc-requ...@listserv.ua.edu> wrote:

> Hi,
>   So my certificate knowledge is lacking and I can normally find samples
> to change the text and define them.
>
> So I was trying a few more functions out in z/OSMF and System Status
> Failed due to GPMSERVE 5003 errors.
>
> I found the pagent definitions and added them but apparently I never
> defined the Keyring or certificates required.
>
> I already have a CA defined that I can use. But need the Server and Server
> private key definitions?
>
> I was wondering if anyone could send me a sample job for the RACDCERT
> commands needed?
>
> According to the manual.
>
> TTLSKeyringParms: Keyring
> Specifies the key ring name of the RMF DDS server, which is
> DDSServerKeyring in the example. The key ring must contain the server
> certificate, the associated server private key, and the certificate of the
> trusted Certificate Authority (CA).
>
> Thank You
>
> Ms Terri E Shaffer
> Senior Systems Engineer,
> z/OS Support:
> ACIWorldwide – Telecommuter
> H(412-766-2697) C(412-519-2592)
> terri.shaf...@aciworldwide.com
>
> 
>  [https://go.aciworldwide.com/rs/030-ROK-804/images/aci-footer.jpg] <
> http://www.aciworldwide.com>
> This email message and any attachments may contain confidential,
> proprietary or non-public information. The information is intended solely
> for the designated recipient(s). If an addressing or transmission error has
> misdirected this email, please notify the sender immediately and destroy
> this email. Any review, dissemination, use or reliance upon this
> information by unintended recipients is prohibited. Any opinions expressed
> in this email are those of the author personally.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Ed Jaffe

On 4/28/2023 1:32 AM, Robin Atwood wrote:

@Ed Jaffe: thanks for the tip about the TEA, but where do you find it? IPCS 
STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 both have zero 
in the address part.


The TEA is displayed on various  IPCS displays. It's captured for the 
SDWA at just the right time. I think the PSA fields could be overlaid 
before they are dumped, so I would never trust them.


Personally, my favorite "go to" after inspecting PSW and registers is 
the SYSTRACE. (I did a GSE UK pitch on that in November and a reprised 
it as a SHARE pitch in Atlanta.) For example, a protection exception:


0004 0149 03923F00  PGM    004 _1747106C  00060004 
   4714 8000 7F328404 <-- Here!
0004 0149 03923F00 *RCVY  PROG    940C4000 0004


--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Sri h Kolusu
>> You job is not summarizing by HLQ; instead is creating one record by each 
>> input record with HLQ and size.

Jack,

Now that I know what you are trying to do, it is quite easy to add the summary 
by HLQ in the same step.  You have 2 different multiplications so we need to 
use IFTHEN statements

So, please change the SORT001 SYSIN to the following (Untested).

//SYSINDD *,SYMBOLS=JCLONLY
  INREC IFTHEN=(WHEN=INIT,
 PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
   OVERLAY=(BRS-HLQ:%01)),

IFTHEN=(WHEN=(INP-MGMTCL,EQ,C'&MGMT'),
 OVERLAY=(BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)),

IFTHEN=(WHEN=NONE,
 OVERLAY=(BRS-BYT:INP-FLSIZE,MUL,+2,PD,LENGTH=16))

  SORT FIELDS=(BRS-HLQ,A,
   INP-MGMTCL,A)

  OUTFIL FNAMES=HLQ#BRS,
  INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
   INP-MGMTCL,EQ,C'&MGMT'),
  REMOVECC,NODETAIL,
  HEADER1=(01:'HLQ   BRS TOTAL KB',/,
   01:' - ---'),
  SECTIONS=(BRS-HLQ,
  TRAILER3=(X,
BRS-HLQ,
X,
TOT=(BRS-BYT,EDIT=(I.III.III.III.III.IIT

  OUTFIL FNAMES=HLQ#LX,
  INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
   INP-MGMTCL,NE,C'&MGMT'),
  REMOVECC,NODETAIL,
  HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
   01:' - ---'),
  SECTIONS=(BRS-HLQ,
  TRAILER3=(X,
BRS-HLQ,
X,
TOT=(BRS-BYT,EDIT=(I.III.III.III.III.IIT

/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GPMSERVE Certificate/Ring define....

2023-04-28 Thread Colin Paice
A practical guide to getting z/OSMF working.

also mentions certificates and keyrings

Colin

On Fri, 28 Apr 2023 at 12:52, Shaffer, Terri <
017d5f778222-dmarc-requ...@listserv.ua.edu> wrote:

> Hi,
>   So my certificate knowledge is lacking and I can normally find samples
> to change the text and define them.
>
> So I was trying a few more functions out in z/OSMF and System Status
> Failed due to GPMSERVE 5003 errors.
>
> I found the pagent definitions and added them but apparently I never
> defined the Keyring or certificates required.
>
> I already have a CA defined that I can use. But need the Server and Server
> private key definitions?
>
> I was wondering if anyone could send me a sample job for the RACDCERT
> commands needed?
>
> According to the manual.
>
> TTLSKeyringParms: Keyring
> Specifies the key ring name of the RMF DDS server, which is
> DDSServerKeyring in the example. The key ring must contain the server
> certificate, the associated server private key, and the certificate of the
> trusted Certificate Authority (CA).
>
> Thank You
>
> Ms Terri E Shaffer
> Senior Systems Engineer,
> z/OS Support:
> ACIWorldwide – Telecommuter
> H(412-766-2697) C(412-519-2592)
> terri.shaf...@aciworldwide.com
>
> 
>  [https://go.aciworldwide.com/rs/030-ROK-804/images/aci-footer.jpg] <
> http://www.aciworldwide.com>
> This email message and any attachments may contain confidential,
> proprietary or non-public information. The information is intended solely
> for the designated recipient(s). If an addressing or transmission error has
> misdirected this email, please notify the sender immediately and destroy
> this email. Any review, dissemination, use or reliance upon this
> information by unintended recipients is prohibited. Any opinions expressed
> in this email are those of the author personally.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised

2023-04-28 Thread Michael Oujesky
Would not think "V" could be included.  "VBS" is just a variation of 
"VB" where the RDW is treated as a SDW where X'' in the "BB" 
field indicates a non-segmented (i.e full variable length record" in 
the buffer).


Another approach would be to not open the file as concatenated, but 
treat the TIOT entries for the DDNAME as a list of data sets to be 
dynamically allocated separately and then each processed on it's 
own.  using that approach, you can "concatenated" VSAM files.


Michael

At 07:12 PM 4/27/2023, Paul Gilmartin wrote:


On Thu, 27 Apr 2023 13:54:18 -0500, Michael Oujesky wrote:

>Presuming the program is assembler, I would suggest trying
>hard-coding for RECFM=VBS, LRECL=32767, BLKSIZE=32760, BFTEK=A.
>
>And presuming all the files are RECFM=VBS.
>
In fact, can't any mixture of RECFM=V, VB, and VBS be overriden to 
those specifications?


>If you do your own segmented record, LRECL=X ought to work.

--
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Michael Stein
On Fri, Apr 28, 2023 at 11:18:43AM -0500, Pierre Fichaud wrote:
> I set DCBOFPPC before the OPEN.
 
>  DCB after open
>  000224D8    01D0 00F43026 002FE5A2 05025C70 
> 4000 00027E08  * }...4  . Vs  * .. .. = *
>  000224F8  02010580 5000 00A44848 008C4064 1AE30E68 00CA99F8 
> 0A018240 020903E8  *&u  .T  . r8  bY*
>  00022518  30013030 00027E78   00C8  
>  80E37A58  *. = ...H T: *
> 
> DCBOFLGS is at X'30'. 
> At x'30', the value is x'1A'. The value of DCBOFPPC is X'08'.
> This means that the bit is on.

Oh, I mistook the x'30' for the value of DCBOFLGS not the offset.

OK, so DCBOPPC is set.  So an alternate theory is that the unlike
concatenation is working as designed in that EOV is doing the close/open
but open isn't getting the new LRECL and BLKSIZE.

An indication of this is that your DCB open exit is getting control.

What does your source DCB look like?  Does it include LRECL and/or BLKSIZE?

Values coded for LRECL/BLKKSiZE in the DCB macro do NOT in general get
changed by open, unspecified values get set from the JCL/JFCB or the
DSCB (dataset attributes).

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Steve Smith
To be clear, the TEA is only relevant for Translation Exceptions, and a PIC
4 is not.  Notwithstanding that your trace entry example *is* a PIC 4, and
that is great information.

Frankly, I think it was unwise by z/OS to lump translation exceptions (PICs
10, 11, 39-3B) in with S0C4.  There's a fundamental difference between
attempting to access storage with the wrong key, and storage that doesn't
exist (S0C5 is a variant).  S0D0 for the latter would have make sense.

I'm quite clear that changing such things isn't practicable.

sas

On Fri, Apr 28, 2023 at 12:52 PM Ed Jaffe 
wrote:

> On 4/28/2023 1:32 AM, Robin Atwood wrote:
> > @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 both
> have zero in the address part.
>
> The TEA is displayed on various  IPCS displays. It's captured for the
> SDWA at just the right time. I think the PSA fields could be overlaid
> before they are dumped, so I would never trust them.
>
> Personally, my favorite "go to" after inspecting PSW and registers is
> the SYSTRACE. (I did a GSE UK pitch on that in November and a reprised
> it as a SHARE pitch in Atlanta.) For example, a protection exception:
>
> 0004 0149 03923F00  PGM004 _1747106C  00060004 
> 4714 8000 7F328404 <-- Here!
> 0004 0149 03923F00 *RCVY  PROG940C4000 0004
>
>
> --
> Phoenix Software International
> Edward E. Jaffe
> 831 Parkview Drive North
> El Segundo, CA 90245
> https://www.phoenixsoftware.com/
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 12:20:29 -0500, Michael Oujesky wrote:

>Would not think "V" could be included.  "...
>
Why not?  If I create a VBS data set; write a single logical record which 
happens
not to be segmented, then close it, the content is identical to that of a RECM=V
data set.  RECFM=VBS must be prepared to deal with that on input.

Why presume the program is assembler?  An override in JCL DD should suffice.


>At 07:12 PM 4/27/2023, Paul Gilmartin wrote:
>
>> >Presuming the program is assembler, I would suggest trying
>> >hard-coding for RECFM=VBS, LRECL=32767, BLKSIZE=32760, BFTEK=A.
>> >
>> >And presuming all the files are RECFM=VBS.
>> >
>>In fact, can't any mixture of RECFM=V, VB, and VBS be overriden to
>>those specifications?

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Pierre Fichaud
These are existing datasets so it's just DSNAME and DISP in the concatenation.

Pierre.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Seymour J Metz
I would have said that it was unwise of IBM to overload ABEND S0C4 in OS/VS, 
but that once they had done so there was no graceful way to change it.


From: IBM Mainframe Discussion List  on behalf of 
Steve Smith 
Sent: Friday, April 28, 2023 1:25 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Inexplicable 0C4!

To be clear, the TEA is only relevant for Translation Exceptions, and a PIC
4 is not.  Notwithstanding that your trace entry example *is* a PIC 4, and
that is great information.

Frankly, I think it was unwise by z/OS to lump translation exceptions (PICs
10, 11, 39-3B) in with S0C4.  There's a fundamental difference between
attempting to access storage with the wrong key, and storage that doesn't
exist (S0C5 is a variant).  S0D0 for the latter would have make sense.

I'm quite clear that changing such things isn't practicable.

sas

On Fri, Apr 28, 2023 at 12:52 PM Ed Jaffe 
wrote:

> On 4/28/2023 1:32 AM, Robin Atwood wrote:
> > @Ed Jaffe: thanks for the tip about the TEA, but where do you find it?
> IPCS STATUS FAILDATA displays it but, in my dumps, PSA+90  and PDS+A8 both
> have zero in the address part.
>
> The TEA is displayed on various  IPCS displays. It's captured for the
> SDWA at just the right time. I think the PSA fields could be overlaid
> before they are dumped, so I would never trust them.
>
> Personally, my favorite "go to" after inspecting PSW and registers is
> the SYSTRACE. (I did a GSE UK pitch on that in November and a reprised
> it as a SHARE pitch in Atlanta.) For example, a protection exception:
>
> 0004 0149 03923F00  PGM004 _1747106C  00060004 
> 4714 8000 7F328404 <-- Here!
> 0004 0149 03923F00 *RCVY  PROG940C4000 0004
>
>
> --
> Phoenix Software International
> Edward E. Jaffe
> 831 Parkview Drive North
> El Segundo, CA 90245
> https://secure-web.cisco.com/1LTeO8jjKs-9V68uCa-qszCjWRxkKrKtDIA9Y6siWpcmrg1V4fnTK5QXpBUBNlzSKP41w8ZfHJznskS6KbFFNNCsedRr6pefb7X0jjA9JG4zzYtXncb04UYn7MT0oX2tSSi7e7x8Y62lHhFkm5xm_K6Xi7JDok91XcBwVK-uJ9WcPhRPNwAC2x6My_E1bph2tzBREZiIg63r1Z6pgkB5ZO_nE4QnaoU8KqbG1HlGtfp3IUF2rAiVoM8Lk1_0g6jmZu-UCwV5oeAkQdkUZYvwtpDVotknpH8vUfFI7KZaKFDLtL7s44kWlrLCgvZsE1TCDFuvmiRuaTGjQAfZcIaxmjwZth28cPPvwffz6nQ8XThqaKNkrmd5Bs1Fe3aGtOvsUSJ-21GPz-dDxqo713UaOhOxEO7jrnF_T-DXSX1e8T80/https%3A%2F%2Fwww.phoenixsoftware.com%2F
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 12:53:46 -0500, Pierre Fichaud wrote:

>These are existing datasets so it's just DSNAME and DISP in the concatenation.
>
It's possible to override attributes of an existing data set in JCL DD, 
DYNALLOC, or DCB.

If the OPEN is only for READ overriding attributes will be effective,
but the DSCBs will not be updated.

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised 2

2023-04-28 Thread Michael Stein
On Fri, Apr 28, 2023 at 12:53:46PM -0500, Pierre Fichaud wrote:
> These are existing datasets so it's just DSNAME and DISP in the concatenation.

OK, but what is in the source coded on the DCB?  Does it specify BLKSIZE
and/or LRECL.

Please provide the DCB from the source of the program.  

Also would be nice to have all references in the source which modify
the DCB BLKSIZE or LRECL.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Inexplicable 0C4!

2023-04-28 Thread Ed Jaffe

On 4/28/2023 10:25 AM, Steve Smith wrote:

Frankly, I think it was unwise by z/OS to lump translation exceptions (PICs
10, 11, 39-3B) in with S0C4.  There's a fundamental difference between
attempting to access storage with the wrong key, and storage that doesn't
exist (S0C5 is a variant).  S0D0 for the latter would have make sense.


Many abend codes have reason codes. Abend0C4 reason codes are simply the 
PIC codes. That seems canonical to me if you think of an 0C4 as a 
"storage access problem" whether by protection or translation or 
whatever. Consult the reason code for the specific failure reason. Makes 
sense.


To my mind, the bigger issue is the inconsistent handling of the NSI 
address in the PSW. If it's a protection exception, the PSW NSI address 
has been incremented by the ILC. For a translation exception is has not 
been incremented (to allow for easy retry by the OS after the page fault 
is resolved). Subtle complexities of this kind help make z/OS dump 
reading difficult for those new to the platform...


--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


COBOL to dynamic DD name

2023-04-28 Thread Schmitt, Michael
I know how to have a COBOL program on z/OS use a data set name that isn't 
determined until runtime, via an environment variable. My question is can you 
use one file (i.e. one select/assign and one FD) to write to different DD 
names, that were already allocated in the JCL?

I can't find a way, and in the manual the syntax for the environment variable 
method requires a DSN or PATH, no option for a DD name.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:

>I know how to have a COBOL program on z/OS use a data set name that isn't 
>determined until runtime, via an environment variable. My question is can you 
>use one file (i.e. one select/assign and one FD) to write to different DD 
>names, that were already allocated in the JCL?
>
>I can't find a way, and in the manual the syntax for the environment variable 
>method requires a DSN or PATH, no option for a DD name.
> 
Do you know the DSN or PATH?

Do you want to specify the DD name or let Dynalloc choose one?

Do BPXWDYN keys RTDDN and INFO help you?  BPXWDYN can be called with OS 
standard linkage.


-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: JES2 $SUBMIT Command

2023-04-28 Thread M. Ray Mullins
There's not what I would consider a definitive specific reference, but 
in several places (including the Initialization & Tuning Guide) note 
that the maximum LRECL for INTRDR and SYSIN data sets is 32760. 
Somewhere (but I can't find it right now) there's an explicit 
prohibition of RECFM=U, and I'd also go along with VBS not being supported.


Note that the MVS Assembler Services Guide still documents that the 
maximum of instream data is 254 and JCL records must be exactly 80. I 
haven't tried larger than 254 yet…I should add this to my little INTRDR 
toolkit program.


I just tried a VB/255 data set for a SUBMITLIB as a test and it worked 
perfectly.


If you're thinking about PROCLIBs, though, those don't work, they must 
be F(B)/80.


Cheers,
Ray

On 2023-04-25 12:43, Paul Gilmartin wrote:

On Tue, 25 Apr 2023 19:04:41 +, Mark Jacobs wrote:


Just wondering if anyone has implemented it and what use cases did you come up 
with.


Curious, I did a search and found:

 ...SUBMITLIB ... The concatenation supports any format PDS (LRECL and 
RECFM) that
 can be used to pass JCL into input processing.

That assertion is a nullity: It supports any supported attributes.  Where are 
those
explicitly listed?



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Steve Thompson
You may want to use BPXWDY2. It dow not require the setting of 
R0. And it does almost everything that BPXWDYN does.


Steve Thompson.

PS. Speaking of RCFS, this is one I did an RCF about and I 
understand there are some updates being done to/with the DOC for 
examples.




On 4/28/2023 3:52 PM, Paul Gilmartin wrote:

On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:


I know how to have a COBOL program on z/OS use a data set name that isn't 
determined until runtime, via an environment variable. My question is can you 
use one file (i.e. one select/assign and one FD) to write to different DD 
names, that were already allocated in the JCL?

I can't find a way, and in the manual the syntax for the environment variable 
method requires a DSN or PATH, no option for a DD name.


Do you know the DSN or PATH?

Do you want to specify the DD name or let Dynalloc choose one?

Do BPXWDYN keys RTDDN and INFO help you?  BPXWDYN can be called with OS 
standard linkage.




--
Regards,
Steve Thompson
VS Strategies LLC
Westfield IN
972-983-9430 cell

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Schmitt, Michael
I'm not trying to allocate the files. The JCL for the step has all the DDs. I 
just need to be able open, extend, and close the select/assign to different DDs 
where which ones I use and which order is not known until I'm working through 
an input file.

I can do it on other platforms, and obviously in assembler, just not in IBM 
COBOL for z/OS. The problem is the assignment name is compiled in to the 
program, not a variable, and using an environment variable doesn't allow for 
DD(ddname).

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Steve Thompson
Sent: Friday, April 28, 2023 3:08 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

You may want to use BPXWDY2. It dow not require the setting of
R0. And it does almost everything that BPXWDYN does.

Steve Thompson.

PS. Speaking of RCFS, this is one I did an RCF about and I
understand there are some updates being done to/with the DOC for
examples.



On 4/28/2023 3:52 PM, Paul Gilmartin wrote:
> On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:
>
>> I know how to have a COBOL program on z/OS use a data set name that isn't 
>> determined until runtime, via an environment variable. My question is can 
>> you use one file (i.e. one select/assign and one FD) to write to different 
>> DD names, that were already allocated in the JCL?
>>
>> I can't find a way, and in the manual the syntax for the environment 
>> variable method requires a DSN or PATH, no option for a DD name.
>>
> Do you know the DSN or PATH?
>
> Do you want to specify the DD name or let Dynalloc choose one?
>
> Do BPXWDYN keys RTDDN and INFO help you?  BPXWDYN can be called with OS 
> standard linkage.
> 
>

--
Regards,
Steve Thompson
VS Strategies LLC
Westfield IN
972-983-9430 cell

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Tom Marchant
I don't know any Cobol syntax that would change the DDNAME in a DCB, but you 
could call an assembler routine to change the DDNAME before OPEN. Why would you 
want to do that?

I'm a bit baffled. In z/OS and its ancestors, the data set name isn't 
determined until runtime, via JCL.

Perhaps if you describe the problem you are trying to solve.

-- 
Tom Marchant

On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael  
wrote:

>I know how to have a COBOL program on z/OS use a data set name that isn't 
>determined until runtime, via an environment variable. My question is can you 
>use one file (i.e. one select/assign and one FD) to write to different DD 
>names, that were already allocated in the JCL?
>
>I can't find a way, and in the manual the syntax for the environment variable 
>method requires a DSN or PATH, no option for a DD name.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Sri h Kolusu
>> I'm not trying to allocate the files. The JCL for the step has all the DDs. 
>> I just need to be able open, extend, and close the select/assign to 
>> different DDs where which ones I use and which order is not known until I'm 
>> working through an input file.

Michael,

As steve mentioned in earlier post , you can BPXWDYN2 to retrieve the info a 
dataset/ddname. 

Here is an example

https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866

Thanks,
Kolusu

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: JES2 $SUBMIT Command

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 12:58:40 -0700, M. Ray Mullins wrote:
>
>Note that the MVS Assembler Services Guide still documents that the
>maximum of instream data is 254
>
That's horribly obsolete, perhaps contradicted by other publications.  I'll
submit an RCF.  Assembler Services Guide should not contain an
explicit number but a citation of the publication containing the current
value.

> ... and JCL records must be exactly 80. I
>
I'm skeptical about that-- I suspect the reader pads to 80 and ignores
data beyond 80.

>haven't tried larger than 254 yet…I should add this to my little INTRDR
>toolkit program.
>
>I just tried a VB/255 data set for a SUBMITLIB as a test and it worked
>perfectly.
>
>If you're thinking about PROCLIBs, though, those don't work, they must
>be F(B)/80.


>On 2023-04-25 12:43, Paul Gilmartin wrote:
>>
>> Curious, I did a search and found:
>> 
>>  ...SUBMITLIB ... The concatenation supports any format PDS (LRECL and 
>> RECFM) that
>>  can be used to pass JCL into input processing.
>>
>> That assertion is a nullity: It supports any supported attributes.  Where 
>> are those
>> explicitly listed?

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Schmitt, Michael
I have an input file that contains thousands of records. They are in groups: 
header record, then a bunch of segments all for one database name, then another 
header, records for another database. But the same database can appear more 
than once in the input.

The step takes this input and creates one output file per database, with one 
header. And resequences the records so they go 1,2,3,4, for each output DD.

On z/OS this step is done using File Manager, with this code:

if fld(1,2,B) = 0 then do   /* if sort key is 0 then  */
   header_rec = inrec   /*save the header record  */
   return 'drop'/*get next record */
   end

dd_name = overlay('N', fld(9,8), 4) /* get DD name from DBD name  */

if recsout(dd_name) = 0 then do /* if 1st record for database */
   outrec.dd_name = header_rec
   write(dd_name)   /*write the header*/
   drop outrec.dd_name
   end

ovly_out(recsout(dd_name), 5,4,B)   /* resequence the records */
write(dd_name)  /* write the segment record   */
return 'drop'


That's the ENTIRE program!


On my PC I have a COBOL program, with a lot more logic, that does essentially 
the same thing. As it is reading the input, each time it gets to a different 
database name, it closes the file it has been writing to and opens the file for 
the appropriate DD name, extending it. So the program only needs to have one 
output file defined, even though it is writing to different DDs as it goes.


Now we're trying to replace the File Manager step. If it was possible to do 
this in z/OS COBOL we could use it, but it isn't worth a large effort because 
it would be an interim solution anyway.


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Tom 
Marchant
Sent: Friday, April 28, 2023 3:18 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

I don't know any Cobol syntax that would change the DDNAME in a DCB, but you 
could call an assembler routine to change the DDNAME before OPEN. Why would you 
want to do that?

I'm a bit baffled. In z/OS and its ancestors, the data set name isn't 
determined until runtime, via JCL.

Perhaps if you describe the problem you are trying to solve.

--
Tom Marchant

On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael  
wrote:

>I know how to have a COBOL program on z/OS use a data set name that isn't 
>determined until runtime, via an environment variable. My question is can you 
>use one file (i.e. one select/assign and one FD) to write to different DD 
>names, that were already allocated in the JCL?
>
>I can't find a way, and in the manual the syntax for the environment variable 
>method requires a DSN or PATH, no option for a DD name.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Schmitt, Michael
So use it to retrieve the data set name that is allocated in the JCL to the DD, 
then use the environment variable method to write to that same data set name? 
Hmmm.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Friday, April 28, 2023 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

>> I'm not trying to allocate the files. The JCL for the step has all the DDs. 
>> I just need to be able open, extend, and close the select/assign to 
>> different DDs where which ones I use and which order is not known until I'm 
>> working through an input file.

Michael,

As steve mentioned in earlier post , you can BPXWDYN2 to retrieve the info a 
dataset/ddname.

Here is an example

https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866

Thanks,
Kolusu

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Farley, Peter
I don't think you can do that.  Unfortunately COBOL does not yet support actual 
FILE-type variables.  COBOL files are essentially CONSTANTS in the language 
definition.  I wish that we had PL/I's FILE variable capability, but we don't.

IMHO your best bet is to avoid multiple DD allocations entirely. Instead start 
with a list of DSN's to be input (can be another separate input file) and 
dynamically assign each DSN you wish to process to the "constant" COBOL DD name 
in the ASSIGN clause, then FREE it (also using BPXWDYN) when you finish 
processing each file and then start with the next DSN (if any left).

You could also leave the DD names allocated as they already are and use an 
assembler function to retrieve the JFCB (or BXWDYN) to get the DSN of each 
assigned DD name and then use those to do a dynamic assign of each DSN to the 
COBOL file DD name from the ASSIGN clause, but the you will have two DD names 
assigned to the same file in the same step, which won't work unless DISP=SHR 
for all of them.  And if any of them is a GDG (+1) from a prior step, you have 
to mess around with getting the GDG suffix right in the dynamic allocate.

I once tried to mess around with dynamically changing the DCB DD name field of 
the closed COBOL file, but finding the DCB for a COBOL file is very 
compiler-release dependent and is a reverse-engineering effort that can be 
upset by IBM any time they decide to update COBOL implementation structures.  
Messy and a maintenance nightmare, so I dropped that effort.

HTH

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Schmitt, Michael
Sent: Friday, April 28, 2023 3:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: COBOL to dynamic DD name

I know how to have a COBOL program on z/OS use a data set name that isn't 
determined until runtime, via an environment variable. My question is can you 
use one file (i.e. one select/assign and one FD) to write to different DD 
names, that were already allocated in the JCL?

I can't find a way, and in the manual the syntax for the environment variable 
method requires a DSN or PATH, no option for a DD name.
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Seymour J Metz
Is PL/I an option at your shop?


From: IBM Mainframe Discussion List  on behalf of 
Schmitt, Michael 
Sent: Friday, April 28, 2023 4:29 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

I have an input file that contains thousands of records. They are in groups: 
header record, then a bunch of segments all for one database name, then another 
header, records for another database. But the same database can appear more 
than once in the input.

The step takes this input and creates one output file per database, with one 
header. And resequences the records so they go 1,2,3,4, for each output DD.

On z/OS this step is done using File Manager, with this code:

if fld(1,2,B) = 0 then do   /* if sort key is 0 then  */
   header_rec = inrec   /*save the header record  */
   return 'drop'/*get next record */
   end

dd_name = overlay('N', fld(9,8), 4) /* get DD name from DBD name  */

if recsout(dd_name) = 0 then do /* if 1st record for database */
   outrec.dd_name = header_rec
   write(dd_name)   /*write the header*/
   drop outrec.dd_name
   end

ovly_out(recsout(dd_name), 5,4,B)   /* resequence the records */
write(dd_name)  /* write the segment record   */
return 'drop'


That's the ENTIRE program!


On my PC I have a COBOL program, with a lot more logic, that does essentially 
the same thing. As it is reading the input, each time it gets to a different 
database name, it closes the file it has been writing to and opens the file for 
the appropriate DD name, extending it. So the program only needs to have one 
output file defined, even though it is writing to different DDs as it goes.


Now we're trying to replace the File Manager step. If it was possible to do 
this in z/OS COBOL we could use it, but it isn't worth a large effort because 
it would be an interim solution anyway.


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Tom 
Marchant
Sent: Friday, April 28, 2023 3:18 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

I don't know any Cobol syntax that would change the DDNAME in a DCB, but you 
could call an assembler routine to change the DDNAME before OPEN. Why would you 
want to do that?

I'm a bit baffled. In z/OS and its ancestors, the data set name isn't 
determined until runtime, via JCL.

Perhaps if you describe the problem you are trying to solve.

--
Tom Marchant

On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael  
wrote:

>I know how to have a COBOL program on z/OS use a data set name that isn't 
>determined until runtime, via an environment variable. My question is can you 
>use one file (i.e. one select/assign and one FD) to write to different DD 
>names, that were already allocated in the JCL?
>
>I can't find a way, and in the manual the syntax for the environment variable 
>method requires a DSN or PATH, no option for a DD name.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Sri h Kolusu
>> So use it to retrieve the data set name that is allocated in the JCL to the 
>> DD, then use the environment variable method to write to that same data set 
>> name? Hmmm.

Michael,

Not really,  once you get the Dataset name, you can open it in EXTENDED mode 
and write the output.  However, you are still limited by the LRECL and RECFM of 
the ddname.   Since you are splitting the records, I guess all of them have the 
same length

Thanks,
Kolusu
DFSORT Development
IBM Corporation

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Sri h Kolusu
>> Now we're trying to replace the File Manager step. If it was possible to do 
>> this in z/OS COBOL we could use it, but it isn't worth a large effort 
>> because it would be an interim solution anyway.

Michael,

Not sure as to why you want to replace file manager step with a COBOL program, 
but DFSORT can easily be used to fulfil the requirement. Let me know the DCB 
properties(LRECL, RECFM) of the input file and I can show you way to split the 
records into multiple files.

Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Seymour J Metz
The OP isn't trying to retrieve the information; he's trying to open a file 
using a dynamic ddname. Put another way, he wants to open the same DCB multiple 
times, with a different DCBDDNAM each time.


From: IBM Mainframe Discussion List  on behalf of Sri 
h Kolusu 
Sent: Friday, April 28, 2023 4:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

>> I'm not trying to allocate the files. The JCL for the step has all the DDs. 
>> I just need to be able open, extend, and close the select/assign to 
>> different DDs where which ones I use and which order is not known until I'm 
>> working through an input file.

Michael,

As steve mentioned in earlier post , you can BPXWDYN2 to retrieve the info a 
dataset/ddname.

Here is an example

https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866

Thanks,
Kolusu

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Charles Hardee
*I have not tried this*, but could you use SET FILE-VAR TO ADDRESS OF
FILE-NAME?
Does that make FILE-VAR point to the DCB?
If so, then, with the file closed, move in your DD name, open, write, close.
Rinse and repeat.

Like I said, I don't know if this will work, but it's worth a try.

Chuck


On Fri, Apr 28, 2023 at 2:38 PM Schmitt, Michael 
wrote:

> I know how to have a COBOL program on z/OS use a data set name that isn't
> determined until runtime, via an environment variable. My question is can
> you use one file (i.e. one select/assign and one FD) to write to different
> DD names, that were already allocated in the JCL?
>
> I can't find a way, and in the manual the syntax for the environment
> variable method requires a DSN or PATH, no option for a DD name.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Sri h Kolusu
>> The OP isn't trying to retrieve the information; he's trying to open a file 
>> using a dynamic ddname. Put another way, he wants to open the same DCB 
>> multiple times, with a different DCBDDNAM each time.

SeyMour

>From the limited information that OP provided, IMHO he was planning on having 
>multiple open and close of files.  However, he doesn't really need to do that. 
>He can open all the files and then have the logic to write to specific file

Sample pseudo code

OPEN INPUT   file-input
 OUTPUT  fileout1
 fileout2
 fileout3
 fileout4
 ..
 fileoutn

MAIN-LOGIC


EVALUATE TRUE
WHEN WS-FILE-IND = 'f01'
 PERFORM WRITE-TO-FILE01
 PERFORM READ-INPUT-FILE
WHEN WS-FILE-IND = 'f02'
 PERFORM WRITE-TO-FILE02
 PERFORM READ-INPUT-FILE
WHEN WS-FILE-IND = 'f03'
 PERFORM WRITE-TO-FILE03
 PERFORM READ-INPUT-FILE
n... files
END-EVALUATE


CLOSE  file-input
   fileout1
   ..


Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 20:26:38 +, Sri h Kolusu wrote:
>...
>Here is an example
>
>https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866
>
Thanks.  I think I see how that works.  Trying to understand it, I found a
contradiction in the REXX UNIX  Ref.  I submitted an RCF.

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Seymour J Metz
How many different files does he have? An equivalent to the PL/I FILE keyword 
would be more flexible than hard-wiring the ddnames at compile time.


From: IBM Mainframe Discussion List  on behalf of Sri 
h Kolusu 
Sent: Friday, April 28, 2023 4:59 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name

>> The OP isn't trying to retrieve the information; he's trying to open a file 
>> using a dynamic ddname. Put another way, he wants to open the same DCB 
>> multiple times, with a different DCBDDNAM each time.

SeyMour

>From the limited information that OP provided, IMHO he was planning on having 
>multiple open and close of files.  However, he doesn't really need to do that. 
>He can open all the files and then have the logic to write to specific file

Sample pseudo code

OPEN INPUT   file-input
 OUTPUT  fileout1
 fileout2
 fileout3
 fileout4
 ..
 fileoutn

MAIN-LOGIC


EVALUATE TRUE
WHEN WS-FILE-IND = 'f01'
 PERFORM WRITE-TO-FILE01
 PERFORM READ-INPUT-FILE
WHEN WS-FILE-IND = 'f02'
 PERFORM WRITE-TO-FILE02
 PERFORM READ-INPUT-FILE
WHEN WS-FILE-IND = 'f03'
 PERFORM WRITE-TO-FILE03
 PERFORM READ-INPUT-FILE
n... files
END-EVALUATE


CLOSE  file-input
   fileout1
   ..


Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: JES2 $SUBMIT Command

2023-04-28 Thread Mark Jacobs
By use-cases I wasn't talking about how to set it up, I've got that. What I was 
asking about is for anyone who has configured it, what are you using it for? 
Does its use make anything easier in your day to day work?

Mark Jacobs 

Sent from ProtonMail, Swiss-based encrypted email.

GPG Public Key - 
https://api.protonmail.ch/pks/lookup?op=get&search=markjac...@protonmail.com


--- Original Message ---
On Friday, April 28th, 2023 at 4:29 PM, Paul Gilmartin 
<042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:


> On Fri, 28 Apr 2023 12:58:40 -0700, M. Ray Mullins wrote:
> 
> > Note that the MVS Assembler Services Guide still documents that the
> > maximum of instream data is 254
> 
> That's horribly obsolete, perhaps contradicted by other publications. I'll
> submit an RCF. Assembler Services Guide should not contain an
> explicit number but a citation of the publication containing the current
> value.
> 
> > ... and JCL records must be exactly 80. I
> 
> I'm skeptical about that-- I suspect the reader pads to 80 and ignores
> data beyond 80.
> 
> > haven't tried larger than 254 yet…I should add this to my little INTRDR
> > toolkit program.
> > 
> > I just tried a VB/255 data set for a SUBMITLIB as a test and it worked
> > perfectly.
> > 
> > If you're thinking about PROCLIBs, though, those don't work, they must
> > be F(B)/80.
> 
> 
> 
> > On 2023-04-25 12:43, Paul Gilmartin wrote:
> > 
> > > Curious, I did a search and found:
> > > https://www.ibm.com/docs/pl/zos/2.5.0?topic=consider-jes2-disk-reader-support
> > > ...SUBMITLIB ... The concatenation supports any format PDS (LRECL and 
> > > RECFM) that
> > > can be used to pass JCL into input processing.
> > > 
> > > That assertion is a nullity: It supports any supported attributes. Where 
> > > are those
> > > explicitly listed?
> 
> 
> --
> gil
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised

2023-04-28 Thread Michael Oujesky
Note that RECFM=V is missing the "B" (i.e. block descriptor 
word).  RECFM=V is almost the equivalent of RECFM=U, exceptt that the 
data block is prefixed by a half-word length (limited to 32767) and "BB".


BTW, a VBS record can be as long as 16,777,215 bytes,

Michael

At 12:40 PM 4/28/2023, Paul Gilmartin wrote:


On Fri, 28 Apr 2023 12:20:29 -0500, Michael Oujesky wrote:

>Would not think "V" could be included.  "...
>
Why not?  If I create a VBS data set; write a single logical record 
which happens
not to be segmented, then close it, the content is identical to that 
of a RECM=V

data set.  RECFM=VBS must be prepared to deal with that on input.

Why presume the program is assembler?  An override in JCL DD should suffice.


>At 07:12 PM 4/27/2023, Paul Gilmartin wrote:
>
>> >Presuming the program is assembler, I would suggest trying
>> >hard-coding for RECFM=VBS, LRECL=32767, BLKSIZE=32760, BFTEK=A.
>> >
>> >And presuming all the files are RECFM=VBS.
>> >
>>In fact, can't any mixture of RECFM=V, VB, and VBS be overriden to
>>those specifications?

--
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Unlike data sets concatenation - revised

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 18:55:47 -0500, Michael Oujesky wrote:

>Note that RECFM=V is missing the "B" (i.e. block descriptor
>word).  RECFM=V is almost the equivalent of RECFM=U, exceptt that the
>data block is prefixed by a half-word length (limited to 32767) and "BB".
>
This says otherwise:


Format-V records
Last Updated: 2023-03-29

Figure 1 shows blocked and unblocked variable-length (format-V) records without 
spanning. A block in a data set containing unblocked records is in the same 
format as a block in a data set containing blocked records. The only difference 
is that with blocked records each block can contain multiple records.

See particularly the part of the figure labelled "Unblocked records".

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Andrew Rowley

On 29/04/2023 6:29 am, Schmitt, Michael wrote:

I have an input file that contains thousands of records. They are in groups: 
header record, then a bunch of segments all for one database name, then another 
header, records for another database. But the same database can appear more 
than once in the input.


Have you considered Java?

This is untested, and I don't know File Manager so I'm not 100% sure of 
the logic or even the field definitions, but it should give you the 
idea. Run under JZOS Batch Launcher so JCL DDs are available.


A complete Java program:

import java.io.*;
import java.util.*;
import com.ibm.jzos.*;
import com.ibm.jzos.fields.*;
import com.ibm.jzos.fields.daa.*;

public class App
{
    public static void main(String[] args) throws IOException
    {
    BinaryUnsignedIntField keyField = new BinaryUnsignedIntField(0, 2);
    BinaryUnsignedIntField countField = new 
BinaryUnsignedIntField(4, 4);

    StringField ddField = new StringField(8, 8);

    byte[] nextHeader = null;

    Map outEntries = new HashMap<>();
    RecordReader in = null;
    try
    {
        in = RecordReader.newReaderForDD("INPUT");
        int bytesRead = 0;
        byte[] record = new byte[in.getLrecl()];
        while ((bytesRead = in.read(record)) >= 0)
        {
            if (keyField.getInt(record) == 0)
            {
                nextHeader = Arrays.copyOfRange(record, 0, bytesRead);
            }
            else
            {
                String ddname = ddField.getString(record);
                OutEntry out = outEntries.get(ddname);
                if (out == null)
                {
                    out = new OutEntry(ddname);
                    outEntries.put(ddname, out);
                    out.writer.write(nextHeader);
                }
                out.count++;
                countField.putInt(out.count, record);
                out.writer.write(record, 0, bytesRead);
            }
        }
    }
    finally
    {
        if (in != null)
            in.close();
        for (OutEntry entry : outEntries.values())
        {
            entry.writer.close();
        }
    }
    }

    private static class OutEntry
    {
    OutEntry(String ddname) throws IOException
    {
        writer = RecordWriter.newWriterForDD(ddname);
    }
    int count = 0;
    RecordWriter writer;
    }
}

--
Andrew Rowley
Black Hill Software

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Paul Gilmartin
On Sat, 29 Apr 2023 11:17:39 +1000, Andrew Rowley  wrote:
>...
>A complete Java program:
>

Obviously a complete Java program needs very few comments.

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Paul Gilmartin
On Fri, 28 Apr 2023 20:40:37 +, Seymour J Metz wrote:

>The OP isn't trying to retrieve the information; ...
>
>
>From:  Sri h Kolusu 
>Sent: Friday, April 28, 2023 4:26 PM
>
>As steve mentioned in earlier post , you can BPXWDYN2 to retrieve the info a 
>dataset/ddname.
>
ITYM BPXWDY2.

>Here is an example
>https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Mike Schwab
I've  seen several uses of sort to split a file into multiple output files.

On Fri, Apr 28, 2023 at 2:38 PM Schmitt, Michael
 wrote:
>
> I know how to have a COBOL program on z/OS use a data set name that isn't 
> determined until runtime, via an environment variable. My question is can you 
> use one file (i.e. one select/assign and one FD) to write to different DD 
> names, that were already allocated in the JCL?
>
> I can't find a way, and in the manual the syntax for the environment variable 
> method requires a DSN or PATH, no option for a DD name.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



-- 
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Andrew Rowley

On 29/04/2023 11:48 am, Paul Gilmartin wrote:

Obviously a complete Java program needs very few comments.


Fair point... although I would contend that a Java program without 
comments is easier to understand than DFSORT control statements! Here is 
a version with comments (again, untested):


import java.io.*;
import java.util.*;
import com.ibm.jzos.*;
import com.ibm.jzos.fields.*;
import com.ibm.jzos.fields.daa.*;

public class App
{
    public static void main(String[] args) throws IOException
    {
    // define JZOS fields for the key, count and ddname
    BinaryUnsignedIntField keyField = new BinaryUnsignedIntField(0, 2);
    BinaryUnsignedIntField countField = new 
BinaryUnsignedIntField(4, 4);

    StringField ddField = new StringField(8, 8);

    // variable to save the current header record
    // I'm not sure I understand the input data i.e. why this is
    // necessary but I think this matches the logic from the File 
Manager

    // sample
    byte[] nextHeader = null;

    // map of ddname -> OutEntry containing RecordWriter and count
    Map outEntries = new HashMap<>();

    RecordReader input = null;
    try
    {
        // open the input dataset
        input = RecordReader.newReaderForDD("INPUT");
        int bytesRead = 0;

        // create a buffer for the input record
        byte[] record = new byte[input.getLrecl()];
        // read records
        while ((bytesRead = input.read(record)) >= 0)
        {
            if (keyField.getInt(record) == 0) // if key is zero
            {
                // copy and save the header record to a new byte array
                nextHeader = Arrays.copyOfRange(record, 0, bytesRead);
            }
            else
            {
                // get the ddname from the record
                // (this probably doesn't match the File Manager 
sample -

                // might need to concatenate/substring etc)
                String ddname = ddField.getString(record);

                // find the output entry for this ddname
                OutEntry out = outEntries.get(ddname);

                if (out == null) // doesn't exist: this is the 
first record for database

                {
                    out = new OutEntry(ddname);   // create/open a 
new entry

                    outEntries.put(ddname, out);  // save it in the map
                    out.writer.write(nextHeader, 0, 
nextHeader.length); // write the saved header entry

                }
                out.count++; // increment record count for this entry
                countField.putInt(out.count, record);   // update 
sequence in the record
                out.writer.write(record, 0, bytesRead); // write 
the record

            }
        }
    }
    finally // close all files
    {
        if (input != null)
            input.close();
        for (OutEntry entry : outEntries.values()) // each output 
writer

        {
            entry.writer.close();
        }
    }
    }

    /**
     * A class to keep a RecordWriter and count for each ddname
     * best practice would be to encapsulate with getters/setters
     * but we're trying to keep things simple for the sample
     */
    private static class OutEntry
    {
    OutEntry(String ddname) throws IOException
    {
        // open a RecordWriter for the supplied ddname
        writer = RecordWriter.newWriterForDD(ddname);
    }
    int count = 0;
    RecordWriter writer;
    }
}




--
Andrew Rowley
Black Hill Software

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: COBOL to dynamic DD name

2023-04-28 Thread Paul Gilmartin
On Sat, 29 Apr 2023 13:51:00 +1000, Andrew Rowley wrote:
>
>Fair point... although I would contend that a Java program without
>comments is easier to understand than DFSORT control statements!
>
Yes.  It appears as if the specifier of DFSORT control statement syntax
was traumatized in utero by CMS or POSIX test(1).

There's too much key,value,key,value,key,value,...
where either ...,key(value),key(value),key(value),...
or ...,key=value,key=value,key=value,...
would be preferable.

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: IKJDAIR DA14CD (return qualifiers)

2023-04-28 Thread Attila Fogarasi
Was the LLZZ specified with ZZ as x''?  Many years ago I had some
strange results from DAIR which were due to random bit settings, that might
also account for not getting the partial results as documented.  It was
always a touchy interface, and the ZZ requirement is poorly documented.

On Fri, Apr 28, 2023 at 9:19 PM Binyamin Dissen 
wrote:

> I have inherited some code which issues IKJDAIR X'14' .
>
> According to the doc , if the buffer is too small to receive all of the
> qualifiers, the buffer is filled as much as possible and return code x'28'
> is
> issued.
>
> I am finding that if the buffer is too small that nothing is returned and
> return code x'28' is issued. The length field in the return buffer is
> zeroed.
>
> I haven't found an applicable APAR.
>
> Anyone still using IKJDAIR?
>
> --
> Binyamin Dissen 
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN