OMG I got it to work !!

Thank you very much !!

Why did your JCL have so many members in
the SCRIPT DD ? I put member in with a 
simple AWK program .



-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Farley, Peter x23353
Sent: Tuesday, December 21, 2021 10:46 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: AWK ? - Re: Top 8 Reasons for using Python instead of 
REXX for z/OS

Technically you are correct - I depend on the undocumented fact that the awk 
implementation on z/OS Unix uses the fopen() function which supports DD 
statement file descriptions (//DD:ddname).  Given IBM's legendary support for 
backwards compatibility, I sincerely doubt they will ever change this, though 
of course they certainly could.  I only use awk in non-production test jobs for 
research and test data generation for regression tests, so no business impact 
if ever this changed.

Typical JCL example:

//AWKSPLIT EXEC PGM=BPXBATSL,MEMLIMIT=256M,                          
// PARM='PGM /bin/awk --f //DD:SCRIPT //DD:TEXTIN'    
//STDOUT   DD  DISP=(NEW,CATLG,CATLG),                               
//             DSN=output.qsam.file,.name,                      
//             UNIT=TEST,SPACE=(CYL,(1,1),RLSE),                     
//             DSORG=PS,RECFM=VB,LRECL=8004,BLKSIZE=0,BUFNO=31       
//STDERR   DD  SYSOUT=*                                              
//SCRIPT   DD  DISP=SHR,DSN=TSOUSER.TEST.AWK(CSVSPLIT)               
//         DD  DISP=SHR,DSN=TSOUSER.TEST.AWK(STRFUNCS)               
//         DD  DISP=SHR,DSN=TSOUSER.TEST.AWK(STRFTIME)               
//         DD  DISP=SHR,DSN=TSOUSER.TEST.AWK(MKTIME)                 
//         DD  DISP=SHR,DSN=TSOUSER.TEST.AWK(NEWTESTS)               
//TEXTIN   DD  DISP=SHR,DSN=input.qsam.or.pds.with.member.name,          
//             BUFNO=31                                              
//STDIN    DD  DUMMY                                                 
//                                                                   

My awk scripts are kept in a normal PDSE created using the IBM1047 code page 
(ISPF terminal type 28, 3278L1).

HTH

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Paul Gilmartin
Sent: Sunday, December 19, 2021 3:07 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: AWK ? - Re: Top 8 Reasons for using Python instead of REXX for z/OS

EXTERNAL EMAIL

On Sun, 19 Dec 2021 19:13:53 +0000, Farley, Peter x23353   wrote:

>I have been using awk from JCL using DD's as script source, input and output 
>files for years now.  There is no issue using awk in normal JCL.  I even use a 
>gawk script for decoding CSV input that I wrote literally decades ago in my 
>JCL-invoked awk steps.
> 
Does IBM support all that, or are you relying on "unpredictable" behavior?

>JCL examples available on request.
>
Please.  Especially "using DD's as script source".  (Or do you just copy to a 
UNIX temporary file?)

Thanks,
gil
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to