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

Problem facing in sort step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu May 26, 2005 12:33 pm
Reply with quote

Hi,
I am executing a step in my JCL. The program is in assembler & IMS. There is one internal sort in the program. Previously temporary files are used for that purpose. That is program is creating the file and sort it. After that a FTP step, which will FTP the sorted file to a server.
My requirement is to create the file as GDG. But i am getting JCL error.
The JCL is as following:
Code:

//STEP1 EXEC PGM=DFSRRC00,                               
//          PARM=&CAPARM                                     
//STEPLIB   DD DSN=
//         DD DSN=IMSMAT1.RESLIB,DISP=SHR                     
//         DD DSN=IMSMAT1.APPL.RESLIB,DISP=SHR               
//         DD DSN=IMSMAT1.SYSTEM.RESLIB,DISP=SHR             
//IMS      DD DISP=SHR,DSN=
//         DD DSN=IMSMAT1.DBDLIB,DISP=SHR                     
//         DD DSN=IMSMAT1.PSBLIB,DISP=SHR                     
//DFSVSAMP DD DSN=TEST.APPLIB.PROCCARD
//               (ABMVSAM4),DISP=SHR     
//IEFRDER   DD DCB=(TRTCH=NOCOMP,RECFM=VB,                   
//             LRECL=10236,BLKSIZE=16000),                   
//             DISP=(,PASS,),                                 
//             DSN=&&TESTLOG,                                 
//             UNIT=TAPE,                                     
//             VOL=(,RETAIN,,10)                             
//IEFRDER2 DD DUMMY                                       
//DFSRESLB DD DSN=IMSMAT1.RESLIB,DISP=SHR                 
//SYSOUT   DD SYSOUT=T                                     
//SYSUDUMP DD SYSOUT=T                                     
//INFILE   DD DISP=SHR,DSN=TEST.FILE.HIST2               
//INFILE1   DD DISP=SHR,DSN=TEST.FILE1.G0198.CYC 
//INFILE2   DD DISP=SHR,DSN=TEST.ABA01V.HIST3               
//INFILE3  DD DISP=SHR,DSN=TEST.ABA01V.REVMON             
[b]//OUTFILE  DD DSN=TEST.OUT.FILE(+1),                              [/b]
//             DISP=(NEW,CATLG,DELETE),                           
//             DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//             UNIT=DISK,                                 
//             SPACE=(CYL,(5,1),RLSE)                     
[b]//SORTIN   DD DISP=SHR,DSN=TEST.OUT.FILE(+1)[/b]
//SORTOUT  DD DSN=&&TEMSORT,                               
//            DISP=(,PASS),                               
//            DCB=(RECFM=FB,LRECL=296,BLKSIZE=8880,BUFNO=2)


But when i am giving the GDG in the sortin step, it shows JCL error, Disp parameter is invalid. How can i solve that problem.
Back to top
View user's profile Send private message
avalanches

New User


Joined: 10 May 2005
Posts: 28

PostPosted: Thu May 26, 2005 12:39 pm
Reply with quote

Just curious if you have tried changing the DISP parameter to OLD. I guess that could solve your problem.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu May 26, 2005 1:27 pm
Reply with quote

Hi,
I have tried it. But old is also not taken.
Back to top
View user's profile Send private message
SteveConway

New User


Joined: 26 May 2005
Posts: 28
Location: Northern VA, USA

PostPosted: Thu May 26, 2005 6:20 pm
Reply with quote

You can not create a +1 GDG in a job step and reference it in the same step with a different DD.
Here's a workaround. Create the dataset as a standard sequential file, DISP=(NEW,CATLG,DELETE).
Code:

//OUTFILE  DD DSN=TEST.OUT.TEMP,
//            DISP=(NEW,CATLG,DELETE),                           
//            DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//            UNIT=DISK,                                 
//            SPACE=(CYL,(5,1),RLSE)                     
//SORTIN   DD DISP=SHR,DSN=TEST.OUT.TEMP


Add an IEBGENER step following your current step to make the GDG.
Code:

//CRE8GDG  PGM=IEBGENER
//*
//SYSPRINT  DD SYSOUT=*
//SYSUT1    DD DISP=SHR,DSN=TEST.OUT.TEMP
//SYSUT2    DD DSN=TEST.OUT.FILE(+1),
//             DISP=(NEW,CATLG,DELETE),                           
//             DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//             UNIT=DISK,                                 
//             SPACE=(CYL,(5,1),RLSE)                     
//SYSIN     DD DUMMY


Cheers,,,Steve
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu May 26, 2005 9:17 pm
Reply with quote

Hi,
Thanks a lot Steve.
Back to top
View user's profile Send private message
SteveConway

New User


Joined: 26 May 2005
Posts: 28
Location: Northern VA, USA

PostPosted: Thu May 26, 2005 9:51 pm
Reply with quote

You're welcome.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top