connect to as-400 system

it's possible connect to as-400 system to extract file from server and calculate the data (parse the file)????

if possible , how make the operation ???

how shell language /type i use ???

tanks