View previous topic :: View next topic
|
Author |
Message |
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
do not use "disp=mod"
check the manuals
jcl reference
jcl guide
from the manuals link at top of the page |
|
Back to top |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
[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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Enrico,
Please don't shout and screech (I guess that's what the bolding does). |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Only kidding, Enrico. I like shouting; I'm hard of seeing. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
Hi all,
Thank you very much for all your valuable suggestions.
Thanks & Rgd's
rajesh |
|
Back to top |
|
|
mk_kumar315
New User
Joined: 21 Nov 2005 Posts: 10
|
|
|
|
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 |
|
|
|