Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Disp=mod to append data in the file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Disp=mod to append data in the file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Mar 21, 2008 12:23 pm    Post subject: Reply to: disp=mod
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Mar 21, 2008 12:40 pm    Post subject: Reply to: disp=mod
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    Post subject:
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    Post subject: Re: Disp=mod to append data in the file
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Mar 21, 2008 6:28 pm    Post subject: Reply to: Disp=mod to append data in the file
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat Mar 22, 2008 2:12 am    Post subject:
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    Post subject: disp=mod
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    Post subject: Reply to: Disp=mod to append data in the file
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us