Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

GET STRING in PL/1

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

New User


Joined: 15 Jul 2010
Posts: 5
Location: US

PostPosted: Tue Jul 27, 2010 2:11 am    Post subject: GET STRING in PL/1
Reply with quote

Hi ,

I am not clear with the GET STRING usage. I searched in manuals , but I could not find much information. Can you please help me on this?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 27, 2010 2:46 am    Post subject:
Reply with quote

Hello and welcome to the forum,

Read here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/ibm3lr80/13.2.7

Suggest you bookmark the link to that manual. . .

At the top of the page is a link to "IBM Manuals" which you will also find useful.

If you find something in the manual that is not clear, post what you found and your doubt. Someone will be able to clarify.
Back to top
View user's profile Send private message
naveen_mf

New User


Joined: 15 Jul 2010
Posts: 5
Location: US

PostPosted: Tue Jul 27, 2010 8:58 pm    Post subject: Reply to: GET STRING in PL/1
Reply with quote

Thank you Dick
Back to top
View user's profile Send private message
naveen_mf

New User


Joined: 15 Jul 2010
Posts: 5
Location: US

PostPosted: Tue Jul 27, 2010 9:08 pm    Post subject: Reply to: GET STRING in PL/1
Reply with quote

This is my input file

Code:
CUST        TYPE
1234567   9406   0
1234567   9406   1
1234567   9406   2
1234567   9406   3
1234567   9406   10
1234567   9406   11
1234567   9406   12
1234567   9406   18
6015154   9406   19
6015154   9406   20
6015154   9406   21
6015154   9406   22

I wanna retrieve all records with CUST 1234567(assume that file is sorted) and store it some place and process those records . Later I should switch to 6015154 records for processing ...

I was told that using GET STRING we can get bunch of records based based on key.. but it is not working .. I coded as mentioned below..

READ FILE(SYSIN) INTO (INP);
GET STRING(CUST);

Help me guys..
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Fri Aug 27, 2010 4:32 pm    Post subject:
Reply with quote

Hello Naveen,

Not sure what you are asking about . please see the syntax for GET STRING statement -
GET-STRING (expression) data-specification

From your example, I could only think of the below to get the customer number:

If you have read one record to STR1, then the below statemnet will extract customer number from STR1:

DCL cust_no char(7) init ('');
GET STRING(str1) LIST(cust_no);

let me knw if you have got any other way .

Regards,
Appu
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us