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.
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
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?