Re: How to insert records using EXECIO

2008-10-22 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 10/19/2008
   at 12:07 PM, Scott Ford [EMAIL PROTECTED] said:

I thought I remembered you could insert records...

And elsewhere I thought that you could continue a line after an operator,
without an explicit continuation character :-(

They say that memory is the second thing to go - I can't remember the
first.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-22 Thread Scott Ford
Shmuel...

Hair  boy 

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Shmuel Metz (Seymour J.)
Sent: Wednesday, October 22, 2008 7:29 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

In [EMAIL PROTECTED], on 10/19/2008
   at 12:07 PM, Scott Ford [EMAIL PROTECTED] said:

I thought I remembered you could insert records...

And elsewhere I thought that you could continue a line after an operator,
without an explicit continuation character :-(

They say that memory is the second thing to go - I can't remember the
first.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-19 Thread Scott Ford
--- Shmuel ..

I thought I remembered you could insert records...I tried it and showed some
code here...but obviously my old memory is failing. I looked it up and even
the TSO/Rexx manuals say...append or update in place , but no word of
insert..

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Shmuel Metz (Seymour J.)
Sent: Saturday, October 18, 2008 10:39 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

In [EMAIL PROTECTED], on 10/16/2008
   at 09:11 PM, Scott Ford [EMAIL PROTECTED] said:

--- Gil...here u go

That code does not insert records, it appends them. Nobody claimed that
you couldn't append.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-18 Thread Paul Gilmartin
On Thu, 16 Oct 2008 21:17:05 -0400, Scott Ford wrote:

See this Share paper...

 http://shareew.prod.web.sba.com/client_files/callpapers/attach/SHARE_in_San_Jose/S8343WS150114.pdf

Ah, the dreaded Rexx Stream I/O Function Package; I've read about it.
This is worse than disappointing; it's dismaying.

Conway's Law at it's most pernicious.

There's the above function package, then there's Rexx Stream I/O for
z/OS Unix Rexx, originally a function package; now integrated into
the z/OS base; both from IBM.

The former runs only under TSO/E, and processes only legacy data sets.

The latter runs only under z/OS Unix and processes only z/OS Unix files.

Why can't IBM get their act together and produce a single stream I/O
facility, integrated with the z/OS base, operational under all of
z/OS Unix, TSO/E, and IRXJCL?  And while they're at it, implement the
customary Rexx facility missing from both, SIGNAL ON NOTREADY?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-18 Thread Scott Ford
Gil amen brother...I loved Open Source Open Object Rexx..
But it took independent developers to do the job...IBM used to listen to
us the customers...

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Gilmartin
Sent: Saturday, October 18, 2008 10:08 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 21:17:05 -0400, Scott Ford wrote:

See this Share paper...


http://shareew.prod.web.sba.com/client_files/callpapers/attach/SHARE_in_San_
Jose/S8343WS150114.pdf

Ah, the dreaded Rexx Stream I/O Function Package; I've read about it.
This is worse than disappointing; it's dismaying.

Conway's Law at it's most pernicious.

There's the above function package, then there's Rexx Stream I/O for
z/OS Unix Rexx, originally a function package; now integrated into
the z/OS base; both from IBM.

The former runs only under TSO/E, and processes only legacy data sets.

The latter runs only under z/OS Unix and processes only z/OS Unix files.

Why can't IBM get their act together and produce a single stream I/O
facility, integrated with the z/OS base, operational under all of
z/OS Unix, TSO/E, and IRXJCL?  And while they're at it, implement the
customary Rexx facility missing from both, SIGNAL ON NOTREADY?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-18 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 10/16/2008
   at 06:22 AM, P.Sabarish Kannan [EMAIL PROTECTED] said:

 I have a requirement to insert some records in the beginning of a file
where  already some lines are existing .

You can't; you need to rewrite the entire file. For classical sequential
files I recommend writing a new file rather than writing on top of the old
file. That way, if something happens in the middle you haven't lost your
data. For Unix files that shouldn't be necessary.

It's too bad that IBM killed TSS.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-18 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on
10/16/2008
   at 02:03 PM, [EMAIL PROTECTED] said:

I wonder - Why is it not possible to add records to the beginning of a 
data set?  Wouldn't it be possible for a sufficiently clever program to 
place the inserted records into a newly allocated area on disk, and then 
modify the VTOC to point to that new area first and the old first area 
next? 

FSVO clever. It's clever in the sense that crashing two planes and tunning
a third one into power lines is brilliant flying. It may impress the
groupies but it's not professional and it's not safe.

OTOH, if you do it in a sandbox and don't put your enterprise at risk, it
might be a fun training exercise. But don't try it at home.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-18 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 10/16/2008
   at 09:11 PM, Scott Ford [EMAIL PROTECTED] said:

--- Gil...here u go

That code does not insert records, it appends them. Nobody claimed that
you couldn't append.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Hunkeler Peter (KIUK 3)
Its alreqdy 8:30am here but it might still be too early
to understand your sample. The result shown indicates 
that you implemented an append, which of course is 
equal to insert after last record. Not what the OP 
wanted.

But why are you reading the data set in first? ALLOC
with MOD followed by EXECIO DISKW accomplishes the same.

I don't understand what the do loop is for.

-- 
Peter Hunkeler
CREDIT SUISSE

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Scott Ford
It was an example for Gil and I also included a url for the actual execio
diskru ..from IBM ...

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Hunkeler Peter (KIUK 3)
Sent: Friday, October 17, 2008 2:35 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

Its alreqdy 8:30am here but it might still be too early
to understand your sample. The result shown indicates 
that you implemented an append, which of course is 
equal to insert after last record. Not what the OP 
wanted.

But why are you reading the data set in first? ALLOC
with MOD followed by EXECIO DISKW accomplishes the same.

I don't understand what the do loop is for.

-- 
Peter Hunkeler
CREDIT SUISSE

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



FW: How to insert records using EXECIO

2008-10-17 Thread Scott Ford
Peter,
See below

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Ford
Sent: Thursday, October 16, 2008 9:17 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

Gil,

See this Share paper...

http://shareew.prod.web.sba.com/client_files/callpapers/attach/SHARE_in_San_
Jose/S8343WS150114.pdf


Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Gilmartin
Sent: Thursday, October 16, 2008 8:05 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 18:53:48 -0400, Scott Ford wrote:

I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

I'm intrigued.  Can you point us to some sample code?  or
is this just the copy-append-rename already posted a couple
times in this thread?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Hunkeler Peter (KIUK 3)
Scott,
I thought you wanted to demonstrate how to insert records
at the beginning of a file. I must have misunderstood. 

-- 
Peter Hunkeler
CREDIT SUISSE

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Paul Gilmartin
On Fri, 17 Oct 2008 08:35:28 +0200, Hunkeler Peter (KIUK 3) wrote:

Its alreqdy 8:30am here but it might still be too early
to understand your sample. The result shown indicates

I didn't understand it last night.

that you implemented an append, which of course is
equal to insert after last record. Not what the OP
wanted.

But why are you reading the data set in first? ALLOC
with MOD followed by EXECIO DISKW accomplishes the same.

I don't understand what the do loop is for.

I don't understand what the parse instruction inside the
unnecessary do loop is for.

I was disappointed.  I had envisioned something like what
a colleague told me long ago.  As an undergraduate, he
had learned on a Scientific Data Systems (later XEROX)
Sigma system.  He explained that program source files,
necessarily line-numbered, were stored in something like
a VSAM KSDS file, with the line numbers as keys.  So it
was possible to update, insert, and delete records in
place.

Of course, this behavior is hard to distinguish from an
editor's reading the entire DSORG=PS file into main
storage, updating it in the buffer, and rewriting it.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Howard Brazee
On 16 Oct 2008 14:06:57 -0700, [EMAIL PROTECTED] wrote:

I wonder - Why is it not possible to add records to the beginning of a 
data set?  Wouldn't it be possible for a sufficiently clever program to 
place the inserted records into a newly allocated area on disk, and then 
modify the VTOC to point to that new area first and the old first area 
next?  It might require rewriting a bunch of control blocks, and probably 
wouldn't work for some kinds of data sets (FBS comes to mind), but isn't 
it theoretically possible? 

That's why we have linked lists, for occasions where this kind of
overhead is worth while.

I've used relative files for the same kind of need, although these
days databases have taken over (which do all that and more).

There are trade-offs though.   That kind of processing requires
significant overhead that slows down processing and is less reliable.
It's easier and safer to write a new copy of the file with the
inserted records in it.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-17 Thread Scott Ford
Peter,
Did you see the url I sent you...



Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Hunkeler Peter (KIUK 3)
Sent: Friday, October 17, 2008 8:14 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

Scott,
I thought you wanted to demonstrate how to insert records
at the beginning of a file. I must have misunderstood. 

-- 
Peter Hunkeler
CREDIT SUISSE

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



How to insert records using EXECIO

2008-10-16 Thread P.Sabarish Kannan
Hi

 I have a requirement to insert some records in the beginning of a file where 
already some lines are existing . i tried using DISKW using MOD , but they are 
appending to the end. How do we insert in the beginning? I am using REXX for 
this program.

Thanks in advance

Sabarish

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Veilleux, Jon L
You can read the whole file into a stem variable, put the lines you want
to insert into a stack, and then loop though the first stem variable to
append the values to the stack and then write the file back.

/* rexx */   
 
ADDRESS TSO  
ALLOC FI(TEMPNAME) DSN(your_file_name) SHR   
'EXECIO * DISKR TEMPNAME (STEM CARD.   FINIS'
Do y=1 to 3  
outcard.y = your_new_records

End  
Do x = 1 to card.0   
Y=y+1
outcard.y=card.x 
End  
Push ''  
'EXECIO 'y' DISKW TEMPNAME (stem outcard. FINIS' 

Jon L. Veilleux 
[EMAIL PROTECTED] 
(860) 636-2683 


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of P.Sabarish Kannan
Sent: Thursday, October 16, 2008 7:22 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: How to insert records using EXECIO

Hi

 I have a requirement to insert some records in the beginning of a file
where already some lines are existing . i tried using DISKW using MOD ,
but they are appending to the end. How do we insert in the beginning? I
am using REXX for this program.

Thanks in advance

Sabarish

--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Walt Farrell
On Thu, 16 Oct 2008 06:22:27 -0500, P.Sabarish Kannan
[EMAIL PROTECTED] wrote:

 I have a requirement to insert some records in the beginning of a file where
already some lines are existing . i tried using DISKW using MOD , but they are
appending to the end. How do we insert in the beginning? I am using REXX for
this program.

As far as I know you can not insert records into an existing file using
EXECIO.  You can append to the end, as you noticed.

I would write the new records into a new file and then copy the existing
file and append its records to that new file.   After that, the exec could
then delete the existing file and rename the new one to the old name if needed.

There is an unsafe alternative: you could read all of the existing data into
REXX variables, then write the new records to the beginning of the existing
file, and then write the data from the variables after that new data. 
However, if an error occurs before you finish the writing then you will have
lost the data in your file.

-- 
  Walt Farrell

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Hunkeler Peter (KIUK 3)
I have a requirement to insert some records in the beginning of a file 
where already some lines are existing . i tried using DISKW using MOD, 
but they are appending to the end. How do we insert in the beginning? 
I am using REXX for this program.

There is no direct way to insert data into a sequential data set,
neither
at the beginning nor inbetween. You need to re-write the dataset with
all 
the new and current records in the desired sequence.

If the dataset is not too big, you can read it into storage using EXECIO
then write everything back out with multiple EXEXIOs. You can also use
one of various ways to concatenate the input datasets and copy them
into a new output dataset.

-- 
Peter Hunkeler
Credit Suisse

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Paul Gilmartin
On Thu, 16 Oct 2008 07:49:45 -0400, Veilleux, Jon L wrote:

You can read the whole file into a stem variable, ...

I feel old.

You really ought to have a fallback mechanism in case
can fails.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Veilleux, Jon L
Actually, I remember installing Amdahl SP Assist so that our machines
could have more than 16MB of real storage. Times have changed..


Jon L. Veilleux 
[EMAIL PROTECTED] 
(860) 636-2683 


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Gilmartin
Sent: Thursday, October 16, 2008 9:19 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 07:49:45 -0400, Veilleux, Jon L wrote:

You can read the whole file into a stem variable, ...

I feel old.

You really ought to have a fallback mechanism in case can fails.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Paul Gilmartin
On Thu, 16 Oct 2008 06:53:15 -0500, Walt Farrell wrote:

I would write the new records into a new file and then copy the existing
file and append its records to that new file.   After that, the exec could
then delete the existing file and rename the new one to the old name if needed.

And I'll recommend z/OS Unix files.  You can omit the delete, and the
POSIX rename guarantees that no other process will observe a window
during which the file doesn't exist, and there's no need for an ENQ
with the possible lockout.  (Might the same be true with PDSE members?)

There is an unsafe alternative: you could read all of the existing data into
REXX variables, then write the new records to the beginning of the existing
file, and then write the data from the variables after that new data.
However, if an error occurs before you finish the writing then you will have
lost the data in your file.

And it might actually be poorer performance.  Note that this is
effectively copying the original file to the page data set, then
the page data set back to the new file -- twice the disk I/O.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Paul Gilmartin
On Thu, 16 Oct 2008 09:25:51 -0400, Veilleux, Jon L wrote:

Actually, I remember installing Amdahl SP Assist so that our machines
could have more than 16MB of real storage. Times have changed..

Can Rexx keep stem variables above the bar nowadays?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Veilleux, Jon L
You are right. You should always have a back up plan. I was answering
his basic question not thinking about preventing disasters. 
That being said, if you really need to protect the file maybe REXX
EXECIO isn't the best solution
Jon 


Jon L. Veilleux 
[EMAIL PROTECTED] 
(860) 636-2683 


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Gilmartin
Sent: Thursday, October 16, 2008 9:19 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 07:49:45 -0400, Veilleux, Jon L wrote:

You can read the whole file into a stem variable, ...

I feel old.

You really ought to have a fallback mechanism in case can fails.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Lizette Koehler
Depending on the number of records in the input file, EXECIO may not be the
most efficient way to do this.

But you could create a new file with the new lines in it and then use
something like IEBGENER later in the REXX to mod the data from the original
file into the new file.

The reason to do it this way is to protect your original file from being
corrupted should there be a failure of some type (x37, 0Cx, etc).

Mod will normally add lines to the end of a file not to a beginning of a
file.

Lizette

 
 Hi
 
  I have a requirement to insert some records in the beginning of a file
 where
 already some lines are existing . i tried using DISKW using MOD , but
 they are
 appending to the end. How do we insert in the beginning? I am using
 REXX for
 this program.
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Patrick O'Keefe
On Thu, 16 Oct 2008 13:53:47 +0200, Hunkeler Peter (KIUK 3) 
[EMAIL PROTECTED] wrote:

I have a requirement to insert some records in the beginning of a file
where already some lines are existing . i tried using DISKW using 
MOD,
but they are appending to the end. How do we insert in the 
beginning?
I am using REXX for this program.

There is no direct way to insert data into a sequential data set,
neither
at the beginning nor inbetween. You need to re-write the dataset with
all
the new and current records in the desired sequence.
...

Peter came close to saying this, but I think it's worth highlighting.
This restriction has nothing to do with REXX; it's just  the way
processing of sequential datasets works.

Regarding MOD, last I checked there was no MOD option to EXECIO
(and I wouldn't expect it there) so I assume the origonal poster
was refering to DISP=MOD or MOD on a TSO ALLOCATE command.
In those contexts MOD implies Add to the end of a dataset.

In the JCL manual it clearly states that MOD implies either 
   The data set exists and records are to be added to the end of it. 
   The data set must be sequential. 
or
   A new data set is to be created.   

HELP for the ALLOCATE command is a lot less clear:
   ADDITIONS ARE TO BE MADE TO DATA SET  

Pat O'Keefe

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Scott Ford
Patrick,

I have been updating in place with Execio in Rexx. The DISP=MOD
Is correct and finding the record you want to update or insert or
delete is also part of the formula.

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Patrick O'Keefe
Sent: Thursday, October 16, 2008 3:25 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 13:53:47 +0200, Hunkeler Peter (KIUK 3) 
[EMAIL PROTECTED] wrote:

I have a requirement to insert some records in the beginning of a file
where already some lines are existing . i tried using DISKW using 
MOD,
but they are appending to the end. How do we insert in the 
beginning?
I am using REXX for this program.

There is no direct way to insert data into a sequential data set,
neither
at the beginning nor inbetween. You need to re-write the dataset with
all
the new and current records in the desired sequence.
...

Peter came close to saying this, but I think it's worth highlighting.
This restriction has nothing to do with REXX; it's just  the way
processing of sequential datasets works.

Regarding MOD, last I checked there was no MOD option to EXECIO
(and I wouldn't expect it there) so I assume the origonal poster
was refering to DISP=MOD or MOD on a TSO ALLOCATE command.
In those contexts MOD implies Add to the end of a dataset.

In the JCL manual it clearly states that MOD implies either 
   The data set exists and records are to be added to the end of it. 
   The data set must be sequential. 
or
   A new data set is to be created.   

HELP for the ALLOCATE command is a lot less clear:
   ADDITIONS ARE TO BE MADE TO DATA SET  

Pat O'Keefe

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Jack . Hamilton
I wonder - Why is it not possible to add records to the beginning of a 
data set?  Wouldn't it be possible for a sufficiently clever program to 
place the inserted records into a newly allocated area on disk, and then 
modify the VTOC to point to that new area first and the old first area 
next?  It might require rewriting a bunch of control blocks, and probably 
wouldn't work for some kinds of data sets (FBS comes to mind), but isn't 
it theoretically possible? 


--
Jack Hamilton
Management Information  Analysis - Analytic Information Services
Kaiser Foundation Health Plan, Inc.
1950 Franklin Street, Oakland, California 94612
+1 510 987-1556 (KP tieline 8-427-1556)

NOTE:  This email document and attachments are covered by CA Evidence Code 
§1157 and CA Health and Safety Code §1370.

NOTICE TO RECIPIENT:  If you are not the intended recipient of this 
e-mail, you are prohibited from sharing, copying, or otherwise using or 
disclosing its contents.  If you have received this e-mail in error, 
please notify the sender immediately by reply e-mail and permanently 
delete this e-mail and any attachments without reading, forwarding or 
saving them.  Thank you.


IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU wrote on 10/16/2008 
12:24:56 PM:

 On Thu, 16 Oct 2008 13:53:47 +0200, Hunkeler Peter (KIUK 3)
 [EMAIL PROTECTED] wrote:

 I have a requirement to insert some records in the beginning of a file
 where already some lines are existing . i tried using DISKW using
 MOD,
 but they are appending to the end. How do we insert in the
 beginning?
 I am using REXX for this program.
 
 There is no direct way to insert data into a sequential data set,
 neither
 at the beginning nor inbetween. You need to re-write the dataset with
 all
 the new and current records in the desired sequence.
 ...

 Peter came close to saying this, but I think it's worth highlighting.
 This restriction has nothing to do with REXX; it's just  the way
 processing of sequential datasets works.

 Regarding MOD, last I checked there was no MOD option to EXECIO
 (and I wouldn't expect it there) so I assume the origonal poster
 was refering to DISP=MOD or MOD on a TSO ALLOCATE command.
 In those contexts MOD implies Add to the end of a dataset.

 In the JCL manual it clearly states that MOD implies either
 The data set exists and records are to be added to the end of it.
 The data set must be sequential.
 or
 A new data set is to be created.
 
 HELP for the ALLOCATE command is a lot less clear:
 ADDITIONS ARE TO BE MADE TO DATA SET
 
 Pat O'Keefe

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Patrick O'Keefe
On Thu, 16 Oct 2008 16:24:14 -0400, Scott Ford 
[EMAIL PROTECTED] wrote:

Patrick,

I have been updating in place with Execio in Rexx. ...

I didn't mean to imply you couldn't update in place.  That's a lot
different than inserting.  

Pat O'Keefe

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Scott Ford
Patrick,
I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Patrick O'Keefe
Sent: Thursday, October 16, 2008 6:42 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 16:24:14 -0400, Scott Ford 
[EMAIL PROTECTED] wrote:

Patrick,

I have been updating in place with Execio in Rexx. ...

I didn't mean to imply you couldn't update in place.  That's a lot
different than inserting.  

Pat O'Keefe

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Jürgen Kehr

Hi,

... and after 15 records added this way you'll get an x37 error, because 
your dataset have more than 16 extents.


[EMAIL PROTECTED] schrieb:
I wonder - Why is it not possible to add records to the beginning of a 
data set?  Wouldn't it be possible for a sufficiently clever program to 
place the inserted records into a newly allocated area on disk, and then 
modify the VTOC to point to that new area first and the old first area 
next?  It might require rewriting a bunch of control blocks, and probably 
wouldn't work for some kinds of data sets (FBS comes to mind), but isn't 
it theoretically possible? 



--
Jack Hamilton
Management Information  Analysis - Analytic Information Services
Kaiser Foundation Health Plan, Inc.
1950 Franklin Street, Oakland, California 94612
+1 510 987-1556 (KP tieline 8-427-1556)

  


--

___



Freundliche Gruesse / Kind regards



Dipl.Math. Juergen Kehr, IT Schulung  Beratung, IT Education + Consulting

Tel.  +49-561-9528788  Fax   +49-561-9528789  Mobil +49-172-5129389

ICQ 292-318-696 (JKehr)



mailto:[EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]

___

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Gerhard Postpischil

[EMAIL PROTECTED] wrote:
I wonder - Why is it not possible to add records to the beginning of a 
data set?  Wouldn't it be possible for a sufficiently clever program to 
place the inserted records into a newly allocated area on disk, and then 
modify the VTOC to point to that new area first and the old first area 
next?  It might require rewriting a bunch of control blocks, and probably 
wouldn't work for some kinds of data sets (FBS comes to mind), but isn't 
it theoretically possible? 


I'm speculating, but sequential files (QSAM, BSAM) were designed 
to be as device independent as possible. While your proposal 
would work a few times for a DASD file, it would not work on 
tape. Furthermore, while there may be a business case for 
inserting records into a file, the specific case of doing so 
only at the beginning is pretty rare, and wouldn't justify the 
expense of implementation.


Gerhard Postpischil
Bradford, VT

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Paul Gilmartin
On Thu, 16 Oct 2008 18:53:48 -0400, Scott Ford wrote:

I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

I'm intrigued.  Can you point us to some sample code?  or
is this just the copy-append-rename already posted a couple
times in this thread?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Scott Ford
I will put together a sample and post it, including Input file, exec clist
and output...

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Gilmartin
Sent: Thursday, October 16, 2008 8:05 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 18:53:48 -0400, Scott Ford wrote:

I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

I'm intrigued.  Can you point us to some sample code?  or
is this just the copy-append-rename already posted a couple
times in this thread?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Scott Ford
--- Gil...here u go


 before add of records *

BROWSESFORD.TEST.FILELine  Col 001
080
* Top of Data
**
line1   
line2   
line3   
line4   
line5   
line6   
line7  
 
 Bottom of Data


/*   Rexx*/
/*   */
/* Clist:   REXXINS  */
/* Author:  Scott Ford, IDF  */
/* Date  :  10-16-2008   */
/* Version:  1.0 */
/* Modification: 1.0 */
/* Release:  1.0 */
/* Narative: Input flat file and insert records  */
/*---*/
reci = 0;
j = 1;
call alloc_input;
call read_input;
call insert_input;
exit
alloc_input:
address TSO
'PROFILE NOPREFIX'
'ALLOC DDN(FILEIN) MOD DSN(SFORD.TEST.FILE)'
if rc = 0 then do;
  say 'REXXINS  --  File allocated ok - at 'date(u)' 'time()
end;
return;
read_input:
'execio * DISKR FILEIN (STEM A. FINIS'
if rc = 0 then do;
  say 'REXXINS  --  File read ok - at 'date(u)' 'time()
end;
return;
insert_input:
B. = '';
j = 1;
do i=1 to A.0;
  if substr(A.i,1,5) = 'line3' then do;
 parse var A.i record
 reci = i
 B.j = 'line3a'
 j = j + 1
 B.j = 'line3b'
   'execio '2' DISKW FILEIN ( STEM B. FINIS'
 say rc
  end;
end;
return;

* after addition of records *

 BROWSESFORD.TEST.FILELine  Col 001
080
* Top of Data
**
line1   
line2   
line3   
line4   
line5   
line6   
line7   
line3a
line3b
 Bottom of Data


Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Gilmartin
Sent: Thursday, October 16, 2008 8:05 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 18:53:48 -0400, Scott Ford wrote:

I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

I'm intrigued.  Can you point us to some sample code?  or
is this just the copy-append-rename already posted a couple
times in this thread?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: How to insert records using EXECIO

2008-10-16 Thread Scott Ford
Gil,

See this Share paper...

http://shareew.prod.web.sba.com/client_files/callpapers/attach/SHARE_in_San_
Jose/S8343WS150114.pdf


Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304[m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Gilmartin
Sent: Thursday, October 16, 2008 8:05 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: How to insert records using EXECIO

On Thu, 16 Oct 2008 18:53:48 -0400, Scott Ford wrote:

I understand what you said, my comments are that an insert was also very
doable in rexx..no more no less.

I'm intrigued.  Can you point us to some sample code?  or
is this just the copy-append-rename already posted a couple
times in this thread?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html