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

How to Change File Manager Utility with SORT utility


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Wed Aug 11, 2010 5:36 pm
Reply with quote

Hi,
I need to change File Manager utility to SORT utility.
File Manager utility have the parameter written in SYSIN is of REXX language. Below is the SYSIN parameter which i need to convert it to SORT CARD.

Code:

$$FILEM SET  PAD=' '                             
$$FILEM DSG OUTPUT=DD01O,NLRECS=0                 
$$FILEM DSC  INPUT=DD01,                         
$$FILEM      OUTPUT=DDDUMMY,                     
$$FILEM      PROC=*                               
 IF FLD(113,5,P) \= '000000000'                   
 THEN DO                                         
 IF FLD(70,1) == 'R',                             
  | FLD(70,1) == 'U'                             
 THEN DO                                         
 IF FLD(193,5) = '00050',                         
   | FLD(193,5) = '04513',                       
   | FLD(193,5) = '04516',                       
   | FLD(193,5) = '04526',                       
   | FLD(193,5) = '08473',                       
   | FLD(193,5) = '08455',                       
   | FLD(193,5) = '00075',                       
   | FLD(193,5) = '04530',             
   | FLD(193,5) = '04522',             
   | FLD(193,5) = '04515',             
   | FLD(193,5) = '08015',             
   | FLD(193,5) = '08045',             
   | FLD(193,5) = '08043'               
 THEN DO                               
   SET_OLEN(0)                         
   OVLY_OUT('PCOSITM ',1,8)             
   FLD_OUT(241,7,10)                   
   FLD_OUT(193,7,20)                   
   FLD_OUT(71,10,30)                   
   FLD_OUT(70,1,50)                     
   FLD_OUT(113,5,60)                   
   WRITE(DD01O)                         
 END                                   
 END                                   
 END                                   
 RETURN DROP 
/+           


Can anyone pls provide me the SORT CARD written in SYSIN which will give the same results,.. i tried but i m not getting anything.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Aug 11, 2010 5:49 pm
Reply with quote

Ashutosh, I know nothing about File Manager, but logically it looks like it's just an INCLUDE statements on the input side with some nested AND's and OR's, and an OUTREC or BUILD statement to format the output. Nothing really tricky, IMHO. Maybe you could post what you tried...

Does IF FLD(113,5,P) \= '000000000' mean a packed-decimal field, position 135 for a length of 5, that's not equal to zero?
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Wed Aug 11, 2010 6:45 pm
Reply with quote

Ya i know what u said but i have doubt on below statements

THEN DO
SET_OLEN(0)
OVLY_OUT('PCOSITM ',1,8)
FLD_OUT(241,7,10)
FLD_OUT(193,7,20)
FLD_OUT(71,10,30)
FLD_OUT(70,1,50)
FLD_OUT(113,5,60)
WRITE(DD01O)

how this will be converted in SORT CARD?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Aug 11, 2010 10:54 pm
Reply with quote

apandey,

Here is the DFSORT equivalent job of File manager.
Code:

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=your input file,DISP=SHR
//SORTOUT  DD SYSOUT=*   
//SYSIN DD *
  SORT FIELDS=COPY                                                     
  INCLUDE COND=(113,5,PD,NE,0,AND,                                     
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
                070,1,SS,EQ,C'R,U',AND,                                 
                193,5,SS,EQ,C'00050,04513,04516,04526,08473,08455,0075,*
                              04530,04522,04515,08015,08045,08043')     
  INREC BUILD=(01:C'PCOSITM ',                                         
               10:241,7,                                               
               20:193,7,                                               
               30:071,10,                                               
               50:070,1,                                               
               60:113,5)                                               
//*
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Thu Aug 12, 2010 2:16 pm
Reply with quote

Thanks a lot my friend.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top