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
 

 

How to Change File Manager Utility with SORT utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to Change File Manager Utility with SORT utility
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

Moderator Team Head


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

PostPosted: Wed Aug 11, 2010 5:49 pm    Post subject: Reply to: How to Change File Manager Utility with SORT utili
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    Post subject:
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    Post subject: Reply to: How to Change File Manager Utility with SORT utili
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    Post subject: Reply to: How to Change File Manager Utility with SORT utili
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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