PIPE delimited file we can achieve through MVS record structure: See, the example below
05 FIRST-ONE PIC X(2)
05 SECOND-ONE PIC X(2) VALUE “||”
The above way, we can construct a record. Similarly we can use UNSTRING in COBOL to delimit the PIPE symbol, and we will get sequential data set.
The second best example is we frequently use PIPE concept with SPLIT in DFSORT
//EXAMP JOB A400,PROGRAMMER
//RUNSORT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=H
//SORTIN DD DSN=INPUT.PIPE,SUBSYS=PIPE,
//OUT1 DD DSN=OUTPUT.PIPE1,SUBSYS=PIPE,
//OUT2 DD DSN=OUTPUT.PIPE2,SUBSYS=PIPE,
//SYSIN DD *
Here, SUBSYS=PIPE, will allocates input file into PIPE system.
OUTFIL FNAMES=(OUT1,OUT2),SPLIT ==> This command writes input file into two output files.
The PIPE symbol will be used in UNIX, to separate each commands in UNIX. Let us execute batch job using BPXBTACH utility.
//STEPN EXEC PGM=BPXBTACH,PARM = ‘SH ls –a | tail +3 | nl’
//SYSOUT DD SYSOUT=*
Here, in the list of records, it filters top three records, and shows line numbers.