Syntax problem on todsn

Discussion of the Co:Z Toolkit Dataset Pipes utilities
Post Reply
wolfgang
Posts: 12
Joined: Tue May 17, 2011 2:37 am

Syntax problem on todsn

Post by wolfgang »

Hello
i tried to read a Directory and used the filenames to send each file to a gdg on the z/os system.
I get an syntax check, but i can not see the problem.
could any body help me about my problem? :?

call read_dir
do I = 1 by 1 until i > rdt.0
if rdt.i = '..',
! rdt.i = '.' then iterate
opt="-o recfm=fb,lrecl=80,blksize=800,space=(cyl,(1,10))"
cmd = "cat "in_source!!"/"!!rdt.i,
" ! "hlq_todsn"/todsn " in_sformat,
opt in_target
call bpxwunix cmd,,out.,err.
do r = 1 to out.0;say out.r;end
do r = 1 to err.0;say err.r;end
End /* End of all Filenames in Dirctory */
Return bzst_rc
/* --------------------------------------------------------------*/
/* init_bzst */
/* set vars on beginning */
/* --------------------------------------------------------------*/
init_bzst:
hlq_todsn="/plex/product/dovetail/coz/bin"
bzst_rc = 0
Return
/* --------------------------------------------------------------*/
/* read_dir */
/* read source directory member names in tab rdt. */
/* --------------------------------------------------------------*/
read_dir:
address syscall
'readdir 'in_source 'rdt.'
do s=1 to rdt.0
say rdt.s
end
Return

Result from Batch running REXX TRACE:
49 *-* cmd = "cat "in_source||"/"||rdt.i, " | "hlq_todsn"/todsn " in_sformat, opt in_target
>L> "cat "
>V> "/u/uaqfzw/bzst_report"
>O> "cat /u/uaqfzw/bzst_report"
>L> "/"
>O> "cat /u/uaqfzw/bzst_report/"
>C> "RDT.7"
>L> "RDT.7"
>O> "cat /u/uaqfzw/bzst_report/RDT.7"
>L> " | "
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | "
>V> "/plex/product/dovetail/coz/bin"
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin"
>L> "/todsn "
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin/todsn "
>V> "-s iso8859-1"
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin/todsn -s iso8859-1"
>V> "-o recfm=fb,lrecl=80,blksize=800,space=(cyl,(1,10))"
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin/todsn -s iso8859-1 -o recfm=fb,lrecl=80,blksize=80
0,space=(cyl,(1,10))"
>V> "//DD:BZST2DD"
>O> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin/todsn -s iso8859-1 -o recfm=fb,lrecl=80,blksize=80
0,space=(cyl,(1,10)) //DD:BZST2DD"
52 *-* call bpxwunix cmd,,out.,err.
>V> "cat /u/uaqfzw/bzst_report/RDT.7 | /plex/product/dovetail/coz/bin/todsn -s iso8859-1 -o recfm=fb,lrecl=80,blksize=80
0,space=(cyl,(1,10)) //DD:BZST2DD"
>L> ""
>L> "OUT."
>L> "ERR."
>>> "1"
53 *-* do r = 1 to out.0
>L> "1"
>V> "0"
54 *-* do r = 1 to err.0
>L> "1"
>V> "1"
*-* say err.r
>C> "ERR.1"
>V> "FSUM7332 syntax error: got (, expecting Newline"
FSUM7332 syntax error: got (, expecting Newline *-* end
*-* do r = 1 to err.0
55 *-* End /* End of all Filenames in Dirctory */
wolfgang
Posts: 12
Joined: Tue May 17, 2011 2:37 am

Re: Syntax problem on todsn

Post by wolfgang »

hello
i found my syntax problem i need a include of th -o options in hochkomma apostophe and it works fine.
thanks for your help
aakicee
Posts: 1
Joined: Mon Apr 13, 2015 4:50 am

Re: Syntax problem on todsn

Post by aakicee »

thanks this was helpful...
Luke
Posts: 1
Joined: Thu Sep 27, 2018 3:41 am

Re: Syntax problem on todsn

Post by Luke »

thank you for the help was having a problem solved by this<3
Post Reply