JCL to Sort using In-Stream Data



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

JCL to Sort using In-Stream Data

Postby Sunitha.P » Thu Jun 05, 2008 2:43 pm

Hi...
I need a JCL which sorts data . I want the JCL to perform the SORT function using in-stream data. I dont want to use a COBOL prgm for this. Can anyone pls post a working-JCL to sort ...
Sunitha.P
 
Posts: 6
Joined: Thu May 29, 2008 3:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Sort using In-Stream Data

Postby jayind » Thu Jun 05, 2008 3:38 pm

I dont have Mainframe access at this moment and hence could not try... hope the following code helps you..

//STEP1   EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
data1vvvmmmmdddd
data2kkkkuuuuuubbb
data3iii4i444400kkki
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
* Sort descending on first 5 bytes of input stream,
   SORT FIELDS=(1,5,CH,D)
/*


let me know the result.
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Sort using In-Stream Data

Postby Sunitha.P » Thu Jun 05, 2008 4:39 pm

//UADT006C JOB NOTIFY=&SYSUID,REGION=0M           
//STEP1 EXEC PGM=IEFBR14                           
//SYSOUT DD SYSOUT=*                               
//SORTIN DD *                                     
DATA1VVVMMMMDDDD                                   
DATA2KKKKUUUUUUBBB                                 
DATA3III4I444400KKKI                               
/*                                                 
SYSIN DD*                                         
SORT FIELDS=(1,5,CH,D)                             
/*     


This is what i have written from ur code. Its not identifying the job at all.. Its not recognizing it as a JCL. Wen i try to submit it, It is asking me to Enter JobName Character(s)..Whats the fault with what i have written ?
Sunitha.P
 
Posts: 6
Joined: Thu May 29, 2008 3:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Sort using In-Stream Data

Postby jayind » Thu Jun 05, 2008 5:17 pm

Hello,

Few mistakes in your JCL..

Take the job card from an existing TEST JCLs in your system to avoid mistakes...

Please cross verify your JCL with the sample JCL step i have given and make sure there are no mistakes.. it will work..
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Sort using In-Stream Data

Postby Sunitha.P » Thu Jun 05, 2008 5:39 pm

jayind wrote:Hello,
Take the job card from an existing TEST JCLs in your system to avoid mistakes.....


I dint understand this statement... :?
Sunitha.P
 
Posts: 6
Joined: Thu May 29, 2008 3:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to Sort using In-Stream Data

Postby dick scherrer » Thu Jun 05, 2008 6:15 pm

Hello Sunitha.P and welcome to the forums,

A major problem with your jcl is that you changed the exec to IEFBR14. I do not understand the change, but IEFBR14 will not sort data - it does not execute any processing code (it merely ends). You need to change so that your jcl uses your sort product.

If you do not know how sort is invoked on your system, ask one of your peers or the system support people. You should ask thos people for a "standard" job card (as was already mentioned).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: JCL to Sort using In-Stream Data

Postby Sarfraz S » Sun Jun 29, 2008 10:08 pm

Hello Sunitha,
You can also use EXEC PGM=SORT..... As for the "Enter jobnames" issue, it will be because the jcl was not prepared properly. You could have missed few steps.... And though this Enter jobnames comes up, jus type in something and enter, your job will be processed and you will get the required output, unless there is any abend or MAXCC > 4. If u dont want to see the Enter jobnames intimation, I suggest that you recheck you r job card and steplib.
Sarfraz S
 
Posts: 4
Joined: Sat Jun 28, 2008 2:31 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post