MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Updaing the File thru JCL
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Fri Mar 07, 2003 1:08 am    Post subject: Reply with quote

Rajeev,

Try this job.

Code:

//STEP100 EXEC PGM=SORT               
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=YOUR ESDS VSAM FILE,
//           DISP=SHR
//T1      DD DSN=&T1,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(X,Y),RLSE)
//T2      DD DSN=&T2,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(X,Y),RLSE)
//T3      DD DSN=&T3,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(X,Y),RLSE)
//SYSIN   DD *
  INREC FIELDS=(1,7822,SEQNUM,8,ZD)
  SORT FIELDS=COPY
  OUTFIL FNAMES=T1,INCLUDE=(753,1,CH,EQ,C' '),
  OUTREC=(1,752,754,7069,X,7823,8)
  OUTFIL FNAMES=T2,INCLUDE=(755,1,CH,EQ,C' '),
  OUTREC=(1,754,756,7067,X,7823,8)
  OUTFIL FNAMES=T3,SAVE
//*
//STEP200 EXEC PGM=SORT               
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=&T1,DISP=OLD
//        DD DSN=&T2,DISP=OLD
//        DD DSN=&T3,DISP=OLD
//SORTOUT DD DSN=YOUR UPDATED ESDS FILE,
//           DISP=(NEW,CATLG,DELETE),
//           UNIT=SYSDA,
//           SPACE=(CYL,(X,Y),RLSE)
//SYSIN   DD *
  SORT FIELDS=(7823,8,ZD,A)
  OUTREC FIELDS=(1,7822)
/*



Hope this helps....

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rajeevvasudevan
Beginner


Joined: 03 Dec 2002
Posts: 13
Topics: 3

PostPosted: Fri Mar 07, 2003 8:33 am    Post subject: Reply with quote

Kolusu,

Thanks for the quick response
But still I am not getting the desired Results..

752 753 754 755 --- 7822
---- ---- ---- ---- -----
K - P
P - P
O N


The O/p file Should be like this

752 753 754 755 ---7822
---- ---- ---- ---- -----
K P
P P
O N


Could U pls also explain in the control card why 7069,x is used 1,752,754,7069,X,7823,8

Thanks!!
Rajeev
    [img][/img]
    Back to top
    View user's profile Send private message Send e-mail
    kolusu
    Site Admin
    Site Admin


    Joined: 26 Nov 2002
    Posts: 12370
    Topics: 75
    Location: San Jose

    PostPosted: Fri Mar 07, 2003 10:09 am    Post subject: Reply with quote

    Rajeev,

    Code:

    OUTREC=(1,752,          $ COPY THE FIRST 752 AS IS FROM INPUT
            754,7069,       $ COPY THE REST OF RECORD FROM 754 TO END
            X,              $ PUT A SPACE AT THE END FOR THE SKIPPED 753 BYTE
            7823,8)         $ SEQNUM


    The same thing applies for the other ouput file T2 also.
    Back to top
    View user's profile Send private message Send e-mail Visit poster's website
    Rajeevvasudevan
    Beginner


    Joined: 03 Dec 2002
    Posts: 13
    Topics: 3

    PostPosted: Sat Mar 08, 2003 6:06 am    Post subject: Reply with quote

    Kolsu,

    Thanks for giving me this nice solution.

    Rajeev
    Back to top
    View user's profile Send private message Send e-mail
    Rajeevvasudevan
    Beginner


    Joined: 03 Dec 2002
    Posts: 13
    Topics: 3

    PostPosted: Mon Mar 10, 2003 7:04 am    Post subject: Reply with quote

    Hi Kolsu,

    Sorry for asking on this topic. How can u update the ESDS File with this sequential File thru the job??
    I tried using IDCAMS the records are gettting added at the end of the file..

    Thanks!!
    RajeeV
    Back to top
    View user's profile Send private message Send e-mail
    CaptBill
    Beginner


    Joined: 02 Dec 2002
    Posts: 100
    Topics: 2
    Location: Pasadena, California, USA

    PostPosted: Mon Mar 10, 2003 12:14 pm    Post subject: Reply with quote

    Rajeevvasudevan, the name ESDS means Entry Sequenced Data Set. Thus it is proper that additions to the file are added at the end of the file.
    Back to top
    View user's profile Send private message Send e-mail Visit poster's website
    Display posts from previous:   
    Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
    Goto page Previous  1, 2
    Page 2 of 2

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum


    MVSFORUMS
    Powered by phpBB © 2001, 2005 phpBB Group