Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Usage of processor directive and first language element

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Usage of processor directive and first language element
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: 2407
Location: Hampshire, UK

PostPosted: Fri Apr 10, 2020 7:38 pm    Post subject: Reply to: Usage of processor directive and first language element
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: 1010
Location: Richmond, Virginia

PostPosted: Fri Apr 10, 2020 8:28 pm    Post subject:
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    Post subject: Reply to: Usage of processor directive and first language element
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: 2407
Location: Hampshire, UK

PostPosted: Mon Apr 13, 2020 4:20 pm    Post subject: Reply to: Usage of processor directive and first language element
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Any limit on usage of cursors ? Jeethendra DB2 1 Sun Jul 12, 2020 10:23 am
No new posts usage of CASE in WHERE clause abdulrafi DB2 10 Wed Mar 18, 2020 4:25 pm
No new posts Usage of pre-processor statement in p... Sakthidevi PL/I & Assembler 1 Thu Nov 28, 2019 4:08 pm
No new posts Usage of external condition Sakthidevi PL/I & Assembler 1 Sat Nov 23, 2019 1:46 pm
No new posts Usage of Like statement in PL/I Sakthidevi PL/I & Assembler 3 Fri Nov 15, 2019 11:22 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us