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
 
Working with hex values in Filemanager batch job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
Emile Straker

New User


Joined: 27 Mar 2013
Posts: 1
Location: United Kingdom

PostPosted: Tue Sep 12, 2017 1:42 am    Post subject: Working with hex values in Filemanager batch job
Reply with quote

Hi,

I'm trying to do a simple find & replace of a field using the following:

Code:

££FILEM DSU INPUT=DD01,       
££FILEM     PROC=*             
IF FLD(269,9) ¬= '         ' &,
   FLD(269,9) ¬= '000000000'
THEN DO               
  OVLY_OUT('123456789',269) 
  RETURN
END
               


As well as spaces and zeros, the field above can contain x'000000000000000000'

I also want to ignore the field if it is all hex zeros.

The manual advised there are additional operators for Binary, Packed Decimal & Zoned Decimal, but I can't get the result I'm after.

Any help would be greatly appreciated.
Back to top
View user's profile Send private message

hankoerlemans

New User


Joined: 25 Jan 2018
Posts: 6
Location: Australia

PostPosted: Mon Jan 29, 2018 2:59 am    Post subject: Reply to: Working with hex values in Filemanager batch job
Reply with quote

2 ways to code that – In both cases hex string is specified with standard REXX ‘hhhh’x notation.

Option 1 - Using contains operator and one function call – note ‘,,’ is required for parameter delimiter and REXX continuation

IF FLDI(269,9,'CO','000000000000000000'X,,
'000000000',,
' ') THEN
OVLY_OUT('123456789',269)

Option 2 – Using FLD() function similar to what they’ve attempted.
IF FLD(269,9) ¬= '000000000000000000'X,
& FLD(269,9) ¬= '0000000000',
& FLD(269,9) ¬= ' ' THEN
OVLY_OUT('123456789',269)

Under FASTREXX which both will run there would be probably no difference in performance.

Response c/- of FM Developer @ HCLTECH
Cheers Hank, HCLTECH
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts z/VM z/VSE Get CPU-time of a COBOL Ba... Andi1982 COBOL Programming 2 Mon Mar 11, 2019 3:36 pm
No new posts DSLIST Command is not working thesumitk TSO/ISPF 14 Mon Dec 10, 2018 8:10 pm
No new posts Using SPUFI with DISTINCT and MAX is ... Time2Live DB2 8 Fri Nov 30, 2018 6:24 am
No new posts calling java code(on mainframe from c... elixir1986 COBOL Programming 1 Fri Nov 30, 2018 1:57 am
No new posts IBM's FTP not working with TLS encryp... sathyajes TSO/ISPF 10 Tue Aug 21, 2018 1:37 pm

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