IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Usage of processor directive and first language element


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sakthidevi

New User


Joined: 15 Nov 2019
Posts: 7
Location: India

PostPosted: Fri Apr 10, 2020 6:27 pm
Reply with quote

Hi ,

Is below declaration can be used as the first statement in PL/I program?

(SUBSCRIPTRANGE,SIZE,STRINGSIZE,STRINGRANGE):
*PROCESS LANGLVL(SPROG);
XXBMIB06:PROC OPTIONS(MAIN REENTRANT) REORDER;

IBM zOS manual says about the process directive:
The % or * must be the first data byte of a source record. Any number of %PROCESS and *PROCESS directives can be specified, but they must all appear before the first language element appears.
Or in other words, the behaviour of this program is undefined if the condition prefix are before the process directive.

Can someone help me with the correct way of coding these statements? Will compiler accept this code?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 10, 2020 7:38 pm
Reply with quote

Quote:
Will compiler accept this code?

Why not try compiling and see what happens? Much quicker than launching browse, finding site, logging on, posting topic, waiting for reply - if any.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Apr 10, 2020 8:28 pm
Reply with quote

Sakthidevi - Nic is so right.

I see you are a very new user, and I don't know how long you have been a programmer, but if you want to be the "go to" (lol) person during your career, then you want to learn first hand how things work.

I suggest you create a directory of test programs in whatever languages, including JCL, you work with, and then test various features separately when you have questions.

If you "learn" something because someone tells you, you'll soon forget it. It may not even be correct!

If you learn from your experience, you'll become the expert.

Good luck.
Back to top
View user's profile Send private message
Sakthidevi

New User


Joined: 15 Nov 2019
Posts: 7
Location: India

PostPosted: Mon Apr 13, 2020 1:33 pm
Reply with quote

Thanks Nic and Phil. I am working on a product development start up. We don't have a mainframe compiler yet and it would take sometime for the setup process. I came across this code as part of our development and just curious to know if it would work?

Thanks much if you could help me on this! icon_smile.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Apr 13, 2020 4:20 pm
Reply with quote

My take on this (I do not have access to a mainframe compiler) is that hte first line - even though it is a label specification - is in error. But I would get back to the person who wrote it and ask them for the manual reference.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts IMS DB using Natural Language IMS DB/DC 0
Search our Forums:

Back to Top