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
 

 

Record size is 70 i want retrive first 50 characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
srinivas.u

New User


Joined: 07 Jun 2004
Posts: 20

PostPosted: Sun Jun 20, 2004 11:08 pm    Post subject: Record size is 70 i want retrive first 50 characters
Reply with quote

hi

in cobol file the record size is 70 i want retrive first 50 characters.
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Sun Jun 20, 2004 11:34 pm    Post subject:
Reply with quote

srinivas.u,
In order to discuss in the same topic you can use POST REPLY instead of
opening a new topic.

Comming to you question, there are couple of ways to do it.

1) 01 ws-rec.
02 ws-reqd-50-data pic x(50).
02 filler pic x(20).
display ws-reqd-50-data.

2) 01 ws-rec pic x(70).
01 ws-reqd-50-data.

move ws-rec(1:50) to ws-reqd-50-data.
display ws-reqd-50-data.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Nov 19, 2004 2:06 am    Post subject:
Reply with quote

Srinivas,

Actually you dont need to do any thing like above simply a move statement will solve this.

01 ws-rec-70 pic x(70).

01 ws-rec-50 pic x(50).

MOVE WS-REC-70 TO WS-REC-50.

This will retrieve only first 50 characters and rest will be truncated.
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Sun Feb 27, 2005 6:01 pm    Post subject:
Reply with quote

Hi imvs,

reference modifier is possible in cobo 85 and versions after that, simply moving 70 bytes variable to 50 bytes variable will truncate and gives the required result.
Back to top
View user's profile Send private message
ankyhunk

Moderator


Joined: 05 May 2005
Posts: 98
Location: Navi Mumbai, India

PostPosted: Fri May 06, 2005 1:44 pm    Post subject:
Reply with quote

You can also copy a 70 char dataset to 50 char dataset using IEBGENER utility
Back to top
View user's profile Send private message
MainframeHelp4_u

New User


Joined: 15 Aug 2006
Posts: 25

PostPosted: Sat Sep 02, 2006 3:26 pm    Post subject: try sort
Reply with quote

1) Keep o/p file length 50 characters, and with SORTIN is 70 bytes file & SORTOUT is 50 bytes file.. try this option...

2) with the help ofSORT : Copy first/any 50 characters to output DSN..

Cheers
Mainframehelp4_u
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Sep 03, 2006 2:01 am    Post subject:
Reply with quote

Or with REXX: "VAR1 = SUBSTR(VAR2,1,50)"

O.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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