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
 

 

Reverse Copy of GDG versions in one Flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Tue Aug 02, 2005 4:50 pm    Post subject: Reverse Copy of GDG versions in one Flat file
Reply with quote

I have taken dump of GDG by using base into flat file using IEBGENER
utility. In flat file it is copying the latest version first and the old
versions next. But I want to copy them in reverse order. i.e. old version
first and latest version next. Here is example of the problem

Input GDG:
First version:
10
20
30
40

Second version:
11
21
41

Third version
23
33

If I copy the GDG by using base the output file looks like this
Output file (flat file)
23
33
11
21
41
10
20
30
40


But I want to copy them in reverse order. i.e. the output should look like
this
10
20
30
40
11
21
41
23
33

guyz..pls advise....
Back to top
View user's profile Send private message

shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Tue Aug 02, 2005 5:27 pm    Post subject: Re: Reverse Copy of GDG versions in one Flat file
Reply with quote

Sorry hav this below

See below for the JCL's

JOB 1
Code:

//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD DSN=&&L,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
LISTCAT ENT('GDG BASE HERE') NAME
//*
//***************************************************************
//STEP020 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&L,DISP=(OLD,DELETE)
//TMP DD DSN=&&T,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE),RECFM=FB
//CARD DD DSN=&&CARD,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TOOL DD DSN=&&TOOL,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//DD DD DSN=&&DD,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//INPUT DD DSN=&&INPUT,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(TMP) USING(CTL2)
//CTL1CNTL DD *
OUTFIL FNAMES=TMP,CONVERT,OUTREC=(6,80)
//CTL2CNTL DD *
INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')
OUTFIL FNAMES=DD,
OUTREC=(C'//',10X,
C'DD',X,
C'DSN=',17,27,
C',DISP=SHR',
26X)
/*
//*
//STEP030 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&DD,DISP=(OLD,DELETE)
//OUT1 DD DSN=OUTFILE1(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=78,RECFM=FB,BLKSIZE=0)
//OUT2 DD DSN=OUTFILE2(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=78,RECFM=FB,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,ENDREC=1,OUTREC=(C'//SORTIN',4X,13,66)
OUTFIL FNAMES=OUT2,SAVE
/*
//*
//STEP040 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=OUTFILE1(+1),DISP=SHR
// DD DSN=OUTFILE2(+1),DISP=SHR
//SORTOUT DD DSN=MYPDS(SORTSYS),DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
/*
//*


JOB 2
Code:

//MYLIB JCLLIB ORDER=(MYPDS)
//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTINF INCLUDE MEMBER=SORTSYS
//SORTOUT DD DSN=OUTFILE3(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
SORT FIELDS=COPY
/*
Back to top
View user's profile Send private message
poolarajesh

New User


Joined: 22 Jan 2004
Posts: 4

PostPosted: Tue Aug 02, 2005 5:48 pm    Post subject: Re: Reverse Copy of GDG versions in one Flat file
Reply with quote

In our project we don't have ICETOOL. Can anyone suggest me other way of solving this problem.

Rajesh P
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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