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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to