Keyboard Shortcuts
Likes
Search
Question on MUSIC JCL
HI ! I was working? on some batches to compile PL/I programs. ? My first approach, was very primitive, a batch with all sources and data, like the time of punched cards, and it worked well: /SYS REGION=500 /FILE SYSPRINT N(PLITEST-2.PRN)? NEW(REPL) LRECL(133) /COM /file SYSPUNCH N(PLITEST-2.LMOD) NEW(REPL) /COM /FILE SYSUT3? ?N(PLITEST-2.SUT3) NEW(REPL) LRECL(80) /INC PL1F /OPT NOSOURCE,DECK,NONEST,NOATTR /INC PLITEST-2.PLI /DATA A=1 B=2 C=3; /END ?
Then I made three different batches, one to compile, other to linkedit. and other to run, that worked OK.
Since I Intend to compile several modules on dis, I wrote a jcl batch, to compile, ling and run, in separe sections, but it give some error.
Thing is, the compiler does not stop, and keeps reading JCL statements as part of the program:
?
PLITEST-2 is the compiler Output and MYPROG.LMOD is the loadable module to be run.
(compilation part) /SYS REGION=500
/FILE SYSPRINT N(PLITEST-2.PRN)? NEW(REPL) LRECL(133)
/file SYSPUNCH N(PLITEST-2.LMOD) NEW(REPL)
/INC PL1F
/OPT NOSOURCE,DECK,NONEST,NOATTR,PRINT
/JOB NOGO
/INC PLITEST-2.PLI
(LINKEDIT PART) /JOB
/file lmod n(MYPROG.LMOD) NEW(REP) lr(128) recfm(f) space(100)
/file sublibos pds(*pl1f,*mus,*os)
/load lked
/job map,nogo,print,stats,mode=os,name=MYPROG
.org 4a00
/INC PLITEST-2.LMOD
(Execution part) /JOB
/inc xmpl1f
MYPROG n(MYPROG.lmod)
?
(DATA SECTION)
A=1? B=2? C=3 ;
/END
?
?
Can you give me any suggestion gentlemen ?
-- Carlos Argentina |
I haven't done anything with PL/I on MUSIC but from my experience
toggle quoted message
Show quoted text
with other languages on MUSIC and reading the online help (HELP /LOAD and HELP LKED), the following is my guess at what you need: For compilation, you need a line like this to generate the object file: /FILE SYSPUNCH NAME(PLITEST-2.OBJ) NEW(REPLACE) (It will work if you call the object file something.lmod but it will end up causing confusion!) For link edit, I think you need a file something like this for example: /FILE LMOD NAME(PLITEST-2.LMOD) NEW(REPLACE) LRECL(128) RECFM(F) /file sublibos pds(*pl1f,*mus,*os) /load lked /job map,nogo,print,stats,mode=os,name=PLITEST2 /INCLUDE PLITEST-2.OBJ Be sure not to have /JOB before /LOAD in any of the files Finally, to execute the program link edited above, use a file something like this: /FILE LMOD NAME(PLITEST-2.LMOD) SHR /LOAD XMPLI PLITEST2 A=1 B=2 C=3; I don't know enough PL/I to test this so it's just guesswork. It might be useful as a starting point. Regards, Peter Coghlan
|
Problem seems like, PL/I compiler once started by exec beingin control keeps reading ALL the SYSYN entries, disregarding control options like /COM or /END or /JOB. Something like this is mentioned in the /FILE documentation in Music. I may need to try this submiting my sctipt or in a CMS environment. Carlos Argentina |
I finally could write a decent batch job in music for compiling, linking and run several modules, as different jobs.
creating .obj and .lmod modules.
The trick is calling different tasks by submitting this script:
?
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM 1-ST COMPILATION
/SYS REGION=500,CD=PLI\PLITESTB
/file SYSPUNCH N(TEST_2.OBJ) NEW(REPL)
/INC PL1F
/OPT NOXREF,NONEST,NOSOURCE,NOATR,DECK
/JOB NOGO
/INC TEST2.PLI
/END
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM -2nd COMPILATION
/SYS REGION=500,CD=PLI\PLITESTB
/file SYSPUNCH N(MAX3.OBJ) NEW(REPL)
/INC PL1F
/OPT NOXREF,NONEST,NOSOURCE,NOATR,DECK
/JOB NOGO
/INC MAX3.PLI
/END
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM link step
/SYS CD=PLI\PLITESTB
/file lmod n(plitestb.lmod) new(REPL) lr(128) recfm(f) space(100)
/file sublibos pds(*pl1f,*mus,*os)
/load lked
/job map,nogo,print,stats,mode=os,name=pltstb
.org 4a00
/inc test_2.obj
/inc max3.obj
/END
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM go step
/SYS CD=PLI\PLITESTB
/inc xmpl1f
pltstb N(PLITESTB.lmod)
?A=1? B=2? C=3 ;
/END
?
this other script does not work in SIM390 with music, I havent tested under H-390, but the OS dislikes this job definition:
?
/ID SAVE-JOB-123456 $000 000 999 999 999
/PASSWORD=MUSIC
/SYS REGION=500
/FILE SYSPRINT N(PLITEST-2.PRN)? NEW(REPL) LRECL(133)
/COM /file SYSPUNCH N(PLITEST-2.LMOD) NEW(REPL)
/COM /FILE SYSUT3? ?N(PLITEST-2.SUT3) NEW(REPL) LRECL(80)
/INC PL1F
/OPT NOSOURCE,DECK,NONEST,NOATTR
/INC PLITEST-2.PLI
/DATA
A=1 B=2 C=3;
/END
?
Seems you have to use /INFO instead of /ID, to the OS recognizes your sepparate jobs:
?
If you want to compile and link several modules in a single Lmod in a single job, you can do:
?
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM 1-ST COMPILATION
/SYS REGION=500,CD=PLI\PLITESTB
/file SYSPUNCH N(TEST_2.OBJ) NEW(REPL)
/INC PL1F
/OPT NOXREF,NONEST,NOSOURCE,NOATR,DECK
/JOB NOGO
/INC TEST2.PLI
/END
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM -2nd COMPILATION
/SYS REGION=500,CD=PLI\PLITESTB
/file SYSPUNCH N(MAX3.OBJ) NEW(REPL)
/INC PL1F
/OPT NOXREF,NONEST,NOSOURCE,NOATR,DECK
/JOB NOGO
/INC MAX3.PLI
/END
/INFO MUSIC USERID(GUEST) PW(PASS4U) TI(5) PA(50) R(MUSIC)
/COM link step
/SYS CD=PLI\PLITESTB
/file lmod n(plitestb.lmod) new(REPL) lr(128) recfm(f) space(100)
/file sublibos pds(*pl1f,*mus,*os)
/load lked
/job map,nogo,print,stats,mode=os,name=pltstb
.org 4a00
/inc test_2.obj
/inc max3.obj
/END
--?
Carlos Argentina |
Carlos, If you are sending batch jobs to the MUSIC card reader from outside of MUSIC (using DEVINIT in Hercules for example), you need to use /ID and /PASSWORD cards at the beginning of the jobs and a /END card at the end of the jobs and you cannot use /INFO. If you are using the SUBMIT command on MUSIC, you can use /INFO and the code in SUBMIT will process the /INFO card and generate the /ID, /PASSWORD and /END cards needed automatically. Something may get confused if you also try to include /ID, /PASSWORD and /END cards in in a job which also uses /INFO. Regards, Peter Coghlan. |
Thanks for the comment Peter. Actually I'm using only H-390, because of FTP and telnet, from the windows/linux environment, which are very similar to the ones I'm used to work in Unixes, like unix, qnx, linux. It's a pain in the neck to learn a new editor on each operating system. But I'll tak into account if I use Hercules in some moment. Carlos Argentina |