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
 

 

Problem facing in sort step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Problem facing in sort step
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    Post subject:
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    Post subject: Re: Problem facing in sort step
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    Post subject: Re: Problem facing in sort step
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    Post subject: Re: Problem facing in sort step
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    Post subject:
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    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 Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm


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