Page 2 of 2

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 12:40 pm
by rukkunudeen
This is the request from our customer. they are planning to remove fileaid from our mainframe TSO sessions by this month release (july 12th). So they have asked us to analyze all JCLs which are present in the system. If the JCL has a fileaid step convert it to sort/icetool/filemanager. While doing this task one of the JCL had a DD01 COPY PADCHAR=X'00' for a variable length file. We are not able to find the relevant syntax in any other utilities. The fileaid step is the first step in the JCL and the input comes from some other system. Kindly help us..

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 1:43 pm
by prino
Start writing a program, rather than whining on this forum, if you had done so straight away, you would not even have had to start this whole thread...

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 4:24 pm
by NicC
done as it is urgent

No - it is not urgent. If it was, you would not have posted on the forum where a question may never even be replied to let alone resolved.

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 5:00 pm
by steve-myers
PAD00    CSECT
         USING *,12
         SAVE  (14,12),,'PAD00 &SYSDATE &SYSTIME'
         LR    12,15
         LA    15,SAVEAREA
         ST    15,8(,13)
         ST    13,4(,15)
         LR    13,15
         OPEN  (UT1,INPUT)
         LH    1,(DCBLRECL-IHADCB)+UT1
         LA    1,1(,1)
         STH   1,(DCBLRECL-IHADCB)+UT2
         OPEN  (UT2,OUTPUT)
COPY     GET   UT1
         LR    2,1
         LH    3,0(,1)
         LA    6,1(,3)
         STH   6,(DCBLRECL-IHADCB)+UT2
         PUT   UT2
         LR    4,1
         LR    5,3
         MVCL  4,2
         STH   6,0(,1)
         MVI   0(4),X'00'
         B     COPY
EOF      CLOSE (UT1,,UT2)
         LA    1,UT1
         BAL   14,FREEPOOL
         LA    1,UT2
         BAL   14,FREEPOOL
         L     13,4(,13)
         RETURN (14,12),T,RC=0
         CNOP  0,8
FREEPOOL BALR  15,0
         SAVE  (14,0),,FREEPOOL
         FREEPOOL (1)
         RETURN (14,0),T
SAVEAREA DC    9D'0'
         PUSH  PRINT
         PRINT NOGEN
UT1      DCB   DSORG=PS,MACRF=GL,DDNAME=SYSUT1,EODAD=EOF
UT2      DCB   DSORG=PS,MACRF=PL,DDNAME=SYSUT2,RECFM=VB
         DCBD  DSORG=QS,DEVD=DA
         POP   PRINT
         END   PAD00

Re: How to append characters to a variable length record

PostPosted: Fri Jul 05, 2013 10:08 pm
by dick scherrer
Hello,

I suggest the urgency goes away when the product is extended.

Then someone needs to look into how the decision was made without knowing all of the uses of the product were "handled" in some way.