I see some examples of conditional compilation, such as:
https://supportline.microfocus.com/documentation/books/opli80/pfmcro.htm
%IF A = 'CONTROL_1'
%THEN %DO;
RES = B + F(X);
%END;
%ELSE %DO;
RES = B - F(X) + SQRT(X);
LST = F(X) + 1;
%END;
However, it isn't clear to me that there is any ...
Search found 15 matches
- Thu Oct 19, 2017 11:50 pm
- Forum: Assembler & PL/I.
- Topic: PL/I equivalent of C's ifdef?
- Replies: 3
- Views: 8605
- Tue Oct 17, 2017 8:10 pm
- Forum: Assembler & PL/I.
- Topic: PL/I equivalent of C's ifdef?
- Replies: 3
- Views: 8605
PL/I equivalent of C's ifdef?
I see that PL/I has macros. For example:
Does it also have a C like 'if defined' or ifdef like construct that I could use to conditionally compile code in two different ways?%DCL RECSZ FIXED;
%RECSZ = 80;
%ACTIVATE RECSZ;
- Thu Oct 05, 2017 4:02 pm
- Forum: Assembler & PL/I.
- Topic: offsetof() equivalent in PL/I?
- Replies: 3
- Views: 8427
Re: offsetof() equivalent in PL/I?
Thank you, that looks like the PL/I equivalent to C's offsetof().Akatsukami wrote: Tue Oct 03, 2017 6:37 pm It's been a couple of decades since I wrote any C, so I may not properly understand what you're looking for, but I think you want the LOCATION function.
- Tue Oct 03, 2017 5:19 am
- Forum: Assembler & PL/I.
- Topic: offsetof() equivalent in PL/I?
- Replies: 3
- Views: 8427
offsetof() equivalent in PL/I?
The SIZE (or STG, or STORAGE) builtin function appears to be the PL/I equivalent of the C sizeof() builtin.
If I have a PL/I structure, such as:
DCL 1 MYSTRUCT,
5 F1 CHAR(13),
5 F2 FIXED BIN(31),
5 F3 FIXED DECIMAL(5,2),
5 F4 FIXED BIN(15),
5 F5 POINTER,
5 F6 CHAR(7);
Is there a way to do ...
If I have a PL/I structure, such as:
DCL 1 MYSTRUCT,
5 F1 CHAR(13),
5 F2 FIXED BIN(31),
5 F3 FIXED DECIMAL(5,2),
5 F4 FIXED BIN(15),
5 F5 POINTER,
5 F6 CHAR(7);
Is there a way to do ...
- Tue Oct 03, 2017 5:01 am
- Forum: JCL - Job Control Language.
- Topic: copy an entire PDS
- Replies: 4
- Views: 3317
Re: copy an entire PDS
fyi. All the calls to IEBCOPY that I'd seen specified a SELECT MEMBER clause in the command sequence. If that is omitted, the whole PDS is copied.
- Thu Sep 28, 2017 3:30 am
- Forum: JCL - Job Control Language.
- Topic: copy an entire PDS
- Replies: 4
- Views: 3317
copy an entire PDS
I see in the IDCAMS documentation that REPRO can only be used to copy a PDS member, and not the whole PDS.
Since I had a fairly small set of members in this case I used:
//CREATEPO EXEC PGM=IEFBR14
//PDSDD DD DISP=(NEW,CATLG),DSN=PJOOT.PDS,
// SPACE=(TRK,(45,15,50)),
// DCB=(RECFM=U,LRECL=80 ...
Since I had a fairly small set of members in this case I used:
//CREATEPO EXEC PGM=IEFBR14
//PDSDD DD DISP=(NEW,CATLG),DSN=PJOOT.PDS,
// SPACE=(TRK,(45,15,50)),
// DCB=(RECFM=U,LRECL=80 ...
- Fri Sep 08, 2017 1:35 am
- Forum: JCL - Job Control Language.
- Topic: jcl to strip asa control characters?
- Replies: 2
- Views: 1720
jcl to strip asa control characters?
I have test results containing SYSPRINT for a regression test suite that have been copied to unix and had the ASA control characters stripped out. I'm recompiling the (PL/I) code and want to compare the results against the previous versions, but the SYSPRINT of my new PL/I programs (which I am ...
- Thu Jun 08, 2017 9:53 pm
- Forum: Assembler & PL/I.
- Topic: what is the point of WRITE KEYTO?
- Replies: 3
- Views: 8164
- Thu Jun 08, 2017 9:42 pm
- Forum: Assembler & PL/I.
- Topic: what is the point of WRITE KEYTO?
- Replies: 3
- Views: 8164
what is the point of WRITE KEYTO?
I understand the point of the KEYFROM option in WRITE. For example I could do a VSAM write using:
WRITE FILE(myfile) KEYFROM(mykey) FROM(myrecord)
The Enterprise PL/I for z/OS Language Reference manual also specifies that a KEYTO() option is allowed for WRITE. What would that be used for?
WRITE FILE(myfile) KEYFROM(mykey) FROM(myrecord)
The Enterprise PL/I for z/OS Language Reference manual also specifies that a KEYTO() option is allowed for WRITE. What would that be used for?
- Wed Jun 07, 2017 8:17 am
- Forum: JCL - Job Control Language.
- Topic: EXEC with or without PGM=?
- Replies: 2
- Views: 1309
EXEC with or without PGM=?
I've seen two EXEC syntax variations, one with PGM=, like:
//PLUPDAT EXEC PGM=KUPDATE
(with and without PARM=), and recently also saw:
//ALLOC0 EXEC ALCPS,LLQ=SYSOUT.ACT,RF=FBA,RL=121
This form appears to pass arguments without using PARM and also doesn't specify the PGM= part of the statement ...
//PLUPDAT EXEC PGM=KUPDATE
(with and without PARM=), and recently also saw:
//ALLOC0 EXEC ALCPS,LLQ=SYSOUT.ACT,RF=FBA,RL=121
This form appears to pass arguments without using PARM and also doesn't specify the PGM= part of the statement ...
- Tue Apr 04, 2017 10:21 pm
- Forum: C, C++ and Java for Mainframes.
- Topic: information about fopen mode mismatches?
- Replies: 1
- Views: 7856
information about fopen mode mismatches?
C doesn't have anything but errno for fopen failures, but it also doesn't have all the complex mode string extensions that exist in mainframe C.
On the mainframe, if an fopen("dd:...", modestring) fails due to a fopen mode string mismatch relative to the JCL that cataloged and/or allocated the ...
On the mainframe, if an fopen("dd:...", modestring) fails due to a fopen mode string mismatch relative to the JCL that cataloged and/or allocated the ...
- Thu Mar 23, 2017 11:20 pm
- Forum: JCL - Job Control Language.
- Topic: syntax of mkdir in JCL or IDCAMS
- Replies: 2
- Views: 2288
Re: syntax of mkdir in JCL or IDCAMS
Thanks. From the link you posted, it looks like a STEP that runs BPXBATCH is the way to do it.
- Thu Mar 23, 2017 9:28 pm
- Forum: JCL - Job Control Language.
- Topic: syntax of mkdir in JCL or IDCAMS
- Replies: 2
- Views: 2288
syntax of mkdir in JCL or IDCAMS
I'm able to use JCL and IDCAMS to populate a USS file:
//PATH JOB
//CREATE EXEC PGM=IDCAMS
//UNIX DD PATH='unixfile',PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//JUNK DD DATA,DLM=@@
a
quick
brown
fox
@@
REPRO -
INFILE(JUNK) -
OUTFILE(UNIX)
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD ...
//PATH JOB
//CREATE EXEC PGM=IDCAMS
//UNIX DD PATH='unixfile',PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//JUNK DD DATA,DLM=@@
a
quick
brown
fox
@@
REPRO -
INFILE(JUNK) -
OUTFILE(UNIX)
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD ...
- Mon Mar 06, 2017 11:58 pm
- Forum: JCL - Job Control Language.
- Topic: How to populate a new DATASET in JCL?
- Replies: 3
- Views: 2096
How to populate a new DATASET in JCL?
If I allocate a DATASET in JCL, either manually, or with IDCAMS, such as:
//VSAMCR JOB
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME(PJVSAM00.00000000) -
CYLINDERS(1) VOLUMES(LZ0000) -
INDEXED KEYS(10 179 ...
//VSAMCR JOB
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME(PJVSAM00.00000000) -
CYLINDERS(1) VOLUMES(LZ0000) -
INDEXED KEYS(10 179 ...
- Fri Mar 03, 2017 7:54 am
- Forum: Introduce Yourself and Share Your IT Experience.
- Topic: Hi from a Unix systems programmer
- Replies: 2
- Views: 1451
Hi from a Unix systems programmer
I'm a systems programmer with lots of experience on Unix and Windows, but am now working on the LzLabs Software Defined Mainframe. I joined this forum to help understand about JCL, mainframe file formats, z/OS assembly parameter passing conventions, and other mainframe concepts.