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
 

 

set column position record?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
italo_pm

New User


Joined: 26 Mar 2015
Posts: 37
Location: Italy

PostPosted: Wed May 27, 2015 2:18 am    Post subject: set column position record?
Reply with quote

hi everyone,

how to set column position in record??

my problem is in the position columns, only from records begins with VFY, how to order there?

VFY (begins always from column 1 to 3)
APP (begins always from column 5 to 12)
RESPONSABILE (begins always from column 14) but not finish in determined column
AREA (begins always 3 "space" before from RESPONSABILE data)
CRITICA (begins always 3 "space" before from AREA data)
CELL (begins always 3 "space" before from CRITICA data)


between a column and the other must be a 3 space (only in RESPONSABILE, AREA, CRITICA, CELL)

input

Code:
VFY APP      RESPONSABILE                             AREA                CRITICA        CELL
VFY WIAX8    name surname 1 new WIAX8                 TEST WIAX8          NO             WIAX81
VFY WIAX8    name surname 2 new WIAX8                 TEST WIAX8          NO             WIAX82

========================================================================
Description : APP WIAX8
======================================================================
***********************************************************************
JOBNAME* *DESCRIPTION JOB         *                *CLASS* *RC**RESTART*
************************************************************************
WIAX8PPR   WIAX8PPR                        WIAX8PPR   0     00   JOB
WIAX8P01   WIAX8P01 DESCRIPTION script     WIAX8P01   0           NO
WIAX8P02   WIAX8P02 DESCRIPTION script     WIAX8P02   0           NO
WIAX8P03   WIAX8P03 DESCRIPTION script     WIAX8P03   0           NO
WIAX8P04   WIAX8P04 DESCRIPTION script     WIAX8P04   0           NO
WIAX8P05   WIAX8P05 DESCRIPTION script     WIAX8P05   0           NO
WIAX8TSX   WIAX8TSX                        WIAX8TSX   0     00   JOB
************************************************************************


output desired

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
VFY APP      RESPONSABILE               AREA         CRITICA   CELL
VFY WIAX8    name surname 1 new WIAX8   TEST WIAX8   NO        WIAX81
VFY WIAX8    name surname 2 new WIAX8   TEST WIAX8   NO        WIAX82

========================================================================
Description : APP WIAX8
======================================================================
***********************************************************************
JOBNAME* *DESCRIPTION JOB         *                *CLASS* *RC**RESTART*
************************************************************************
WIAX8PPR   WIAX8PPR                        WIAX8PPR   0     00   JOB
WIAX8P01   WIAX8P01 DESCRIPTION script     WIAX8P01   0           NO
WIAX8P02   WIAX8P02 DESCRIPTION script     WIAX8P02   0           NO
WIAX8P03   WIAX8P03 DESCRIPTION script     WIAX8P03   0           NO
WIAX8P04   WIAX8P04 DESCRIPTION script     WIAX8P04   0           NO
WIAX8P05   WIAX8P05 DESCRIPTION script     WIAX8P05   0           NO
WIAX8TSX   WIAX8TSX                        WIAX8TSX   0     00   JOB
************************************************************************



I will have to use POS,substr functions right?? any suggestions please??


Thanks in advance
Back to top
View user's profile Send private message

Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed May 27, 2015 6:32 pm    Post subject: Reply to: set column position record?
Reply with quote

Quote:
how to set column position in record??

Use the PARSE statement to break up the existing statement. Then use an assignment statement with concatenation operators.
Code:

line1 = vfy app '   ' ||,
           resp '   ' ||,
           area
Back to top
View user's profile Send private message
italo_pm

New User


Joined: 26 Mar 2015
Posts: 37
Location: Italy

PostPosted: Thu May 28, 2015 4:54 pm    Post subject:
Reply with quote

Hi Pedo, thanks for answer,

but I don't know where to start. how to get not only first record but data too (begin record with VFY)??

some sample to this or suggestions kindly please.

thanks again.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Thu May 28, 2015 8:58 pm    Post subject: Reply to: set column position record?
Reply with quote

Use a TSO ALLOCATE statement then use EXECIO to read the file into a rexx stem. I think there are plenty of examples already posted in this forum. Use the search function.
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 -> CLIST & REXX 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 SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 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 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


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