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 

Help regarding sort card

 
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
Veera333
Beginner


Joined: 16 Jul 2010
Posts: 7
Topics: 5

PostPosted: Sun Dec 05, 2010 12:57 am    Post subject: Help regarding sort card Reply with quote

Hi,

I have a requirement as follows

I have a file with Columns: Name,Designation, Band

I have to extract all the records with designation as 'Engineer'

Then If band is 'E' i have populate 10 after Band field else i have to populate 0 (conditional population)

Please suggest me a sort card/Icetool for this requirement.

Thanks in advance,
Veera
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sun Dec 05, 2010 9:55 am    Post subject: Reply with quote

1 - why not post in the SORT section?
2 -What is the layout of your input record, column start/end of your fields and datatype of your fields? By the way, input records have fields not columns, or is your input a DB2 table?
3 - What is the layout of your output record?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Dec 05, 2010 3:20 pm    Post subject: Reply with quote

Veera333,

As Nic Pointed out, you need to provide more details. Here is a untested DFSORT JCL which will give you the desired results.

I assumed the name is 20 bytes and designation is 10 bytes and band is 1 byte and the update of the level is at position 35

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
----+----1----+----2----+----3----+----4----+----5----+----6-
VEERA FIRSTNAME     ENGINEER  E                             
BLAH BLAH           ENGINEER  A                             
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INCLUDE COND=(21,8,CH,EQ,C'ENGINEER')                     
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(35:C'00')),               
  IFTHEN=(WHEN=(31,1,CH,EQ,C'E'),OVERLAY=(35:C'10'))         
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
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
Page 1 of 1

 
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