On Mon, Sep 8, 2014 at 8:46 AM, Werner Kuehnel
<[email protected]> wrote:
> It's not my creation, it was delivered by a bank for a test. Thanks for
> your suggestions, but if there are no standard ftp commands I refuse to
> work with that file.
> Anyway, I tested your way and it almost worked, Unfortunately there are
> packed fields in the records containing x'15' which are not a line end.

Yuck! You're definitely looking at using a REXX program for this. I
don't know the bank attitude in Germany. But I've had a number of
large banks basically tell me: "This is what we are going to give you.
No discussion, just deal with it."

>
> Thanks,
> Werner
>

Possible REXX program:

/* rexx */
data=''
CRLF='0D25'X
do forever
   "execio 1 diskr sysut1"
   if rc <> 0 then leave
   parse pull record
   data=data||record
   i=pos(CRLF,data)
   do while i <> 0;
      output=left(data,i-1);
      queue output
      "execio 1 diskw sysut2"
      data=substr(data,i+2)
      i=pos(CRLF,data)
   end
end
i=pos(CRLF,data)
do while i <> 0;
   output=left(data,i-1);
   queue output
   "execio 1 diskw sysut2"
   data=substr(data,i+2)
   i=pos(CRLF,data)
end
"execio 0 diskr sysut1(finis"
"execio 0 diskw sysut2(finis"

JCL:

//STEP010  EXEC PGM=IKJEFT01,DYNAMNBR=40,REGION=0M
//SYSTSPRT DD   SYSOUT=*
//SYSEXEC  DD   DISP=SHR,DSN=rexx.library
//SYSTSIN  DD   *
EXECUTIL SEARCHDD(YES)
%CRLF
/*
//SYSUT1 DD DISP=SHR,DSN=INPUT.FILE.EBCDIC
//SYSUT2 DD DSN=OUTPUT.FILE.CRLF,
// DISP=(NEW,CATLG),UNIT=SYSDA,
// RECFM=VB,LRECL=582,DSORG=PS,BLKSIZE=0,
// SPACE=(TRK,(20,10),RLSE)

-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to