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

GET STRING in PL/1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

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

Hello and welcome to the forum,

Read here:
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
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
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: 73
Location: India

PostPosted: Fri Aug 27, 2010 4:32 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top