Re: Ways to update PS files?

2007-08-22 Thread Ulrich Krueger
Which brings up a question ...

 

Is there a way for an application programmer to detect in the program that
the file is compressed? If so, how would one do that?

 

Regards,

Ulrich Krueger

 

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Graeme Gibson
Sent: Tuesday, August 21, 2007 6:47 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Ways to update PS files?

 

(ROFL) Yup, that's one I didn't think of!

 

At 01:28 AM 8/22/2007, you wrote:

On Wed, 2007-08-22 at 00:23 +1000, Graeme Gibson wrote:

  Only the application programer will be aware when

  [QSAM update-in-place] has been used, there's nothing

  to tell sysprogs or operators that it's in use and

  absolutely no need for them to know.

 

Unless the sysprog (me, in one unfortunate case) enabled compression.

 

--

David Andrews

 

--

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: Ways to update PS files?

2007-08-22 Thread Kirk Talman
Agreed.  I inherited and replaced a messy set of JCL/sorts/handgrubbing 
w/a simple pair of cobol programs.  The input tx file is update in place. 
It is loaded by a sort.  Each tx has an effective date.  Programs run once 
a day.  When date of exec is reached, tx is executed and date of exec is 
shown in record.

IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU wrote on 08/21/2007 
10:23:11 AM:

 I was amazed to see how many posters effectively said don't use this 
 technique!
 
 QSAM update-in-place is a very simple, easy-to-use and effective 
 update technique that has been used in countless applications for 
 goodness knows how many years.  Only the application programer will 
 be aware when the technique has been used, there's nothing to tell 
 sysprogs or operators that it's in use and absolutely no need for 
 them to know.  One of it's strengths is the ability to have 
 concurrent batch updating of a file that is also being used read-only 
 by other programs, perhaps for online customer queries, the sort of 
 thing that today you'd be using a fully-blown database for.



-
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. The information may also constitute a legally
privileged confidential communication. If the reader of this
message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified
that you have received this communication in error and that any
review, dissemination, copying, or unauthorized use of this
information, or the taking of any action in reliance on the
contents of this information is strictly prohibited. If you have
received this communication in error, please notify us immediately
by e-mail, and delete the original message. Thank you 

--
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: Ways to update PS files?

2007-08-21 Thread FRASER, Brian
I've got MACRF=(GL,PL) in my programmes and it works. ;)



---
This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of its 
related entities Suncorp. 

Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13 11 
55  or at suncorp.com.au.

The content of this e-mail is the view of the sender or stated author and does 
not necessarily reflect the view of Suncorp. The content, including 
attachments, is a confidential communication between Suncorp and the intended 
recipient. If you are not the intended recipient, any use, interference with, 
disclosure or copying of this e-mail, including attachments, is unauthorised 
and expressly prohibited. If you have received this e-mail in error please 
contact the sender immediately and delete the e-mail and any attachments from 
your system.

If this e-mail constitutes a commercial message of a type that you no longer 
wish to receive please reply to this e-mail by typing Unsubscribe in the 
subject line.

--
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: Ways to update PS files?

2007-08-21 Thread Steve Comstock

Johnny Luo wrote:

Steve,

I also believe it should be (GL,PM) after I checked my personal notes. I
remember clearly that I wrote a test program to verify that three months
ago. (On z/os 1.7)


H. I'd have to see the program.

From DFSMS Using Data Sets, p. 398:

When you update a data set in place, you read, process, and write 
records back to their original positions without destroying the 
remaining records on the track. The following rules apply:


 * You must specify the UPDAT option in the OPEN macro to update the 
data set. To perform the update, you can use only the READ, WRITE, 
CHECK, NOTE, and POINT macros or you use only GET and PUTX macros. To 
use PUTX, code MACRF=(GL,PL) on the DCB macro.


 * You cannot delete any record or change its length.
 * You cannot add new records.
 * The data set must be on a DASD.
 * You must rewrite blocks in the same order in which you read them.

And later, talking about updating PDSE members (p. 478):

You can update a member of a PDSE using the locate mode of QSAM (DCB 
specifies MACRF=(GL,PL)) and using the GET and PUTX macros.





On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:




Nope. MACRF=(GL,PL) is what it has to be.



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: Ways to update PS files?

2007-08-21 Thread Johnny Luo
Steve,

Here is my program:

***
*AUTHOR: JOHNNY   *
*DATE  : 05/11/07
*DESCRIPTION: UPDATE A PS,FB FILE USING QSAM
*I-OFILE: INVMAST(PS,FB,50)
***
  TITLE 'DEMONSTRATE HOW TO UPDATE UISNG QSAM'
QSAMUPD   CSECT
* HOUSEKEEPING
  SAVE   (14,12)
  LR 3,15
  USING  QSAMUPD,3  BASE REGISTER
  LA 15,SAVEAREA
  ST 15,8(,13)
  ST 13,SAVEAREA+4
  LR 13,15
* MAINLINE
  OPEN (INVMAST,UPDAT)
READ  GET  INVMAST
  MVC  0(50,1),=CL50'UPDATED BY QSAM HAHA!'
  PUTX INVMAST
  B READ
EOF   CLOSE (INVMAST)
* HOUSEKEEPING
  L  13,SAVEAREA+4
  MVC16(4,13),RC
  RETURN (14,12)
* WORKING AREA
  LTORG
INVMAST   DCB DDNAME=INVMAST,  X
   DSORG=PS,   X
   RECFM=FB,   X
   LRECL=50,   X
   EODAD=EOF,  X
   MACRF=(GL,PM)
*
SAVEAREA  DS 18F
RCDC F'0'
   ENDQSAMUPD

On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:



 H. I'd have to see the program.





-- 
Best Regards,
Johnny Luo

--
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: Ways to update PS files?

2007-08-21 Thread Steve Comstock

Johnny Luo wrote:

Steve,

Here is my program:

***
*AUTHOR: JOHNNY   *
*DATE  : 05/11/07
*DESCRIPTION: UPDATE A PS,FB FILE USING QSAM
*I-OFILE: INVMAST(PS,FB,50)
***
  TITLE 'DEMONSTRATE HOW TO UPDATE UISNG QSAM'
QSAMUPD   CSECT
* HOUSEKEEPING
  SAVE   (14,12)
  LR 3,15
  USING  QSAMUPD,3  BASE REGISTER
  LA 15,SAVEAREA
  ST 15,8(,13)
  ST 13,SAVEAREA+4
  LR 13,15
* MAINLINE
  OPEN (INVMAST,UPDAT)
READ  GET  INVMAST
  MVC  0(50,1),=CL50'UPDATED BY QSAM HAHA!'
  PUTX INVMAST
  B READ
EOF   CLOSE (INVMAST)
* HOUSEKEEPING
  L  13,SAVEAREA+4
  MVC16(4,13),RC
  RETURN (14,12)
* WORKING AREA
  LTORG
INVMAST   DCB DDNAME=INVMAST,  X
   DSORG=PS,   X
   RECFM=FB,   X
   LRECL=50,   X
   EODAD=EOF,  X
   MACRF=(GL,PM)
*
SAVEAREA  DS 18F
RCDC F'0'
   ENDQSAMUPD


Ah! You see: you said you were going to use Put Move
(MACRF=(GL,PM)), but you actually used Put Locate (or,
more precisely, PUTX Locate) because your PUTX only
has one operand. To use PUTX Move mode you need to
specify two operands: the DCB and location where the
record should be put from; so you used PUTX locate
mode even though you promised to use PUTX move mode;
so you got away with a little lie. The proper way is
to code MACRF=(GL,PL). Try it that way. It will work
and will be correct.




On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:




H. I'd have to see the program.




--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: Ways to update PS files?

2007-08-21 Thread Johnny Luo
Thanks, Steve. I'll fix my program as well as my notes right now.

I must say I always fear to deal with i/o because it's so complicated and
full of various parameters.

On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:



 Ah! You see: you said you were going to use Put Move
 (MACRF=(GL,PM)), but you actually used Put Locate (or,
 more precisely, PUTX Locate) because your PUTX only
 has one operand. To use PUTX Move mode you need to
 specify two operands: the DCB and location where the
 record should be put from; so you used PUTX locate
 mode even though you promised to use PUTX move mode;
 so you got away with a little lie. The proper way is
 to code MACRF=(GL,PL). Try it that way. It will work
 and will be correct.




-- 
Best Regards,
Johnny Luo

--
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: Ways to update PS files?

2007-08-21 Thread J R

I suspect that UPDAT is a special case and that, for PUTX, it may not
matter whether you specify MACRF=(GL,PL) or MACRF=(GL,PM).

In DFSMS Using Data Sets, p. 353, it refers to:
GET-locate, PUTX-update. Processed in an input buffer and returned to the 
same data set.


And, on p.355:
UPDAT mode. When a data set is opened with UPDAT specified (Figure 63), 
only GET-locate and PUTX-update are supported.


It seems to avoid using locate and move in the UPDAT context.




From: Steve Comstock [EMAIL PROTECTED]
Reply-To: IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Ways to update PS files?
Date: Tue, 21 Aug 2007 05:58:51 -0600

Johnny Luo wrote:

Steve,

I also believe it should be (GL,PM) after I checked my personal notes. I
remember clearly that I wrote a test program to verify that three months
ago. (On z/os 1.7)


H. I'd have to see the program.

From DFSMS Using Data Sets, p. 398:

When you update a data set in place, you read, process, and write records 
back to their original positions without destroying the remaining records 
on the track. The following rules apply:


 * You must specify the UPDAT option in the OPEN macro to update the data 
set. To perform the update, you can use only the READ, WRITE, CHECK, NOTE, 
and POINT macros or you use only GET and PUTX macros. To use PUTX, code 
MACRF=(GL,PL) on the DCB macro.


 * You cannot delete any record or change its length.
 * You cannot add new records.
 * The data set must be on a DASD.
 * You must rewrite blocks in the same order in which you read them.

And later, talking about updating PDSE members (p. 478):

You can update a member of a PDSE using the locate mode of QSAM (DCB 
specifies MACRF=(GL,PL)) and using the GET and PUTX macros.





On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:




Nope. MACRF=(GL,PL) is what it has to be.



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.


_
Find a local pizza place, movie theater, and more….then map the best route! 
http://maps.live.com/default.aspx?v=2ss=yp.bars~yp.pizza~yp.movie%20theatercp=42.358996~-71.056691style=rlvl=13tilt=-90dir=0alt=-1000scene=950607encType=1FORM=MGAC01


--
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: Ways to update PS files?

2007-08-21 Thread J R

Ah! You see: you said you were going to use Put Move
(MACRF=(GL,PM)), but you actually used Put Locate (or,
more precisely, PUTX Locate) because your PUTX only
has one operand. To use PUTX Move mode you need to
specify two operands: the DCB and location where the
record should be put from; so you used PUTX locate
mode even though you promised to use PUTX move mode;
so you got away with a little lie. The proper way is
to code MACRF=(GL,PL). Try it that way. It will work
and will be correct.


Actually, for PUTX, the optional second operand specifies
the input dcb address, not record/buffer address.  So, I
think this implies that there's no such thing as PUTX-MOVE
or PUTX-LOCATE.



From: Steve Comstock [EMAIL PROTECTED]
Reply-To: IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Ways to update PS files?
Date: Tue, 21 Aug 2007 07:08:42 -0600

Johnny Luo wrote:

Steve,

Here is my program:


~snippage~


Ah! You see: you said you were going to use Put Move
(MACRF=(GL,PM)), but you actually used Put Locate (or,
more precisely, PUTX Locate) because your PUTX only
has one operand. To use PUTX Move mode you need to
specify two operands: the DCB and location where the
record should be put from; so you used PUTX locate
mode even though you promised to use PUTX move mode;
so you got away with a little lie. The proper way is
to code MACRF=(GL,PL). Try it that way. It will work
and will be correct.




On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:




H. I'd have to see the program.




--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.


_
Now you can see trouble…before he arrives 
http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_protection_0507


--
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: Ways to update PS files?

2007-08-21 Thread Hunkeler Peter (KIUK 3)
Ah! You see: you said you were going to use Put Move
(MACRF=(GL,PM)), but you actually used Put Locate (or,
more precisely, PUTX Locate) because your PUTX only
has one operand. To use PUTX Move mode you need to
specify two operands: the DCB and location where the
record should be put from; so you used PUTX locate
mode even though you promised to use PUTX move mode;
so you got away with a little lie. The proper way is
to code MACRF=(GL,PL). Try it that way. It will work
and will be correct.

Sorry to contradict to some extent. While the outcome is 
as you describe, there is no PUTX-move-mode (according to 
the manual). The second, optional operand is the *input 
DCB address* to be used in the output mode. If it 
is omitted, PUTX assumes update mode. 

I consider this a special case of locate mode processing 
if you want to call it so, at all. The sequence of
locate mode PUT is a) set DCBLRECL b) call PUT and c) 
finally move the record to the address returned in b).

With PUTX, nothing is moved. PUTX continues with the
control blocks as left by the last GET. So conceptually, 
it is more like a GL,PM processing than it is a GL,PL 
processing, since no step c) has to be done after the
call to PUTX.

The manual is a bit fuzzy about PUTX, so I may have 
misinterpreted the tex myself ;-)


-- 
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: Ways to update PS files?

2007-08-21 Thread Graeme Gibson
I was amazed to see how many posters effectively said don't use this 
technique!


QSAM update-in-place is a very simple, easy-to-use and effective 
update technique that has been used in countless applications for 
goodness knows how many years.  Only the application programer will 
be aware when the technique has been used, there's nothing to tell 
sysprogs or operators that it's in use and absolutely no need for 
them to know.  One of it's strengths is the ability to have 
concurrent batch updating of a file that is also being used read-only 
by other programs, perhaps for online customer queries, the sort of 
thing that today you'd be using a fully-blown database for.


But my real point is that we need to get a grip on the primitive 
impulse to discard, deride and detour 'round the unfamiliar; that's 
the path back to anarchy and the dark ages.


Graeme.

--
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: Ways to update PS files?

2007-08-21 Thread David Andrews
On Wed, 2007-08-22 at 00:23 +1000, Graeme Gibson wrote:
 Only the application programer will be aware when
 [QSAM update-in-place] has been used, there's nothing
 to tell sysprogs or operators that it's in use and
 absolutely no need for them to know.

Unless the sysprog (me, in one unfortunate case) enabled compression.

-- 
David Andrews
A. Duda and Sons, Inc.
[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: Ways to update PS files?

2007-08-21 Thread Graeme Gibson

(ROFL) Yup, that's one I didn't think of!

At 01:28 AM 8/22/2007, you wrote:

On Wed, 2007-08-22 at 00:23 +1000, Graeme Gibson wrote:
 Only the application programer will be aware when
 [QSAM update-in-place] has been used, there's nothing
 to tell sysprogs or operators that it's in use and
 absolutely no need for them to know.

Unless the sysprog (me, in one unfortunate case) enabled compression.

--
David Andrews


--
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


Ways to update PS files?

2007-08-20 Thread Lindy Mayfield
Please forgive me for certain gaps in my knowledge as I've never even
considered this before (a colleague is asking).

Are there any standard ways that allow update of PS files?  Using
COBOL? I can't think of any off hand other than some proprietary access
methods that use EXCP.  Can EXECIO do it?  I can check on that...

Thanks, 
Lindy

--
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: Ways to update PS files?

2007-08-20 Thread john gilmore
There are straightforward ways to update [necessarily] DASD-resident PS 
datasets in assembly language using the NOTE and POINT macros (q.v.), but I 
am not aware that any statement-level procedural language supports these 
operations, and Enterprise COBOL certainly does not.  (An LE-compliant pair 
of COBOL-callable HLASM subroutines would of course be easy to write.)


John Gilmore
Ashland, MA 01721-1817
USA

_
Puzzles, trivia teasers, word scrambles and more. Play for your chance to 
win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink


--
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: Ways to update PS files?

2007-08-20 Thread Lizette Koehler
Lindy,

Do you have anything specific in mind?  Security issues, Change Control, or
something else.  Is this for production data or any data?

Basically, I think each shop determines how a data set can be updated based
on the requirements of that shop.  For one shop it might be that only batch
jobs that use program X will update production files.  Or it could be that
it is okay to use an interactive approach.

A PS (Physical Sequential) file can be updated any number of ways.  It will
depend on the application requirements.

IEBGENER, IEBCOPY, an in house developed program (COBOL, ASSEMBLER, Fortran,
REXX, CLIST, etc).  You can use ISPF EDIT or any other number of methods.

If you are talking a standardized change control process, it will depend on
what you are looking for.

You can have an ISPF application that will provide inputs for In-dataset and
Out-dataset and then it can build the JCL that will always work and always
be the same for all users.


Could you let me know a little more detail on what kind of standard you
are looking for?

Lizette


 
 Please forgive me for certain gaps in my knowledge as I've never even
 considered this before (a colleague is asking).
 
 Are there any standard ways that allow update of PS files?  Using
 COBOL? I can't think of any off hand other than some proprietary access
 methods that use EXCP.  Can EXECIO do it?  I can check on that...

--
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: Ways to update PS files?

2007-08-20 Thread Terry Sambrooks
Hi Lindy,

In response to:

Are there any standard ways that allow update of PS files?  Using
COBOL? I can't think of any off hand other than some proprietary access
methods that use EXCP.  Can EXECIO do it?  I can check on that...

Not withstanding the responses already published I was about to say that I
believe the traditional answer to your question is NO, when I decided to
check the Cobol Programmers guide to avoid the 'egg on face' syndrome. 

It states in the aforesaid manual that QSAM files (which embraces PS) can be
updated with records of the same size if the file is opened as I-O, and
REWRITE is used. The other caveat is that the data set must reside on disk.

This functionality corresponds nicely with EXECIO DISKRU/DISKW pairings used
in REXX.

I have not checked specifically but my guess would be that both Assembler
and PL/I would have the same functionality. 

Kind regards - Terry

Terry Sambrooks
Director
KMS-IT Limited
228 Abbeydale Road South
Dore, Sheffield, S17 3LA, UK

Tel: +44 (0)114 262 0933
WEB: www.legac-e.co.uk

Company Reg: 3767263 at the above address

All outgoing E-mail is scanned, but it remains the recipients responsibility
to ensure their system is protected from spy-ware, trojans, viruses, and
worms.

--
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: Ways to update PS files?

2007-08-20 Thread Don Poitras
In article [EMAIL PROTECTED] you wrote:
 There are straightforward ways to update [necessarily] DASD-resident PS 
 datasets in assembly language using the NOTE and POINT macros (q.v.), but I 
 am not aware that any statement-level procedural language supports these 
 operations, and Enterprise COBOL certainly does not.  (An LE-compliant pair 
 of COBOL-callable HLASM subroutines would of course be easy to write.)

 John Gilmore
 Ashland, MA 01721-1817
 USA

Both SAS/C and IBM C can update PS files if the recfm is FBS.

-- 
Don Poitras - SAS Development  -  SAS Institute Inc. - SAS Campus Drive
[EMAIL PROTECTED]   (919) 531-5637Cary, NC 27513

--
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: Ways to update PS files?

2007-08-20 Thread Steve Comstock

john gilmore wrote:
There are straightforward ways to update [necessarily] DASD-resident PS 
datasets in assembly language using the NOTE and POINT macros (q.v.), 
but I am not aware that any statement-level procedural language supports 
these operations, and Enterprise COBOL certainly does not.  (An 
LE-compliant pair of COBOL-callable HLASM subroutines would of course be 
easy to write.)


John Gilmore
Ashland, MA 01721-1817
USA


Assembler: use DCB MACRF=(GL,PL), open for UPDAT,
   issue GET, change data, issue PUTX

COBOL: open for I-O, issue READ, change data,
   issue REWRITE

DASD only.

Can also do for PL/I and, I believe, C.



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: ways to update PS files?

2007-08-20 Thread john gilmore
As usual, we have a lot of people posting comments about things they know 
little about.


NOTE and POINT, as reference to the current z/OS DFSMS Macro Instructions 
for Data Sets manual will confirm, are usable only with BSAM and BPAM.


Much depends upon what kinds of update processing are required, in 
particular upon whether non-sequential processing is required.


John Gilmore
Ashland, MA 01721-1817
USA

_
More photos, more messages, more storage—get 2GB with Windows Live Hotmail. 
http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_2G_0507


--
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: ways to update PS files?

2007-08-20 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of john gilmore
 Sent: Monday, August 20, 2007 8:30 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: ways to update PS files?
 
 
 As usual, we have a lot of people posting comments about 
 things they know 
 little about.
 
 NOTE and POINT, as reference to the current z/OS DFSMS Macro 
 Instructions 
 for Data Sets manual will confirm, are usable only with BSAM and BPAM.
 
 Much depends upon what kinds of update processing are required, in 
 particular upon whether non-sequential processing is required.
 
 John Gilmore

I think the simpliest answer to this question is just plain NO. Granted,
that technically it can be done, it is not something that your average
application programmer would want to try. If something needs to be
updated ad hoc, then I'd suggest AMASPZAP. If something needs to be
updated with any regularity, then I'd strongly suggest that an ESDS
would be simplier to do than a PS file. The only minus is that an ESDS
cannot be read as easily by an application as a PS file. Too bad IBM
didn't make a PS compatability interface so that an ESDS could be
read/written via a QSAM or BSAM DCB in addition to a DCB. I think that
this is possible in z/VSE's version of an ESDS (but I could easily be
wrong).

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
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: ways to update PS files?

2007-08-20 Thread Lindy Mayfield
Thanks all for the clarification.  This is a synopsis up what I learned,
which was sort of what I thought:

- Regular record oriented PS files can updated by basically opening
them for I/O and replacing a particular record.  They still have to be
sequentially scanned of course.  COBOL and EXECIO can both do this.

- A FBS PS dataset can be updated at any byte location (like an ESDS or
even LDS) using lower level routines provided by Assembler, IBM C and
SAS/C.  AMASPZAP could also be used.  If you write your own access
method you can even do random access I/O operations.

- Still, though, when you get down to it, it is still QSAM and
multi-user access (without some sort of higher level manager) would
solely depend on ENQ, which, if I'm not wrong, would be pretty lame.

- And finally, if it is an application programmer type asking, the
answer is just plain No.  (-:

Regards,
Lindy

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of john gilmore
Sent: 20. elokuuta 2007 16:30
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: ways to update PS files?

As usual, we have a lot of people posting comments about things they
know 
little about.

NOTE and POINT, as reference to the current z/OS DFSMS Macro
Instructions 
for Data Sets manual will confirm, are usable only with BSAM and BPAM.

Much depends upon what kinds of update processing are required, in 
particular upon whether non-sequential processing is required.

John Gilmore
Ashland, MA 01721-1817
USA

--
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: ways to update PS files?

2007-08-20 Thread Hunkeler Peter (KIUK 3)
- And finally, if it is an application programmer type asking, 
the answer is just plain No.  (-:

And from a production operations point of view, how would you
implement job restartability if the PS data set was being
updated in place? You can't unless you also implement check
pointing the updates.

It's probably safer and not too much slower (depending on data 
size) to apply the necessary changes while copying the data
set to a new instance. Simplifies restart a great deal.

-- 
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: ways to update PS files?

2007-08-20 Thread Hunkeler Peter (KIUK 3)
As usual, we have a lot of people posting comments about things 
they know little about.

What happened to you, John? This is the second post in this 
unfriendly manner in a short time. I thought this is a discussion
platform; in discussions you sometimes give wrong or incomplete
answers, don't you? I certainly do, be it because I misunderstood
the question, be it because my knowledge is inaccurate.

Regards
Peter Hunkeler

--
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: ways to update PS files?

2007-08-20 Thread Don Poitras
In article [EMAIL PROTECTED] you wrote:
  -Original Message-
  From: IBM Mainframe Discussion List 
  [mailto:[EMAIL PROTECTED] On Behalf Of john gilmore
  Sent: Monday, August 20, 2007 8:30 AM
  To: IBM-MAIN@BAMA.UA.EDU
  Subject: Re: ways to update PS files?
  
  
  As usual, we have a lot of people posting comments about 
  things they know 
  little about.
  
  NOTE and POINT, as reference to the current z/OS DFSMS Macro 
  Instructions 
  for Data Sets manual will confirm, are usable only with BSAM and BPAM.

Was someone insisting that QSAM be used?


  
  Much depends upon what kinds of update processing are required, in 
  particular upon whether non-sequential processing is required.
  
  John Gilmore

 I think the simpliest answer to this question is just plain NO. Granted,
 that technically it can be done, it is not something that your average
 application programmer would want to try. If something needs to be
 updated ad hoc, then I'd suggest AMASPZAP. If something needs to be
 updated with any regularity, then I'd strongly suggest that an ESDS
 would be simplier to do than a PS file. The only minus is that an ESDS
 cannot be read as easily by an application as a PS file. Too bad IBM
 didn't make a PS compatability interface so that an ESDS could be
 read/written via a QSAM or BSAM DCB in addition to a DCB. I think that
 this is possible in z/VSE's version of an ESDS (but I could easily be
 wrong).

If you can specify the RECFM of the dataset, then PS files are easy to
update and very fast. C programmers are used to using fseek, ftell and
so forth. I'm not sure if they consider themselves average, but I
doubt they look on themselves as rocket scientists.

 --
 John McKown
 Senior Systems Programmer
 HealthMarkets
 Keeping the Promise of Affordable Coverage
 Administrative Services Group
 Information Technology

-- 
Don Poitras - SAS Development  -  SAS Institute Inc. - SAS Campus Drive
[EMAIL PROTECTED]   (919) 531-5637Cary, NC 27513

--
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: ways to update PS files?

2007-08-20 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Don Poitras
 Sent: Monday, August 20, 2007 9:12 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: ways to update PS files?

snip
 
 If you can specify the RECFM of the dataset, then PS files are easy to
 update and very fast. C programmers are used to using fseek, ftell and
 so forth. I'm not sure if they consider themselves average, but I
 doubt they look on themselves as rocket scientists.
 

snip

 -- 
 Don Poitras - SAS Development  -  SAS Institute Inc. - SAS 

Hum, I keep forgetting that C programmers are becoming more prevalent on
z/OS. I was thinking of COBOL programmers. COBOL still doesn't have a
way to do the equivalent of ftell and fseek.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
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: ways to update PS files?

2007-08-20 Thread Steve Comstock

Lindy Mayfield wrote:

Thanks all for the clarification.  This is a synopsis up what I learned,
which was sort of what I thought:

- Regular record oriented PS files can updated by basically opening
them for I/O and replacing a particular record.  They still have to be
sequentially scanned of course.  COBOL and EXECIO can both do this.

- A FBS PS dataset can be updated at any byte location (like an ESDS or
even LDS) using lower level routines provided by Assembler, IBM C and
SAS/C.  AMASPZAP could also be used.  If you write your own access
method you can even do random access I/O operations.

- Still, though, when you get down to it, it is still QSAM and
multi-user access (without some sort of higher level manager) would
solely depend on ENQ, which, if I'm not wrong, would be pretty lame.

- And finally, if it is an application programmer type asking, the
answer is just plain No.  (-:


That's a terrible attitude! If the application calls for it,
why would you lie to the application programmer? Honestly,
systems programmers can sometimes be so arrogant!



Regards,
Lindy

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of john gilmore
Sent: 20. elokuuta 2007 16:30
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: ways to update PS files?

As usual, we have a lot of people posting comments about things they
know 
little about.


NOTE and POINT, as reference to the current z/OS DFSMS Macro
Instructions 
for Data Sets manual will confirm, are usable only with BSAM and BPAM.


And GET / PUTX only usable with QSAM. So what?



Much depends upon what kinds of update processing are required, in 
particular upon whether non-sequential processing is required.


John Gilmore
Ashland, MA 01721-1817
USA




--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: ways to update PS files?

2007-08-20 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Steve Comstock
 Sent: Monday, August 20, 2007 9:26 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: ways to update PS files?

snip

  - And finally, if it is an application programmer type asking, the
  answer is just plain No.  (-:
 
 That's a terrible attitude! If the application calls for it,
 why would you lie to the application programmer? Honestly,
 systems programmers can sometimes be so arrogant!
 

snip

 -- 
 
 Kind regards,
 
 -Steve Comstock

Arrogant, or realistic? I've had too many cases of applications people
trying things beyond their knowledge and ending up being saddled with
supporting their junk (not as much now since applications on z/OS is
basically told to be 100% COBOL or EasyTrieve). Now, you'd like argue
that means that the applications people need training. I would agree
with you 100% on that. But management generally would disagree. People
are, mostly, regarded as a disposable commodity anymore. If a person
doesn't know, or cannot self-educate, then that proves them to be
obsolete and in needing of replacement. I won't say more on this subject
as it is likely to lead to a flame war.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
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: ways to update PS files?

2007-08-20 Thread Lindy Mayfield
You forgot the smiley face, Steve.  (-:

I remember once writing an online ISPF/Rexx application that was mostly
single user but could have been used by 2 or 3, and I appended change
log records to a flat file.  That was a bit risky.  And once I did
something similar to write records to see who was using a particular
installation.  In the first instance I was young and risky, in the
second I was lazy because I new I only wanted a ball park figure and if
it dropped a record here and there it wouldn't matter.

Then again, in the first instance long ago I didn't have any Rexx
interface to DB2 or VSAM, and for readability I didn't want to use ISPF
tables.

To be honest, this question came to me from a young (experience wise)
MVS applications programmer, and I didn't want to just say don't do
that, I wanted to give him all the facts and let him decide.  Like the
Jeff Foxworthy where he talks about when he was little: So you wanna
put a penny in a light socket? Bzzzp. Heh heh, bet you won't do that
agin. 

Ciao,
Lindy

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Comstock
Sent: 20. elokuuta 2007 17:26
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: ways to update PS files?

Lindy Mayfield wrote:
 
 - And finally, if it is an application programmer type asking, the
 answer is just plain No.  (-:

That's a terrible attitude! If the application calls for it,
why would you lie to the application programmer? Honestly,
systems programmers can sometimes be so arrogant!

--
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: ways to update PS files?

2007-08-20 Thread Tom Marchant
On Mon, 20 Aug 2007 13:29:31 +, john gilmore wrote:

As usual, we have a lot of people posting comments about things they know
little about.

PKB

From the Enterprise COBOL Reference:

quote COBOL
 6.2.31 REWRITE statement

The REWRITE statement logically replaces an existing record in a direct-access 
file. When the REWRITE statement is executed, the associated direct-access 
file must be open in I-O mode.


 6.2.31.4 Sequential files

For files in the sequential access mode, the last prior input/output statement 
executed for this file must be a successfully executed READ statement. When 
the REWRITE statement is executed, the record retrieved by that READ 
statement is logically replaced.The number of character positions in record-
name-1 must equal the number of character positions in the record being 
replaced.

/quote COBOL

-- 
Tom Marchant

--
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: ways to update PS files?

2007-08-20 Thread Walt Farrell

On 8/20/2007 9:50 AM, Lindy Mayfield wrote:

Thanks all for the clarification.  This is a synopsis up what I learned,
which was sort of what I thought:
...snipped...
- Still, though, when you get down to it, it is still QSAM and
multi-user access (without some sort of higher level manager) would
solely depend on ENQ, which, if I'm not wrong, would be pretty lame.



I'm not sure what you mean by lame.

Properly used, ENQ will provide all that you need for data integrity. 
In order for two users (jobs) to have the data set allocated 
concurrently, they would have to specify DISP=SHR.  Anyone doing an 
update -should- instead specify DISP=OLD, which would prevent any problems.


If a single updater does specify DISP=SHR (perhaps to allow simultaneous 
reading) then it's not clear whether any readers would see the old or 
the new data.  On the other hand one usually can not predict whether the 
updater will update before or after someone reads the record, so I don't 
think that matters.


If two updaters try to run, specifying DISP=SHR, I believe that the 
second one to try the OPEN will get some flavor of S213 ABEND on any 
supported z/OS release.


--
Walt Farrell, CISSP
IBM STSM, z/OS Security Design

--
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


Changes in the wind? (was Re: ways to update PS files?)

2007-08-20 Thread Steve Comstock

McKown, John wrote:

[snip]


Arrogant, or realistic? I've had too many cases of applications people
trying things beyond their knowledge and ending up being saddled with
supporting their junk (not as much now since applications on z/OS is
basically told to be 100% COBOL or EasyTrieve). Now, you'd like argue
that means that the applications people need training. I would agree
with you 100% on that. 


Great.

But management generally would disagree. People

are, mostly, regarded as a disposable commodity anymore. If a person
doesn't know, or cannot self-educate, then that proves them to be
obsolete and in needing of replacement. 


Well, that has been evident over the last several years.
And frustrating for us and for all people in IT.

But we are beginning to see hints that may be changing.

Just last Friday, we had one email (from India) and two
phone calls (one from NJ, one from NC) inquiring about
training. Too soon to say if any work will result from
any of these, but we like to look at them as omens that
at least some management is beginning to realize that
formal, well-designed training is a quick, effective way
to upgrade their people's skills, and that those skills
indeed need updating.

If everyone outsources and uses the same software packages,
how can one firm promote any advantages over its competitors?
The companies themselves become commodities, competing solely
on price. The Wal-Mart mentality comes home to roost.

It's time to start differentiating one's company from the
pack based on quality and services as well as (or, better,
instead of) price. It's time to invest money and time in
people to provide the infrastructure for innovative and
competitive ways to attract and keep customers. Part of
the formula for this is a well-trained, well-motivated
work force.

And those of us in the trenches are not powerless. But
it takes courage to stand up to the common concensus
when we know it's not necessarily the best way to go.
But now's a good time to promote mainframe capabilities
in the face of Windows mindsets. Now's a good time to
learn what the mainframe can do, and to promote this.
If you use us, that's great. If you do self-learning:
that's great too. If you use our competitors, that's,
well, not bad. (g).

--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: ways to update PS files?

2007-08-20 Thread Lindy Mayfield
I should have been more thoughtful and said:  Sometimes problematic,
sometimes adding an extra layer of complexity, sometimes simplifying the
situation.

Problematic as John pointed out batch jobs that need to regularly update
the same file and constantly running into each other and restart
problems.

Extra complexity as for example a Rexx online-ish program that has to
keep trying to ENQ the dataset and implement X number of tries or Y
amount of time to keep trying before it gives up.

Simplification as in batch job A that has it old and batch job B that is
run unscheduled and either goes down or waits for resources.  (Not sure
what system parameter governs that, though.)

Anyway, thanks Walt, as it is obvious there are aspects of ENQ and data
integrity that I need to know better.  I'm glad I asked. (-:

Lindy

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Walt Farrell
Sent: 20. elokuuta 2007 18:44
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: ways to update PS files?

On 8/20/2007 9:50 AM, Lindy Mayfield wrote:
 Thanks all for the clarification.  This is a synopsis up what I
learned,
 which was sort of what I thought:
 ...snipped...
 - Still, though, when you get down to it, it is still QSAM and
 multi-user access (without some sort of higher level manager) would
 solely depend on ENQ, which, if I'm not wrong, would be pretty lame.
 

I'm not sure what you mean by lame.

Properly used, ENQ will provide all that you need for data integrity. 
In order for two users (jobs) to have the data set allocated 
concurrently, they would have to specify DISP=SHR.  Anyone doing an 
update -should- instead specify DISP=OLD, which would prevent any
problems.

If a single updater does specify DISP=SHR (perhaps to allow simultaneous

reading) then it's not clear whether any readers would see the old or 
the new data.  On the other hand one usually can not predict whether the

updater will update before or after someone reads the record, so I don't

think that matters.

If two updaters try to run, specifying DISP=SHR, I believe that the 
second one to try the OPEN will get some flavor of S213 ABEND on any 
supported z/OS release.

-- 
Walt Farrell, CISSP
IBM STSM, z/OS Security Design

--
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: ways to update PS files?

2007-08-20 Thread Rick Fochtman

-snip-
NOTE and POINT, as reference to the current z/OS DFSMS MacroInstructions 
for Data Sets manual will confirm, are usable only with BSAM and BPAM.


And GET / PUTX only usable with QSAM. So what?

Much depends upon what kinds of update processing are required, in 
particular upon whether non-sequential processing is required.

unsnip---
With BSAM, in Assembler, you would READ a block. After scanning through 
and determining that update is required, just issue a WRITE on the 
block, using the same DECB that was used to READ it. Don't forget to do 
a CHECK after each READ or WRITE. NOTE and POINT are not needed; OPEN 
for UPDAT will set appropriate flags for address reuse, etc.


With QSAM, In Assembler, issue GET (Locate mode); when a record that 
requires update is required, do the update then issue PUTX(Move mode).


In PL/1, OPEN the FILE for UPDATE, use sequential READ to locate records 
to be updated. As each record is updated, use REWRITE to update the record.


I have no idea of the constructs for other languages. Which one you use 
depends on your requirements and staff capabilities.


--
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: Ways to update PS files?

2007-08-20 Thread Rick Fochtman

--snip-


john gilmore wrote:

There are straightforward ways to update [necessarily] DASD-resident 
PS datasets in assembly language using the NOTE and POINT macros 
(q.v.), but I am not aware that any statement-level procedural 
language supports these operations, and Enterprise COBOL certainly 
does not.  (An LE-compliant pair of COBOL-callable HLASM subroutines 
would of course be easy to write.)


John Gilmore
Ashland, MA 01721-1817
USA



Assembler: use DCB MACRF=(GL,PL), open for UPDAT,
   issue GET, change data, issue PUTX

COBOL: open for I-O, issue READ, change data,
   issue REWRITE

DASD only.

Can also do for PL/I and, I believe, C.


unsnip--
Steve, I believe it MACRF=(GL,PM) for PUTX, isn't 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: Ways to update PS files?

2007-08-20 Thread Steve Comstock

Rick Fochtman wrote:

--snip-


john gilmore wrote:

There are straightforward ways to update [necessarily] DASD-resident 
PS datasets in assembly language using the NOTE and POINT macros 
(q.v.), but I am not aware that any statement-level procedural 
language supports these operations, and Enterprise COBOL certainly 
does not.  (An LE-compliant pair of COBOL-callable HLASM subroutines 
would of course be easy to write.)


John Gilmore
Ashland, MA 01721-1817
USA




Assembler: use DCB MACRF=(GL,PL), open for UPDAT,
   issue GET, change data, issue PUTX

COBOL: open for I-O, issue READ, change data,
   issue REWRITE

DASD only.

Can also do for PL/I and, I believe, C.



unsnip--
Steve, I believe it MACRF=(GL,PM) for PUTX, isn't it?


Nope. MACRF=(GL,PL) is what it has to be.


--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

--
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: Ways to update PS files?

2007-08-20 Thread Johnny Luo
Steve,

I also believe it should be (GL,PM) after I checked my personal notes. I
remember clearly that I wrote a test program to verify that three months
ago. (On z/os 1.7)


On 8/21/07, Steve Comstock [EMAIL PROTECTED] wrote:



 Nope. MACRF=(GL,PL) is what it has to be.



-- 
Best Regards,
Johnny Luo

--
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