Can you run the shell script from JCL?

I should have made it clear I need to have the JCL generate the data set each 
time it is run.

If I just wanted to do it one time, I would just use ISPF Edit:

1. NUM ON
2. type "Record"
3. Repeat 999
4. NUM OFF
5. Shift the sequence numbers


Meanwhile I completed the IEBDG, SORT solution:

IEBDG:
       DSD     OUTPUT=(SYSUT2)
       CREATE  QUANTITY=1000,FILL=' ',PICTURE=6,1,'Record'
       END

SORT:
   INREC OVERLAY=(8:SEQNUM,4,ZD)
   SORT FIELDS=COPY


-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Friday, September 15, 2023 3:45 PM
To: [email protected]
Subject: Re: Generate a data set with record numbers?

On Fri, 15 Sep 2023 20:19:32 +0000, Schmitt, Michael wrote:

>I want to generate a data set that has the record number on each line, such as:
>
>RECORD 1
>RECORD 2
>RECORD 3
>
A shell solution:

#! /bin/sh +x

R=0
while  R=$(( $R + 1 )); [ 10 -ge $R ]
do
    echo "Record $R"
done

I'm confident you'll get alternatives in REXX and DFSORT.

--
gil

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



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

Reply via email to