Reason I never knew you could have a sequential SYSEXEC is I'm on z/OS 2.4. 
This capability is added in z/OS 2.5.

On Mon, 18 Sep 2023 15:25:47 +0000, Schmitt, Michael <[email protected]> 
wrote:

>Huh. I always thought that SYSEXEC had to be a library.
>
>I suppose a sequential SYSEXEC only works for IRXJCL, not IKJEFT01. And that 
>if SYSEXEC is sequential, the exec shouldn't call other execs.
>
>-----Original Message-----
>From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
>Beate Kawelke
>Sent: Monday, September 18, 2023 1:47 AM
>To: [email protected]
>Subject: AW: Generate a data set with record numbers?
>
>Hi Michael,
>
>you could directly run the REXX as in-stream in the JCL: 
>https://www.ibm.com/docs/en/zos/2.5.0?topic=routine-using-irxjcl-execute-in-stream-rexx-exec
>
>Best regards,
>Beate
>
>-----Urspr�ngliche Nachricht-----
>Von: IBM Mainframe Discussion List <[email protected]> Im Auftrag von 
>Schmitt, Michael
>Gesendet: Freitag, 15. September 2023 22:20
>An: [email protected]
>Betreff: [IBM-MAIN] Generate a data set with record numbers?
>
>I want to generate a data set that has the record number on each line, such as:
>
>RECORD 1
>RECORD 2
>RECORD 3
>
>Or
>
>RECORD 00001
>RECORD 00002
>RECORD 00003
>
>Perhaps I want to generate 1,000 records. Or 10,000.
>
>The question is, what's the simplest way to do this with a *standard* z/OS 
>utility (i.e. that comes with z/OS), or with a standard sort product (e.g. 
>DFSORT or SyncSort), where it is all in a self-contained job?
>
>I thought of IEBDG or IEBGENER but I don't see where you can tell it to 
>generate a sequence number in the records it is building. Is it there and I'm 
>just missing it?
>
>
>I came up with two solutions:
>
>A. IEBGENER to copy instream REXX into a PDS, then IRXJCL to execute it. The 
>REXX exec generates the records.
>
>Or
>
>B. IEBDG to generate a file of N records that just say "RECORD", followed by a 
>SORT that uses INREC to modify the record to contain the RECNUM. The sort 
>would just copy the records.
>
>
>Both of these solutions are two steps.
>
>I'm curious if there's a simpler solution that I haven't thought of.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to