IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Disp=mod to append data in the file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
P.RAJESH
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Fri Mar 21, 2008 12:22 pm
Reply with quote

hi,

//P111 EXEC PGM=ICEGENER,COND=(4,LT)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=OLD,DSN=TSCH088.CYAD010.SQL
//SYSUT2 DD DSN=TSCH088.BCH.IF.TEST6,DISP=MOD

I want the data inside TSCH088.CYAD010.SQL ps come at start not to append to TSCH088.BCH.IF.TEST6.

please hlep me...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 21, 2008 12:23 pm
Reply with quote

do not use "disp=mod"

check the manuals

jcl reference
jcl guide

from the manuals link at top of the page
Back to top
View user's profile Send private message
P.RAJESH
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Fri Mar 21, 2008 12:36 pm
Reply with quote

i got my requirement by using GDG'S but now don't wnat to use GDG'S

they need it by using flat files.

i tried with disp=shr,old,pass etc.. but i didn't achieve the result.

please suggest me which dis position i can use.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 21, 2008 12:40 pm
Reply with quote

GDG' s are flat files

just the allocation preamble is different, generating funny looking names

SHR,OLD,NEW will yield the desired result, once You abide to the allocation rules[/b]
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Fri Mar 21, 2008 2:57 pm
Reply with quote

i you want to get the data to be at the top and not at the bottom, then you should not use DISP=MOD as it will append the data at the bottom only.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Mar 21, 2008 6:12 pm
Reply with quote

[quote="P.RAJESH"]I want the data inside TSCH088.CYAD010.SQL ps come at start not to append to TSCH088.BCH.IF.TEST6.
quote]Do you want to keep the existing data in TSCH088.BCH.IF.TEST6 and put the new records at the front?? This cannot be done using JCL disposition. You can create a workfile and then copy the workfile and old file together in the desired sequence.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Mar 21, 2008 6:14 pm
Reply with quote

Enrico,

Please don't shout and screech (I guess that's what the bolding does). icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 21, 2008 6:28 pm
Reply with quote

Hi Jack

that was not shouting and screeching...
it was a desperate rant

I was trying to make a point about everybody considering GDG as something different
from normal datasets as far as I/O is concerned

and thinking that the program might behave differently when reading/writing a gdg dataset
instead of a non GDG PS dataset

It was not a personal shout ( I do know what bolding and character size means )
but rather speak to one so that many might listen and understand and learn
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Mar 21, 2008 11:01 pm
Reply with quote

Hi p.rajesh,

Please check with the following code for your requirement.
Code:
//P111 EXEC PGM=ICEGENER,COND=(4,LT)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TSCH088.CYAD010.SQL,DISP=SHR
//       DD DSN=TSCH088.BCH.IF.TEST6,DISP=SHR
//SYSUT2 DD DSN=TSCH088.BCH.IF.TEST6,DISP=SHR

Thanks,
Shankar
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Mar 22, 2008 1:29 am
Reply with quote

Only kidding, Enrico. I like shouting; I'm hard of seeing. icon_smile.gif
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Sat Mar 22, 2008 2:04 am
Reply with quote

PLEASE DO NOT use the JCL suggested by shankar and write into your same input file! If you're foolhardy, you can do this with a SORT where all input I/O completes prior to any output I/O. ICEGENER, however, will corrupt your file because it reads and writes at the same time.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 22, 2008 2:12 am
Reply with quote

Hello,

To add a bit to Bill's excellent point - it is a very bad practice to write over the input data in a step.

If there are any problems, the data is most likely destroyed and creates even more of a problem. The input needs to be re-created in addition to resolving the original problem.
Back to top
View user's profile Send private message
P.RAJESH
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Tue Mar 25, 2008 1:41 pm
Reply with quote

Hi all,

Thank you very much for all your valuable suggestions.


Thanks & Rgd's
rajesh
Back to top
View user's profile Send private message
mk_kumar315

New User


Joined: 21 Nov 2005
Posts: 10

PostPosted: Wed Mar 26, 2008 4:47 pm
Reply with quote

Hi,

I think we can concatenate the 2 files into TEMP. file and then loading the second file from the data of TEMP file.

Pls let me know if my assumption is wrong.

Thanks,
Kumar.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top