Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language JCL

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:3
Info:n/a
Score: (3.03 in 61 votes)
000100 //AB2217# JOB  CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),NOTIFY=AB2217
000200 //*
000300 //* THE BEERSONG IN IBM 370 JCL & UTILITIES
000400 //* RENE VINCENT JANSEN, I-BIZZ IT SERVICES & CONSULTANCY
000500 //*
000200 //BOTTLES EXEC PGM=IEBDG,REGION=20K
000300 //SYSPRINT DD SYSOUT=*
000400 //SEQOUT DD DSN=&&BEER,UNIT=SYSDA,DISP=(,PASS),                  
       X
000500 //SPACE=(TRK,(10,10)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
000600 //SYSIN DD *
000700     DSD OUTPUT=(SEQOUT)
000800     FD  NAME=FIELD1,LENGTH=2,STARTLOC=1,FORMAT=ZD,               
       X
000900          INDEX=1
001000     FD  NAME=FIELD2,LENGTH=27,STARTLOC=4,
001100         PICTURE=27,'BOTTLES OF BEER ON THE WALL',ACTION=FX
001200     CREATE QUANTITY=100,NAME=(FIELD1,FIELD2)
001300     FD  NAME=FIELD3,LENGTH=2,STARTLOC=1,FORMAT=ZD,               
       X
001400          INDEX=1
001500     FD  NAME=FIELD4,LENGTH=15,STARTLOC=5,
001600          PICTURE=15,'BOTTLES OF BEER',ACTION=FX
001700     FD  NAME=FIELD5,LENGTH=28,STARTLOC=21,
001800          PICTURE=28,'TAKE ONE DOWN PASS IT AROUND',ACTION=FX
001900     FD  NAME=FIELD6,LENGTH=26,STARTLOC=5,
002000          PICTURE=26,'NO MORE BOTTLES OF BEER ON',ACTION=FX
002100     FD  NAME=FIELD7,LENGTH=8,STARTLOC=32,
002200         PICTURE=8,'THE WALL',ACTION=FX
002300     CREATE QUANTITY=100,NAME=(FIELD3,FIELD4,FIELD5)
002400     CREATE QUANTITY=1,NAME=(FIELD6,FIELD7)
002500     END
002600 /*
002700 //SORT EXEC PGM=SORT,REGION=512K,PARM='MSG=AP'
002800 //SYSOUT DD SYSOUT=*
002900 //SYSUDUMP DD SYSOUT=*
003000 //SYSPRINT DD SYSOUT=*
003100 //SORTLIB DD DISP=SHR,DSN=SYS1.SORTLIB
003200 //*ORTOUT DD SYSOUT=*,DCB=(BLKSIZE=80,RECFM=F),
003300 //SORTOUT DD DSN=&&OUT,DISP=(,PASS),UNIT=SYSDA,                  
       X
003400 //SPACE=(TRK,(10,10)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
003500 //SORTWK01 DD UNIT=2314,SPACE=(CYL,(5,5))
003600 //SORTWK02 DD UNIT=2314,SPACE=(CYL,(5,5))
003700 //SORTWK03 DD UNIT=2314,SPACE=(CYL,(5,5))
003800 //SYSIN DD *
003900  SORT FIELDS=(1,2,ZD,D,20,25,CH,D,5,2,CH,A)
004000  RECORD TYPE=F,LENGTH=80
004100  END
004200 /*
004300 //SORTIN DD DSN=*.BOTTLES.SEQOUT,DISP=(SHR,PASS)
004400 //PRINT EXEC PGM=IEBPTPCH
004500 //SYSPRINT DD SYSOUT=*
004600 //SYSUT1   DD DSN=*.SORT.SORTOUT,DISP=(SHR,PASS)
004700 //SYSUT2   DD SYSOUT=*
004800 //SYSIN DD *
004900    PUNCH STOPAFT=200
005000    TITLE ITEM=('THE BEERSONG')
005100 /*

Download Source | Write Comment

Alternative Versions

Comments

>>  Steve Howie said on 02/16/09 22:15:01

Steve Howie Bravo!!

Out of curiosity, have you tried this under VM/CMS using Filedefs instead?

Scotty

>>  Scotty said on 03/13/09 09:35:03

Scotty Impressive. I remember skipping straight past a description of IEBDG about 25 years ago.

>>  Captain Paralytic said on 11/16/09 15:27:02

Captain Paralytic One slight problem in that it it ends up with:
01 BOTTLES OF BEER ON THE WALL
01 BOTTLES OF BEER TAKE ONE DOWN PASS IT AROUND

Instead of

01 BOTTLE OF BEER ON THE WALL
01 BOTTLE OF BEER TAKE ONE DOWN PASS IT AROUND

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: