Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need the syntax of 'BASED' used in PL/1 pgms

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
spriya

New User


Joined: 06 Oct 2005
Posts: 42

PostPosted: Tue Jul 25, 2006 12:32 pm    Post subject: Need the syntax of 'BASED' used in PL/1 pgms
Reply with quote

HI,

Anybody explain the syntax 'BASED' using in PL/1 pgms

ex:
DCL (PTR_DRAF) POINTER


INPUT_STRUC BASED (PTR_DRAF),

explain this example
Back to top
View user's profile Send private message

shameer007

New User


Joined: 20 Apr 2006
Posts: 12

PostPosted: Fri Aug 18, 2006 8:20 pm    Post subject: Re: Need the syntax of 'BASED' used in PL/1 pgms
Reply with quote

spriya wrote:
HI,

Anybody explain the syntax 'BASED' using in PL/1 pgms

ex:
DCL (PTR_DRAF) POINTER


INPUT_STRUC BASED (PTR_DRAF),

explain this example



Hi,

This program will give basic idea about Based pointer.. If u still have doubt Let me know I will give some more examples..

POINT6: PROC OPTIONS(MAIN);
DCL P POINTER;
DCL 1 STUD,
2 NAME CHAR(8) INIT('SHAMEEER'),
2 NUM FIXED DECIMAL(3) INIT(4);
/* ALLOCATE STUD;*/
P=ADDR(STUD);
PUT SKIP FILE(SIVA) LIST(STUD.NAME,STUD.NUM);
DCL 1 STUD2 BASED(P),
2 NAME CHAR(8),
2 NUM FIXED DECIMAL(3)INIT(5);
STUD2.NAME = 'WALTER';
/* ALLOCATE STUD2;*/
PUT SKIP FILE(SIVA) LIST(STUD2.NAME,STUD2.NUM);
PUT SKIP FILE(SIVA) LIST(STUD.NAME,STUD.NUM,STUD2.NAME,STUD2.NUM);
END POINT6;

Okay...
Back to top
View user's profile Send private message
shameer007

New User


Joined: 20 Apr 2006
Posts: 12

PostPosted: Fri Aug 18, 2006 8:28 pm    Post subject: Few changes..
Reply with quote

I think it is little bit confusing. I am just commenting some of these lines...



POINT6: PROC OPTIONS(MAIN);
DCL P POINTER;
DCL 1 STUD,
2 NAME CHAR(8) INIT('SHAMEEER'),
2 NUM FIXED DECIMAL(3) INIT(4);
/* ALLOCATE STUD;*/
P=ADDR(STUD);
PUT SKIP FILE(SIVA) LIST(STUD.NAME,STUD.NUM);
DCL 1 STUD2 BASED(P),
2 NAME CHAR(8),
2 NUM FIXED DECIMAL(3)INIT(5);

/* I am commenting this stmt........ */

/* STUD2.NAME = 'WALTER'; */

/* ALLOCATE STUD2;*/

/* here u can give simple PUT SKIP LIST */

/*
PUT SKIP FILE(SIVA) LIST(STUD2.NAME,STUD2.NUM);
PUT SKIP FILE(SIVA) LIST(STUD.NAME,STUD.NUM,STUD2.NAME,STUD2.NUM);
END POINT6; */


PUT SKIP LIST(STUD2.NAME,STUD2.NUM);


Now It is okay I think...
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

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